Skip to content

Guidance around defining SemConv for info metrics #2595

@kamphaus

Description

@kamphaus

Should SemConv define guidance on how to define info metrics?
If yes, what should that guidance be?

Info metrics are a well established metric type in Prometheus and OpenMetrics for a time series that has a constant value and whose main value lies in its existence or its attributes.
By convention the name of the metric ends in an _info suffix:

https://prometheus.io/docs/practices/naming/#metric-names:~:text=count%20with%20unit)-,foobar_build_info,-(for%20a%20pseudo
https://github.com/prometheus/OpenMetrics/blob/main/specification/OpenMetrics.md#info
https://github.com/prometheus/OpenMetrics/blob/main/specification/OpenMetrics.md#suffixes

The Otel Specs's page on compatibility with Prometheus / OpenMetrics also includes Info metrics: https://opentelemetry.io/docs/specs/otel/compatibility/prometheus_and_openmetrics/#info
When exporting to prometheus this already specifies that resources should be exported as an info metric.

This article explains the advantage of an info metric as opposed to including its attributes on other time series as well as ways to use an info metrics in conjunction with other time series in Prometheus queries:
https://www.robustperception.io/exposing-the-software-version-to-prometheus/

Guidance on how to define info metrics could be defined as part of https://github.com/open-telemetry/semantic-conventions/blob/main/docs/how-to-write-conventions/README.md#defining-metrics

Examples of info metrics

Here a screenshot of some info metrics available on a prometheus scraping my k8s state and app metrics:

Image

Related metrics types

A metric type that is related to info metrics are state metrics.
These are gauge metrics where the gauge value corresponds to the values of an enum or boolean.
For example: the up metric from prometheus.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Need triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions