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

Add support for async methods in Spring MVC. #1652

Merged
merged 3 commits into from
Aug 19, 2021
Merged

Add support for async methods in Spring MVC. #1652

merged 3 commits into from
Aug 19, 2021

Conversation

maciejwalkowiak
Copy link
Contributor

📜 Description

Add support for async methods in Spring MVC.

💡 Motivation and Context

Using the same technique as for coroutines and Webflux, using a task decorator propagates Hub with Scope to the executing thread in async tasks.

Fixes #1226
Fixes #1107

Sample how it can be used: https://github.com/maciej-scratches/sentry-spring-mvc-async-controller/blob/master/src/main/java/com/example/springasynccontroller/SpringAsyncControllerApplication.java

💚 How did you test it?

Integration tests, sample project.

📝 Checklist

  • I reviewed the submitted code
  • I added tests to verify the changes
  • I updated the docs if needed
  • No breaking changes

🔮 Next steps

Add reference docs.

@codecov-commenter
Copy link

codecov-commenter commented Aug 17, 2021

Codecov Report

Merging #1652 (d0421e0) into main (733f0e0) will increase coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##               main    #1652      +/-   ##
============================================
+ Coverage     75.74%   75.77%   +0.02%     
- Complexity     2016     2019       +3     
============================================
  Files           206      207       +1     
  Lines          7037     7045       +8     
  Branches        699      699              
============================================
+ Hits           5330     5338       +8     
  Misses         1369     1369              
  Partials        338      338              
Impacted Files Coverage Δ
...ain/java/io/sentry/spring/SentryTaskDecorator.java 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 733f0e0...d0421e0. Read the comment docs.

@marandaneto
Copy link
Contributor

@maciejwalkowiak lets document this too :)

@maciejwalkowiak maciejwalkowiak merged commit 9c64c24 into main Aug 19, 2021
@maciejwalkowiak maciejwalkowiak deleted the gh-1226 branch August 19, 2021 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants