-
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
Add new tail sampling processor policy: status_code #3754
Conversation
We won't be able to merge this PR and #3750 at the same time because of merge conflicts, but I can resolve any conflicts in whatever PR we merge second. |
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 haven't been able to write proper tests because I can't figure out how to set the status code on spans manually. All the pdata data structures are closed off: fields are private and there is not setter for status code
Doesn't this one here work?
🤯 yeah that works as you'd expect, not sure how I missed it 😅 |
Move repeated boiler plate logic related to iterating through traces into a common set of functions.
Rebased on top of #3787 |
I'm going to pull this comment out of the review so it's easier to continue the discussion:
I'm not sure, I can't find anything that would say so. According to the spec the status is a separate field on a span (opentelemetry-specification/specification/trace/api.md#span). I've been digging through the various resource attribtues, but haven't found anything related to the span status or status code. (opentelemetry-specification/specification/resource/semantic_conventions/README.md) |
This PR was marked stale due to lack of activity. It will be closed in 7 days. |
Friendly bump, this PR is still active I'm just waiting for a review 🙂 |
@kvrhdn can you fix the merge conflict? @jpkrohling can you have another look? |
# Conflicts: # CHANGELOG.md
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.
Looks good, the changelog needs to be changed though.
@@ -4,7 +4,9 @@ | |||
|
|||
## 💡 Enhancements 💡 | |||
|
|||
- `tailsampling` processor: Add new policy `latency` (#3750) | |||
- `tailsampling` processor: | |||
- Add new policy `latency` (#3750) |
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 guess the latency made it to 0.29.0, no?
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.
Actually... 0.29.0 hasn't been released for contrib yet. I heard yesterday that the release train has departed already, though (#3863).
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 it still possible to get this PR in 0.29 or is the release already cut?
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 not sure how to avoid a merge conflict with the release PR, should I wait until #3863 is merged to rebase and update the changelog?
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 think @bogdandrutu mentioned yesterday that they were having build problems, blocking the release. I don't expect any new features to be included for 0.29.0. Wait for the release, then rebase and update the changelog.
Co-authored-by: Juraci Paixão Kröhling <juraci.github@kroehling.de>
Description:
This adds a new policy to the tail sampling processor sampling traces based upon the status code of a span. Adding this policy allows you to sample all traces of which the status code matches a given status code.
Link to tracking Issue:Testing:
Added unit tests similar to the other policies.
pdata
data structures are closed off: fields are private and there is not setter for status code 🤷🏻 If there is a mechanism to still set it, please let me know and I'll update the tests!Documentation:
I have updated the README.