prometheus / OpenMetrics

Evolving the Prometheus exposition format into a standard.
https://openmetrics.io
Apache License 2.0
2.37k stars 171 forks source link

Please clarify stateset #242

Closed th-developer closed 2 years ago

th-developer commented 2 years ago

The description of OpenMetrics seems to be a bit unclear. Regarding the description of a StateSet in the Section 'Data Model' / 'Metric Types' the first sentence starts with introducing 2 new terms 'bitset' and 'ENUM' It seems a type StateSet models both, a set of exclusive states and a set of flags each representing a individual state property?

this is my conclusion because of the sample in section 'Wire Format'. The sample shows non-exclusive states:

foo{entity="replica",foo="a"} 1.0
foo{entity="replica",foo="bb"} 0.0
foo{entity="replica",foo="ccc"} 1.0

back to section 'Data Model': As long as the the type does not make a distinction between exclusive and non-exclusive states the clause "if ... as ENUM" is not a property of the model. Instead it is a property of a source of type enumeration which a developer wants to map on an OpenMetrics StateSet....

brian-brazil commented 2 years ago

It seems a type StateSet models both, a set of exclusive states and a set of flags each representing a individual state property?

Yes.

Instead it is a property of a source of type enumeration which a developer wants to map on an OpenMetrics StateSet

Yes.

th-developer commented 2 years ago

thanx!!