Skip to content

Commit

Permalink
Links with invalid SpanContext are recorded. (open-telemetry#3928)
Browse files Browse the repository at this point in the history
As Links with invalid SpanContext may contain attributes describing the
operation (specially useful and occurrent for messaging systems), we
still want to collect them. Fixes open-telemetry#2176 (in the issue extensive
discussion about took place and we came, back in the day, with an
initial agreement).

---------

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
  • Loading branch information
carlosalberto and trask authored May 7, 2024
1 parent 1177378 commit 2a990ac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ release.

### Traces

- Links with invalid SpanContext are recorded.
([#3928](https://github.com/open-telemetry/opentelemetry-specification/pull/3928))

### Metrics

- Change the exemplar behavior to be on by default.
Expand Down
5 changes: 3 additions & 2 deletions specification/trace/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -805,8 +805,9 @@ The 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. Implementations MAY ignore links with an
[invalid](#isvalid) `SpanContext`.
appropriate for the language. Implementations SHOULD record links containing
`SpanContext` with empty `TraceId` or `SpanId` (all zeros) as long as either the attribute set
or `TraceState` is non-empty.

The Span interface MAY provide:

Expand Down

0 comments on commit 2a990ac

Please sign in to comment.