From e7a122969508e81149ffe50b88c3ff117655a586 Mon Sep 17 00:00:00 2001 From: Anuraag Agrawal Date: Tue, 2 Mar 2021 11:33:32 +0900 Subject: [PATCH 1/3] Ignore invalid spancontext in addLink --- specification/trace/api.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/specification/trace/api.md b/specification/trace/api.md index c4e40f81889..b20a0349f20 100644 --- a/specification/trace/api.md +++ b/specification/trace/api.md @@ -405,7 +405,8 @@ The Span creation API MUST provide: 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. + appropriate for the language. If the `SpanContext` is not [valid](#isvalid), the + call SHOULD be ignored. Links SHOULD preserve the order in which they're set. From c7665e19bdf5a754a937964e45090631badd4591 Mon Sep 17 00:00:00 2001 From: Anuraag Agrawal Date: Tue, 2 Mar 2021 11:48:09 +0900 Subject: [PATCH 2/3] SDK not API --- 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 b20a0349f20..b2cd0f3147e 100644 --- a/specification/trace/api.md +++ b/specification/trace/api.md @@ -405,8 +405,8 @@ The Span creation API MUST provide: 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. If the `SpanContext` is not [valid](#isvalid), the - call SHOULD be ignored. + appropriate for the language. Implementations MAY ignore links with an + [invalid](#isvalid) `SpanContext`. Links SHOULD preserve the order in which they're set. From 3db5765202386d73212087caa61fb743f11c074c Mon Sep 17 00:00:00 2001 From: Anuraag Agrawal Date: Wed, 3 Mar 2021 12:35:32 +0900 Subject: [PATCH 3/3] Changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b031a1eac1..888ade35949 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ release. ## Unreleased +- Adds note that implementations can ignore links with invalid SpanContext([#1492](https://github.com/open-telemetry/opentelemetry-specification/pull/1492)) - Adds `none` as a possible value for OTEL_TRACES_EXPORTER and OTEL_METRICS_EXPORTER to disable export ([#1439](https://github.com/open-telemetry/opentelemetry-specification/pull/1439)) - Add [`ForceFlush`](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/sdk.md#forceflush) to SDK's `TracerProvider` ([#1452](https://github.com/open-telemetry/opentelemetry-specification/pull/1452))