From fab45bcae3647978c82e175b766e4bd6858fa755 Mon Sep 17 00:00:00 2001 From: Matthew Wear Date: Wed, 24 Jul 2019 15:47:02 -0700 Subject: [PATCH] Clarify behavior when receiving a tracestate header without traceparent 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. --- spec/30-processing-model.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/spec/30-processing-model.md b/spec/30-processing-model.md index f2317c97..d9a0d554 100644 --- a/spec/30-processing-model.md +++ b/spec/30-processing-model.md @@ -12,8 +12,9 @@ If no traceparent header is received: 1. The vendor checks an incoming request for a `traceparent` and a `tracestate` header. 2. If _no_ `traceparent` header is received, the vendor creates a new `trace-id` and `parent-id` that represents the current request. -3. The vendor SHOULD modify the `tracestate` header by adding a new key/value pair. -4. The vendor sets the `traceparent` and `tracestate` header for the outgoing request. +3. If a `tracestate` header is received without an accompanying `traceparent` header, it is invalid and MUST be discarded. +4. The vendor SHOULD create a new `tracestate` header and add a new key/value pair. +5. The vendor sets the `traceparent` and `tracestate` header for the outgoing request. ## A traceparent is Received