Repository navigation
Provide more specific password login failure reasons in metrics - #5862
Open
reivilibre wants to merge 3 commits into
Open
reivilibre wants to merge 3 commits into
reivilibre wants to merge 3 commits into
Conversation
Deploying matrix-authentication-service-docs with
|
| Latest commit: |
0b9d97f
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://1a6a718d.matrix-authentication-service-docs.pages.dev |
| Branch Preview URL: | https://rei-better-login-fail-reason.matrix-authentication-service-docs.pages.dev |
sandhose
requested changes
Jul 28, 2026
|
|
||
| if !form_state.is_valid() { | ||
| tracing::warn!("Invalid login form: {form_state:?}"); | ||
| PASSWORD_LOGIN_COUNTER.add(1, &[KeyValue::new(RESULT, "error")]); |
Member
There was a problem hiding this comment.
I think to avoid breaking the existing metric, I would rather add a new label? like {result="error", reason="form-invalid"}? Most dashboard and alerting rules should anyway sum on (result) … or similar since MAS scales horizontally and usually has multiple instances, so adding cardinality with a new label isn't a breaking change
Member
Author
There was a problem hiding this comment.
Fair enough, though note result=mismatch is already a potential label. Having the split reason is going to feel a little bit inconsistent
reivilibre
requested review from
barodeur
and removed request for
a team and
barodeur
December 1, 2026 15:31
# Conflicts: # crates/handlers/src/views/login.rs
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is probably not ready to merge as-is, but I just got paged because we had a large rate of 'error' password logins.
Problem is, this seems to not be a very useful metric currently and it seems like it could just be someone hitting their ratelimit and spamming requests.
I'm opening this as a discussion starter, but we probably want to figure out what we actually want from the alerting on this one.