Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename built-in ExemplarFilters #2919

Merged
merged 13 commits into from
Dec 20, 2022
28 changes: 26 additions & 2 deletions specification/metrics/sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ linkTitle: SDK
- [Attribute limits](#attribute-limits)
- [Exemplar](#exemplar)
* [ExemplarFilter](#exemplarfilter)
* [Built-in ExemplarFilters](#built-in-exemplarfilters)
+ [AlwaysOn](#alwayson)
+ [AlwaysOff](#alwaysoff)
+ [SampleWithTrace](#samplewithtrace)
* [ExemplarReservoir](#exemplarreservoir)
* [Exemplar defaults](#exemplar-defaults)
- [MetricReader](#metricreader)
Expand Down Expand Up @@ -658,8 +662,28 @@ This interface SHOULD have access to:
[Span](../trace/api.md#span).
- A `timestamp` that best represents when the measurement was taken.

See [Defaults and Configuration](#defaults-and-configuration) for built-in
filters.
Sampled here simply makes the measurement eligible for being included as an
cijothomas marked this conversation as resolved.
Show resolved Hide resolved
exemplar. `ExemplarReservoir` makes the final decision if a measurement becomes
an exemplar.

### Built-in ExemplarFilters

OpenTelemetry supports a number of built-in exemplar filters to choose from.
The default is `SampleWithTrace`.

#### AlwaysOn

An ExemplarFilter which makes all measurements eligible for being an Exemplar.

#### AlwaysOff

An ExemplarFilter which makes no measurements eligible for being an Exemplar.
Using this ExemplarFilter is as good as disabling Exemplar feature.

#### SampleWithTrace
cijothomas marked this conversation as resolved.
Show resolved Hide resolved

An ExemplarFilter which makes those measurements eligible for being an
Exemplar, which are recorded in the context of a sampled parent span.

### ExemplarReservoir

Expand Down
6 changes: 3 additions & 3 deletions specification/sdk-environment-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,9 +266,9 @@ Known values for `OTEL_LOGS_EXPORTER` are:

Known values for `OTEL_METRICS_EXEMPLAR_FILTER` are:

- `"none"`: No measurements are eligible for exemplar sampling.
- `"all"`: All measurements are eligible for exemplar sampling.
- `"with_sampled_trace"`: Only allow measurements with a sampled parent span in context.
- `"always_on"`: [AlwaysOn](./metrics/sdk.md#alwayson)
reyang marked this conversation as resolved.
Show resolved Hide resolved
- `"always_off"`: [AlwaysOff](./metrics/sdk.md#alwaysoff)
- `"sample_with_trace"`: [SampleWithTrace](./metrics/sdk.md#samplewithtrace)
cijothomas marked this conversation as resolved.
Show resolved Hide resolved

### Periodic exporting MetricReader

Expand Down