File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,6 +24,8 @@ Propagators API consists of two main formats:
2424- ` HTTPTextFormat ` is used to inject and extract a value as text into carriers that travel
2525in-band across process boundaries.
2626
27+ Deserializing must set ` IsRemote ` to true on the returned ` SpanContext ` .
28+
2729## Binary Format
2830
2931` BinaryFormat ` is a formatter to serialize and deserialize a value into a binary format.
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ Returns the sampling Decision for a `Span` to be created.
3030- ` SpanContext ` of a parent ` Span ` . Typically extracted from the wire. Can be
3131 ` null ` .
3232- Boolean that indicates that ` SpanContext ` was extracted from the wire, i.e.
33- parent ` Span ` is from the different process.
33+ parent ` Span ` is from the different process, meaning ` IsRemote ` is set to true .
3434- ` TraceId ` of the ` Span ` to be created.
3535- ` SpanId ` of the ` Span ` to be created.
3636- Name of the ` Span ` to be created.
Original file line number Diff line number Diff line change @@ -166,6 +166,9 @@ the same trace.
166166` IsValid ` is a boolean flag which returns true if the SpanContext has a non-zero
167167TraceID and a non-zero SpanID.
168168
169+ ` IsRemote ` is a boolean flag which returns true if the SpanContext was propagated
170+ from a remote parent.
171+
169172Please review the W3C specification for details on the [ Tracestate
170173field] ( https://www.w3.org/TR/trace-context/#tracestate-field ) .
171174
@@ -229,9 +232,8 @@ spans in the trace. Implementations MUST provide an option to create a `Span` as
229232a root span, and MUST generate a new ` TraceId ` for each root span created.
230233
231234A ` Span ` is said to have a _ remote parent_ if it is the child of a ` Span `
232- created in another process. Since the ` SpanContext ` is the only component of a
233- ` Span ` that is propagated between processes, a ` Span ` 's parent SHOULD be a
234- ` SpanContext ` if it is remote. Otherwise, it may be a ` Span ` or ` SpanContext ` .
235+ created in another process. Each propagators' deserialization must set
236+ ` IsRemote ` to true so ` Span ` creation knows if the parent is remote.
235237
236238#### Add Links
237239
You can’t perform that action at this time.
0 commit comments