Skip to content

Commit c97e629

Browse files
authored
OM2: Metric/MetricFamily.Name escaping consistency (#2938)
* OM2: Metric/MetricFamily.Name escaping consistency Signed-off-by: bwplotka <bwplotka@gmail.com> * Apply suggestions from code review Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com> Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com> --------- Signed-off-by: bwplotka <bwplotka@gmail.com> Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
1 parent 7ca1285 commit c97e629

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

docs/specs/om/open_metrics_spec_2_0.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -691,6 +691,17 @@ There MUST NOT be an explicit separator between MetricFamilies. The next MetricF
691691

692692
MetricFamilies MUST NOT be interleaved.
693693

694+
The same MetricFamily's Name and Metric's Name SHOULD have the same quoting.
695+
696+
An example that would violate this:
697+
698+
```openmetrics-add-eof
699+
# TYPE "read_errors" counter
700+
# HELP read_errors The number of errors in the read path for fooDb.
701+
{"read_errors","service.name"="my_service"} 3482
702+
read_errors{"service.name"="my_service2"} 123
703+
```
704+
694705
#### MetricFamily metadata
695706

696707
There are four pieces of metadata: The MetricFamily name, TYPE, UNIT and HELP. An example of the metadata for a counter Metric called `foo_total` is:

0 commit comments

Comments
 (0)