Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ release.

- Deprecate Zipkin exporter document and make exporter implementation optional.
([#4715](https://github.com/open-telemetry/opentelemetry-specification/pull/4715/))
- Add spec for `AlwaysRecord` sampler
([#4699](https://github.com/open-telemetry/opentelemetry-specification/pull/4699))

### Metrics

Expand Down
1 change: 1 addition & 0 deletions spec-compliance-matrix.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ formats is required. Implementing more than one format is optional.
| [Support W3C Trace Context Level 2 randomness](specification/trace/sdk.md#traceid-randomness) | X | - | | | | | | | | | | |
| [TraceIdRatioBased sampler implements OpenTelemetry tracestate `th` field](specification/trace/sdk.md#traceidratiobased) | X | - | | | | | | | | | | |
| [CompositeSampler and built-in ComposableSamplers](specification/trace/sdk.md#compositesampler) | X | - | | | | | | | | | | |
| [Sampler: AlwaysRecord](specification/trace/sdk.md#alwaysrecord) | | - | | | | | | | | | | |

## Baggage

Expand Down
2 changes: 2 additions & 0 deletions spec-compliance-matrix/cpp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ sections:
status: '?'
- name: '[CompositeSampler and built-in ComposableSamplers](specification/trace/sdk.md#compositesampler)'
status: '?'
- name: '[Sampler: AlwaysRecord](specification/trace/sdk.md#alwaysrecord)'
status: '?'
- name: Baggage
features:
- name: Basic support
Expand Down
2 changes: 2 additions & 0 deletions spec-compliance-matrix/dotnet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ sections:
status: '?'
- name: '[CompositeSampler and built-in ComposableSamplers](specification/trace/sdk.md#compositesampler)'
status: '?'
- name: '[Sampler: AlwaysRecord](specification/trace/sdk.md#alwaysrecord)'
status: '?'
- name: Baggage
features:
- name: Basic support
Expand Down
2 changes: 2 additions & 0 deletions spec-compliance-matrix/erlang.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ sections:
status: '?'
- name: '[CompositeSampler and built-in ComposableSamplers](specification/trace/sdk.md#compositesampler)'
status: '?'
- name: '[Sampler: AlwaysRecord](specification/trace/sdk.md#alwaysrecord)'
status: '?'
- name: Baggage
features:
- name: Basic support
Expand Down
2 changes: 2 additions & 0 deletions spec-compliance-matrix/go.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ sections:
status: '-'
- name: '[CompositeSampler and built-in ComposableSamplers](specification/trace/sdk.md#compositesampler)'
status: '-'
- name: '[Sampler: AlwaysRecord](specification/trace/sdk.md#alwaysrecord)'
status: '-'
- name: Baggage
features:
- name: Basic support
Expand Down
2 changes: 2 additions & 0 deletions spec-compliance-matrix/java.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ sections:
status: '?'
- name: '[CompositeSampler and built-in ComposableSamplers](specification/trace/sdk.md#compositesampler)'
status: '?'
- name: '[Sampler: AlwaysRecord](specification/trace/sdk.md#alwaysrecord)'
status: '?'
- name: Baggage
features:
- name: Basic support
Expand Down
2 changes: 2 additions & 0 deletions spec-compliance-matrix/js.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ sections:
status: '?'
- name: '[CompositeSampler and built-in ComposableSamplers](specification/trace/sdk.md#compositesampler)'
status: '?'
- name: '[Sampler: AlwaysRecord](specification/trace/sdk.md#alwaysrecord)'
status: '?'
- name: Baggage
features:
- name: Basic support
Expand Down
2 changes: 2 additions & 0 deletions spec-compliance-matrix/php.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ sections:
status: '?'
- name: '[CompositeSampler and built-in ComposableSamplers](specification/trace/sdk.md#compositesampler)'
status: '?'
- name: '[Sampler: AlwaysRecord](specification/trace/sdk.md#alwaysrecord)'
status: '?'
- name: Baggage
features:
- name: Basic support
Expand Down
2 changes: 2 additions & 0 deletions spec-compliance-matrix/python.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ sections:
status: '?'
- name: '[CompositeSampler and built-in ComposableSamplers](specification/trace/sdk.md#compositesampler)'
status: '?'
- name: '[Sampler: AlwaysRecord](specification/trace/sdk.md#alwaysrecord)'
status: '?'
- name: Baggage
features:
- name: Basic support
Expand Down
2 changes: 2 additions & 0 deletions spec-compliance-matrix/ruby.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ sections:
status: '?'
- name: '[CompositeSampler and built-in ComposableSamplers](specification/trace/sdk.md#compositesampler)'
status: '?'
- name: '[Sampler: AlwaysRecord](specification/trace/sdk.md#alwaysrecord)'
status: '?'
- name: Baggage
features:
- name: Basic support
Expand Down
2 changes: 2 additions & 0 deletions spec-compliance-matrix/rust.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ sections:
status: '?'
- name: '[CompositeSampler and built-in ComposableSamplers](specification/trace/sdk.md#compositesampler)'
status: '?'
- name: '[Sampler: AlwaysRecord](specification/trace/sdk.md#alwaysrecord)'
status: '?'
- name: Baggage
features:
- name: Basic support
Expand Down
2 changes: 2 additions & 0 deletions spec-compliance-matrix/swift.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ sections:
status: '?'
- name: '[CompositeSampler and built-in ComposableSamplers](specification/trace/sdk.md#compositesampler)'
status: '?'
- name: '[Sampler: AlwaysRecord](specification/trace/sdk.md#alwaysrecord)'
status: '?'
- name: Baggage
features:
- name: Basic support
Expand Down
1 change: 1 addition & 0 deletions spec-compliance-matrix/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ sections:
optional: true
- name: '[CompositeSampler and built-in ComposableSamplers](specification/trace/sdk.md#compositesampler)'
optional: true
- name: '[Sampler: AlwaysRecord](specification/trace/sdk.md#alwaysrecord)'
- name: Baggage
features:
- name: Basic support
Expand Down
25 changes: 25 additions & 0 deletions specification/trace/sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ weight: 3
- [Compatibility warnings for `ProbabilitySampler`](#compatibility-warnings-for-probabilitysampler)
+ [ParentBased](#parentbased)
+ [JaegerRemoteSampler](#jaegerremotesampler)
+ [AlwaysRecord](#alwaysrecord)
+ [CompositeSampler](#compositesampler)
- [ComposableSampler](#composablesampler)
* [GetSamplingIntent](#getsamplingintent)
Expand Down Expand Up @@ -603,6 +604,30 @@ The following configuration properties should be available when creating the sam
[jaeger-remote-sampling-api]: https://www.jaegertracing.io/docs/1.41/architecture/apis/#remote-sampling-configuration-stable
[jaeger-adaptive-sampling]: https://www.jaegertracing.io/docs/1.41/architecture/sampling/#adaptive-sampling

#### AlwaysRecord
Comment thread
cijothomas marked this conversation as resolved.

**Status**: [Development](../document-status.md)

`AlwaysRecord` is a sampler decorator that ensures every span is passed to
the `SpanProcessor`, even those that would normally be dropped. It does this
by converting `DROP` decisions from the wrapped sampler into `RECORD_ONLY`
decisions, allowing processors to see all spans without sending them to
exporters. This is typically used to enable accurate span-to-metrics processing.

Based on the decision from the wrapped root sampler, `AlwaysRecord` MUST behave
as follows:

| Root sampler decision | AlwaysRecord decision |
|-----------------------|-----------------------|
| `DROP` | `RECORD_ONLY` |
| `RECORD_ONLY` | `RECORD_ONLY` |
| `RECORD_AND_SAMPLE` | `RECORD_AND_SAMPLE` |

Required parameters:

* `root(Sampler)` - The sampler being wrapped; it provides the original
sample/drop decision that AlwaysRecord modifies.

#### CompositeSampler

**Status**: [Development](../document-status.md)
Expand Down
Loading