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

Refactor ReactorUtils into its own sentry-reactor module #4155

Merged
merged 14 commits into from
Feb 17, 2025

Conversation

lcian
Copy link
Member

@lcian lcian commented Feb 10, 2025

📜 Description

Refactor ReactorUtils into its own sentry-reactor module

💡 Motivation and Context

Part of #3144

💚 How did you test it?

Unit tests and manual tests with the webflux samples.

📝 Checklist

  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard 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.

🔮 Next steps

Pending actions:

  • merge release registry PR
  • release
  • .craft.yml
  • merge docs PR
  • add main README entry

Comments

  • Do we need to add this module to the Gradle and Maven plugins?
    No, it will still be included in the Spring and Spring Boot integrations, just as a different module.
  • Any extra steps required for release of the SDK and/or the plugins?
    We need to add an entry to the sentry-release-registry and then update .craft.yml (post-release)
  • Do we need a major for this? Should we keep the old classes and mark them as deprecated instead, so that we can remove the old ones and swap to these on the next major?
    We will add a deprecation warning and make the old classes extend the new ones, so we don't break existing customers.
  • Update the docs if needed

@lcian
Copy link
Member Author

lcian commented Feb 10, 2025

The commented out tests in SentryReactorUtilsTest are currently failing and I don't understand why.
The setup we do in the setup function should be sufficient to enable context propagation and use our SentryReactorThreadLocalAccessor.

Edit: I was not initializing the SDK :) Also the ThreadLocalAccessor can be set up with SPI instead.

@lcian lcian requested a review from adinauer February 10, 2025 10:22
Copy link
Contributor

github-actions bot commented Feb 10, 2025

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 427.45 ms 449.10 ms 21.65 ms
Size 1.58 MiB 2.21 MiB 641.11 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
c2c78de 415.28 ms 505.08 ms 89.80 ms

App size

Revision Plain With Sentry Diff
c2c78de 1.58 MiB 2.21 MiB 640.27 KiB

Previous results on branch: lcian/ref/reactor-as-module

Startup times

Revision Plain With Sentry Diff
7276711 444.02 ms 475.80 ms 31.78 ms
67c204c 397.52 ms 481.22 ms 83.70 ms
c320936 369.81 ms 481.23 ms 111.42 ms
74b0da5 380.19 ms 454.58 ms 74.40 ms
4bbe412 423.04 ms 466.40 ms 43.36 ms
10216d9 482.39 ms 514.26 ms 31.87 ms
3dd4220 373.60 ms 468.00 ms 94.40 ms

App size

Revision Plain With Sentry Diff
7276711 1.58 MiB 2.21 MiB 640.27 KiB
67c204c 1.58 MiB 2.21 MiB 640.25 KiB
c320936 1.58 MiB 2.21 MiB 640.27 KiB
74b0da5 1.58 MiB 2.21 MiB 640.27 KiB
4bbe412 1.58 MiB 2.21 MiB 640.27 KiB
10216d9 1.58 MiB 2.21 MiB 640.25 KiB
3dd4220 1.58 MiB 2.21 MiB 640.27 KiB

Copy link
Member

@adinauer adinauer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not fully done with reviewing the PR, so I'm just sending the comments I have already.
Also I opened a PR to fix some things: #4160

@adinauer
Copy link
Member

Other things that might be missing from this PR:

  • .craft.yml (we can only do this once the sentry-release-registry entry exists and we released this once)
  • bug_report_java.yml should allow selecting the module for bug reports
  • a README in the new module would be great
  • root README has a list of modules where we should add this
    • there's also some missing there, we should add those as well, e.g. sentry-opentelemetry-agentless and sentry-opentelemetry-agent-spring

We need manually add this new module to sentry-release-registry after releasing this new module but we can already prepare the PR there beforehand.

Docs would also be great.

@lcian lcian marked this pull request as ready for review February 11, 2025 21:51
@lcian lcian requested a review from adinauer February 11, 2025 21:52
Copy link
Member

@adinauer adinauer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

We shouldn't forget to update release registry, then update .craft.yml here.
Also would be great to have an entry in the root README listing this new module.

@lcian
Copy link
Member Author

lcian commented Feb 17, 2025

Thanks @adinauer . I'll add this to the README after it's released, otherwise we'll have broken links. I'll add this to the issue for v8.3.0 so we don't forget about the missing tasks.

@lcian lcian merged commit 46cb541 into main Feb 17, 2025
35 checks passed
@lcian lcian deleted the lcian/ref/reactor-as-module branch February 17, 2025 11:26
@lcian lcian mentioned this pull request Feb 24, 2025
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants