Skip to content

Commit 5e762e6

Browse files
committed
feat(om1.1): relax the acceptance rules around unit and total suffixes
This proposal only relaxes the rules on what is acceptable by ingestors. This allows non Prometheus systems to expose names without suffixes and still get processed. Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
1 parent 2adaf96 commit 5e762e6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

docs/specs/om/open_metrics_spec_1_1.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,8 @@ Type specifies the MetricFamily type. Valid values are "unknown", "gauge", "coun
146146

147147
Unit specifies MetricFamily units. If non-empty, it MUST be a suffix of the MetricFamily name separated by an underscore. Be aware that further generation rules might make it an infix in the text format.
148148

149+
Ingestors MAY accept MetricFamily name without unit suffix. Be aware that exposing such metrics directly to end-users reduces usability due to confusion about what the metric's unit is.
150+
149151
##### Help
150152

151153
Help is a string and SHOULD be non-empty. It is used to give a brief description of the MetricFamily for human consumption and SHOULD be short enough to be used as a tooltip.
@@ -488,7 +490,7 @@ A valid example for a foo_seconds metric with a unit of "seconds":
488490
# UNIT foo_seconds seconds
489491
```
490492

491-
An invalid example, where the unit is not a suffix on the name:
493+
An invalid example (which MAY still be accepted by ingestors), where the unit is not a suffix on the name:
492494

493495
```
494496
# TYPE foo counter
@@ -635,6 +637,8 @@ foo 18.0 456
635637

636638
The MetricPoint's Total Value Sample MetricName MUST have the suffix `_total`. If present the MetricPoint's Created Value Sample MetricName MUST have the suffix `_created`.
637639

640+
Ingestors MAY accept MetricPoint Total Value name without the `_total` suffix. Be aware that exposing such metrics directly to end-users reduces usability due to confusion about what the metric's type is.
641+
638642
An example with a Metric with no labels, and a MetricPoint with no timestamp and no created:
639643

640644
```openmetrics-add-eof

0 commit comments

Comments
 (0)