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

POC: More simply set attribute on exemplar spans #5922

Closed

Conversation

samwright
Copy link

@samwright samwright commented Oct 17, 2023

Proof of Concept for a way to support metric exemplars and tail-based sampling at the same time. Hopefully this will spur discussion on how we want to support this use-case.

This is a simpler version of #5915

Relevant issue: open-telemetry/opentelemetry-specification#2922

This makes a few big changes:

  • HistogramExemplarReservoir and RandomFixedSizeExemplarReservoir now collect the first instead of the last exemplar sample they see. This lets us know whether or not a span will be used as an exemplar while it is still current.
  • Suggest otel.exemplar as a potential new attribute that, when set to true means the sample is being used as an exemplar.

This approach allows tail-based samplers to ensure that all traces containing spans with otel.exemplar == true are kept, while the rest can be sampled without accidentally dropping a span used as an exemplar.

@codecov
Copy link

codecov bot commented Oct 17, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Files Coverage Δ
.../internal/exemplar/FixedSizeExemplarReservoir.java 89.28% <100.00%> (ø)
.../internal/exemplar/HistogramExemplarReservoir.java 90.90% <ø> (ø)
...nal/exemplar/RandomFixedSizeExemplarReservoir.java 83.33% <100.00%> (ø)
...y/sdk/metrics/internal/exemplar/ReservoirCell.java 90.00% <92.30%> (-0.48%) ⬇️

... and 3 files with indirect coverage changes

📢 Thoughts on this report? Let us know!.

@jack-berg
Copy link
Member

Closing for same reason as this comment. Feel free to re-open if I've misunderstood something!

@jack-berg jack-berg closed this Jan 18, 2024
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