Skip to content

Commit f140aaa

Browse files
authored
feat(om2): expand Extensions and Improvements section (#2934)
- Add sentence about Metric name now required to match MetricFamily name - Add list of notable changes from OpenMetrics 1.0 Coded with Claude Sonnet 4.6. Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
1 parent 15ec08d commit f140aaa

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

docs/specs/om/open_metrics_spec_2_0.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1167,8 +1167,21 @@ We want to allow monitoring systems to get usable information from an OpenMetric
11671167

11681168
This principle is applied consistently throughout the standard. For example, it is encouraged that a MetricFamily's unit is duplicated in the name so that the unit is available for systems that don't understand the unit metadata. However, as opposed to the previous version, duplicating the unit name and adding the `_total` suffix for counters is not enforced anymore to foster compatibility with OpenTelemetry.
11691169

1170+
Another change from the previous version is that the Metric name is now required to strictly match its MetricFamily name. In OpenMetrics 1.0, the MetricFamily name was the Metric name without type-specific suffixes such as `_total` or `_bucket`. This change improves parser reliability by making the association between a Metric and its MetricFamily unambiguous.
1171+
11701172
Each line exposed via this format is self-contained in the sense that the information derived from it is complete and can be put into storage in a meaningful way. This is achieved by the introduction of composite types and moving the Start Timestamp (formerly Created value) in-line. These are major changes from the first version, made necessary by the introduction of native histograms in Prometheus and the performance of parsing the `_created` lines in the previous version.
11711173

1174+
A summary of notable changes from OpenMetrics 1.0:
1175+
1176+
- Start Timestamp moved inline with `st@` notation, replacing separate `_created` samples.
1177+
- Metric name must exactly match its MetricFamily name; implicit suffix stripping is removed.
1178+
- `_total` suffix for Counters and unit suffixes changed from MUST to SHOULD.
1179+
- Histogram, GaugeHistogram, and Summary values consolidated into a single CompositeValue line; Count and Sum are now required.
1180+
- Native Histograms with exponential bucket schemas introduced.
1181+
- UTF-8 metric and label names allowed with quoting.
1182+
- Exemplar timestamps are now mandatory; multiple exemplars per sample are allowed.
1183+
- Protobuf format specification removed.
1184+
11721185
### Units and Base Units
11731186

11741187
For consistency across systems and to avoid confusion, units are largely based on SI base units. Base units include seconds, bytes, joules, grams, meters, ratios, volts, amperes, and celsius. Units should be provided where they are applicable.

0 commit comments

Comments
 (0)