Skip to content

Commit 960207e

Browse files
authored
fix(om2.0): consistency of metric name is metric name (#2852)
Fix inconsistency for Info metric related to metric name is metric name rule. Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
1 parent 0327b4b commit 960207e

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

docs/specs/om/open_metrics_spec_2_0.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,8 @@ MetricFamilies of type StateSets MUST have an empty Unit string.
247247

248248
Info metrics are used to expose textual information which SHOULD NOT change during process lifetime. Common examples are an application's version, revision control commit, and the version of a compiler.
249249

250+
The MetricFamily name for Info metrics MUST end in `_info`.
251+
250252
A MetricPoint of an Info Metric contains a LabelSet. An Info MetricPoint's LabelSet MUST NOT have a label name which is the same as the name of a label of the LabelSet of its Metric.
251253

252254
Info MAY be used to encode ENUMs whose values do not change over time, such as the type of a network interface.
@@ -938,19 +940,19 @@ foo{entity="replica",foo="ccc"} 1.0
938940

939941
##### Info
940942

941-
The Sample MetricName for the value of a MetricPoint for a MetricFamily of type Info MUST have the suffix `_info`. The Sample value MUST always be 1.
943+
The Sample value MUST always be 1.
942944

943945
An example of a Metric with no labels, and one MetricPoint value with "name" and "version" labels:
944946

945947
```openmetrics-add-eof
946-
# TYPE foo info
948+
# TYPE foo_info info
947949
foo_info{name="pretty name",version="8.2.7"} 1
948950
```
949951

950952
An example of a Metric with label "entity" and one MetricPoint value with “name” and “version” labels:
951953

952954
```openmetrics-add-eof
953-
# TYPE foo info
955+
# TYPE foo_info info
954956
foo_info{entity="controller",name="pretty name",version="8.2.7"} 1.0
955957
foo_info{entity="replica",name="prettier name",version="8.1.9"} 1.0
956958
```

0 commit comments

Comments
 (0)