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

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

lcian
Copy link
Member

@lcian lcian commented Feb 10, 2025

📜 Description

Refactor ReactorUtils into its own sentry-reactor module

💡 Motivation and Context

Closes #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

  • Do we need to add this module to the Gradle and Maven plugins?
  • Any extra steps required for release of the SDK and/or the plugins?
  • 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?
  • Update the docs if needed

Copy link
Contributor

github-actions bot commented Feb 10, 2025

Fails
🚫 Please consider adding a changelog entry for the next release.

Instructions and example for changelog

Please add an entry to CHANGELOG.md to the "Unreleased" section. Make sure the entry includes this PR's number.

Example:

## Unreleased

- Refactor `ReactorUtils` into its own `sentry-reactor` module ([#4155](https://github.com/getsentry/sentry-java/pull/4155))

If none of the above apply, you can opt out of this check by adding #skip-changelog to the PR description.

Generated by 🚫 dangerJS against 79bcd82

@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 369.81 ms 481.23 ms 111.42 ms
Size 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
4bbe412 423.04 ms 466.40 ms 43.36 ms

App size

Revision Plain With Sentry Diff
4bbe412 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.

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.

Split out ReactorUtils and required classes from Spring integration
2 participants