Skip to content

PeriodicMetricReader emits otel.sdk.metric_reader.collection.duration unconditionally, bypassing the experimental self-observability opt-in #8566

Description

@cijothomas

PeriodicMetricReader / MetricReaderInstrumentation records otel.sdk.metric_reader.collection.duration unconditionally whenever a real MeterProvider is available — it never checks otel.experimental.sdk.telemetry.version (OTEL_EXPERIMENTAL_SDK_TELEMETRY_VERSION).

This is inconsistent with the rest of the self-observability suite: TracerProviderConfiguration and LoggerProviderConfiguration both call InternalTelemetryConfiguration.getVersion(config) before enabling span/log processor self-observability, and OtlpConfigUtil does the same for OTLP exporter self-observability. There's no equivalent check in the metric reader path.

Repro: run any service with metrics enabled via the Java agent/autoconfigure, without setting OTEL_EXPERIMENTAL_SDK_TELEMETRY_VERSIONotel.sdk.metric_reader.collection.duration still shows up, while span/log/exporter self-observability correctly stays off.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions