-
Notifications
You must be signed in to change notification settings - Fork 375
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
feat: delay sampling decision to allow sampling on tags and resource #3956
Conversation
90199e9
to
eac9753
Compare
eac9753
to
9390ccc
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3956 +/- ##
==========================================
- Coverage 97.86% 97.85% -0.01%
==========================================
Files 1313 1313
Lines 78369 78477 +108
Branches 3888 3891 +3
==========================================
+ Hits 76694 76797 +103
- Misses 1675 1680 +5 ☔ View full report in Codecov by Sentry. |
f2ef787
to
2329771
Compare
2329771
to
469a92b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome work, @ZStriker19!
What does this PR do?
This PR enables lazy sampling with the feature being the ability to sample on tags and resource values for root spans. It does this by:
TraceOperation
so that values from the root span will be returned if available, allowing sampling on all tags that will end up attached to the root span.TraceOperation.to_digest
which runs before context propagationTracer.flush
which runs before spans are written to the agent.This PR also fixes wildcard rule sampling when multiple
*
characters are repeated (e.g.***
), which are now considered equivalent to*
, meaning "match all".Motivation:
The ability to sample on tags and resource will be helpful to users trying to reduce costs in a precise way as well as keep those spans that are truly useful to them.
How to test the change?
Added tests for new behaviors and passes system-tests trace_sampling.py