Skip to content

Commit 6b8f369

Browse files
committed
more rephrasing around ComplexValue
Signed-off-by: György Krajcsovits <[email protected]>
1 parent a5240a7 commit 6b8f369

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

docs/specs/om/open_metrics_spec_2_0.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ metric-type = counter / gauge / histogram / gaugehistogram / stateset
427427
metric-type =/ info / summary / unknown
428428
429429
sample = metricname-and-labels SP number [SP timestamp] [SP start-timestamp] [exemplar] LF
430-
sample =/ metricname-and-labels SP "{" complextype "}" [SP timestamp] [SP start-timestamp] *exemplar LF
430+
sample =/ metricname-and-labels SP "{" complex-value "}" [SP timestamp] [SP start-timestamp] *exemplar LF
431431
432432
exemplar = SP HASH SP labels-in-braces SP number [SP timestamp]
433433
@@ -498,8 +498,8 @@ normal-char = %x00-09 / %x0B-21 / %x23-5B / %x5D-D7FF / %xE000-10FFFF
498498
; Lowercase st @ timestamp
499499
start-timestamp = %d115.116 "@" timestamp
500500
501-
; Complex types
502-
complextype = nativehistogram
501+
; Complex values
502+
complex-value = nativehistogram
503503
504504
nativehistogram = nh-count "," nh-sum "," nh-schema "," nh-zero-threshold "," nh-zero-count [ "," nh-negative-spans "," nh-negative-buckets ] [ "," nh-positive-spans "," nh-positive-buckets ]
505505
@@ -597,6 +597,10 @@ Floating point numbers MUST be represented either with a decimal point or using
597597

598598
Arbitrary integer and floating point rendering of numbers MUST NOT be used for "quantile" and "le" label values as in section "Canonical Numbers". They MAY be used anywhere else numbers are used.
599599

600+
###### ComplexValues
601+
602+
ComplexValue is represented as structured data with fields. There MUST NOT be any whitespace around fields. See the ABNF for exact details about the format and possible values.
603+
600604
###### Considerations: Canonical Numbers
601605

602606
Numbers in the "le" label values of histograms and "quantile" label values of summary metrics are special in that they're label values, and label values are intended to be opaque. As end users will likely directly interact with these string values, and as many monitoring systems lack the ability to deal with them as first-class numbers, it would be beneficial if a given number had the exact same text representation.
@@ -945,12 +949,9 @@ foo_sum 324789.3 [email protected]
945949

946950
##### Histogram with Native Buckets
947951

948-
The MetricPoint's value MUST be a complex data type.
949-
950-
Histograms with Native Buckets MUST use the integer native histogram data type.
952+
The MetricPoint's value MUST be a ComplexValue.
951953

952-
The integer native histogram data type is represented as structured data with fields. There MUST NOT be any whitespace around fields.
953-
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.
954+
The ComplexValue 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.
954955

955956
If there are no negative Native Buckets, then the fields `negative_spans` and `negative_buckets` SHOULD be omitted.
956957
If there are no positive Native Buckets, then the fields `positive_spans` and `positive_buckets` SHOULD be omitted.

0 commit comments

Comments
 (0)