feat(tracing): Add transaction name to tracestate
value
#3937
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds transaction name to the
tracetate
value.Doing this has two known limitations, which, though we've discussed them, I'm adding here for posterity:
Adding this data puts us over the character limit for tracestate values listed in the W3C spec (256 characters). To be fair, depending on the data, we might already be over this limit with the previous addition of
user
. For reference:Given the tracestate data:
tracestate
with without either: 196 characterstracestate
withuser
data: 256 characterstracestate
withtransaction
: 264 characterstracestate
with both: 324 charactersThis data may change and/or get added to the scope after the tracestate value has been calculated, making it impossible to sample based on those attributes. This is especially a problem for transaction name, which in some frameworks isn't set to its final value until the transaction ends. This poses the added problem that the transaction name in its raw, un-finalized form may contain PII, because it is often the raw URL as opposed to the parameterized one (so,
/users/maisey/tricks/
rather than/users/:username/tricks/
). More work needs to be done to investigate whether the final transaction name can be set earlier in any/all of the frameworks where this poses a problem. (For instance, it is a known problem in our Express integration, but not yet clear if it is a problem in any Python frameworks.)