-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[processor/tailsampling] record sampling policy #36312
base: main
Are you sure you want to change the base?
Conversation
0fff4e1
to
2ce41df
Compare
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
Hey @djaglowski, sorry to bother you but do you think you'd be able to take a look at this some time soon? |
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 still prefer to set the policy at the root span, but I acknowledge that the root span might not be easy to find given the current structure we have. I think we can go with this first implementation and see what real-world effects it has on people.
2ce41df
to
08c761c
Compare
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 like this change, it goes in the right direction, but it's missing unit tests for the newly introduced function, a changelog entry, and something in the README telling people how to use this.
Thanks for your feedback @jpkrohling, I'll work on resolving these comments over the next couple of days 👍 |
d6ceb1a
to
966c3db
Compare
@jpkrohling thanks for the review, I've pushed fixes for all your comments. I think I missed Unsure why the pipeline is failing, seems unrelated to anything I touched (command missing error). |
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'm OK merging as is, the comments are nits.
processor/tailsamplingprocessor/internal/sampling/composite_test.go
Outdated
Show resolved
Hide resolved
processor/tailsamplingprocessor/internal/sampling/composite_test.go
Outdated
Show resolved
Hide resolved
The code owners check seems to be failing for all jobs at the moment. |
07966b6
to
37b15b3
Compare
@jpkrohling thanks for the review, I've pushed fixes for your comments |
Linting seems to be failing:
You can run |
…olicy) associated with an inclusive tail processor sampling decision. Resolves !35180. - This functionality lives behind a feature flag that is disabled by default - The original issue described a solution where we might attach the attribute solely to the root span. I'm not sure I agree with the commenter that we can rely on this (e.g. we might decide to sample halfway through a long-running trace) so I have attached the attributes to all present scope spans. This feels like a decent trade off between complexity + network cost, as finding the highest non-root parent would require multiple passes of the spans and keeping all span ids in a set - Added automated tests to verify enabling the flag both records the expected decision while not impacting existing logic - Built a custom version and ran it in our preprod environment to ensure it was stable over a 1h period (still evaluating, will update PR with any further observations) Does this require a CHANGELOG entry?
- Added README entry for the feature flag - Added missing mutex lock around reading trace data in `SetAttrOnScopeSpans` - Added tests + benchmarks for `SetAttrOnScopeSpans`
…olicy) associated with an inclusive tail processor sampling decision. Resolves !35180. - This functionality lives behind a feature flag that is disabled by default - The original issue described a solution where we might attach the attribute solely to the root span. I'm not sure I agree with the commenter that we can rely on this (e.g. we might decide to sample halfway through a long-running trace) so I have attached the attributes to all present scope spans. This feels like a decent trade off between complexity + network cost, as finding the highest non-root parent would require multiple passes of the spans and keeping all span ids in a set - Added automated tests to verify enabling the flag both records the expected decision while not impacting existing logic - Built a custom version and ran it in our preprod environment to ensure it was stable over a 1h period (still evaluating, will update PR with any further observations) Does this require a CHANGELOG entry?
171deff
to
0584b17
Compare
@jpkrohling apologies, re-ran |
Thanks again @jpkrohling for reviewing this change but I think I need to bother you one last time: I can see you've approved but I'm not authorized to merge. Is that something you could do? |
Hey @jpkrohling! Just a friendly ping- if you've got time before Christmas and you're able to help merge this it would be appreciated. Otherwise I can follow up in the new year. |
Description
Adds support for optionally recording the policy (and any composite policy) associated with an inclusive tail processor sampling decision:
Link to tracking issue
Fixes
Resolves #35180.
Implementation notes
Testing
TODO
Does this require a CHANGELOG entry?