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
Copy file name to clipboardExpand all lines: docs/specs/om/open_metrics_spec_2_0.md
+18-13Lines changed: 18 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -283,6 +283,10 @@ If the Histogram Metric has MetricPoints with Classic Buckets, the Histogram's M
283
283
284
284
The Histogram type is cumulative over time, but MAY be reset. When a Histogram is reset, the Sum, Count, Classic Buckets and Native Buckets MUST be reset to their zero state, and if the Start Timestamp is present then it MUST be set to the approximate reset time. Histogram resets can be useful for limiting the number of Native Buckets used by Histograms.
285
285
286
+
A Histogram MetricPoint MAY have exemplars. The values of exemplars in a Histogram MetricPoint
287
+
SHOULD be evenly distributed, such as by keeping one exemplar for each Classic Bucket if Classic
288
+
Buckets are included.
289
+
286
290
##### Classic Buckets
287
291
288
292
Every Classic Bucket MUST have a threshold. Classic Bucket thresholds within a MetricPoint MUST be unique. Classic Bucket thresholds MAY be negative.
@@ -297,8 +301,6 @@ Exposed Classic Bucket thresholds SHOULD stay constant over time and between tar
297
301
298
302
If the NaN value is allowed, it MUST be counted in the +Inf bucket, and MUST NOT be counted in any other bucket. The rationale is that NaN does not belong to any bucket mathematically, however instrumentation libraries traditionally put it into the +Inf bucket.
299
303
300
-
A Histogram MetricPoint MAY have exemplars. The values of exemplars in a Histogram MetricPoint SHOULD be evenly distributed, such as by keeping one exemplar for each Classic Bucket.
301
-
302
304
##### Native Buckets
303
305
304
306
Histogram MetricPoints with Native Buckets MUST have a Schema value. The Schema MUST be an 8 bit signed integer between -4 and 8 (inclusive), these are called Standard (exponential) schemas.
@@ -342,10 +344,6 @@ If the NaN value is not allowed, then the Count value MUST be equal to the sum o
342
344
343
345
If the NaN value is allowed, it MUST NOT be counted in any Native Bucket, and MUST be counted towards the Count. The difference between the Count and the sum of the negative, positive and zero Native Buckets MUST BE the number of NaN observations. The rationale is that NaN does not belong to any bucket mathematically.
344
346
345
-
A Histogram MetricPoint with Native Buckets MAY contain exemplars.
346
-
347
-
The values of exemplars in a Histogram MetricPoint with Native Buckets SHOULD be evenly distributed to avoid only representing the bucket with the highest value and therefore most common case.
348
-
349
347
#### GaugeHistogram
350
348
351
349
GaugeHistograms measure current distributions. Common examples are how long items have been waiting in a queue, or size of the requests in a queue.
@@ -1055,29 +1053,36 @@ The order ensures that implementations can easily skip the Classic Buckets if th
Exemplars MAY be attached to the Histogram MetricPoint.
1059
+
1060
+
When present, all Exemplars of the Histogram MetricPoint SHOULD be attached.
1061
+
In practice this means that if the exposer is keeping a separate set of exemplars for Classic and Native Buckets, then
1062
+
the exposer MAY attach only one set for performance and backwards compatibility reasons and that set SHOULD be the
1063
+
exemplars associated with Classic Buckets.
1064
+
1065
+
If present, the MetricPoint's Start Timestamp MUST be inlined with the Metric point with a `st@` prefix. If the value's timestamp is present, the Start Timestamp MUST be added right after it. If exemplars are present, the Start Timestamp MUST be added before it.
1059
1066
1060
1067
Exemplars without Labels MUST represent an empty LabelSet as {}.
1061
1068
1062
-
In case of a Histogram with both Classic and Native Buckets, only the exemplars belonging to the Classic Buckets MUST be
1063
-
included, the exemplars related to the Native Buckets MUST be excluded.
1069
+
Exemplars of a MetricPoint SHOULD have the same Label names to have a consistent style.
1064
1070
1065
-
An example of a Histogram with Native Buckets that has multiple Exemplars:
1071
+
An example of a Histogram with Native Buckets and Start Timestamp that has multiple Exemplars:
An example of a Histogram with Classic Buckets where the "0.01" bucket has no Exemplar. The 0.1 bucket has an Exemplar with no Labels. The 1 bucket has an Exemplar with one Label. The 10 bucket has an Exemplar with a Label and a timestamp. In practice all buckets SHOULD have the same style of Exemplars.
1078
+
An example of a Histogram with Classic Buckets and Start Timestamp where no exemplar falls within the "0.01" bucket and the "+Inf" bucket. An exemplar without Labels falls within the "0.1" bucket. An exemplar with one Label falls within the "1" bucket and another in the "10" bucket.
0 commit comments