Class PrometheusRegistry.RegistrationInfo
java.lang.Object
io.prometheus.metrics.model.registry.PrometheusRegistry.RegistrationInfo
- Enclosing class:
PrometheusRegistry
Tracks registration information for each metric name to enable validation of type consistency,
label schema uniqueness, and help/unit consistency.
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateRegistrationInfo(MetricType type, Set<Set<String>> labelSchemas, String help, Unit unit) -
Method Summary
Modifier and TypeMethodDescription(package private) booleanaddLabelSet(Set<String> labelNames) Adds a label schema to this registration.(package private) MetricTypegetType()(package private) booleanisEmpty()Returns true if all label schemas have been unregistered.(package private) static PrometheusRegistry.RegistrationInfo(package private) voidremoveLabelSet(Set<String> labelNames) Removes a label schema from this registration.(package private) voidvalidateMetadata(String newHelp, Unit newUnit) Validates that the given help and unit are exactly equal to this registration.
-
Field Details
-
type
-
labelSchemas
-
help
-
unit
-
-
Constructor Details
-
RegistrationInfo
-
-
Method Details
-
of
static PrometheusRegistry.RegistrationInfo of(MetricType type, Set<String> labelNames, String help, Unit unit) -
validateMetadata
-
addLabelSet
-
removeLabelSet
-
isEmpty
boolean isEmpty()Returns true if all label schemas have been unregistered. -
getType
MetricType getType()
-