Skip to content

Commit

Permalink
fix: use gauge instead histogram for replication lag metric (#159)
Browse files Browse the repository at this point in the history
  • Loading branch information
AnastasiiaVashchuk authored Oct 5, 2023
1 parent d6a1399 commit 0d952d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/lib/circuit_breaker/src/replication_lag.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ impl CircuitBreaker for ReplicationLagChecker {
.get_replication_lag_sec()
.await;

metrics::histogram!("circuit_breaker.replication_lag", lag as f64);
metrics::gauge!("circuit_breaker.replication_lag", lag as f64);
match self.replication_lag_limit_sec {
Some(replication_lag_limit_sec) if lag > replication_lag_limit_sec => Err(
CircuitBreakerError::ReplicationLag(lag, replication_lag_limit_sec),
Expand Down

0 comments on commit 0d952d4

Please sign in to comment.