@Test public void customMetricNamesOverrideDefaultOnes() { CollectorRegistry registry = new CollectorRegistry(); CircuitBreakerMetricsCollector.ofCircuitBreakerRegistry( custom().callsMetricName("custom_calls") .stateMetricName("custom_state") .bufferedCallsMetricName("custom_buffered_calls") .slowCallsMetricName("custom_slow_calls") .failureRateMetricName("custom_failure_rate") .slowCallRateMetricName("custom_slow_rate") .build(), circuitBreakerRegistry).register(registry); assertThat(registry.getSampleValue( "custom_buffered_calls", new String[]{"name", "kind"}, new String[]{"backendA", "successful"} )).isNotNull(); assertThat(registry.getSampleValue( "custom_buffered_calls", new String[]{"name", "kind"}, new String[]{"backendA", "failed"} )).isNotNull(); assertThat(registry.getSampleValue( "custom_state", new String[]{"name", "state"}, new String[]{"backendA", "closed"} )).isNotNull(); }
public static CircuitBreakerMetricsCollector ofCircuitBreakerRegistry(MetricNames names, MetricOptions options, CircuitBreakerRegistry circuitBreakerRegistry) { return new CircuitBreakerMetricsCollector(names, options, circuitBreakerRegistry); }
CircuitBreakerMetricsCollector extends AbstractCircuitBreakerMetrics { public static CircuitBreakerMetricsCollector ofCircuitBreakerRegistry(MetricNames names, MetricOptions options, CircuitBreakerRegistry circuitBreakerRegistry) { return new CircuitBreakerMetricsCollector(names, options, circuitBreakerRegistry); } }
CircuitBreakerMetricsCollector extends AbstractCircuitBreakerMetrics { public static CircuitBreakerMetricsCollector ofCircuitBreakerRegistry(MetricNames names, MetricOptions options, CircuitBreakerRegistry circuitBreakerRegistry) { return new CircuitBreakerMetricsCollector(names, options, circuitBreakerRegistry); } private  CircuitBreakerMetricsCollector(MetricNames names, MetricOptions options,
        CircuitBreakerRegistry circuitBreakerRegistry); }
CircuitBreakerMetricsCollector extends AbstractCircuitBreakerMetrics { public static CircuitBreakerMetricsCollector ofCircuitBreakerRegistry(MetricNames names, MetricOptions options, CircuitBreakerRegistry circuitBreakerRegistry) { return new CircuitBreakerMetricsCollector(names, options, circuitBreakerRegistry); } private  CircuitBreakerMetricsCollector(MetricNames names, MetricOptions options,
        CircuitBreakerRegistry circuitBreakerRegistry); static CircuitBreakerMetricsCollector ofCircuitBreakerRegistry(MetricNames names,
        MetricOptions options, CircuitBreakerRegistry circuitBreakerRegistry); static CircuitBreakerMetricsCollector ofCircuitBreakerRegistry(MetricNames names,
        CircuitBreakerRegistry circuitBreakerRegistry); static CircuitBreakerMetricsCollector ofCircuitBreakerRegistry(
        CircuitBreakerRegistry circuitBreakerRegistry); @Override List<MetricFamilySamples> collect(); }
CircuitBreakerMetricsCollector extends AbstractCircuitBreakerMetrics { public static CircuitBreakerMetricsCollector ofCircuitBreakerRegistry(MetricNames names, MetricOptions options, CircuitBreakerRegistry circuitBreakerRegistry) { return new CircuitBreakerMetricsCollector(names, options, circuitBreakerRegistry); } private  CircuitBreakerMetricsCollector(MetricNames names, MetricOptions options,
        CircuitBreakerRegistry circuitBreakerRegistry); static CircuitBreakerMetricsCollector ofCircuitBreakerRegistry(MetricNames names,
        MetricOptions options, CircuitBreakerRegistry circuitBreakerRegistry); static CircuitBreakerMetricsCollector ofCircuitBreakerRegistry(MetricNames names,
        CircuitBreakerRegistry circuitBreakerRegistry); static CircuitBreakerMetricsCollector ofCircuitBreakerRegistry(
        CircuitBreakerRegistry circuitBreakerRegistry); @Override List<MetricFamilySamples> collect();  }