Skip to content

Metric metadata isn't printed during debug verbosity: detailed #46540

@agardnerIT

Description

@agardnerIT

Component(s)

No response

What happened?

transform:
    error_mode: ignore
    metric_statements:
      - context: metric
        statements:
          - set(metric.metadata["user_id"], "555") where metric.name == "order_total"

...

exporters:
  debug:
    verbosity: detailed

Shows

Metric #0
Descriptor:
     -> Name: order_total
     -> Description: 
     -> Unit: gauge
     -> DataType: Gauge
NumberDataPoints #0
StartTimestamp: 1970-01-01 00:00:00 +0000 UTC
Timestamp: 2026-03-02 00:05:09.417257 +0000 UTC
Value: 18.000000
        {"resource": {"service.instance.id": "12341234-abcd-1234-1234-1234abcd1234", "service.name": "otelcol-contrib", "service.version": "0.145.0"}, "otelcol.component.id": "debug", "otelcol.component.kind": "exporter", "otelcol.signal": "metrics"}

Note: This is actually otelcol-contrib v0.146.0 but see open-telemetry/opentelemetry-collector-releases#1394

Collector version

v0.146.0

Environment information

Environment

OS: (e.g., "Ubuntu 20.04")
Compiler(if manually compiled): (e.g., "go 14.2")

OpenTelemetry Collector configuration

Log output

Additional context

No response

Tip

React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds triageNew item requiring triage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions