Package io.prometheus.client
Interface Collector.Describable
-
- Enclosing class:
- Collector
public static interface Collector.Describable
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description List<Collector.MetricFamilySamples>
describe()
Provide a list of metric families this Collector is expected to return.
-
-
-
Method Detail
-
describe
List<Collector.MetricFamilySamples> describe()
Provide a list of metric families this Collector is expected to return. These should exclude the samples. This is used by the registry to detect collisions and duplicate registrations. Usually custom collectors do not have to implement Describable. If Describable is not implemented and the CollectorRegistry was created with auto describe enabled (which is the case for the default registry) thenCollector.collect()
will be called at registration time instead of describe. If this could cause problems, either implement a proper describe, or if that's not practical have describe return an empty list.
-
-