You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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>
Copy file name to clipboardExpand all lines: docs/specs/om/open_metrics_spec_1_1.md
+9-1Lines changed: 9 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -118,6 +118,8 @@ A MetricFamily MAY have zero or more Metrics. A MetricFamily MUST have a name, H
118
118
119
119
MetricFamily names are a string and MUST be unique within a MetricSet. Names SHOULD be in snake_case. Metric names MUST follow the restrictions in the ABNF section.
120
120
121
+
Ingestors MAY accept duplicate MetricFamily names, provided that there is a mechanism to distinguish the resulting MetricPoints.
122
+
121
123
Colons in MetricFamily names are RESERVED to signal that the MetricFamily is the result of a calculation or aggregation of a general purpose monitoring system.
122
124
123
125
MetricFamily names beginning with underscores are RESERVED and MUST NOT be used unless specified by this standard.
@@ -126,6 +128,8 @@ MetricFamily names beginning with underscores are RESERVED and MUST NOT be used
126
128
127
129
The name of a MetricFamily MUST NOT result in a potential clash for sample metric names as per the ABNF with another MetricFamily in the Text Format within a MetricSet. An example would be a gauge called "foo_created" as a counter called "foo" could create a "foo_created" in the text format.
128
130
131
+
Ingestors MAY accept conflicting MetricFamily names, provided that there is a mechanism to distinguish the resulting MetricPoints. It follows that ingestors MAY accept MetricFamily name without the type specific suffix.
132
+
129
133
Exposers SHOULD avoid names that could be confused with the suffixes that text format sample metric names use.
130
134
131
135
* Suffixes for the respective types are:
@@ -146,6 +150,8 @@ Type specifies the MetricFamily type. Valid values are "unknown", "gauge", "coun
146
150
147
151
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.
148
152
153
+
Ingestors MAY accept MetricFamily name without unit suffix.
154
+
149
155
##### Help
150
156
151
157
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 +494,7 @@ A valid example for a foo_seconds metric with a unit of "seconds":
488
494
# UNIT foo_seconds seconds
489
495
```
490
496
491
-
An invalid example, where the unit is not a suffix on the name:
497
+
An invalid example (which MAY still be accepted by ingestors), where the unit is not a suffix on the name:
492
498
493
499
```
494
500
# TYPE foo counter
@@ -635,6 +641,8 @@ foo 18.0 456
635
641
636
642
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`.
637
643
644
+
Ingestors MAY accept MetricPoint Total Value name without the `_total` suffix.
645
+
638
646
An example with a Metric with no labels, and a MetricPoint with no timestamp and no created:
0 commit comments