@Test public void customMetricNamesOverrideDefaultOnes() { CollectorRegistry registry = new CollectorRegistry(); RateLimiterMetricsCollector.ofRateLimiterRegistry( RateLimiterMetricsCollector.MetricNames.custom() .availablePermissionsMetricName("custom_available_permissions") .waitingThreadsMetricName("custom_waiting_threads") .build(), rateLimiterRegistry).register(registry); assertThat(registry.getSampleValue( "custom_available_permissions", new String[]{"name"}, new String[]{"backendA"} )).isNotNull(); assertThat(registry.getSampleValue( "custom_waiting_threads", new String[]{"name"}, new String[]{"backendA"} )).isNotNull(); }
public static RateLimiterMetricsCollector ofRateLimiterRegistry(MetricNames names, RateLimiterRegistry rateLimiterRegistry) { return new RateLimiterMetricsCollector(names, rateLimiterRegistry); }
RateLimiterMetricsCollector extends Collector { public static RateLimiterMetricsCollector ofRateLimiterRegistry(MetricNames names, RateLimiterRegistry rateLimiterRegistry) { return new RateLimiterMetricsCollector(names, rateLimiterRegistry); } }
RateLimiterMetricsCollector extends Collector { public static RateLimiterMetricsCollector ofRateLimiterRegistry(MetricNames names, RateLimiterRegistry rateLimiterRegistry) { return new RateLimiterMetricsCollector(names, rateLimiterRegistry); } private  RateLimiterMetricsCollector(MetricNames names,
        RateLimiterRegistry rateLimiterRegistry); }
RateLimiterMetricsCollector extends Collector { public static RateLimiterMetricsCollector ofRateLimiterRegistry(MetricNames names, RateLimiterRegistry rateLimiterRegistry) { return new RateLimiterMetricsCollector(names, rateLimiterRegistry); } private  RateLimiterMetricsCollector(MetricNames names,
        RateLimiterRegistry rateLimiterRegistry); static RateLimiterMetricsCollector ofRateLimiterRegistry(MetricNames names,
        RateLimiterRegistry rateLimiterRegistry); static RateLimiterMetricsCollector ofRateLimiterRegistry(
        RateLimiterRegistry rateLimiterRegistry); @Override List<MetricFamilySamples> collect(); }
RateLimiterMetricsCollector extends Collector { public static RateLimiterMetricsCollector ofRateLimiterRegistry(MetricNames names, RateLimiterRegistry rateLimiterRegistry) { return new RateLimiterMetricsCollector(names, rateLimiterRegistry); } private  RateLimiterMetricsCollector(MetricNames names,
        RateLimiterRegistry rateLimiterRegistry); static RateLimiterMetricsCollector ofRateLimiterRegistry(MetricNames names,
        RateLimiterRegistry rateLimiterRegistry); static RateLimiterMetricsCollector ofRateLimiterRegistry(
        RateLimiterRegistry rateLimiterRegistry); @Override List<MetricFamilySamples> collect();  }