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  HealthMeterRegistry.Builder  

    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, java.util.Collection<ServiceLevelObjective> serviceLevelObjectives, java.util.Collection<io.micrometer.core.instrument.config.MeterFilter> serviceLevelObjectiveFilters, io.micrometer.core.instrument.Clock clock, java.util.concurrent.ThreadFactory threadFactory)  
  • Method Summary

    Modifier and Type Method Description
    static HealthMeterRegistry.Builder builder​(HealthConfig config)  
    void close()  
    protected java.util.concurrent.TimeUnit getBaseTimeUnit()  
    java.util.Collection<ServiceLevelObjective> getServiceLevelObjectives()  
    void start​(java.util.concurrent.ThreadFactory threadFactory)  
    void stop()  

    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, summary, summary, timer, timer

    Methods inherited from class java.lang.Object

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

    • HealthMeterRegistry

      protected HealthMeterRegistry​(HealthConfig config, java.util.Collection<ServiceLevelObjective> serviceLevelObjectives, java.util.Collection<io.micrometer.core.instrument.config.MeterFilter> serviceLevelObjectiveFilters, io.micrometer.core.instrument.Clock clock, java.util.concurrent.ThreadFactory threadFactory)
  • Method Details

    • getBaseTimeUnit

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

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

      public java.util.Collection<ServiceLevelObjective> getServiceLevelObjectives()
    • start

      public void start​(java.util.concurrent.ThreadFactory threadFactory)
    • stop

      public void stop()
    • close

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