sentry-java icon indicating copy to clipboard operation
sentry-java copied to clipboard

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

Open nandorholozsnyak opened this issue 1 year ago • 1 comments

  • Spring RestClient support

:scroll: Description

  • New classes are added to auto configure the neccessary interceptors for newly created RestClients
  • Tests are added to test the new functionality.

:bulb: Motivation and Context

  • The RestClient is similar to the RestTemplate but uses different ways of creation and because of that the older auto configurations did not put the required interceptors into these new RestClient instances

:green_heart: How did you test it?

  • With the unit and IT tests

:pencil: Checklist

  • [x] I reviewed the submitted code.
  • [x] I added tests to verify the changes.
  • [x] No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • [ ] I updated the docs if needed.
  • [ ] Review from the native team if needed.
  • [ ] No breaking change or entry added to the changelog.
  • [ ] No breaking change for hybrid SDKs or communicated to hybrid SDKs.

:crystal_ball: Next steps

nandorholozsnyak avatar Feb 08 '24 07:02 nandorholozsnyak

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.

adinauer avatar Feb 08 '24 08:02 adinauer

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.

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.

nandorholozsnyak avatar Mar 04 '24 10:03 nandorholozsnyak

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.

adinauer avatar Mar 05 '24 11:03 adinauer

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.

Thank you so much.

nandorholozsnyak avatar Mar 21 '24 14:03 nandorholozsnyak