-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[pkg/ottl]Add trace_state.adjusted_count path to span context #36789
base: main
Are you sure you want to change the base?
Conversation
Sorry about the review notifications folks, I was not expecting a new draft PR to add reviewers 😓 |
Bringing the PR out of draft state after getting confirmation on the approach in this comment. |
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.
Overall this looks okay to me, but I'd like someone more familiar with trace sampling to take a look. @kentquirk would you be willing to review this one?
👋 folks, the conflicts in the PR are trivial and will continue to happen with new version ups. To avoid repetitive task, I plan to fix the conflicts once the PR is approved but let me know if you want to have that fixed before reviewing - I can do that too. |
@kentquirk If you have a minute, could you please review this? |
otTraceState := w3cTraceState.OTelValue() | ||
if otTraceState == nil { | ||
// If otel trace state is missing, default to 1 | ||
return float64(1), nil |
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.
Is this defined by the sampling spec as a default value? If not we should probably error. It feels like accessing the trace state with an unset "key" is an issue.
Description
Introduces
trace_state.adjusted_count
path which calculates adjusted count for an OTTL span.Link to tracking issue
Fixes #36572
Alternative to #36573
Testing
Added unit tests
Documentation