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
+7-1Lines changed: 7 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -892,6 +892,8 @@ Quantiles MAY be in any order.
892
892
893
893
The MetricPoint's Sum Value Sample MetricName MUST have the suffix `_sum`. The MetricPoint's Count Value Sample MetricName MUST have the suffix `_count`. The MetricPoint's Classic Bucket values Sample MetricNames MUST have the suffix `_bucket`.
894
894
895
+
For backwards compatibility with version OpenMetrics 1.0, ingestors MAY allow Histogram MetricPoints without Sum or Count value. In case of missing Sum it MAY be interpreted as 0 if needed. In case of missing Count it MAY be copied from the +Inf bucket if needed.
896
+
895
897
If present the MetricPoint's Created Timestamp MUST be inlined with the Metric point with a `ct@` prefix. If the value's timestamp is present, the Created Timestamp MUST be added right after it. If exemplar is present, the Created Timestamp MUST be added before it. Created Timestamp MUST be appended to all Classic Bucket values, to the MetricPoint's Sum and MetricPoint's Count.
896
898
897
899
Classic Buckets MUST be sorted in number increasing order of "le", and the value of the "le" label MUST follow the rules for Canonical Numbers.
@@ -922,13 +924,15 @@ The MetricPoint's value MUST be a complex data type.
922
924
Histograms with Native Buckets MUST use the integer native histogram data type.
923
925
924
926
The integer native histogram data type is represented as structured data with fields. There MUST NOT be any whitespace around fields.
925
-
The integer native histogram data type MUST include the Count, Sum, Schema, Zero Threshold, Zero Native Bucket value as the fields `count`, `sum`, `schema`, `zero_threshold`, `zero_count`.
927
+
The integer native histogram data type MUST include the Count, Sum, Schema, Zero Threshold, Zero Native Bucket value as the fields `count`, `sum`, `schema`, `zero_threshold`, `zero_count`, in this order.
926
928
927
929
If there are no negative Native Buckets, then the fields `negative_spans` and `negative_buckets` SHOULD be omitted.
928
930
If there are no positive Native Buckets, then the fields `positive_spans` and `positive_buckets` SHOULD be omitted.
929
931
930
932
If there are negative (and/or positive) Native Buckets, then the fields `negative_spans`, `negative_buckets` (and/or `positive_spans`, `positive_buckets`) MUST be present in this order after the `zero_count` field.
931
933
934
+
With the exception of the `sum` and `zero_threshold` field, all numbers MUST be integers and MUST NOT include dot '.' or exponent 'e'.
935
+
932
936
Native Bucket values MUST be ordered by their index, and their values MUST be placed in the `negative_buckets` (and/or `positive_buckets`) fields.
933
937
934
938
To map the `negative_buckets` (and/or `positive_buckets`) back to their indices, the `negative_spans` (and/or `positive_spans`) field MUST be constructed in the following way: Each span consists of a pair of numbers, an integer called offset and an non-negative integer called length. Only the first span in each list can have a negative offset. It defines the index of the first bucket in its corresponding `negative_buckets` (and/or `positive_buckets`). The length defines the number of consecutive buckets the bucket list starts with. The offsets of the following spans define the number of excluded (and thus unpopulated buckets). The lengths define the number of consecutive buckets in the list following the excluded buckets.
The MetricPoint's Sum Value Sample MetricName MUST have the suffix `_gsum`. The MetricPoint's Count Value Sample MetricName MUST have the suffix `_gcount`. The MetricPoint's Classic Bucket values Sample MetricNames MUST have the suffix `_bucket`.
998
1002
1003
+
For backwards compatibility with version OpenMetrics 1.0, ingestors MAY allow Histogram MetricPoints without Sum or Count value. In case of missing Sum it MAY be interpreted as 0 if needed. In case of missing Count it MAY be copied from the +Inf bucket if needed.
1004
+
999
1005
Classic Buckets MUST be sorted in number increasing order of "le", and the value of the "le" label MUST follow the rules for Canonical Numbers.
1000
1006
1001
1007
An example of a Metric with no labels, and one MetricPoint value with no Exemplar with no Exemplars in the buckets:
0 commit comments