Skip to content

Commit

Permalink
save 4xx and 5xx status codes in cluster metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
Keksoj committed Oct 23, 2023
1 parent 9648cf0 commit 6b53071
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/src/protocol/kawa_h1/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@ impl<Front: SocketHandler, L: ListenerHandler + L7ListenerHandler> Http<Front, L

fn writable_default_answer(&mut self, metrics: &mut SessionMetrics) -> StateResult {
let res = match self.status {
SessionStatus::DefaultAnswer(_, ref buf, mut index) => {
SessionStatus::DefaultAnswer(status, ref buf, mut index) => {
let len = buf.len();

let mut sz = 0usize;
Expand All @@ -866,6 +866,7 @@ impl<Front: SocketHandler, L: ListenerHandler + L7ListenerHandler> Http<Front, L
}

if index == len {
save_http_status_metric(Some(status.into()), self.log_context());
self.log_default_answer_success(metrics);
self.frontend_readiness.reset();
self.backend_readiness.reset();
Expand Down

0 comments on commit 6b53071

Please sign in to comment.