fix(metrics): fix authn metrics count clause error

This commit is contained in:
firest 2022-07-01 15:14:46 +08:00
parent 9ea28cf093
commit 9170a05990
1 changed files with 9 additions and 8 deletions

View File

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