From 630af80293cf0f673b5a140676982d8e63b96823 Mon Sep 17 00:00:00 2001 From: Carlos Alberto Cortez Date: Tue, 29 Aug 2023 16:26:31 +0200 Subject: [PATCH 01/20] Add a new AddLink() operation to Span. --- specification/trace/api.md | 75 ++++++++++++++++++++++++-------------- 1 file changed, 48 insertions(+), 27 deletions(-) diff --git a/specification/trace/api.md b/specification/trace/api.md index 5c8285c2dd2..725c7e445ef 100644 --- a/specification/trace/api.md +++ b/specification/trace/api.md @@ -29,12 +29,12 @@ linkTitle: API - [Span](#span) * [Span Creation](#span-creation) + [Determining the Parent Span from a Context](#determining-the-parent-span-from-a-context) - + [Specifying links](#specifying-links) * [Span operations](#span-operations) + [Get Context](#get-context) + [IsRecording](#isrecording) + [Set Attributes](#set-attributes) + [Add Events](#add-events) + + [Add Link](#add-link) + [Set Status](#set-status) + [UpdateName](#updatename) + [End](#end) @@ -42,6 +42,7 @@ linkTitle: API * [Span lifetime](#span-lifetime) * [Wrapping a SpanContext in a Span](#wrapping-a-spancontext-in-a-span) - [SpanKind](#spankind) +- [Link](#link) - [Concurrency](#concurrency) - [Included Propagators](#included-propagators) - [Behavior of the API in the absence of an installed SDK](#behavior-of-the-api-in-the-absence-of-an-installed-sdk) @@ -300,7 +301,7 @@ the entire operation and, optionally, one or more sub-spans for its sub-operatio - A start timestamp - An end timestamp - [`Attributes`](../common/README.md#attribute) -- A list of [`Link`s](#specifying-links) to other `Span`s +- A list of [`Link`s](#link) to other `Span`s - A list of timestamped [`Event`s](#add-events) - A [`Status`](#set-status). @@ -386,7 +387,9 @@ The API MUST accept the following parameters: to calling `SetAttribute` later, as samplers can only consider information already present during span creation. -- `Link`s - an ordered sequence of Links, see API definition [here](#specifying-links). +- `Link`s - an ordered sequence of Links, see [API definition](#link). + `Link`s added at `Span` creation are considered by [Samplers](sdk.md#sampler) + to make a sampling decision - `Start timestamp`, default to current time. This argument SHOULD only be set when span creation time has already passed. If API is called at a moment of a Span logical start, API user MUST NOT explicitly set this argument. @@ -421,30 +424,6 @@ A `SpanContext` cannot be set as active in a `Context` directly, but by [wrapping it into a Span](#wrapping-a-spancontext-in-a-span). For example, a `Propagator` performing context extraction may need this. -#### Specifying links - -During `Span` creation, a user MUST have the ability to record links to other -`Span`s. Linked `Span`s can be from the same or a different trace -- see [Links -between spans](../overview.md#links-between-spans). `Link`s cannot be added after -Span creation. - -A `Link` is structurally defined by the following properties: - -- `SpanContext` of the `Span` to link to. -- Zero or more [`Attributes`](../common/README.md#attribute) further describing - the link. - -The Span creation API MUST provide: - -- An API to record a single `Link` where the `Link` properties are passed as - arguments. This MAY be called `AddLink`. This API takes the `SpanContext` of - the `Span` to link to and optional `Attributes`, either as individual - parameters or as an immutable object encapsulating them, whichever is most - appropriate for the language. Implementations MAY ignore links with an - [invalid](#isvalid) `SpanContext`. - -Links SHOULD preserve the order in which they're set. - ### Span operations With the exception of the function to retrieve the `Span`'s `SpanContext` and @@ -556,6 +535,13 @@ keys"](semantic_conventions/README.md) which have prescribed semantic meanings. Note that [`RecordException`](#record-exception) is a specialized variant of `AddEvent` for recording exception events. +#### Add Link + +A `Span` MUST have the ability to add `Link`s associated with it after its creation - see [Links](#link). + +Observe that `Link`s added after `Span` creation are not considered by [Samplers](sdk.md#sampler) +to make a sampling decision. + #### Set Status Sets the `Status` of the `Span`. If used, this will override the default `Span` @@ -797,6 +783,41 @@ To summarize the interpretation of these kinds: | `CONSUMER` | | yes | maybe | | | `INTERNAL` | | | | | +## Link + +A user MUST have the ability to record links to other `Span`s. +Linked `Span`s can be from the same or a different trace -- see [Links +between spans](../overview.md#links-between-spans). + +A `Link` is structurally defined by the following properties: + +- `SpanContext` of the `Span` to link to. +- Zero or more [`Attributes`](../common/README.md#attribute) further describing + the link. +- `timestamp`, default to current time. This argument SHOULD only be set + when span creation time has already passed. If API is called at a moment of + a Span logical start, API user MUST NOT explicitly set this argument. + +The Span creation API MUST provide: + +- An API to record a single `Link` where the `Link` properties are passed as + arguments. This MAY be called `AddLink`. This API takes the `SpanContext` of + the `Span` to link to and optional `Attributes` and `timestamp`, either as individual + parameters or as an immutable object encapsulating them, whichever is most + appropriate for the language. Implementations MAY ignore links with an + [invalid](#isvalid) `SpanContext`. + +The Span interface MAY provide: + +- An API to add multiple `Link`s at once, where the `Link`s are passed in a + single method call. + +Links SHOULD preserve the order in which they're set. + +Note that [Samplers](sdk.md#sampler) can only consider information already +present during span creation. Any `Link`s added later cannot change their +decisions. + ## Concurrency For languages which support concurrent execution the Tracing APIs provide From d1df1fbf042f87b2f6f002aa424a8cd897a692b5 Mon Sep 17 00:00:00 2001 From: Carlos Alberto Cortez Date: Wed, 30 Aug 2023 08:24:06 -0600 Subject: [PATCH 02/20] Update specification/trace/api.md Co-authored-by: Yuri Shkuro --- specification/trace/api.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/specification/trace/api.md b/specification/trace/api.md index 725c7e445ef..23650eae621 100644 --- a/specification/trace/api.md +++ b/specification/trace/api.md @@ -538,9 +538,7 @@ Note that [`RecordException`](#record-exception) is a specialized variant of #### Add Link A `Span` MUST have the ability to add `Link`s associated with it after its creation - see [Links](#link). - -Observe that `Link`s added after `Span` creation are not considered by [Samplers](sdk.md#sampler) -to make a sampling decision. +`Link`s added after `Span` creation may not be considered by [Samplers](sdk.md#sampler) #### Set Status From c996c5953354aa38c27ebae5263bd77a7795dc78 Mon Sep 17 00:00:00 2001 From: Carlos Alberto Cortez Date: Thu, 31 Aug 2023 16:08:20 +0200 Subject: [PATCH 03/20] Feedback. --- specification/trace/api.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/specification/trace/api.md b/specification/trace/api.md index 23650eae621..53481b62169 100644 --- a/specification/trace/api.md +++ b/specification/trace/api.md @@ -538,7 +538,7 @@ Note that [`RecordException`](#record-exception) is a specialized variant of #### Add Link A `Span` MUST have the ability to add `Link`s associated with it after its creation - see [Links](#link). -`Link`s added after `Span` creation may not be considered by [Samplers](sdk.md#sampler) +`Link`s added after `Span` creation may not be considered by [Samplers](sdk.md#sampler). #### Set Status @@ -810,11 +810,11 @@ The Span interface MAY provide: - An API to add multiple `Link`s at once, where the `Link`s are passed in a single method call. -Links SHOULD preserve the order in which they're set. +Span SHOULD preserve the order in which `Link`s are set. -Note that [Samplers](sdk.md#sampler) can only consider information already -present during span creation. Any `Link`s added later cannot change their -decisions. +Note that [Samplers](sdk.md#sampler) may only consider information already +present during span creation. Any `Link`s added later may not change the sampling +decision. ## Concurrency From b1d9676fe82175417367c5572d9a67e5902ba093 Mon Sep 17 00:00:00 2001 From: Carlos Alberto Cortez Date: Thu, 31 Aug 2023 16:16:05 +0200 Subject: [PATCH 04/20] Add experimental status to AddLink() --- specification/trace/api.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/specification/trace/api.md b/specification/trace/api.md index 53481b62169..44b469ba8e8 100644 --- a/specification/trace/api.md +++ b/specification/trace/api.md @@ -4,7 +4,7 @@ linkTitle: API # Tracing API -**Status**: [Stable, Feature-freeze](../document-status.md) +**Status**: [Stable, Feature-freeze](../document-status.md), except where otherwise specified
Table of Contents @@ -537,6 +537,8 @@ Note that [`RecordException`](#record-exception) is a specialized variant of #### Add Link +**Status**: [Experimental](../document-status.md) + A `Span` MUST have the ability to add `Link`s associated with it after its creation - see [Links](#link). `Link`s added after `Span` creation may not be considered by [Samplers](sdk.md#sampler). From 06e18c296b11e4f65e67c26a4c9b81a25f2bd0b9 Mon Sep 17 00:00:00 2001 From: Carlos Alberto Cortez Date: Thu, 31 Aug 2023 16:28:59 +0200 Subject: [PATCH 05/20] Mention AddEvent() can be used for this. --- specification/trace/api.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/specification/trace/api.md b/specification/trace/api.md index 44b469ba8e8..0491bf295be 100644 --- a/specification/trace/api.md +++ b/specification/trace/api.md @@ -805,7 +805,9 @@ The Span creation API MUST provide: the `Span` to link to and optional `Attributes` and `timestamp`, either as individual parameters or as an immutable object encapsulating them, whichever is most appropriate for the language. Implementations MAY ignore links with an - [invalid](#isvalid) `SpanContext`. + [invalid](#isvalid) `SpanContext`. Alternatively, this functionality MAY be provided + through the `AddEvent` operation instead with the respective addition of the new + parameters, e.g. the `SpanContext` to link to. The Span interface MAY provide: From 992bdf8dcd7ef5f318defe116219e64d86bff8ca Mon Sep 17 00:00:00 2001 From: Carlos Alberto Cortez Date: Thu, 31 Aug 2023 16:31:53 +0200 Subject: [PATCH 06/20] Fix links. --- specification/common/README.md | 2 +- specification/compatibility/opencensus.md | 2 +- specification/compatibility/opentracing.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/specification/common/README.md b/specification/common/README.md index 239bdf2014a..1f17536bb64 100644 --- a/specification/common/README.md +++ b/specification/common/README.md @@ -123,7 +123,7 @@ at this time, as discussed in [data points](../metrics/data-model.md#metric-points), [Spans](../trace/api.md#set-attributes), Span [Events](../trace/api.md#add-events), Span -[Links](../trace/api.md#specifying-links) and +[Links](../trace/api.md#link) and [Log Records](../logs/data-model.md) may contain a collection of attributes. The keys in each such collection are unique, i.e. there MUST NOT exist more than one key-value pair with the same key. The enforcement of uniqueness may be performed diff --git a/specification/compatibility/opencensus.md b/specification/compatibility/opencensus.md index f1e55bac3ce..991d936dea5 100644 --- a/specification/compatibility/opencensus.md +++ b/specification/compatibility/opencensus.md @@ -180,7 +180,7 @@ using the OpenCensus <-> OpenTelemetry bridge. This leads to some issues with OpenCensus APIs that allowed flexible specification of parent spans post-initialization. 2. Links added to spans after the spans are created. This is [not supported in - OpenTelemetry](../trace/api.md#specifying-links), therefore OpenCensus spans + OpenTelemetry](../trace/api.md#link), therefore OpenCensus spans that have links added to them after creation will be mapped to OpenTelemetry spans without the links. 3. OpenTelemetry specifies that samplers are diff --git a/specification/compatibility/opentracing.md b/specification/compatibility/opentracing.md index 1481b0af2b7..321cbca84a8 100644 --- a/specification/compatibility/opentracing.md +++ b/specification/compatibility/opentracing.md @@ -544,7 +544,7 @@ OpenTracing defines two types of references: OpenTelemetry does not define strict equivalent semantics for these references. These reference types must not be confused with the -[Link](../trace/api.md#specifying-links) functionality. This information +[Link](../trace/api.md#link) functionality. This information is however preserved as the `opentracing.ref_type` attribute. ## In process Propagation exceptions From 1a20e93c708671b684fe74cefc8a25a4836e6f95 Mon Sep 17 00:00:00 2001 From: Carlos Alberto Cortez Date: Mon, 18 Sep 2023 20:37:20 +0200 Subject: [PATCH 07/20] Clear old sentence. --- specification/trace/api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/trace/api.md b/specification/trace/api.md index 0491bf295be..612d9492a6c 100644 --- a/specification/trace/api.md +++ b/specification/trace/api.md @@ -798,7 +798,7 @@ A `Link` is structurally defined by the following properties: when span creation time has already passed. If API is called at a moment of a Span logical start, API user MUST NOT explicitly set this argument. -The Span creation API MUST provide: +The API MUST provide: - An API to record a single `Link` where the `Link` properties are passed as arguments. This MAY be called `AddLink`. This API takes the `SpanContext` of From 8e0b9db59ec95215336591d536cbc7933d028f27 Mon Sep 17 00:00:00 2001 From: Carlos Alberto Cortez Date: Mon, 18 Sep 2023 22:20:50 +0200 Subject: [PATCH 08/20] Dot not include timestamp nor event-name for now. --- specification/trace/api.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/specification/trace/api.md b/specification/trace/api.md index 612d9492a6c..8fb09578f0a 100644 --- a/specification/trace/api.md +++ b/specification/trace/api.md @@ -794,20 +794,17 @@ A `Link` is structurally defined by the following properties: - `SpanContext` of the `Span` to link to. - Zero or more [`Attributes`](../common/README.md#attribute) further describing the link. -- `timestamp`, default to current time. This argument SHOULD only be set - when span creation time has already passed. If API is called at a moment of - a Span logical start, API user MUST NOT explicitly set this argument. The API MUST provide: - An API to record a single `Link` where the `Link` properties are passed as arguments. This MAY be called `AddLink`. This API takes the `SpanContext` of - the `Span` to link to and optional `Attributes` and `timestamp`, either as individual + the `Span` to link to and optional `Attributes`, either as individual parameters or as an immutable object encapsulating them, whichever is most appropriate for the language. Implementations MAY ignore links with an [invalid](#isvalid) `SpanContext`. Alternatively, this functionality MAY be provided through the `AddEvent` operation instead with the respective addition of the new - parameters, e.g. the `SpanContext` to link to. + parameters, e.g. the `SpanContext` to link to, and with event name being dropped. The Span interface MAY provide: From 6a71b9dc10505568de169b49d674337831c1cbbb Mon Sep 17 00:00:00 2001 From: Carlos Alberto Cortez Date: Mon, 18 Sep 2023 22:27:14 +0200 Subject: [PATCH 09/20] Clarification. --- specification/trace/api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/trace/api.md b/specification/trace/api.md index 8fb09578f0a..be19fd429b7 100644 --- a/specification/trace/api.md +++ b/specification/trace/api.md @@ -388,7 +388,7 @@ The API MUST accept the following parameters: already present during span creation. - `Link`s - an ordered sequence of Links, see [API definition](#link). - `Link`s added at `Span` creation are considered by [Samplers](sdk.md#sampler) + `Link`s added at `Span` creation may be considered by [Samplers](sdk.md#sampler) to make a sampling decision - `Start timestamp`, default to current time. This argument SHOULD only be set when span creation time has already passed. If API is called at a moment of From 5b3d503d59da152b75a8223effdac78cbcf817a2 Mon Sep 17 00:00:00 2001 From: Carlos Alberto Cortez Date: Thu, 21 Sep 2023 15:03:46 +0200 Subject: [PATCH 10/20] Remove AddEvent() as an option. --- specification/trace/api.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/specification/trace/api.md b/specification/trace/api.md index be19fd429b7..dd724c98424 100644 --- a/specification/trace/api.md +++ b/specification/trace/api.md @@ -802,9 +802,7 @@ The API MUST provide: the `Span` to link to and optional `Attributes`, either as individual parameters or as an immutable object encapsulating them, whichever is most appropriate for the language. Implementations MAY ignore links with an - [invalid](#isvalid) `SpanContext`. Alternatively, this functionality MAY be provided - through the `AddEvent` operation instead with the respective addition of the new - parameters, e.g. the `SpanContext` to link to, and with event name being dropped. + [invalid](#isvalid) `SpanContext`. The Span interface MAY provide: From c73fa5d7b7fa8a173b86b43e997213570fdec39f Mon Sep 17 00:00:00 2001 From: Carlos Alberto Cortez Date: Tue, 3 Oct 2023 15:48:56 +0200 Subject: [PATCH 11/20] Be verbose about links at Span creation. --- specification/trace/api.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/specification/trace/api.md b/specification/trace/api.md index dd724c98424..682e3b4a4ac 100644 --- a/specification/trace/api.md +++ b/specification/trace/api.md @@ -29,6 +29,7 @@ linkTitle: API - [Span](#span) * [Span Creation](#span-creation) + [Determining the Parent Span from a Context](#determining-the-parent-span-from-a-context) + + [Specifying links](#specifying-links) * [Span operations](#span-operations) + [Get Context](#get-context) + [IsRecording](#isrecording) @@ -424,6 +425,11 @@ A `SpanContext` cannot be set as active in a `Context` directly, but by [wrapping it into a Span](#wrapping-a-spancontext-in-a-span). For example, a `Propagator` performing context extraction may need this. +### Specifying links + +During `Span` creation, a user MUST have the ability to record links to other `Span`s. +Linked `Span`s can be from the same or a different trace -- see [links](#link). + ### Span operations With the exception of the function to retrieve the `Span`'s `SpanContext` and From 3cba8e0d39c8ac85ec36e6824c7b12e8057c944e Mon Sep 17 00:00:00 2001 From: Carlos Alberto Cortez Date: Tue, 3 Oct 2023 15:55:14 +0200 Subject: [PATCH 12/20] Update header. --- specification/trace/api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/trace/api.md b/specification/trace/api.md index 682e3b4a4ac..006c304a50f 100644 --- a/specification/trace/api.md +++ b/specification/trace/api.md @@ -425,7 +425,7 @@ A `SpanContext` cannot be set as active in a `Context` directly, but by [wrapping it into a Span](#wrapping-a-spancontext-in-a-span). For example, a `Propagator` performing context extraction may need this. -### Specifying links +#### Specifying links During `Span` creation, a user MUST have the ability to record links to other `Span`s. Linked `Span`s can be from the same or a different trace -- see [links](#link). From c34b5f1c802fa08fcacddd584c22e331801158c7 Mon Sep 17 00:00:00 2001 From: Carlos Alberto Cortez Date: Tue, 3 Oct 2023 15:57:23 +0200 Subject: [PATCH 13/20] Relocate the note about sampling for links added at Span creation. --- specification/trace/api.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/trace/api.md b/specification/trace/api.md index 006c304a50f..27d85686058 100644 --- a/specification/trace/api.md +++ b/specification/trace/api.md @@ -389,8 +389,6 @@ The API MUST accept the following parameters: already present during span creation. - `Link`s - an ordered sequence of Links, see [API definition](#link). - `Link`s added at `Span` creation may be considered by [Samplers](sdk.md#sampler) - to make a sampling decision - `Start timestamp`, default to current time. This argument SHOULD only be set when span creation time has already passed. If API is called at a moment of a Span logical start, API user MUST NOT explicitly set this argument. @@ -429,6 +427,8 @@ For example, a `Propagator` performing context extraction may need this. During `Span` creation, a user MUST have the ability to record links to other `Span`s. Linked `Span`s can be from the same or a different trace -- see [links](#link). +`Link`s added at `Span` creation may be considered by [Samplers](sdk.md#sampler) +to make a sampling decision ### Span operations From 6657270dc7317bfd3cef9939710a6c8d23d2a322 Mon Sep 17 00:00:00 2001 From: Carlos Alberto Cortez Date: Thu, 5 Oct 2023 09:10:26 -0600 Subject: [PATCH 14/20] Update specification/trace/api.md Co-authored-by: Johannes Tax --- specification/trace/api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/trace/api.md b/specification/trace/api.md index 27d85686058..1430f311077 100644 --- a/specification/trace/api.md +++ b/specification/trace/api.md @@ -428,7 +428,7 @@ For example, a `Propagator` performing context extraction may need this. During `Span` creation, a user MUST have the ability to record links to other `Span`s. Linked `Span`s can be from the same or a different trace -- see [links](#link). `Link`s added at `Span` creation may be considered by [Samplers](sdk.md#sampler) -to make a sampling decision +to make a sampling decision. ### Span operations From d9ae3191fa79563f9c74b66e3dd2a5ccaf6bf2f5 Mon Sep 17 00:00:00 2001 From: Carlos Alberto Cortez Date: Fri, 6 Oct 2023 16:49:14 +0200 Subject: [PATCH 15/20] Add spec compliance matrix entry. --- spec-compliance-matrix.md | 1 + 1 file changed, 1 insertion(+) diff --git a/spec-compliance-matrix.md b/spec-compliance-matrix.md index d1bd1c0d148..ebad5c70004 100644 --- a/spec-compliance-matrix.md +++ b/spec-compliance-matrix.md @@ -67,6 +67,7 @@ formats is required. Implementing more than one format is optional. | Unicode support for keys and string values | | + | + | + | + | + | + | + | + | + | + | + | | [Span linking](specification/trace/api.md#specifying-links) | Optional | Go | Java | JS | Python | Ruby | Erlang | PHP | Rust | C++ | .NET | Swift | | Links can be recorded on span creation | | + | + | | + | + | + | + | + | + | + | | +| Links can be recorded after span creation | | | | | | | | | | | | | | Links order is preserved | | + | + | | + | + | + | + | + | + | + | | | [Span events](specification/trace/api.md#add-events) | | | | | | | | | | | | | | AddEvent | | + | + | + | + | + | + | + | + | + | + | + | From 404fa993aaf5aabea55e6d924043914b62db0014 Mon Sep 17 00:00:00 2001 From: Carlos Alberto Cortez Date: Fri, 6 Oct 2023 08:53:37 -0600 Subject: [PATCH 16/20] Update specification/trace/api.md Co-authored-by: Liudmila Molkova --- specification/trace/api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/trace/api.md b/specification/trace/api.md index 1430f311077..112bdde7c65 100644 --- a/specification/trace/api.md +++ b/specification/trace/api.md @@ -792,7 +792,7 @@ To summarize the interpretation of these kinds: ## Link A user MUST have the ability to record links to other `Span`s. -Linked `Span`s can be from the same or a different trace -- see [Links +Linked `SpanContext`s can be from the same or a different trace -- see [Links between spans](../overview.md#links-between-spans). A `Link` is structurally defined by the following properties: From b963f239fe2055a8fe442a5bd90604a79aa75702 Mon Sep 17 00:00:00 2001 From: Carlos Alberto Cortez Date: Fri, 6 Oct 2023 08:53:49 -0600 Subject: [PATCH 17/20] Update specification/trace/api.md Co-authored-by: Liudmila Molkova --- specification/trace/api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/trace/api.md b/specification/trace/api.md index 112bdde7c65..5bb1fc4c0a5 100644 --- a/specification/trace/api.md +++ b/specification/trace/api.md @@ -791,7 +791,7 @@ To summarize the interpretation of these kinds: ## Link -A user MUST have the ability to record links to other `Span`s. +A user MUST have the ability to record links to other `SpanContext`s. Linked `SpanContext`s can be from the same or a different trace -- see [Links between spans](../overview.md#links-between-spans). From 5a89469907495c9b81546518ed41f2684177384d Mon Sep 17 00:00:00 2001 From: Carlos Alberto Cortez Date: Fri, 6 Oct 2023 17:19:25 +0200 Subject: [PATCH 18/20] Update CHANGELOG. --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a3b9b66c78e..f65c2daab99 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,8 @@ release. - `ParentBased` sampler is a decorator (not a composite). ([#3706](https://github.com/open-telemetry/opentelemetry-specification/pull/3706)) +- Add a new AddLink() operation to Span (experimental). + ([#3678](https://github.com/open-telemetry/opentelemetry-specification/pull/3678)) ### Metrics From 44afd4eda984c7c61fbfd4c8f0cbdbb15a506410 Mon Sep 17 00:00:00 2001 From: Carlos Alberto Cortez Date: Fri, 6 Oct 2023 12:57:55 -0600 Subject: [PATCH 19/20] Update specification/trace/api.md Co-authored-by: Joshua MacDonald --- specification/trace/api.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/specification/trace/api.md b/specification/trace/api.md index 86eb1956196..750b7efb172 100644 --- a/specification/trace/api.md +++ b/specification/trace/api.md @@ -817,10 +817,7 @@ The Span interface MAY provide: Span SHOULD preserve the order in which `Link`s are set. -Note that [Samplers](sdk.md#sampler) may only consider information already -present during span creation. Any `Link`s added later may not change the sampling -decision. - +The API documentation MUST state that adding links at span creation is preferred to calling `AddLink` later, for contexts that are available during span creation, because head sampling decisions can only consider information present during span creation. ## Concurrency For languages which support concurrent execution the Tracing APIs provide From 86101dd4dadd1ce28b65fc86e210889b2d4affd5 Mon Sep 17 00:00:00 2001 From: Carlos Alberto Cortez Date: Tue, 10 Oct 2023 20:09:42 +0200 Subject: [PATCH 20/20] Make linter happy again. --- specification/trace/api.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/specification/trace/api.md b/specification/trace/api.md index 750b7efb172..7cc1901ae74 100644 --- a/specification/trace/api.md +++ b/specification/trace/api.md @@ -817,7 +817,10 @@ The Span interface MAY provide: Span SHOULD preserve the order in which `Link`s are set. -The API documentation MUST state that adding links at span creation is preferred to calling `AddLink` later, for contexts that are available during span creation, because head sampling decisions can only consider information present during span creation. +The API documentation MUST state that adding links at span creation is preferred +to calling `AddLink` later, for contexts that are available during span creation, +because head sampling decisions can only consider information present during span creation. + ## Concurrency For languages which support concurrent execution the Tracing APIs provide