-
Notifications
You must be signed in to change notification settings - Fork 851
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
Do not validate tracestate #790
Comments
Co-authored-by: Rauno Viskus <[email protected]>
@dyladan do you think this may be relevant for SDK 2.0? Looks like it would signficantly change behavior. I think the relevant code is still there: opentelemetry-js/packages/opentelemetry-core/src/trace/TraceState.ts Lines 72 to 89 in cd8e77b
|
@dyladan @pichlermarc I'll have a look into this |
Maintainers were discussing this earlier today.
For now we decided to punt on this issue being in "SDK 2.0". The changes proposed here are not breaking, so can be done anytime after 2.0. |
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
The text was updated successfully, but these errors were encountered: