w3c/trace-context

Add more normative text for flags processing in traceresponse

kalyanaj opened this issue · 0 comments

@basti1302 had suggestions in #533 for normative language related to flags in traceresponse, filing this issue to track it:

From @basti1302 :

I was thinking about some explicit normative language like the following:

  • A participant that starts or restarts the trace by generating a new trace-id MUST apply the rules for (re)starting a trace stated in the section on the random trace ID for traceparent for the flag value in the traceresponse header as well.

  • A participant that uses the same trace-id in traceresponse as it received in the incoming traceparent header MUST also set the random-trace-id flag to the same value that was found in that traceparent header.

  • If a participant did not receive an incoming traceparent header, but it received a traceresponse header from downstream, and it wants to communicate the trace-id from that traceresponse header upstream, it MUST use the same random-trace-id flag value as in that traceresponse header.

Side note: The last bullet point refers to the non-normative example in the section "Load Balancer Deferred Sampling".