Skip to content

POTEL 51 - Cleanup OTel class loading#3848

Merged
adinauer merged 6 commits into8.x.xfrom
feat/otel-classloader-fix
Nov 11, 2024
Merged

POTEL 51 - Cleanup OTel class loading#3848
adinauer merged 6 commits into8.x.xfrom
feat/otel-classloader-fix

Conversation

@adinauer
Copy link
Copy Markdown
Member

@adinauer adinauer commented Nov 5, 2024

📜 Description

💡 Motivation and Context

💚 How did you test it?

📝 Checklist

  • I reviewed the submitted code.
  • 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.
  • 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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Nov 5, 2024

Fails
🚫 Please consider adding a changelog entry for the next release.
Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

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

- POTEL 51 - Cleanup OTel class loading ([#3848](https://github.com/getsentry/sentry-java/pull/3848))

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 eb5d26b

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Nov 6, 2024

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 680.94 ms 791.65 ms 110.71 ms
Size 1.65 MiB 2.31 MiB 672.57 KiB

Previous results on branch: feat/otel-classloader-fix

Startup times

Revision Plain With Sentry Diff
2e7e6fc 392.94 ms 416.18 ms 23.25 ms

App size

Revision Plain With Sentry Diff
2e7e6fc 1.70 MiB 2.36 MiB 670.64 KiB

which causes OtelContextScopesStorage.init to register SentryContextStorage
as a wrapper. The wrapper can only be set until storage has been initialized by OpenTelemetry.
*/
Sentry.getGlobalScope();
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Hmm, should we create a more specific method in the Sentry class to make it clear that this method initalizes the storage?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I think the extracted method plus the comment here should suffice and I'd rather not clutter public API with a noop method.

Copy link
Copy Markdown
Collaborator

@lbloder lbloder left a comment

Choose a reason for hiding this comment

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

LGTM 👍

Base automatically changed from feat/spring-boot-autoconfig-for-otel-no-agent to 8.x.x November 11, 2024 14:53
@adinauer adinauer marked this pull request as ready for review November 11, 2024 15:14
@adinauer adinauer merged commit f6257e3 into 8.x.x Nov 11, 2024
@adinauer adinauer deleted the feat/otel-classloader-fix branch November 11, 2024 15:20
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