Skip to content

Do not validate tracestate #790

@dyladan

Description

@dyladan

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions