-
Notifications
You must be signed in to change notification settings - Fork 580
feat(tracing): Add types for traces_sampler implementation
#864
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
Conversation
1f0419e to
ccb335c
Compare
|
|
||
| class Transaction(Span): | ||
| __slots__ = ("name",) | ||
| __slots__ = ("name", "parent_sampled") |
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.
Why do we need to store this value in every transaction?
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.
Because there's no other way (that I can see) to get it to the traces_sampler. The only link between from_traceparent and start_transaction is the Transaction object itself.
It's true that once it's been used, I could delete it off of the transaction object, but is that necessary/worth it?
3ab81a0 to
832593c
Compare
untitaker
left a 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.
I have zero context on this PR, I don't know how to review this
832593c to
3d0f8e7
Compare
Yeah, sorry - Rodolfo just went through helping me with the JS version of this, so I probably didn't explain as much as I should have in the PR description since he was originally going to be the one reviewing. I've added more context above. |
3d0f8e7 to
6ccab61
Compare
This adds (but doesn't yet use) the types and attributes necessary for adding the
traces_sampleroption which is specced here. Extracted from the larger PR on that topic, #863.traces_sampleritself (the function and its input)Transactionclass tracking the parent sampling decision separately from the sampling decision of the transaction itself, since part of thetraces_samplerspec is that there needs to be a difference between an inherited decision and an explicitly set decision.