feat(tracing): Add types for traces_sampler implementation#864
Conversation
1f0419e to
ccb335c
Compare
|
|
||
| class Transaction(Span): | ||
| __slots__ = ("name",) | ||
| __slots__ = ("name", "parent_sampled") |
There was a problem hiding this comment.
Why do we need to store this value in every transaction?
There was a problem hiding this comment.
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.
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.