Skip to content

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.

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>
```openmetrics-add-eof
# TYPE foo counter
foo 17.0 1520879607.789
foo_created 1520430000.123 1520879607.789
Copy link
Contributor

Choose a reason for hiding this comment

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

needs three ticks to fix formatting

@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 :).

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