Skip to content

Commit

Permalink
Remove restriction that SpanContext must be a final class, specify cr…
Browse files Browse the repository at this point in the history
…eation. (open-telemetry#969)

* Remove restriction that SpanContext must be a final class

* Methods for SpanContext.

* Lint

* No bookmark?

* Root span needs sampling

* Non-root needs sampling too

* API-only

* Update specification/trace/api.md

Co-authored-by: Christian Neumüller <christian+github@neumueller.me>

* Update specification/trace/api.md

Co-authored-by: Christian Neumüller <christian+github@neumueller.me>

* Note

* less is more

* Update specification/trace/api.md

Co-authored-by: Christian Neumüller <christian+github@neumueller.me>

Co-authored-by: Christian Neumüller <christian+github@neumueller.me>
  • Loading branch information
Anuraag Agrawal and Oberon00 authored Sep 26, 2020
1 parent 82a68e5 commit 0d16e36
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion specification/trace/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,6 @@ These functions MUST delegate to the `Tracing Context Utilities`.

A `SpanContext` represents the portion of a `Span` which must be serialized and
propagated along side of a distributed context. `SpanContext`s are immutable.
`SpanContext` MUST be a final (sealed) class.

The OpenTelemetry `SpanContext` representation conforms to the [W3C TraceContext
specification](https://www.w3.org/TR/trace-context/). It contains two
Expand All @@ -192,6 +191,10 @@ of key-value pairs. TraceState allows multiple tracing
systems to participate in the same trace. It is fully described in the [W3C Trace Context
specification](https://www.w3.org/TR/trace-context/#tracestate-header).

The API MUST implement methods to create a `SpanContext`. These methods SHOULD be the only way to
create a `SpanContext`. This functionality MUST be fully implemented in the API, and SHOULD NOT be
overridable.

### Retrieving the TraceId and SpanId

The API MUST allow retrieving the `TraceId` and `SpanId` in the following forms:
Expand Down

0 comments on commit 0d16e36

Please sign in to comment.