diff --git a/specification/api-tracing.md b/specification/api-tracing.md index 6e6c8c0d258..85e9a4a4812 100644 --- a/specification/api-tracing.md +++ b/specification/api-tracing.md @@ -286,6 +286,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. +The option for creating a span as a root span should allow to choose whether the +ignored parents in `Context` should be captured as links in the new span. If the +links should be captured then the implementation SHOULD add those possible +parents as [`Link`s](#add-links) to the new `Span`. For description of the +ignored-parent link attributes, see [Link +Conventions](data-link-semantic-conventions.md#ignored-parent). The capturing is +off by default. + 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 diff --git a/specification/data-link-semantic-conventions.md b/specification/data-link-semantic-conventions.md new file mode 100644 index 00000000000..6f1cb03d3cf --- /dev/null +++ b/specification/data-link-semantic-conventions.md @@ -0,0 +1,29 @@ +# Link Conventions + +This document is about standard attributes for +[Links](api-tracing.md#add-links). + +## Document conventions + +Attributes are divided into groups, describing certain characteristics of a +link. Attributes in each group start with a specified prefix and a dot. + +Attribute groups in this document have a **Required** column. If a link has at +least one attribute from the group, then it MUST also contain all the required +attributes of the group. + +## Link types + +* [Ignored parent](#ignored-parent) + +### Ignored parent + +**Prefix:** parent + +**Description:** These attributes are used to denote a span context that was +ignored during a span creation as a parent and thus became only linked to the +span. + +| Attribute | Description | Example | Required? | +|---|---|---|---| +| parent.kind | Kind of ignored span context. It MUST be either "local" or "remote". "local" denotes a span context that was a part of a current span at the time of a creation of the link. "remote" denotes a span context that was a part of remote span at the time of a creation of the link. | "local" | Yes | diff --git a/specification/data-semantic-conventions.md b/specification/data-semantic-conventions.md index 48280a63bec..453f4254b7a 100644 --- a/specification/data-semantic-conventions.md +++ b/specification/data-semantic-conventions.md @@ -5,6 +5,7 @@ Span attributes. * [Resource Conventions](data-resource-semantic-conventions.md) * [Span Conventions](#span-conventions) +* [Link Conventions](data-link-semantic-conventions.md) The type of the attribute SHOULD be specified in the semantic convention for that attribute. Array values are allowed for attributes. For