diff --git a/examples/kitchen-sink.yaml b/examples/kitchen-sink.yaml index 04f2a31..d9e56f0 100644 --- a/examples/kitchen-sink.yaml +++ b/examples/kitchen-sink.yaml @@ -213,6 +213,8 @@ meter_provider: # Configure list of attribute keys to exclude from the resulting stream(s). Applies after .attribute_keys.included (i.e. excluded has higher priority than included). excluded: - key3 + # Configure the exemplar filter. Known values include: trace_based, always_on, always_off. + exemplar_filter: trace_based # Configure text map context propagators. propagator: diff --git a/examples/sdk-config.yaml b/examples/sdk-config.yaml index 71dad2d..57390d6 100644 --- a/examples/sdk-config.yaml +++ b/examples/sdk-config.yaml @@ -139,6 +139,8 @@ meter_provider: temporality_preference: cumulative # Configure default histogram aggregation. default_histogram_aggregation: explicit_bucket_histogram + # Configure the exemplar filter. Known values include: trace_based, always_on, always_off. + exemplar_filter: trace_based # Configure logger provider. logger_provider: diff --git a/examples/sdk-migration-config.yaml b/examples/sdk-migration-config.yaml index a1b842a..1f9ca44 100644 --- a/examples/sdk-migration-config.yaml +++ b/examples/sdk-migration-config.yaml @@ -25,7 +25,6 @@ # - OTEL_TRACES_EXPORTER # - OTEL_METRICS_EXPORTER # - OTEL_LOGS_EXPORTER -# - OTEL_METRICS_EXEMPLAR_FILTER # - OTEL_EXPORTER_OTLP_PROTOCOL # - OTEL_EXPORTER_OTLP_ENDPOINT # - OTEL_EXPORTER_OTLP_INSECURE, OTEL_EXPORTER_OTLP_{SIGNAL}_INSECURE @@ -177,6 +176,8 @@ meter_provider: temporality_preference: ${OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE:-cumulative} # Configure default histogram aggregation. default_histogram_aggregation: ${OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION:-explicit_bucket_histogram} + # Configure the exemplar filter. Known values include: trace_based, always_on, always_off. + exemplar_filter: ${OTEL_METRICS_EXEMPLAR_FILTER:-trace_based} # Configure logger provider. logger_provider: diff --git a/schema/meter_provider.json b/schema/meter_provider.json index 461ec30..7a2d288 100644 --- a/schema/meter_provider.json +++ b/schema/meter_provider.json @@ -16,6 +16,14 @@ "items": { "$ref": "#/$defs/View" } + }, + "exemplar_filter": { + "type": ["string", "null"], + "enum": [ + "always_on", + "always_off", + "trace_based" + ] } }, "$defs": { diff --git a/schema/type_descriptions.yaml b/schema/type_descriptions.yaml index 5abfefa..12ea1ab 100644 --- a/schema/type_descriptions.yaml +++ b/schema/type_descriptions.yaml @@ -203,6 +203,7 @@ property_descriptions: readers: Configure metric readers. views: Configure views. Each view has a selector which determines the instrument(s) it applies to, and a configuration for the resulting stream(s). + exemplar_filter: "Configure the exemplar filter. Known values include: trace_based, always_on, always_off." path_patterns: - .meter_provider