-
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
Add W3C Trace Context propagator #2451
Conversation
# Check if the Priority Sampling decision is to keep or drop the trace. | ||
# Other factors can influence the sampling decision; this method is only | ||
# responsible for interpreting the Sampling Priority decision. | ||
# | ||
# @param priority_sampling [Integer] priority sampling number | ||
# @return [Boolean] true if trace is "kept" by priority sampling | ||
# @return [Boolean] false if trace is "dropped" by priority sampling | ||
def self.sampled?(priority_sampling) | ||
priority_sampling >= Ext::Priority::AUTO_KEEP | ||
end |
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.
I got tired of obscure sampling comparisons all over ddtrace
, like sampling_priority > AUTO_KEEP
or sampling_priority <= AUTO_KEEP
. It's never clear what they mean.
I added this so we can start cleaning up such checks all over ddtrace
now.
Codecov Report
@@ Coverage Diff @@
## master #2451 +/- ##
========================================
Coverage 98.34% 98.34%
========================================
Files 1101 1103 +2
Lines 58977 59338 +361
========================================
+ Hits 58001 58357 +356
- Misses 976 981 +5
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
This PR adds support trace propagation through the the "W3C Trace Context": https://www.w3.org/TR/trace-context/.
This standard is used by OpenTelemetry to propagate traces by default.
This PR adds the propagator class but does not wire it yet, as to make this PR smaller to review.