The opentelemetry-java implementation of W3C TraceContext is currently validating every tracestate entry (See here). An invalid tracestate entry will cause an IllegalArgumentException, via Utils::checkArgument, which will bubble up to HttpTraceContext::extract, here. That exception causes the entire W3C TraceContext payload to be discarded!
The W3C spec allows for tracestate validation, with this text:
The vendor MAY validate the tracestate header. If the tracestate header cannot be parsed the vendor MAY discard the entire header. Invalid tracestate entries MAY also be discarded.
But I don't believe it intends for vendors to discard traceparent and restart the trace.
In addition, there is an open issue (w3c/trace-context#384) to change that to a SHOULD NOT, rather than a MAY.
I propose that this project remove all validation of tracestate entries.
Or, at the very least, I propose that this project drop only invalid tracestate entries, rather than the entire W3C TraceContext payload.
The opentelemetry-java implementation of W3C TraceContext is currently validating every tracestate entry (See here). An invalid tracestate entry will cause an
IllegalArgumentException, viaUtils::checkArgument, which will bubble up toHttpTraceContext::extract, here. That exception causes the entire W3C TraceContext payload to be discarded!The W3C spec allows for tracestate validation, with this text:
But I don't believe it intends for vendors to discard traceparent and restart the trace.
In addition, there is an open issue (w3c/trace-context#384) to change that to a SHOULD NOT, rather than a MAY.
I propose that this project remove all validation of tracestate entries.
Or, at the very least, I propose that this project drop only invalid tracestate entries, rather than the entire W3C TraceContext payload.