Skip to content

Commit 56657f4

Browse files
committed
fix comments for unit support
Signed-off-by: Arianna Vespri <[email protected]>
1 parent 88a6d8b commit 56657f4

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

expfmt/openmetrics_create.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,15 @@ import (
4747
// Prometheus to OpenMetrics or vice versa:
4848
//
4949
// - Counters are expected to have the `_total` suffix in their metric name. In
50-
// the output, the suffix will be truncated from the `# TYPE` and `# HELP`
51-
// line. A counter with a missing `_total` suffix is not an error. However,
50+
// the output, the suffix will be truncated from the `# TYPE`, `# HELP` and `# UNIT`
51+
// lines. A counter with a missing `_total` suffix is not an error. However,
5252
// its type will be set to `unknown` in that case to avoid invalid OpenMetrics
5353
// output.
5454
//
55-
// - No support for the following (optional) features: `# UNIT` line, `_created`
55+
// - The `# UNIT` line is optional, but if populated, the unit has to be present in the metric
56+
// name as its suffix (see https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#unit)
57+
//
58+
// - No support for the following (optional) features: `_created`
5659
// line, info type, stateset type, gaugehistogram type.
5760
//
5861
// - The size of exemplar labels is not checked (i.e. it's possible to create

0 commit comments

Comments
 (0)