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 Spring's new RestClient with auto configuration #3198

Closed
nandorholozsnyak opened this issue Feb 8, 2024 · 4 comments
Closed

Support Spring's new RestClient with auto configuration #3198

nandorholozsnyak opened this issue Feb 8, 2024 · 4 comments

Comments

@nandorholozsnyak
Copy link
Contributor

Problem Statement

As Spring 6.1 introduced the new RestClient approach for calling HTTP APIs, the Sentry SDK is not yet providing an auto configuration for it to set the SentrySpanClientHttpRequestInterceptor during the creation of a new client with the RestClient.Builder.

Solution Brainstorm

Change a few things:

  • Create a new class named SentrySpanRestClientCustomizer that extends the RestClientCustomizer
  • Update the SentryAutoConfiguration to register the customizer
  • Write the necessary tasks
@github-project-automation github-project-automation bot moved this to Needs Discussion in Mobile & Cross Platform SDK Feb 8, 2024
@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 2 Feb 8, 2024
nandorholozsnyak added a commit to nandorholozsnyak/fork-of-sentry-java that referenced this issue Feb 8, 2024
@markushi
Copy link
Member

Hey @nandorholozsnyak thanks for opening up this issue and contributing a PR: #3199
If you need some help on the PR itself, kindly let us know in the comments.

@nandorholozsnyak
Copy link
Contributor Author

Hey @markushi
I'll try to finalize the PR this week. Everything is looking good.

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 2 Feb 14, 2024
nandorholozsnyak pushed a commit to nandorholozsnyak/fork-of-sentry-java that referenced this issue Mar 4, 2024
- Test when HTTP call fails is fixed with disabling retry mechanism in the Apache Http Client
@nandorholozsnyak
Copy link
Contributor Author

Hey @nandorholozsnyak thanks for opening up this issue and contributing a PR: #3199 If you need some help on the PR itself, kindly let us know in the comments.

Hello there, code seems to be finalized for review. Please check the associated PR. I have a few concerns around the equality check, but I tried to use the same concept as in the RestTemplate one...

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 2 Mar 4, 2024
@getsantry getsantry bot removed the status in GitHub Issues with 👀 2 Mar 7, 2024
adinauer added a commit that referenced this issue Mar 21, 2024
* Support Spring's new RestClient with auto configuration (#3198)

- Spring RestClient support

* Support Spring's new RestClient with auto configuration (#3198)

- Test when HTTP call fails is fixed with disabling retry mechanism in the Apache Http Client

* apply code formatter etc.

* Use separate trace origin; Add to Spring Boot 3 sample

* changelog

---------

Co-authored-by: Nándor Holozsnyák <etta@Toth-MacBook-Air.local>
Co-authored-by: Alexander Dinauer <alexander.dinauer@sentry.io>
Co-authored-by: Alexander Dinauer <adinauer@users.noreply.github.com>
@adinauer
Copy link
Member

Implemented in #3199

@github-project-automation github-project-automation bot moved this from Needs Discussion to Done in Mobile & Cross Platform SDK Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Archived in project
Development

No branches or pull requests

3 participants