Class BulkheadMetricsCollector
java.lang.Object
io.prometheus.client.Collector
io.github.resilience4j.prometheus.collectors.BulkheadMetricsCollector
public class BulkheadMetricsCollector
extends io.prometheus.client.Collector
Collects bulkhead exposed
Bulkhead.Metrics.-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBulkheadMetricsCollector.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 BulkheadMetricsCollectorofBulkheadRegistry(io.github.resilience4j.bulkhead.BulkheadRegistry bulkheadRegistry)Creates a new collector using givenregistryas source of bulkheads.static BulkheadMetricsCollectorofBulkheadRegistry(BulkheadMetricsCollector.MetricNames names, io.github.resilience4j.bulkhead.BulkheadRegistry bulkheadRegistry)Creates a new collector with custom metric names and using givensupplieras source of bulkheads.
-
Method Details
-
ofBulkheadRegistry
public static BulkheadMetricsCollector ofBulkheadRegistry(BulkheadMetricsCollector.MetricNames names, io.github.resilience4j.bulkhead.BulkheadRegistry 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 BulkheadMetricsCollector ofBulkheadRegistry(io.github.resilience4j.bulkhead.BulkheadRegistry 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
-