Interface Collector.Describable

All Known Implementing Classes:
Counter, Gauge, Histogram, Summary
Enclosing class:
Collector

public static interface Collector.Describable
  • Method Summary

    Modifier and Type
    Method
    Description
    Provide a list of metric families this Collector is expected to return.
  • Method Details

    • 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) then Collector.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.