-
-
Notifications
You must be signed in to change notification settings - Fork 446
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
Only send userid in Dynamic Sampling Context if sendDefaultPii is true #2147
Only send userid in Dynamic Sampling Context if sendDefaultPii is true #2147
Conversation
Codecov Report
@@ Coverage Diff @@
## feat/add-sample-rate-to-baggage #2147 +/- ##
==================================================================
Coverage 80.94% 80.94%
- Complexity 3288 3290 +2
==================================================================
Files 233 233
Lines 12041 12044 +3
Branches 1595 1594 -1
==================================================================
+ Hits 9746 9749 +3
Misses 1712 1712
Partials 583 583
Continue to review full report at Codecov.
|
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
@@ -500,6 +501,29 @@ class SentryTracerTest { | |||
} | |||
} | |||
|
|||
@Test | |||
fun `returns trace state without userId if not send pii`() { |
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.
l
: For full conditional coverage you could also add a test if the user is null and isSendDefaultPii = true
, but maybe that's overkill. Up to you.
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.
added returns baggage header without userId if send pii and null user
below
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.
Thanks, LGTM.
…atten user (#2135) * Add sample rate to baggage and trace in envelope header; flatten user * Add changelog * Use _ for baggage keys * Commit tests * Feat/traces sampler into sample rate (#2141) * Commit tests * Add sample rate from traces sampler to DSC * Do not replace null with true/false * Restore sample rate in OutboxSender * Remove fallback for sampling decision from TraceContext * Remove sample rate fallback from TracesSamplingDecision * Test more envelope header trace fields for OutboxSender * CR changes * Fix changelog * Only send userid in Dynamic Sampling Context if sendDefaultPii is true (#2147) * Skip sending userId in DSC if send default pii is off * Add changelog * Add test case
📜 Description
See getsentry/develop#625
💡 Motivation and Context
Replaces #2145 and not only skips
userId
inbaggage
but also in the envelope headertrace
.💚 How did you test it?
📝 Checklist
🔮 Next steps