From 5e762e64ca45c5d73e2a19c12f6330ef883a3221 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gy=C3=B6rgy=20Krajcsovits?= Date: Thu, 2 Oct 2025 09:15:36 +0200 Subject: [PATCH] feat(om1.1): relax the acceptance rules around unit and total suffixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- docs/specs/om/open_metrics_spec_1_1.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/specs/om/open_metrics_spec_1_1.md b/docs/specs/om/open_metrics_spec_1_1.md index 0d9ed4026..d71411367 100644 --- a/docs/specs/om/open_metrics_spec_1_1.md +++ b/docs/specs/om/open_metrics_spec_1_1.md @@ -146,6 +146,8 @@ Type specifies the MetricFamily type. Valid values are "unknown", "gauge", "coun 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. +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. + ##### Help 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": # UNIT foo_seconds seconds ``` -An invalid example, where the unit is not a suffix on the name: +An invalid example (which MAY still be accepted by ingestors), where the unit is not a suffix on the name: ``` # TYPE foo counter @@ -635,6 +637,8 @@ foo 18.0 456 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`. +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. + An example with a Metric with no labels, and a MetricPoint with no timestamp and no created: ```openmetrics-add-eof