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 classThreadPoolBulkheadMetricsCollector.MetricNamesDefines possible configuration for metric names. -
Field Summary
-
Method Summary
Modifier and Type Method Description java.util.List<io.prometheus.client.Collector.MetricFamilySamples>collect()static ThreadPoolBulkheadMetricsCollectorofBulkheadRegistry(io.github.resilience4j.bulkhead.ThreadPoolBulkheadRegistry bulkheadRegistry)Creates a new collector using givenregistryas source of bulkheads.static ThreadPoolBulkheadMetricsCollectorofBulkheadRegistry(ThreadPoolBulkheadMetricsCollector.MetricNames names, io.github.resilience4j.bulkhead.ThreadPoolBulkheadRegistry bulkheadRegistry)Creates a new collector with custom metric names and using givensupplieras source of bulkheads.
-
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 givensupplieras source of bulkheads.- Parameters:
names- the custom metric namesbulkheadRegistry- the source of bulkheads
-
ofBulkheadRegistry
public static ThreadPoolBulkheadMetricsCollector ofBulkheadRegistry(io.github.resilience4j.bulkhead.ThreadPoolBulkheadRegistry bulkheadRegistry)Creates a new collector using givenregistryas source of bulkheads.- Parameters:
bulkheadRegistry- the source of bulkheads
-
collect
public java.util.List<io.prometheus.client.Collector.MetricFamilySamples> collect()- Specified by:
collectin classio.prometheus.client.Collector
-