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
+23-11Lines changed: 23 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -711,7 +711,7 @@ Label values MAY be any valid UTF-8 value, so escaping MUST be applied as per th
711
711
bar_seconds_count{a="x",b="escaping\" example \n "} 0
712
712
```
713
713
714
-
Metric names and label names MAY also be any valid UTF-8 value, and under certain circumstances they MUST be quoted and escaped per the ABNF. See the UTF-8 Quoting section for specifics.
714
+
Metric names and label names MAY also be any valid UTF-8 value, and under certain circumstances they MUST be quoted and escaped per the ABNF. See the [UTF-8 Quoting](#utf-8-quoting) section for specifics.
715
715
716
716
```openmetrics-add-eof
717
717
{"\"bar\".seconds.count","b\\"="escaping\" example \n "} 0
@@ -721,6 +721,8 @@ Metric names and label names MAY also be any valid UTF-8 value, and under certai
721
721
722
722
#### Gauge
723
723
724
+
The Sample's value MUST be a Number.
725
+
724
726
There are no recommended suffixes for the MetricFamily name for a MetricFamily of Type Gauge.
725
727
726
728
An example MetricFamily with a Metric with no labels and a Sample with no timestamp:
@@ -768,6 +770,8 @@ foo 18.0 456
768
770
769
771
#### Counter
770
772
773
+
The Sample's value MUST be a Number.
774
+
771
775
If present, the Sample's Start Timestamp MUST be inlined with the Sample with a `st@` prefix. If the value's timestamp is present, the Start Timestamp MUST be added right after it. If exemplar is present, the Start Timestamp MUST be added before it.
772
776
773
777
An example with a Metric with no labels, and a Sample with no timestamp and no Start Timestamp:
@@ -798,7 +802,7 @@ An example with a Metric with no labels, and a Sample with a timestamp and a Sta
798
802
foo_total 17.0 1520879607.789 st@1520430000.123
799
803
```
800
804
801
-
An example with a Metric with no labels, and a Sample without the `_total` suffix and with a timestamp and a start timestamp:
805
+
An example with a Metric with no labels, and without the `_total` suffix and a Sample with a timestamp and a start timestamp:
802
806
803
807
```openmetrics-add-eof
804
808
# TYPE foo counter
@@ -923,14 +927,14 @@ If present the Sample's Start Timestamp MUST be inlined with the Sample with a `
923
927
924
928
The quantiles MUST be sorted in increasing order of the quantile.
925
929
926
-
An example of a Metric with no labels and a Sample with Sum, Count and Start Timestamp values:
930
+
An example of a Metric with no labels and a Sample with Sum, Count and Start Timestamp:
An example of a Metric with no labels and a Sample with two quantiles and Start Timestamp values:
937
+
An example of a Metric with no labels and a Sample with two quantiles and Start Timestamp:
934
938
935
939
```openmetrics-add-eof
936
940
# TYPE foo summary
@@ -968,6 +972,8 @@ If there are negative (and/or positive) Native Buckets, then the fields `negativ
968
972
969
973
Native Bucket values MUST be ordered by their index, and their values MUST be placed in the `negative_buckets` (and/or `positive_buckets`) fields.
970
974
975
+
> NOTE: Bucket values are absolute counts, as opposed to some implementations that store bucket values as deltas relative to the preceding bucket.
976
+
971
977
Native Buckets that have a value of 0 SHOULD NOT be present.
972
978
973
979
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.
0 commit comments