diff --git a/specification/api-propagators.md b/specification/api-propagators.md index 3a53a9b9628..9862c1120e4 100644 --- a/specification/api-propagators.md +++ b/specification/api-propagators.md @@ -24,6 +24,8 @@ Propagators API consists of two main formats: - `HTTPTextFormat` is used to inject and extract a value as text into carriers that travel in-band across process boundaries. +Deserializing must set `IsRemote` to true on the returned `SpanContext`. + ## Binary Format `BinaryFormat` is a formatter to serialize and deserialize a value into a binary format. diff --git a/specification/api-sampling.md b/specification/api-sampling.md index ba065ee093e..78337c7266e 100644 --- a/specification/api-sampling.md +++ b/specification/api-sampling.md @@ -30,7 +30,7 @@ Returns the sampling Decision for a `Span` to be created. - `SpanContext` of a parent `Span`. Typically extracted from the wire. Can be `null`. - Boolean that indicates that `SpanContext` was extracted from the wire, i.e. - parent `Span` is from the different process. + parent `Span` is from the different process, meaning `IsRemote` is set to true. - `TraceId` of the `Span` to be created. - `SpanId` of the `Span` to be created. - Name of the `Span` to be created. diff --git a/specification/api-tracing.md b/specification/api-tracing.md index 3c1bff4d6fe..2246c3bc240 100644 --- a/specification/api-tracing.md +++ b/specification/api-tracing.md @@ -166,6 +166,9 @@ the same trace. `IsValid` is a boolean flag which returns true if the SpanContext has a non-zero TraceID and a non-zero SpanID. +`IsRemote` is a boolean flag which returns true if the SpanContext was propagated +from a remote parent. + Please review the W3C specification for details on the [Tracestate field](https://www.w3.org/TR/trace-context/#tracestate-field). @@ -229,9 +232,8 @@ spans in the trace. Implementations MUST provide an option to create a `Span` as a root span, and MUST generate a new `TraceId` for each root span created. A `Span` is said to have a _remote parent_ if it is the child of a `Span` -created in another process. Since the `SpanContext` is the only component of a -`Span` that is propagated between processes, a `Span`'s parent SHOULD be a -`SpanContext` if it is remote. Otherwise, it may be a `Span` or `SpanContext`. +created in another process. Each propagators' deserialization must set +`IsRemote` to true so `Span` creation knows if the parent is remote. #### Add Links