fix(om2): consistency between model and exposition#2890
Open
fix(om2): consistency between model and exposition#2890
Conversation
The model said that: A MetricFamily MUST have a name, HELP, TYPE, and UNIT metadata. However the exposition does not require it to be exposed, therefore for the sake of consistency we make this SHOULD. Also having all caps conflated the model with the exposition. Also this allows very simple exposers to not think about this. Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
dashpole
reviewed
Mar 12, 2026
| #### MetricFamily | ||
|
|
||
| A MetricFamily MAY have zero or more Metrics. A MetricFamily MUST have a name, HELP, TYPE, and UNIT metadata. Every Metric within a MetricFamily MUST have a unique LabelSet. | ||
| A MetricFamily MAY have zero or more Metrics. Every Metric within a MetricFamily MUST have a unique LabelSet. A MetricFamily SHOULD have a name, Help, Type, and Unit metadata. |
Contributor
There was a problem hiding this comment.
well... You do definitely need a name, so we should probably keep that as a must
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The model said that: A MetricFamily MUST have a name, HELP, TYPE, and UNIT
metadata. However the exposition does not require it to be exposed,
therefore for the sake of consistency we make this SHOULD. Also having all caps conflated the model with the exposition.
Also this allows very simple exposers to not think about this.