From 3893f147edd4c14557d1230290fa534b4a583c14 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Tue, 4 Feb 2020 14:24:26 +0100 Subject: [PATCH] Require tracer to add ignored parents as links --- specification/api-tracing.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/specification/api-tracing.md b/specification/api-tracing.md index 85dd23b36fa..0c3d3e72b2a 100644 --- a/specification/api-tracing.md +++ b/specification/api-tracing.md @@ -288,6 +288,14 @@ a root span, and MUST generate a new `TraceId` for each root span created. For a Span with a parent, the `TraceId` MUST be the same as the parent. Also, the child span MUST inherit all `TraceState` values of its parent by default. +If the implementation chooses to ignore possible parent in `Context` (because an +option to create a root span was used), then the implementation SHOULD add those +possible parents as [`Link`s](#add-links) to the new `Span` with an +[attribute](#set-attributes) denoting whether the ignored parent was a current +`Span` or an extracted `SpanContext`. The attribute MUST have a key +`ignored-parent`, and value `local` and `remote` for ignored current `Span` and +extracted `SpanContext`, respectively. + A `Span` is said to have a _remote parent_ if it is the child of a `Span` created in another process. Each propagators' deserialization must set `IsRemote` to true on a parent `SpanContext` so `Span` creation knows if the