-
-
Notifications
You must be signed in to change notification settings - Fork 427
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/traces sampler into sample rate #2141
Feat/traces sampler into sample rate #2141
Conversation
Maybe it makes sense that you, @brustolin, have a look at this PR on a conceptual level. |
@@ -1521,14 +1525,15 @@ public class io/sentry/SpanContext : io/sentry/JsonSerializable, io/sentry/JsonU | |||
protected field status Lio/sentry/SpanStatus; | |||
protected field tags Ljava/util/Map; | |||
public fun <init> (Lio/sentry/SpanContext;)V |
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.
Regarding breaking changes to constructors here:
Duplicating the constructors would still break when explicitly passing null as the compiler then doesn't know which version to call. So a cast would be needed to fix. That's why we decided to just modify the constructors and risk breaking stuff this way as they are niche constructors which we expect to not be used by many and it's a rather easy fix to pass a new TracesSamplingDecision(true/false) instead of the boolean.
Codecov Report
@@ Coverage Diff @@
## feat/add-sample-rate-to-baggage #2141 +/- ##
==================================================================
Coverage ? 80.94%
Complexity ? 3288
==================================================================
Files ? 233
Lines ? 12041
Branches ? 1595
==================================================================
Hits ? 9746
Misses ? 1712
Partials ? 583 Continue to review full report at Codecov.
|
sentry/src/test/resources/envelope-transaction-with-sample-rate.txt
Outdated
Show resolved
Hide resolved
…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
#skip-changelog
📜 Description
Addon PR for #2135 to also include the result of
tracesSampler
callback in case it was used.💡 Motivation and Context
Requried for Dynamic Sampling
💚 How did you test it?
📝 Checklist
🔮 Next steps