Class TaggedThreadPoolBulkheadMetrics

  • All Implemented Interfaces:
    io.micrometer.core.instrument.binder.MeterBinder

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

      • meterIdMap

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

      • ofThreadPoolBulkheadRegistry

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

        public static TaggedThreadPoolBulkheadMetrics ofThreadPoolBulkheadRegistry​(ThreadPoolBulkheadMetricNames names,
                                                                                   io.github.resilience4j.bulkhead.ThreadPoolBulkheadRegistry 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 TaggedThreadPoolBulkheadMetrics 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.ThreadPoolBulkhead bulkhead)