Skip to content

Conversation

@adinauer
Copy link
Member

📜 Description

Use NoOpSpanFactory for SentryOptions.empty

💡 Motivation and Context

Otherwise DefaultSpanFactory is used for SentryOptions.empty which is returned, e.g. for NoOpScopes.getOptions(). When calling .startChild inside DefaultSpanFactory on OtelSpanWrapper, recursion is caused and a stack overflow happens.

💚 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

adinauer and others added 30 commits March 27, 2024 16:30
@github-actions
Copy link
Contributor

github-actions bot commented Jun 17, 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 17 - Use `NoOpSpanFactory` for `SentryOptions.empty` ([#3489](https://github.com/getsentry/sentry-java/pull/3489))

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 011cde7

@adinauer adinauer changed the base branch from feat/potel-16-ignore-span-origins to feat/catch-exceptions-on-integration-close June 17, 2024 11:27
@github-actions
Copy link
Contributor

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 392.87 ms 480.78 ms 87.91 ms
Size 1.70 MiB 2.28 MiB 596.86 KiB

Baseline results on branch: feat/potel-16-ignore-span-origins

Startup times

Revision Plain With Sentry Diff
5327033 393.10 ms 486.88 ms 93.78 ms

App size

Revision Plain With Sentry Diff
5327033 1.70 MiB 2.28 MiB 596.00 KiB

Copy link
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/catch-exceptions-on-integration-close to 8.x.x June 24, 2024 05:20
@adinauer adinauer merged commit 9f7e431 into 8.x.x Jun 24, 2024
@adinauer adinauer deleted the feat/potel-17-noop-span-factory-by-default branch June 24, 2024 05:21
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.

3 participants