Skip to content

Commit 9124bd8

Browse files
mweardanielkhan
authored andcommitted
Clarify behavior when receiving a tracestate header without traceparent (#326)
As the processing model was written, it can be interpreted such that a tracing system that receives a tracestate header without an accompanying traceparent header is valid, and that it should append to and propagate that tracestate. This commit clarifies that a tracestate header received without a traceparent header is invalid, and a new tracestate should be created.
1 parent bd253d5 commit 9124bd8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

spec/30-processing-model.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@ If no traceparent header is received:
1212

1313
1. The vendor checks an incoming request for a `traceparent` and a `tracestate` header.
1414
2. If _no_ `traceparent` header is received, the vendor creates a new `trace-id` and `parent-id` that represents the current request.
15-
3. The vendor SHOULD modify the `tracestate` header by adding a new key/value pair.
16-
4. The vendor sets the `traceparent` and `tracestate` header for the outgoing request.
15+
3. If a `tracestate` header is received without an accompanying `traceparent` header, it is invalid and MUST be discarded.
16+
4. The vendor SHOULD create a new `tracestate` header and add a new key/value pair.
17+
5. The vendor sets the `traceparent` and `tracestate` header for the outgoing request.
1718

1819
## A traceparent is Received
1920

0 commit comments

Comments
 (0)