Skip to content

Commit

Permalink
Issue ReactiveX#85: Added prometheus dashboard example for circuit br…
Browse files Browse the repository at this point in the history
…eaker. Fixed typo in readme.
  • Loading branch information
Oleksandr Goldobin authored and RobWin committed May 4, 2017
1 parent 527ab0b commit 21a2656
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion resilience4j-prometheus/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ For the rate limiter following metric with default name `rate_limiter` and label
The names of the rate limiters and circuit breakers are exposed using label `name`.

== Dashboard Example

image::dashboard.png[Circuit Breaker Dashboard Example]

== Usage

=== CircuitBreaker
Expand All @@ -39,6 +43,7 @@ final CircuitBreakerRegistry circuitBreakerRegistry = CircuitBreakerRegistry.ofD
final CircuitBreaker foo = circuitBreakerRegistry.circuitBreaker("foo");
final CircuitBreaker boo = circuitBreakerRegistry.circuitBreaker("boo");

// Registering metrics in prometeus CollectorRegistry
collectorRegistry.register(CircuitBreakerExports.ofCircuitBreakerRegistry(circuitBreakerRegistry));
--

Expand All @@ -48,7 +53,7 @@ collectorRegistry.register(CircuitBreakerExports.ofCircuitBreakerRegistry(circui
--
final CollectorRegistry collectorRegistry = CollectorRegistry.defaultRegistry;

final RateLimiterRegistry rateLimiterRegistry = CircuitBreakerRegistry.ofDefaults();
final RateLimiterRegistry rateLimiterRegistry = RateLimiterRegistry.ofDefaults();

final RateLimiter foo = rateLimiterRegistry.rateLimiter("foo");
final RateLimiter boo = rateLimiterRegistry.rateLimiter("boo");
Expand Down
Binary file added resilience4j-prometheus/dashboard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 21a2656

Please sign in to comment.