-
-
Notifications
You must be signed in to change notification settings - Fork 444
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 automatic trace support for Spring WebClient #1621
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! @maciejwalkowiak might have some thoughts as the author of the RestTemplate bits
looks good, I'll let @maciejwalkowiak review though since its backend bits. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
left a comment to fix CI but changes are good LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yhware thanks a lot for this PR! 🤩 Few small things have to be polished to get it merged. Also, make sure to run ./gradlew apiDump
to update files containing public APIs.
sentry-spring/src/main/java/io/sentry/spring/tracing/SentrySpanClientWebRequestFilter.java
Outdated
Show resolved
Hide resolved
sentry-spring/src/main/java/io/sentry/spring/tracing/SentrySpanClientWebRequestFilter.java
Outdated
Show resolved
Hide resolved
...ring-boot-starter/src/test/kotlin/io/sentry/spring/boot/SentrySpanWebClientCustomizerTest.kt
Outdated
Show resolved
Hide resolved
...y-samples-spring-boot/src/main/java/io/sentry/samples/spring/boot/SentryDemoApplication.java
Outdated
Show resolved
Hide resolved
…d accept final params. Also, make api.
Codecov Report
@@ Coverage Diff @@
## main #1621 +/- ##
============================================
- Coverage 75.93% 75.63% -0.31%
- Complexity 2004 2006 +2
============================================
Files 202 204 +2
Lines 6943 6980 +37
Branches 691 692 +1
============================================
+ Hits 5272 5279 +7
- Misses 1335 1365 +30
Partials 336 336
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixes!
📜 Description
When using
WebClient
in Spring, automatically add span and breadcrumb for tracing.There's already support for
RestTemplate
(https://docs.sentry.io/platforms/java/guides/spring-boot/performance/instrumentation/automatic-instrumentation/)💡 Motivation and Context
Resolves: Support for Spring WebClient for creating spans/crumbs #1619
💚 How did you test it?
Ported all tests that were available for RestTemplate integration.
Also ran the sample spring boot application with my personal DSN and verified it worked as intended.
📝 Checklist
🔮 Next steps