MicrometerBridge

Binds resilience-pattern statistics to a Micrometer MeterRegistry as gauges.

Each bind* function registers a gauge that reads the pattern's current statistics snapshot on every scrape (via MeterRegistry.gauge semantics) — there is no background polling loop to manage or shut down.

Functions

Link copied to clipboard
fun bindAdaptiveLimiter(registry: MeterRegistry, name: String, limiter: AdaptiveLimiter)

Binds AdaptiveLimiterStatistics gauges for limiter under metric prefix resilience.adaptive_limiter.

Link copied to clipboard
fun bindBulkhead(registry: MeterRegistry, name: String, bulkhead: Bulkhead)

Binds BulkheadStatistics gauges for bulkhead under metric prefix resilience.bulkhead.

Link copied to clipboard
fun bindCache(registry: MeterRegistry, name: String, cache: Cache<*, *>)

Binds CacheStatistics gauges for cache under metric prefix resilience.cache.

Link copied to clipboard
fun bindCircuitBreaker(registry: MeterRegistry, name: String, circuitBreaker: CircuitBreaker)

Binds circuit breaker state/failure gauges for circuitBreaker under metric prefix resilience.circuit_breaker.

Link copied to clipboard
fun <T> bindFailover(registry: MeterRegistry, name: String, failover: Failover<T>)

Binds FailoverProviderStatistics gauges for every provider in failover, under metric prefix resilience.failover, tagged by both name (the failover chain) and provider.

Link copied to clipboard
fun bindRateLimiter(registry: MeterRegistry, name: String, rateLimiter: RateLimiter)

Binds RateLimiterStatistics gauges for rateLimiter under metric prefix resilience.rate_limiter.

Link copied to clipboard
fun bindTimeLimiter(registry: MeterRegistry, name: String, timeLimiter: TimeLimiter)

Binds TimeLimiterStatistics gauges for timeLimiter under metric prefix resilience.time_limiter.