From 1b2da580e58409d17ded40e70251c9295ec54ac5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gy=C3=B6rgy=20Krajcsovits?= Date: Thu, 26 Mar 2026 08:43:43 +0100 Subject: [PATCH] feat(om2): expand Number description with float64 and NaN details MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add IEEE 754-2008 double-precision reference for float64 - Expand NaN usage to cover all undefined/indeterminate mathematical results Signed-off-by: György Krajcsovits Coded with Claude Sonnet 4.6. --- docs/specs/om/open_metrics_spec_2_0.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/specs/om/open_metrics_spec_2_0.md b/docs/specs/om/open_metrics_spec_2_0.md index 8456bdcb3..3b8ad54b7 100644 --- a/docs/specs/om/open_metrics_spec_2_0.md +++ b/docs/specs/om/open_metrics_spec_2_0.md @@ -130,7 +130,9 @@ Metric values in OpenMetrics MUST be either Number or CompositeValue. ##### Number -Number value MUST be either floating point or integer. Note that ingestors of the format MAY only support float64. The non-real values NaN, +Inf and -Inf MUST be supported. NaN value MUST NOT be considered a missing value, but it MAY be used to signal a division by zero. +Number value MUST be either floating point or integer. + +Note that ingestors of the format MAY only support float64, for example Go's `float64` which is an IEEE 754-2008 double-precision (binary64) floating-point number with approximately 15–17 significant decimal digits of precision. The non-real values NaN, +Inf and -Inf MUST be supported. NaN value MUST NOT be considered a missing value, but it MAY be used to signal a division by zero or any other mathematical operation that yields an undefined or indeterminate result. Booleans MUST be represented as a Number value where `1` is true and `0` is false.