@Override
    public List<MetricFamilySamples> collect() {

        final GaugeMetricFamily stats = new GaugeMetricFamily(
                name,
                "Rate Limiter Stats",
                asList("name", "param"));

        for (RateLimiter rateLimiter : rateLimitersSupplier.get()) {

            final RateLimiter.Metrics metrics = rateLimiter.getMetrics();

            stats.addMetric(
                    asList(rateLimiter.getName(), "available_permissions"),
                    metrics.getAvailablePermissions());

            stats.addMetric(
                    asList(rateLimiter.getName(), "waiting_threads"),
                    metrics.getNumberOfWaitingThreads());
        }

        return singletonList(stats);
    }
@ Override public List < MetricFamilySamples > collect ( ) { final GaugeMetricFamily stats = new GaugeMetricFamily ( name , "Rate Limiter Stats" , asList ( "name" , "param" ) ) ; for ( RateLimiter rateLimiter : rateLimitersSupplier . get ( ) ) { final RateLimiter . Metrics metrics = rateLimiter . getMetrics ( ) ; stats . addMetric ( asList ( rateLimiter . getName ( ) , "available_permissions" ) , metrics . getAvailablePermissions ( ) ) ; stats . addMetric ( asList ( rateLimiter . getName ( ) , "waiting_threads" ) , metrics . getNumberOfWaitingThreads ( ) ) ; } return singletonList ( stats ) ; }
{@inheritDoc}