-
Notifications
You must be signed in to change notification settings - Fork 946
Description
Right now we are parsing and validating tracestate on every span regardless of if it is used or not (we currently do not use it for anything except exporting to the collector). This is an unnecessary cost and complexity (parse does a split, reverse, and reduce). Further, we allow arbitrary keys to be overwritten by calling traceState.set despite the fact that we should not be modifying other vendor keys.
Propose that we remove all parsing and validation of tracestate until it is actually modified, and change our default behavior to simply propagate unchanged. Further, set should be changed such that it doesn't parse all values into a map, but simply searches the list for our key/value and splices it out, then sets a new value at the front.
There is currently an open issue on trace context to change the language from MAY to SHOULD NOT validate tracestate w3c/trace-context#384