Class HealthMeterRegistry

java.lang.Object
io.micrometer.core.instrument.MeterRegistry
io.micrometer.core.instrument.simple.SimpleMeterRegistry
io.micrometer.health.HealthMeterRegistry

@Incubating(since="1.6.0") public class HealthMeterRegistry extends io.micrometer.core.instrument.simple.SimpleMeterRegistry
Configured with a set of queries, provides an overall health indicator given a set of service level objectives.

For efficiency, this registry automatically denies all metrics that aren't part of the definition of a service level objective.

Service level objectives can specify one or more MeterBinder that they require to be registered in order to perform their tests. These are automatically bound at construction time.

Since:
1.6.0
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     

    Nested classes/interfaces inherited from class io.micrometer.core.instrument.MeterRegistry

    io.micrometer.core.instrument.MeterRegistry.Config, io.micrometer.core.instrument.MeterRegistry.More
  • Field Summary

    Fields inherited from class io.micrometer.core.instrument.MeterRegistry

    clock
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    HealthMeterRegistry(HealthConfig config, Collection<ServiceLevelObjective> serviceLevelObjectives, Collection<io.micrometer.core.instrument.config.MeterFilter> serviceLevelObjectiveFilters, io.micrometer.core.instrument.Clock clock, ThreadFactory threadFactory)
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    void
     
    protected TimeUnit
     
     
    void
    start(ThreadFactory threadFactory)
     
    void
     

    Methods inherited from class io.micrometer.core.instrument.simple.SimpleMeterRegistry

    defaultHistogramConfig, newCounter, newDistributionSummary, newFunctionCounter, newFunctionTimer, newGauge, newLongTaskTimer, newMeter, newTimer

    Methods inherited from class io.micrometer.core.instrument.MeterRegistry

    clear, config, counter, counter, find, forEachMeter, gauge, gauge, gauge, gauge, gaugeCollectionSize, gaugeMapSize, get, getConventionName, getConventionTags, getMeters, isClosed, meterRegistrationFailed, more, newLongTaskTimer, newTimeGauge, remove, remove, removeByPreFilterId, summary, summary, timer, timer

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • getBaseTimeUnit

      protected TimeUnit getBaseTimeUnit()
      Overrides:
      getBaseTimeUnit in class io.micrometer.core.instrument.simple.SimpleMeterRegistry
    • builder

      public static HealthMeterRegistry.Builder builder(HealthConfig config)
    • getServiceLevelObjectives

      public Collection<ServiceLevelObjective> getServiceLevelObjectives()
    • start

      public void start(ThreadFactory threadFactory)
    • stop

      public void stop()
    • close

      public void close()
      Overrides:
      close in class io.micrometer.core.instrument.MeterRegistry