Class TaggedBulkheadMetrics

java.lang.Object
io.github.resilience4j.micrometer.tagged.TaggedBulkheadMetrics
All Implemented Interfaces:
io.micrometer.core.instrument.binder.MeterBinder

public class TaggedBulkheadMetrics
extends java.lang.Object
implements io.micrometer.core.instrument.binder.MeterBinder
A micrometer binder that is used to register Bulkhead exposed metrics.
  • Field Summary

    Fields 
    Modifier and Type Field Description
    protected java.util.concurrent.ConcurrentMap<java.lang.String,​java.util.Set<io.micrometer.core.instrument.Meter.Id>> meterIdMap  
    protected BulkheadMetricNames names  
  • Method Summary

    Modifier and Type Method Description
    protected void addMetrics​(io.micrometer.core.instrument.MeterRegistry meterRegistry, io.github.resilience4j.bulkhead.Bulkhead bulkhead)  
    void bindTo​(io.micrometer.core.instrument.MeterRegistry registry)  
    static TaggedBulkheadMetrics ofBulkheadRegistry​(io.github.resilience4j.bulkhead.BulkheadRegistry bulkheadRegistry)
    Creates a new binder that uses given registry as source of bulkheads.
    static TaggedBulkheadMetrics ofBulkheadRegistry​(io.github.resilience4j.micrometer.tagged.AbstractBulkheadMetrics.MetricNames names, io.github.resilience4j.bulkhead.BulkheadRegistry bulkheadRegistry)
    static TaggedBulkheadMetrics ofBulkheadRegistry​(BulkheadMetricNames names, io.github.resilience4j.bulkhead.BulkheadRegistry bulkheadRegistry)
    Creates a new binder defining custom metric names and using given registry as source of bulkheads.

    Methods inherited from class java.lang.Object

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

    • names

      protected final BulkheadMetricNames names
    • meterIdMap

      protected java.util.concurrent.ConcurrentMap<java.lang.String,​java.util.Set<io.micrometer.core.instrument.Meter.Id>> meterIdMap
  • Method Details

    • ofBulkheadRegistry

      public static TaggedBulkheadMetrics ofBulkheadRegistry​(io.github.resilience4j.bulkhead.BulkheadRegistry bulkheadRegistry)
      Creates a new binder that uses given registry as source of bulkheads.
      Parameters:
      bulkheadRegistry - the source of bulkheads
      Returns:
      The TaggedBulkheadMetrics instance.
    • ofBulkheadRegistry

      public static TaggedBulkheadMetrics ofBulkheadRegistry​(BulkheadMetricNames names, io.github.resilience4j.bulkhead.BulkheadRegistry bulkheadRegistry)
      Creates a new binder defining custom metric names and using given registry as source of bulkheads.
      Parameters:
      names - custom names of the metrics
      bulkheadRegistry - the source of bulkheads
      Returns:
      The TaggedBulkheadMetrics instance.
    • ofBulkheadRegistry

      @Deprecated public static TaggedBulkheadMetrics ofBulkheadRegistry​(io.github.resilience4j.micrometer.tagged.AbstractBulkheadMetrics.MetricNames names, io.github.resilience4j.bulkhead.BulkheadRegistry bulkheadRegistry)
      Creates a new binder defining custom metric names and using given registry as source of bulkheads.
      Parameters:
      names - custom names of the metrics
      bulkheadRegistry - the source of bulkheads
      Returns:
      The TaggedBulkheadMetrics instance.
    • bindTo

      public void bindTo​(io.micrometer.core.instrument.MeterRegistry registry)
      Specified by:
      bindTo in interface io.micrometer.core.instrument.binder.MeterBinder
    • addMetrics

      protected void addMetrics​(io.micrometer.core.instrument.MeterRegistry meterRegistry, io.github.resilience4j.bulkhead.Bulkhead bulkhead)