Skip to content

Commit

Permalink
Update Sampler.ShouldSample parent parameter to be Context (#881)
Browse files Browse the repository at this point in the history
* Change Sampler.ShouldSample to get full parent Context.

* Link to Context.

* SpanContext is never stored in Context anymore

* Add CHANGELOG.

* Wording.

* Add compliance matrix entry.

Co-authored-by: Armin Ruech <[email protected]>
  • Loading branch information
Oberon00 and arminru authored Oct 20, 2020
1 parent 12e3a4a commit cbc8936
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ Updates:
([#984](https:/open-telemetry/opentelemetry-specification/pull/984)
- Metrics SDK: Specify TBD default aggregation for ValueRecorder
([#984](https:/open-telemetry/opentelemetry-specification/pull/984)
- Trace SDK: Sampler.ShouldSample gets parent Context instead of SpanContext
([#881](https:/open-telemetry/opentelemetry-specification/pull/881))
- SDK: Specify known values, as well as basic error handling for OTEL_PROPAGATORS.
([#962](https:/open-telemetry/opentelemetry-specification/pull/962))
([#995](https:/open-telemetry/opentelemetry-specification/pull/995))
Expand Down
1 change: 1 addition & 0 deletions spec-compliance-matrix.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ status of the feature is not known.
|RecordException with extra parameters | - | + | + | [-](https:/open-telemetry/opentelemetry-python/issues/1102) | - | - | | + | - | + |
|[Sampling](https:/open-telemetry/opentelemetry-specification/blob/master/specification/trace/sdk.md#sampling)|
|Allow samplers to modify tracestate | | | | [-](https:/open-telemetry/opentelemetry-python/issues/1220) | | | | | | |
|ShouldSample gets full parent Context | | | | | | | | | | |

## Baggage

Expand Down
3 changes: 2 additions & 1 deletion specification/trace/sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ Returns the sampling Decision for a `Span` to be created.

**Required arguments:**

* Parent `SpanReference`. May be invalid to indicate a root span.
* [`Context`](../context/context.md) with parent `Span`.
The Span's SpanContext may be invalid to indicate a root span.
* `TraceId` of the `Span` to be created.
If the parent `SpanReference` contains a valid `TraceId`, they MUST always match.
* Name of the `Span` to be created.
Expand Down

0 comments on commit cbc8936

Please sign in to comment.