Skip to content

Commit 11d8776

Browse files
committed
fix(om2.0): consistency between text and abnf on Summary fields
In #2627 and #2634 we've made the Sum and Count mandatory fields in histograms. They became mandatory in Summary due to the ABNF as that has precedence. This PR changes the data model to follow the ABNF and be consistent with histograms. Note: this is probably the last chance to reverse course and make Sum and/or Count optional without a breaking change. Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
1 parent 7bf21de commit 11d8776

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

docs/specs/om/open_metrics_spec_2_0.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -382,12 +382,12 @@ Summaries also measure distributions of discrete events and MAY be used when His
382382

383383
They MAY also be used for backwards compatibility, because some existing instrumentation libraries expose precomputed quantiles and do not support Histograms. Precomputed quantiles SHOULD NOT be used, because quantiles are not aggregatable and the user often can not deduce what timeframe they cover.
384384

385-
A Summary MetricPoint MAY consist of a Count, Sum, Start Timestamp, and a set of quantiles.
385+
A Summary MetricPoint MUST contain a Count, Sum and a set of quantiles.
386386

387387
Semantically, Count and Sum values are counters so MUST NOT be NaN or negative.
388388
Count MUST be an integer.
389389

390-
A MetricPoint in a Metric with the type Summary which contains Count or Sum values SHOULD have a Timestamp value called Start Timestamp. This can help ingestors discern between new metrics and long-running ones it did not see before. Start Timestamp MUST NOT relate to the collection period of quantile values.
390+
A Summary SHOULD have a Timestamp value called Start Timestamp. This can help ingestors discern between new metrics and long-running ones it did not see before. Start Timestamp MUST NOT relate to the collection period of quantile values.
391391

392392
Quantiles are a map from a quantile to a value. An example is a quantile 0.95 with value 0.2 in a metric called myapp_http_request_duration_seconds which means that the 95th percentile latency is 200ms over an unknown timeframe. If there are no events in the relevant timeframe, the value for a quantile MUST be NaN.
393393
A Quantile's Metric's LabelSet MUST NOT have "quantile" label name.

0 commit comments

Comments
 (0)