Class ThreadPoolBulkheadMetricsCollector

java.lang.Object
io.prometheus.client.Collector
io.github.resilience4j.prometheus.collectors.ThreadPoolBulkheadMetricsCollector

public class ThreadPoolBulkheadMetricsCollector
extends io.prometheus.client.Collector
Collects bulkhead exposed Bulkhead.Metrics.
  • Nested Class Summary

    Nested Classes 
    Modifier and Type Class Description
    static class  ThreadPoolBulkheadMetricsCollector.MetricNames
    Defines possible configuration for metric names.

    Nested classes/interfaces inherited from class io.prometheus.client.Collector

    io.prometheus.client.Collector.Describable, io.prometheus.client.Collector.MetricFamilySamples, io.prometheus.client.Collector.Type
  • Field Summary

    Fields inherited from class io.prometheus.client.Collector

    MILLISECONDS_PER_SECOND, NANOSECONDS_PER_SECOND
  • Method Summary

    Modifier and Type Method Description
    java.util.List<io.prometheus.client.Collector.MetricFamilySamples> collect()  
    static ThreadPoolBulkheadMetricsCollector ofBulkheadRegistry​(io.github.resilience4j.bulkhead.ThreadPoolBulkheadRegistry bulkheadRegistry)
    Creates a new collector using given registry as source of bulkheads.
    static ThreadPoolBulkheadMetricsCollector ofBulkheadRegistry​(ThreadPoolBulkheadMetricsCollector.MetricNames names, io.github.resilience4j.bulkhead.ThreadPoolBulkheadRegistry bulkheadRegistry)
    Creates a new collector with custom metric names and using given supplier as source of bulkheads.

    Methods inherited from class io.prometheus.client.Collector

    checkMetricLabelName, checkMetricName, doubleToGoString, register, register, sanitizeMetricName

    Methods inherited from class java.lang.Object

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

    • ofBulkheadRegistry

      public static ThreadPoolBulkheadMetricsCollector ofBulkheadRegistry​(ThreadPoolBulkheadMetricsCollector.MetricNames names, io.github.resilience4j.bulkhead.ThreadPoolBulkheadRegistry bulkheadRegistry)
      Creates a new collector with custom metric names and using given supplier as source of bulkheads.
      Parameters:
      names - the custom metric names
      bulkheadRegistry - the source of bulkheads
    • ofBulkheadRegistry

      public static ThreadPoolBulkheadMetricsCollector ofBulkheadRegistry​(io.github.resilience4j.bulkhead.ThreadPoolBulkheadRegistry bulkheadRegistry)
      Creates a new collector using given registry as source of bulkheads.
      Parameters:
      bulkheadRegistry - the source of bulkheads
    • collect

      public java.util.List<io.prometheus.client.Collector.MetricFamilySamples> collect()
      Specified by:
      collect in class io.prometheus.client.Collector