Reactive and Imperative Context Propagation in Spring Applications by Dariusz Jędrzejczyk

  Рет қаралды 6,321

SpringDeveloper

SpringDeveloper

Күн бұрын

Applications have relied on contextual data that is outside of core business logic for a long time to provide vital insight into what the application is doing. Traditionally, Java applications built on the ThreadLocal construct to aggregate meta and observability information. With the introduction of asynchrony to the processing, it became easy to lose the precious, contextual data.
After providing the background behind current design and implementation of context support in Project Reactor, we’ll move to practical aspects that Spring application developers face. We’ll introduce a new Context Propagation library under Micrometer, which provides new and essential capabilities for bridging reactive and imperative programming styles. Reactor 3.5 has dedicated support for interacting with these concepts.
Next, we’ll cover how Reactor uses Micrometer 1.10’s Observation feature to provide metrics, tracing, and logging and how library implementers can take advantage of these patterns.

Пікірлер: 11
@Muescha
@Muescha Жыл бұрын
24:00 if you replay the code: you need to add: implementation 'io.micrometer:context-propagation:1.0.2' to the gradle file to get the ContextRegistry
@Muescha
@Muescha Жыл бұрын
34:00 if you replay the code: and the WebFilter is not invoked -> maybe you forget to reload the gradle setup when you comment out the spring boot starter web in the gradle file
@ksoot
@ksoot Жыл бұрын
Thanks for the Demo. It looks good when you are making just one call at a time, but things may fall apart when u make multiple parallel call to API, the their trace id and span id gets mixed up. Need to confirm that
@jeet987
@jeet987 Жыл бұрын
Have you tried playing with this ? Even i suspect there could be mix up or MDC ctx getting lost , which i have seen with my webflux apps
@sfshtirlitz
@sfshtirlitz 11 ай бұрын
What about calling another microservice using webClient and not just reading the file? It would be great to see the same traceId on the other side of webClient call? And that's what would make it "distributed"...
@shubhamkesri6859
@shubhamkesri6859 8 ай бұрын
I am also looking to handle a similar kind of issue, did you find any resources for it ?
@Muescha
@Muescha Жыл бұрын
could you add the link to the example code to the description?
@Muescha
@Muescha Жыл бұрын
i can not post a link into the comments, because then all my comments will be deleted.
@skkchoudhary
@skkchoudhary 11 ай бұрын
Can u plz share your example code or git location
@Piontek.k
@Piontek.k 9 ай бұрын
Wtf are those scratch noises?
@hareepjoshi
@hareepjoshi 11 ай бұрын
this was a complete waste of time.
Spring Tips: The Reactor Context
45:36
SpringDeveloper
Рет қаралды 13 М.
Correlated Logs in Spring Apps with Reactive Parts
22:55
SpringDeveloper
Рет қаралды 1,9 М.
Bike Vs Tricycle Fast Challenge
00:43
Russo
Рет қаралды 112 МЛН
ДЕНЬ УЧИТЕЛЯ В ШКОЛЕ
01:00
SIDELNIKOVVV
Рет қаралды 3,8 МЛН
Avoiding Reactor Meltdown
58:22
SpringDeveloper
Рет қаралды 22 М.
From Imperative To Reactive Web Apps
1:12:32
SpringDeveloper
Рет қаралды 14 М.
Do’s and Don’ts: Avoiding First-Time Reactive Programmer Mines
58:38
Guide to "Reactive" for Spring MVC Developers
1:04:27
SpringDeveloper
Рет қаралды 62 М.
Demystifying Spring Internals
28:44
SpringDeveloper
Рет қаралды 18 М.
Spring Tips: Multitenant JDBC
38:38
SpringDeveloper
Рет қаралды 32 М.
Bike Vs Tricycle Fast Challenge
00:43
Russo
Рет қаралды 112 МЛН