Skip to content

Conversation

@fractalwrench
Copy link
Member

@fractalwrench fractalwrench commented Jan 15, 2026

Goal

Creates the interface that forms the public Sampler API. Currently there is no way to configure or use these symbols - that will happen in subsequent PRs.

Closes #34

@fractalwrench fractalwrench requested a review from a team as a code owner January 15, 2026 16:39
@codecov
Copy link

codecov bot commented Jan 15, 2026

Codecov Report

❌ Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.60%. Comparing base (5f111d7) to head (edda42e).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...elemetry/kotlin/tracing/sampling/SamplingResult.kt 0.00% 3 Missing ⚠️

❌ Your patch status has failed because the patch coverage (0.00%) is below the target coverage (50.00%). You can increase the patch coverage or adjust the target coverage.
❌ Your project status has failed because the head coverage (90.60%) is below the adjusted base coverage (90.71%). You can increase the head coverage or adjust the Removed Code Behavior.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #51      +/-   ##
==========================================
- Coverage   90.71%   90.60%   -0.12%     
==========================================
  Files         214      215       +1     
  Lines        2295     2298       +3     
  Branches      233      233              
==========================================
  Hits         2082     2082              
- Misses        160      163       +3     
  Partials       53       53              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

@bidetofevil bidetofevil left a comment

Choose a reason for hiding this comment

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

Give how sampling should work on mobile apps without it being fragmented and biased (i.e. not per telemetry instance, but by app instance or install), it feels like this merits a bigger discussion to see if it makes sense to bake that into the API.

Thoughts?

@fractalwrench
Copy link
Member Author

Happy to discuss this.

My first thoughts are that the Sampler API is a stable part of the OpenTelemetry specification and that this project also needs to support backend use-cases, not just mobile. IMO the Sampler API is fairly extensible and it seems possible to write a custom sampler that takes app instance/install ID into account.

Copy link

@bidetofevil bidetofevil left a comment

Choose a reason for hiding this comment

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

LGTM. I guess my main issue is whether the base API is sufficiently expressive and what Sampler implementations ought to be built initially. Both of these could be done after the core API is added.

@fractalwrench fractalwrench merged commit d1dfece into open-telemetry:main Jan 26, 2026
3 of 5 checks passed
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.

Create Sampler interface

2 participants