From cbc89366b8cab945b7e4cf75b38b4b2f6436f277 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Neum=C3=BCller?= Date: Tue, 20 Oct 2020 20:25:23 +0200 Subject: [PATCH] Update Sampler.ShouldSample parent parameter to be Context (#881) * 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 --- CHANGELOG.md | 2 ++ spec-compliance-matrix.md | 1 + specification/trace/sdk.md | 3 ++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fc53daf8b2e..28cd8d0ef10 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -114,6 +114,8 @@ Updates: ([#984](https://github.com/open-telemetry/opentelemetry-specification/pull/984) - Metrics SDK: Specify TBD default aggregation for ValueRecorder ([#984](https://github.com/open-telemetry/opentelemetry-specification/pull/984) +- Trace SDK: Sampler.ShouldSample gets parent Context instead of SpanContext + ([#881](https://github.com/open-telemetry/opentelemetry-specification/pull/881)) - SDK: Specify known values, as well as basic error handling for OTEL_PROPAGATORS. ([#962](https://github.com/open-telemetry/opentelemetry-specification/pull/962)) ([#995](https://github.com/open-telemetry/opentelemetry-specification/pull/995)) diff --git a/spec-compliance-matrix.md b/spec-compliance-matrix.md index 21d59d97ba5..b830df46099 100644 --- a/spec-compliance-matrix.md +++ b/spec-compliance-matrix.md @@ -68,6 +68,7 @@ status of the feature is not known. |RecordException with extra parameters | - | + | + | [-](https://github.com/open-telemetry/opentelemetry-python/issues/1102) | - | - | | + | - | + | |[Sampling](https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/trace/sdk.md#sampling)| |Allow samplers to modify tracestate | | | | [-](https://github.com/open-telemetry/opentelemetry-python/issues/1220) | | | | | | | +|ShouldSample gets full parent Context | | | | | | | | | | | ## Baggage diff --git a/specification/trace/sdk.md b/specification/trace/sdk.md index 6a315d11b6f..aee09e6c4eb 100644 --- a/specification/trace/sdk.md +++ b/specification/trace/sdk.md @@ -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.