Merge pull request #8375 from lafirest/fix/authn_metrics_clause

fix(metrics): fix authn metrics count clause error
This commit is contained in:
JianBo He 2022-07-01 15:53:52 +08:00 committed by GitHub
commit 127ecdbf77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 8 deletions

View File

@ -226,14 +226,15 @@ authenticate(#{listener := Listener, protocol := Protocol} = Credential, _AuthRe
ignore; ignore;
NAuthenticators -> NAuthenticators ->
Result = do_authenticate(ChainName, NAuthenticators, Credential), Result = do_authenticate(ChainName, NAuthenticators, Credential),
inc_authenticate_metric(
case Result of case Result of
{stop, {ok, _}} -> {stop, {ok, _}} ->
'authentication.success'; inc_authenticate_metric('authentication.success');
{stop, {error, _}} ->
inc_authenticate_metric('authentication.failure');
_ -> _ ->
'authentication.failure' ok
end end,
),
Result Result
end; end;
none -> none ->