Skip to content

[prometheusreceiver/prometheusexporter] Handle units in prometheus metric names #8950

@dashpole

Description

@dashpole

After open-telemetry/opentelemetry-specification#2440, prometheus exporters must add units to as a suffix to the metric name (before type suffixes), and the prometheus receiver must trim a unit suffix after trimming type suffixes. I.e.:

# TYPE request_duration_seconds counter
request_duration_seconds_total{}

is broken down into OTLP

{
  name: request_duration,
  unit: seconds, 
  type: counter,
  is_monotonic: true,
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions