-
Notifications
You must be signed in to change notification settings - Fork 48
Description
Setting the traceparent header (usually by a client) enables tracing. In some situation tracing needs to be disabled
For performance reasons the disabling is done by a single character replacement (avoiding a parsen and render header cycle) from traceparent to Xraceparent - This is an undocumented oddity from the end users perspctive.
Situations in which traceparent is disabled
- When storing in a stream
- Cross account service export unless tracing is explicitely enabled by the export
- If only “traceparent” header is found (that is, "Nats-Trace-Dest” is not) and the trace should not be sampled. That is, the account has a sampling value (between 0..100) and the server picks a random number, if below the sampling value the message will be traced, otherwise it will not. In that case, the header is “disabled” (with the “X”).
Case 2) Is not a security feature
Case 3) It is natural to expect that the header is removed is mangled
Problem:
Case 1) Is unexpected and counter-intuitive
a) Unexpected - The consumer is the one interested in the tracing data. But it will not know it was traced as traceparent has been mangled.
b) Why is delivery not traced? One would expect to see the message trace end-2-end. Including source/mirror and consumption.
Suggestion:
Do NOT disable tracing when storing in a stream. Continue tracing all the way through to the consumer.