-
-
Notifications
You must be signed in to change notification settings - Fork 516
Propagated sampling rates #2671
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
base: master
Are you sure you want to change the base?
Conversation
fa9fe50
to
e1b1e74
Compare
e1b1e74
to
e8da627
Compare
e8da627
to
206704f
Compare
f054365
to
c720d30
Compare
c720d30
to
3581ae9
Compare
3581ae9
to
0fdbceb
Compare
2706368
to
763c8ad
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2671 +/- ##
=======================================
Coverage 97.41% 97.42%
=======================================
Files 135 136 +1
Lines 5229 5326 +97
=======================================
+ Hits 5094 5189 +95
- Misses 135 137 +2
🚀 New features to boost your workflow:
|
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.
logic looks perfect, nice work!
if we can avoid deduplication it would be great, but maybe I missed a reason why transaction needs its own logic. We will remove Transaction.from_sentry_trace
completely in the major either way.
@@ -139,6 +154,29 @@ def self.extract_sentry_trace(sentry_trace) | |||
PropagationContext.extract_sentry_trace(sentry_trace) | |||
end | |||
|
|||
def self.extract_sample_rand_from_baggage(baggage, trace_id, parent_sampled) |
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.
can we not define these methods again, but add params to the ones in PropagationContext
and reuse them?
so expose
PropagationContext.extract_sample_rand_from_baggage(baggage)
PropgationContext.generate_sample_rand(baggage, trace_id, parent_sampled)
This ensures that we follow the spec as described here https://develop.sentry.dev/sdk/telemetry/traces/#propagated-random-value