-
Notifications
You must be signed in to change notification settings - Fork 452
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(datadog): add sampling priority tag in datadog spans #792
Conversation
|
Codecov Report
@@ Coverage Diff @@
## main #792 +/- ##
=======================================
- Coverage 69.7% 69.7% -0.1%
=======================================
Files 110 110
Lines 9061 9072 +11
=======================================
+ Hits 6324 6331 +7
- Misses 2737 2741 +4
Continue to review full report at Codecov.
|
We need to format the code by |
rmp::encode::write_map_len(&mut encoded, 1)?; | ||
// https://github.com/DataDog/dd-trace-js/blob/c89a35f7d27beb4a60165409376e170eacb194c5/packages/dd-trace/src/constants.js#L4 | ||
rmp::encode::write_u32(&mut encoded, interner.intern("_sampling_priority_v1"))?; | ||
rmp::encode::write_f64(&mut encoded, if span.span_context.is_sampled() { 1.0 } else { 0.0 })?; |
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.
Could we define some constant at model/mod.rs
and reuse them across v3 and v5 exporter?
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.
Have one nit and need to format the code but otherwise LGTM. Thanks for the help!
d3de60e
to
3f48047
Compare
amended my commit with the suggestions. attempted to use the EasyCLA but I'm receiving the following |
it worked this time |
…ata dog exported data. data dog uses this to sample.
3f48047
to
2363b27
Compare
@rex-remind101 I think we need to bump the msrv to 1.56 to resolve the CI issues. Could you make the change in https://github.com/open-telemetry/opentelemetry-rust/blob/main/.github/workflows/ci.yml#L71 ? I don't have the write access to the branch. |
@TommyCpp ready! |
@TommyCpp looks like there is still an error actually, could you help provide direction? |
I think the problem is still the MSRV. Confirmed |
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.
Sorry for the delay. LGTM. Thanks!
encode sampling priority into metrics object of data dog exported data. data dog uses this to sample.
solves #791