Skip to content

Commit

Permalink
instr(auth): Tag authentication failure by number of attempts (#4011)
Browse files Browse the repository at this point in the history
We've been getting authentication errors. Tag with the number of
attempts to see how often this happens more than once. Suppress errors
for single failures.
  • Loading branch information
jjbayer authored Sep 9, 2024
1 parent 3680771 commit 559323c
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions relay-server/src/services/upstream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1202,10 +1202,13 @@ impl AuthMonitor {
}
}
Err(err) => {
relay_log::error!(
error = &err as &dyn std::error::Error,
"authentication encountered error"
);
if backoff.attempt() > 1 {
relay_log::error!(
error = &err as &dyn std::error::Error,
tags.attempts = backoff.attempt(),
"authentication encountered error",
);
}

// ChannelClosed indicates that there are no more listeners, so we stop
// authenticating.
Expand Down

0 comments on commit 559323c

Please sign in to comment.