Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support ThreadLocalAccessor for reactor based libraries (WebFlux, WebClient) #2546

Closed
adinauer opened this issue Feb 15, 2023 · 3 comments
Closed
Assignees

Comments

@adinauer
Copy link
Member

Description

Reactor has released a new version: https://github.com/reactor/reactor/releases/tag/2022.0.3

Looks like Spring is already on the version just before that so will likely have this version soon. https://docs.spring.io/spring-boot/docs/current/reference/html/dependency-versions.html

We should try it and see if it improves our WebFlux support, then fix potential problems and document if needed.

Thanks @maciejwalkowiak for telling us about it 🙏

@adinauer
Copy link
Member Author

Version bump has already landed on main and 3.0.x here: spring-projects/spring-boot@486f3b3 . Micrometer dependency has also been bumped to 1.10.4.

2.7.x seems to stay on an older version of reactor. This means we will only add support for ThreadLocalAccessor in our jakarta module(s) which are meant for Spring Boot 3.

@adinauer
Copy link
Member Author

Just opened a bunch of PRs that add support for ThreadLocalAccessor. When this lands Spring Boot may not have released a version yet that includes all dependencies required with the required version.

I used these dependencies for testing:

implementation("io.projectreactor:reactor-core:3.5.3")
implementation("io.projectreactor.netty:reactor-netty:1.1.3")
implementation("io.micrometer:context-propagation:1.0.2")

reactor.core.publisher.Hooks#enableAutomaticContextPropagation() has to be enabled (SentryWebfluxAutoConfiguration should take care of this for you, just be aware it does this. If you don't want this, please let us know).

Here's the PRs:

We still need some internal discussions around some of these changes. Stay tuned

@adinauer adinauer changed the title Evaluate Support for latest reactor release Support ThreadLocalAccessor for reactor based libraries (WebFlux, WebClient) Feb 24, 2023
@adinauer
Copy link
Member Author

Spring Boot 3.0.3 is out now providing the needed version of reactor.

@HazAT HazAT closed this as completed Mar 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants