No video

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

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

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.

Пікірлер: 12
@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
@sfshtirlitz
@sfshtirlitz 9 ай бұрын
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 6 ай бұрын
I am also looking to handle a similar kind of issue, did you find any resources for it ?
@rohanmiskin6955
@rohanmiskin6955 4 ай бұрын
can you please share the github link for the above code
@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 11 ай бұрын
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
@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 9 ай бұрын
Can u plz share your example code or git location
@Piontek.k
@Piontek.k 7 ай бұрын
Wtf are those scratch noises?
@hareepjoshi
@hareepjoshi 9 ай бұрын
this was a complete waste of time.
Spring Tips: Spring Modulith
37:39
SpringDeveloper
Рет қаралды 21 М.
Spring Tips: Useful Annotation Processors
25:51
SpringDeveloper
Рет қаралды 9 М.
UNO!
00:18
БРУНО
Рет қаралды 4,1 МЛН
Spring Tips: Proxies
27:18
SpringDeveloper
Рет қаралды 11 М.
Spring Office Hours: S3E25 - Zero to Spring Boot
1:08:27
SpringDeveloper
Рет қаралды 2,8 М.
Spring Tips: Data Oriented Programming in Java 21+
18:50
SpringDeveloper
Рет қаралды 11 М.
Spring Tips: Go Further and Faster with Spring Boot 3.3 (Updated)
36:57
Spring Tips: HTMX
21:09
SpringDeveloper
Рет қаралды 9 М.
Spring Tips: Spring Security method security with special guest Rob Winch
35:40
Spring Office Hours: S3E27 - Getting Started with Ollama in Spring
1:06:54
SpringDeveloper
Рет қаралды 1,6 М.
Spring Tips: Software Bills of Material in Spring Boot 3.3
8:05
SpringDeveloper
Рет қаралды 4,2 М.