You've already forked opentelemetry-go
mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2025-11-29 23:07:45 +02:00
Enable exemplars by default (#5778)
Part of https://github.com/open-telemetry/opentelemetry-go/issues/5249. Addresses https://github.com/open-telemetry/opentelemetry-go/issues/5249#issuecomment-2088725450 This removes handling of the `OTEL_GO_X_EXEMPLAR` environment variable. Instead of changing the default for the existing environment variable to enable it by default, i'm just removing it entirely. Users can still disable the feature by setting the filter to always_off. Since we will continue to support that configuration, it seems better to direct users there, rather than give them a temporary equivalent.
This commit is contained in:
@@ -9,7 +9,6 @@ import (
|
||||
"slices"
|
||||
|
||||
"go.opentelemetry.io/otel/sdk/metric/internal/exemplar"
|
||||
"go.opentelemetry.io/otel/sdk/metric/internal/x"
|
||||
)
|
||||
|
||||
// reservoirFunc returns the appropriately configured exemplar reservoir
|
||||
@@ -20,9 +19,6 @@ import (
|
||||
// feature is enabled and the OTEL_METRICS_EXEMPLAR_FILTER environment variable
|
||||
// is not set to always_off.
|
||||
func reservoirFunc[N int64 | float64](agg Aggregation) func() exemplar.FilteredReservoir[N] {
|
||||
if !x.Exemplars.Enabled() {
|
||||
return nil
|
||||
}
|
||||
// https://github.com/open-telemetry/opentelemetry-specification/blob/d4b241f451674e8f611bb589477680341006ad2b/specification/configuration/sdk-environment-variables.md#exemplar
|
||||
const filterEnvKey = "OTEL_METRICS_EXEMPLAR_FILTER"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user