Skip to content

feat(om1.1): relax the requirements around unit and total suffixes#2750

Merged
krajorama merged 3 commits intomainfrom
krajo/om1.1-relax-suffix-alt2
Oct 8, 2025
Merged

feat(om1.1): relax the requirements around unit and total suffixes#2750
krajorama merged 3 commits intomainfrom
krajo/om1.1-relax-suffix-alt2

Conversation

@krajorama
Copy link
Member

@krajorama krajorama commented Oct 3, 2025

Allow exposers to expose metrics that do not put _total or unit as suffix to metric names.

Out of scope: note that this does not relax rules around the uniqueness of metric family names!

Alternatives considered:

  1. Do nothing.
  2. Introduce new mime type openmetrics-permissive-text and only relax rules if content negotiation yields permissive.
  3. Introduce new mime type openmetrics-strict-text and only relax rules if content negotiation is not strict.
  4. Only relax rules for ingestors (feat(om1.1): relax the acceptance rules around unit and total suffixes #2745 ).
  5. Require metadata to be present if suffix is not.

Related to prometheus/OpenMetrics#286

Allow exposers to expose metrics that do not put `_total` or unit
as suffix to metric names.

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Co-authored-by: David Ashpole <dashpole@google.com>
Signed-off-by: George Krajcsovits <krajorama@users.noreply.github.com>
@ywwg
Copy link
Member

ywwg commented Oct 3, 2025

PR description needs to be updated

##### Counter

The MetricPoint's Total Value Sample MetricName MUST have the suffix `_total`. If present the MetricPoint's Created Value Sample MetricName MUST have the suffix `_created`.
The MetricPoint's Total Value Sample MetricName SHOULD have the suffix `_total`. If present the MetricPoint's Created Value Sample MetricName MUST have the suffix `_created`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmmm, I'm not sure how Otel deals with created metrics. I am tempted not to have any MUSTs around names so that we can truly allow anything and not be against the spec (no matter how much we discourage it)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need a MUST for the _created series, otherwise it wouldn't be the _created series :).

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
@krajorama krajorama merged commit 66bd52f into main Oct 8, 2025
5 checks passed
@krajorama krajorama deleted the krajo/om1.1-relax-suffix-alt2 branch October 8, 2025 07:42
krajorama added a commit that referenced this pull request Oct 30, 2025
Fixes: prometheus/OpenMetrics#286

Based on #2750 and #2751

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
krajorama added a commit that referenced this pull request Oct 31, 2025
Fixes: prometheus/OpenMetrics#286

Based on #2750 and #2751

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants