-
Notifications
You must be signed in to change notification settings - Fork 552
feat(tracing): Propagate sample_rand to transaction's baggage #4040
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(tracing): Propagate sample_rand to transaction's baggage #4040
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## szokeasaurusrex/sample_rand-2 #4040 +/- ##
=================================================================
+ Coverage 79.56% 79.63% +0.06%
=================================================================
Files 140 140
Lines 15561 15579 +18
Branches 2639 2643 +4
=================================================================
+ Hits 12381 12406 +25
+ Misses 2343 2336 -7
Partials 837 837
|
14a70da
to
0a0de06
Compare
92cd6fb
to
bea45b9
Compare
0a0de06
to
21bb038
Compare
bea45b9
to
6363759
Compare
21bb038
to
836d5b1
Compare
154662a
to
af64b16
Compare
836d5b1
to
cbfc36a
Compare
af64b16
to
01334d7
Compare
cbfc36a
to
6f66ce8
Compare
01334d7
to
7ec8e08
Compare
fec92c5
to
d486a8f
Compare
7ec8e08
to
b400fb1
Compare
382ef64
to
beb943b
Compare
b400fb1
to
cf51e51
Compare
beb943b
to
93f41d6
Compare
cf51e51
to
0db414f
Compare
93f41d6
to
5ffab05
Compare
0db414f
to
620b617
Compare
5ffab05
to
cb8e728
Compare
620b617
to
c8820e2
Compare
c8820e2
to
64b4d84
Compare
cb8e728
to
9863506
Compare
64b4d84
to
6e56143
Compare
@szokeasaurusrex Were there relevant changes to this after Neel's last review? With the force pushes I can't tell. |
Nope, just rebasing on #4038 and updating the tests in response to the changes in that PR |
4add685
to
c60cb71
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.
lgtm
c60cb71
to
2b3f4f7
Compare
11cfacd
to
f77a9ec
Compare
2b3f4f7
to
789b065
Compare
`continue_trace` now propagates incoming `sample_rand` values to the transaction's baggage. Also, in the case where `sample_rand` is missing from the incoming trace and needs to be backfilled, this change introduces a mechanism for the backfilled value from the scope's propagation context to be propagated to the transaction's baggage. The transaction still does not use the `sample_rand` for making sampling decisions; this PR only enables propagation. A future PR will add support for reading the incoming/backfilled `sample_rand` and for using this value to make sampling decisions. Ref #3998
f77a9ec
to
61ae6e7
Compare
Use the `sample_rand` value from an incoming trace to make sampling decisions, rather than generating a random value. When we are the head SDK starting a new trace, save our randomly-generated value as the `sample_rand`, and also change the random generation logic so that the `sample_rand` is computed deterministically based on the `trace_id`. Depends on: - #4040 - #4038 Closes #3998
continue_trace
now propagates incomingsample_rand
values to the transaction's baggage. Also, in the case wheresample_rand
is missing from the incoming trace and needs to be backfilled, this change introduces a mechanism for the backfilled value from the scope's propagation context to be propagated to the transaction's baggage.The transaction still does not use the
sample_rand
for making sampling decisions; this PR only enables propagation. A future PR will add support for reading the incoming/backfilledsample_rand
and for using this value to make sampling decisions.Depends on:
sample_rand
onPropagationContext
#4038Ref #3998
Thank you for contributing to
sentry-python
! Please add tests to validate your changes, and lint your code usingtox -e linters
.Running the test suite on your PR might require maintainer approval. The AWS Lambda tests additionally require a maintainer to add a special label, and they will fail until this label is added.