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
# HELP "quoting_example" Number of goroutines that currently exist.
474
+
{"quoting_example","foo"="bar"} 4.5
442
475
# EOF
443
476
```
444
477
@@ -538,6 +571,8 @@ The value of a UNIT or HELP line MAY be empty. This MUST be treated as if no met
538
571
# HELP foo_seconds Some text and \n some \" escaping
539
572
```
540
573
574
+
See the UTF-8 Quoting section for circumstances where the metric name MUST be enclosed in double quotes.
575
+
541
576
There MUST NOT be more than one of each type of metadata line for a MetricFamily. The ordering SHOULD be TYPE, UNIT, HELP.
542
577
543
578
Aside from this metadata and the EOF line at the end of the message, you MUST NOT expose lines beginning with a #.
@@ -566,6 +601,13 @@ Label values MAY be any valid UTF-8 value, so escaping MUST be applied as per th
566
601
bar_seconds_count{a="x",b="escaping\" example \n "} 0
567
602
```
568
603
604
+
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.
605
+
See the UTF-8 Quoting section for specifics.
606
+
607
+
```openmetrics-add-eof
608
+
{"\"bar\".seconds.count","b\\"="escaping\" example \n "} 0
609
+
```
610
+
569
611
The rendering of values for a MetricPoint can include additional labels (e.g. the "le" label for a Histogram type), which MUST be rendered in the same way as a Metric's own LabelSet.
0 commit comments