opentelemetry-go
opentelemetry-go copied to clipboard
Prometheus exporter: omit empty otel_scope_info and otel_target_info metrics
Description
otel_scope_info and target_info should now only be generated when scope attributes and resource attributes are non-empty.
From https://github.com/open-telemetry/opentelemetry-specification/pull/3660:
Prometheus exporters SHOULD generate an Info-typed metric named
otel_scope_infofor each Instrumentation Scope with non-empty scope attributes.
In SDK Prometheus (pull) exporters, resource attributes SHOULD be converted to a single
target_infometric if the resource is not empty;