use of io.github.resilience4j.ratelimiter.utils.MetricNames.WAITING_THREADS in project resilience4j by resilience4j.
the class RateLimiterMetrics method bindTo.
@Override
public void bindTo(MeterRegistry registry) {
for (RateLimiter rateLimiter : rateLimiters) {
final String name = rateLimiter.getName();
Gauge.builder(getName(prefix, name, AVAILABLE_PERMISSIONS), rateLimiter, (cb) -> cb.getMetrics().getAvailablePermissions()).register(registry);
Gauge.builder(getName(prefix, name, WAITING_THREADS), rateLimiter, (cb) -> cb.getMetrics().getNumberOfWaitingThreads()).register(registry);
}
}
Aggregations