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

POTEL 11 - Move sampling logic into OTel Sampler #3462

Merged
merged 65 commits into from
Jun 18, 2024

Conversation

adinauer
Copy link
Member

@adinauer adinauer commented Jun 6, 2024

📜 Description

OTel offers a Sampler interface which we now implement to copy sampling decisions or sample using Sentry TracesSampler.

💡 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

adinauer and others added 30 commits March 27, 2024 16:30
Copy link
Contributor

github-actions bot commented Jun 6, 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 11 - Move sampling logic into OTel Sampler ([#3462](https://github.com/getsentry/sentry-java/pull/3462))

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 ee540fd

Copy link
Contributor

github-actions bot commented Jun 6, 2024

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 374.94 ms 395.52 ms 20.58 ms
Size 1.70 MiB 2.28 MiB 596.06 KiB

Baseline results on branch: feat/potel-10-cleanup

Startup times

Revision Plain With Sentry Diff
999e623 366.85 ms 431.49 ms 64.64 ms

App size

Revision Plain With Sentry Diff
999e623 1.70 MiB 2.28 MiB 596.07 KiB

@adinauer adinauer changed the title POTel 11 - Move sampling logic into OTel Sampler POTEL 11 - Move sampling logic into OTel Sampler Jun 6, 2024
}
// TODO [POTEL] what do we use as fallback here? could happen if misconfigured (i.e. sampler
// not in place)
final boolean sampled = samplingDecision != null ? samplingDecision.getSampled() : true;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Hmm, should we use otelSpan.getSpanContext().isSampled() as fallback?

Copy link
Member Author

Choose a reason for hiding this comment

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

Hmm not sure

Base automatically changed from feat/potel-10-cleanup to 8.x.x June 18, 2024 05:49
@adinauer adinauer merged commit e50d955 into 8.x.x Jun 18, 2024
1 of 19 checks passed
@adinauer adinauer deleted the feat/potel-11-otel-sampler branch June 18, 2024 05:50
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