Skip to content

Commit 58664e3

Browse files
committed
Add spec for AlwaysRecord sampler
1 parent 0b35888 commit 58664e3

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ release.
1313

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

1719
### Metrics
1820

specification/trace/sdk.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ weight: 3
4141
- [Compatibility warnings for `ProbabilitySampler`](#compatibility-warnings-for-probabilitysampler)
4242
+ [ParentBased](#parentbased)
4343
+ [JaegerRemoteSampler](#jaegerremotesampler)
44+
+ [AlwaysRecord](#alwaysrecord)
4445
+ [CompositeSampler](#compositesampler)
4546
- [ComposableSampler](#composablesampler)
4647
* [GetSamplingIntent](#getsamplingintent)
@@ -603,6 +604,23 @@ The following configuration properties should be available when creating the sam
603604
[jaeger-remote-sampling-api]: https://www.jaegertracing.io/docs/1.41/architecture/apis/#remote-sampling-configuration-stable
604605
[jaeger-adaptive-sampling]: https://www.jaegertracing.io/docs/1.41/architecture/sampling/#adaptive-sampling
605606

607+
#### AlwaysRecord
608+
609+
**Status**: [Development](../document-status.md)
610+
611+
This is a sampler decorator. `AlwaysRecord` helps to have spans always
612+
be processed by `SpanProcessor`s. It returns the following given a sampled
613+
flag from the root sampler:
614+
615+
* Root sampler returns `DROP` -> AlwaysRecord returns `RECORD_ONLY`
616+
* Root sampler returns `RECORD_ONLY` -> AlwaysRecord returns `RECORD_ONLY`
617+
* Root sampler returns `RECORD_AND_SAMPLE` -> AlwaysRecord returns `RECORD_AND_SAMPLE`
618+
619+
Required parameters:
620+
621+
* `root(Sampler)` - A delegate sampler called to determine whether a span
622+
is sampled or dropped
623+
606624
#### CompositeSampler
607625

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

0 commit comments

Comments
 (0)