File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
resilience4j-micrometer/src/main/java/io/github/resilience4j/micrometer Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,26 @@ public static CircuitBreakerMetrics ofCircuitBreakerRegistry(CircuitBreakerRegis
49
49
return new CircuitBreakerMetrics (circuitBreakerRegistry .getAllCircuitBreakers ());
50
50
}
51
51
52
+ /**
53
+ * Creates a new instance CircuitBreakerMetrics {@link CircuitBreakerMetrics} with
54
+ * an {@link Iterable} of circuit breakers as a source.
55
+ *
56
+ * @param circuitBreakers the circuit breakers
57
+ */
58
+ public static CircuitBreakerMetrics ofIterable (Iterable <CircuitBreaker > circuitBreakers ) {
59
+ return new CircuitBreakerMetrics (circuitBreakers );
60
+ }
61
+
62
+ /**
63
+ * Creates a new instance CircuitBreakerMetrics {@link CircuitBreakerMetrics} with
64
+ * an {@link Iterable} of circuit breakers as a source.
65
+ *
66
+ * @param circuitBreakers the circuit breakers
67
+ */
68
+ public static CircuitBreakerMetrics ofIterable (String prefix , Iterable <CircuitBreaker > circuitBreakers ) {
69
+ return new CircuitBreakerMetrics (circuitBreakers , prefix );
70
+ }
71
+
52
72
@ Override
53
73
public void bindTo (MeterRegistry registry ) {
54
74
for (CircuitBreaker circuitBreaker : circuitBreakers ) {
You can’t perform that action at this time.
0 commit comments