-
-
Notifications
You must be signed in to change notification settings - Fork 441
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 Spring's new RestClient with auto configuration (#3198) #3199
Support Spring's new RestClient with auto configuration (#3198) #3199
Conversation
- Spring RestClient support
...-jakarta/src/test/kotlin/io/sentry/spring/boot/jakarta/SentrySpanRestClientCustomizerTest.kt
Show resolved
Hide resolved
|
||
@Override | ||
public void customize(final @NotNull RestClient.Builder restClientBuilder) { | ||
restClientBuilder.requestInterceptors(clientHttpRequestInterceptors -> { |
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.
This is a tricky one, I saw the same concept in the SentrySpanRestTemplateCustomizer
but I'm not sure if the contains can catch that a SentrySpanClientHttpRequestInterceptor
is already registered or not, as it is being instantiated in the constructor, so different instances can be registered easily. We might need a proper equals in the SentrySpanClientHttpRequestInterceptor
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.
So far I'm not aware of any reported problems about this in SentrySpanRestTemplateCustomizer
so I'd say we can do the same thing here and improve it if problems come up.
Thanks for the PR @nandorholozsnyak, we'll take a look but it might take a while as I'm feeling a bit under the weather. |
- Test when HTTP call fails is fixed with disabling retry mechanism in the Apache Http Client
Hello there, Sorry for the late reply, but I could only solve the failing test today. Now I would like to ask for a review from you guys. I'll try to sync with master. |
Hey @nandorholozsnyak thanks for the PR. We'll try to take a look soonish but we're in the middle of something right now, so might take a bit - sorry. |
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 again for the PR and also your patience. I've added a changelog, added RestClient to our sample and tweaked the reported trace origin.
I've opened a PR for docs: getsentry/sentry-docs#9531 which we should merge after this PR has been released.
|
||
@Override | ||
public void customize(final @NotNull RestClient.Builder restClientBuilder) { | ||
restClientBuilder.requestInterceptors(clientHttpRequestInterceptors -> { |
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.
So far I'm not aware of any reported problems about this in SentrySpanRestTemplateCustomizer
so I'd say we can do the same thing here and improve it if problems come up.
Thank you so much. |
📜 Description
💡 Motivation and Context
💚 How did you test it?
📝 Checklist
sendDefaultPII
is enabled.🔮 Next steps