Search in sources :

Example 1 with AVAILABLE_CONCURRENT_CALLS

use of io.github.resilience4j.bulkhead.utils.MetricNames.AVAILABLE_CONCURRENT_CALLS in project resilience4j by resilience4j.

the class BulkheadMetrics method bindTo.

@Override
public void bindTo(MeterRegistry registry) {
    for (Bulkhead bulkhead : bulkheads) {
        final String name = bulkhead.getName();
        Gauge.builder(getName(prefix, name, AVAILABLE_CONCURRENT_CALLS), bulkhead, (cb) -> cb.getMetrics().getAvailableConcurrentCalls()).register(registry);
    }
}
Also used : BulkheadRegistry(io.github.resilience4j.bulkhead.BulkheadRegistry) Gauge(io.micrometer.core.instrument.Gauge) DEFAULT_PREFIX(io.github.resilience4j.bulkhead.utils.MetricNames.DEFAULT_PREFIX) MetricUtils.getName(io.github.resilience4j.micrometer.MetricUtils.getName) MeterRegistry(io.micrometer.core.instrument.MeterRegistry) Objects.requireNonNull(java.util.Objects.requireNonNull) Bulkhead(io.github.resilience4j.bulkhead.Bulkhead) MeterBinder(io.micrometer.core.instrument.binder.MeterBinder) AVAILABLE_CONCURRENT_CALLS(io.github.resilience4j.bulkhead.utils.MetricNames.AVAILABLE_CONCURRENT_CALLS) Bulkhead(io.github.resilience4j.bulkhead.Bulkhead)

Aggregations

Bulkhead (io.github.resilience4j.bulkhead.Bulkhead)1 BulkheadRegistry (io.github.resilience4j.bulkhead.BulkheadRegistry)1 AVAILABLE_CONCURRENT_CALLS (io.github.resilience4j.bulkhead.utils.MetricNames.AVAILABLE_CONCURRENT_CALLS)1 DEFAULT_PREFIX (io.github.resilience4j.bulkhead.utils.MetricNames.DEFAULT_PREFIX)1 MetricUtils.getName (io.github.resilience4j.micrometer.MetricUtils.getName)1 Gauge (io.micrometer.core.instrument.Gauge)1 MeterRegistry (io.micrometer.core.instrument.MeterRegistry)1 MeterBinder (io.micrometer.core.instrument.binder.MeterBinder)1 Objects.requireNonNull (java.util.Objects.requireNonNull)1