Skip to content

Commit

Permalink
rename up and down metrics for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
hcaumeil committed Aug 8, 2023
1 parent 3feeca8 commit 182b579
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion doc/debugging_strategies.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ The `sozu.http.errors` counter is the sum of failed requests. It contains the fo
Going further, backend connections issues are tracked by the following metrics:

* `sozu.backend.connections.error`: could not connect to a backend server
* `sozu.down`: the retry policy triggered and marked the backend server as down
* `sozu.backend.down`: the retry policy triggered and marked the backend server as down

The `sozu.http.503.errors` metric is incremented after a request sent back a 503 error, and a 503 error is sent
after the circuit breaker triggered (we wait for 3 failed connections to the backend server).
Expand Down
4 changes: 2 additions & 2 deletions lib/src/protocol/kawa_h1/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1292,7 +1292,7 @@ impl<Front: SocketHandler, L: ListenerHandler + L7ListenerHandler> Http<Front, L

if backend.retry_policy.is_down() {
incr!(
"up",
"backend.up",
self.cluster_id.as_deref(),
metrics.backend_id.as_deref()
);
Expand Down Expand Up @@ -1340,7 +1340,7 @@ impl<Front: SocketHandler, L: ListenerHandler + L7ListenerHandler> Http<Front, L
backend.backend_id, backend.address
);
incr!(
"down",
"backend.down",
self.cluster_id.as_deref(),
metrics.backend_id.as_deref()
);
Expand Down
4 changes: 2 additions & 2 deletions lib/src/tcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ impl TcpSession {

if backend.retry_policy.is_down() {
incr!(
"up",
"backend.up",
self.cluster_id.as_deref(),
self.metrics.backend_id.as_deref()
);
Expand Down Expand Up @@ -522,7 +522,7 @@ impl TcpSession {
backend.backend_id, backend.address
);
incr!(
"down",
"backend.down",
self.cluster_id.as_deref(),
self.metrics.backend_id.as_deref()
);
Expand Down

0 comments on commit 182b579

Please sign in to comment.