Skip to content

Add more fine-grained support for selecting metric exemplars #49572

@mhalbritter

Description

@mhalbritter

OpenTelemetry supports the OTEL_METRICS_EXEMPLAR_FILTER environment variable, which selects which spans can serve as exemplars.

Our org.springframework.boot.micrometer.tracing.autoconfigure.otlp.OtlpExemplarsAutoConfiguration.LazyTracingExemplarContextProvider uses the sampled flag from the span, which is essentially trace_based in OTel. We should also support always_on and always_off.

There's also code in org.springframework.boot.micrometer.tracing.autoconfigure.prometheus.PrometheusExemplarsAutoConfiguration.LazyTracingSpanContext. Prometheus supports only trace based sampling and always off.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions