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

Feature request: support for Spring WebFlux and Spring Boot 3.x #305

Closed
matsev opened this issue Jul 5, 2023 · 6 comments
Closed

Feature request: support for Spring WebFlux and Spring Boot 3.x #305

matsev opened this issue Jul 5, 2023 · 6 comments
Assignees

Comments

@matsev
Copy link

matsev commented Jul 5, 2023

Please add support for facilitating bootstrapping of Rollbar using Spring Webflux and Spring Boot 3.x.

According to the Rollbar changelog, support for Spring 6.x and Spring Boot 3.x was added as part of version 1.10.0. Additionally, rollbar-reactive-streams and rollbar-reactive-streams-reactor was released as part of version 1.9.0. However, it seems there is currently no support for the union Spring WebFlux and Spring Boot 3.x?

One observation is that the RollbarServletContextInitializer provided by the rollbar-spring-boot3-webmvc library adds a RollbarRequestListener to the ServletContext. This needs to be ported as there is no servlet context in the reactive world.

Another observation is that Rollbar rollbar-reactive-streams has its own AsyncHttpClient interface with two different implementations. In contrast, the WebFlux WebClient can be backed by several different http clients. Ideally, Rollbar would pick any WebClient bean available in the application context or delegate to Spring for creation of a new one.

@ghost
Copy link

ghost commented Jul 10, 2023

Hey @matsev, Thanks for reporting this request. I'll pick it up and get back to you with our findings.

@ghost
Copy link

ghost commented Jul 17, 2023

@matsev What's the minimum version of Java and Spring you want to work with?

@ghost ghost assigned ghost and csaba-ilonka-rollbar and unassigned ghost Jul 17, 2023
@matsev
Copy link
Author

matsev commented Jul 18, 2023

The project that I am currently working on is based on Java 17 and Spring Boot 3.1.1. Going forward, this project aims to upgrade with Java LTS versions when they become available in addition to upgrading Spring Boot releases when they become available.

Spring Boot 3.x is based on Spring Framework 6.x and it's wiki page has a list of supported JDK versions:

  • Spring Framework 6.1.x: JDK 17-23
  • Spring Framework 6.0.x: JDK 17-21

The Spring Framework 6 release includes several breaking changes compared to the 5.x release. Copied from What's New in Version 6.0:

  • JDK 17+ and Jakarta EE 9+ Baseline
  • Entire framework codebase based on Java 17 source code level now.
  • Migration from javax to jakarta namespace for Servlet, JPA, etc.
  • Runtime compatibility with Jakarta EE 9 as well as Jakarta EE 10 APIs.
  • Compatible with latest web servers: Tomcat 10.1Jetty 11Undertow 2.3.
  • Early compatibility with virtual threads (in preview as of JDK 19).

Additionally, Spring Boot 3 also has upgraded many other third party dependencies as mentioned in the release notes. For specific details about currently used versions, please refer to the spring-boot-dependencies pom file.

@ghost
Copy link

ghost commented Jul 24, 2023

@matsev Thanks for sharing. I'll bring this back to the devs.

@ghost
Copy link

ghost commented Aug 17, 2023

@matsev, I wanted to provide you with an update regarding your feature request. We've conducted an in-depth investigation into potential integration methods for reactive WebFlux applications. This area presents a notably intricate challenge compared to standard applications, where errors follow a more organized path. Reactive apps often traverse various execution threads, resulting in limited available information for effective handling.

After careful consideration, we recommend utilizing the rollbar-reactive-streams-reactor alongside Spring WebFlux and Spring Boot 3.x. This combination aligns well with your use case and supports reactive error tracking. While this solution employs AsyncHttpClient, it still ensures efficient error tracking within the reactive context. Let us know if you have trouble with the setup. We're more than happy to help you out.

Our team extensively examined the popularity of this approach and assessed the level of effort required for comprehensive development. However, due to the relatively low demand for this solution and the inherent complexity of the development process, we regret that we won't be able to prioritize this work in our immediate roadmap.

Nevertheless, I've added your request to our idea board to keep it on our radar for potential future considerations.

Thank you for your understanding and continued support.

@ghost ghost closed this as not planned Won't fix, can't repro, duplicate, stale Aug 17, 2023
@matsev
Copy link
Author

matsev commented Aug 18, 2023

@rollbar-bborsits thanks for your feedback. Based on your reply, I created a follow up ticket in which I suggest that you revisit the documentation of the rollbar-reactive-streams-reactor library, please see #307 for details.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants