fix(metrics): revert client.authenticate count method
This commit is contained in:
parent
c45cf62b3d
commit
7f18969f1e
|
@ -34,7 +34,7 @@
|
||||||
| {continue, binary(), map()}
|
| {continue, binary(), map()}
|
||||||
| {error, term()}.
|
| {error, term()}.
|
||||||
authenticate(Credential) ->
|
authenticate(Credential) ->
|
||||||
case emqx_hooks:run_fold('client.authenticate', [Credential], {ok, #{is_superuser => false}}) of
|
case run_hooks('client.authenticate', [Credential], {ok, #{is_superuser => false}}) of
|
||||||
ok ->
|
ok ->
|
||||||
{ok, #{is_superuser => false}};
|
{ok, #{is_superuser => false}};
|
||||||
Other ->
|
Other ->
|
||||||
|
|
|
@ -909,12 +909,8 @@ to_list(L) when is_list(L) -> L.
|
||||||
|
|
||||||
call(Call) -> gen_server:call(?MODULE, Call, infinity).
|
call(Call) -> gen_server:call(?MODULE, Call, infinity).
|
||||||
|
|
||||||
inc_authenticate_metric(Metric) ->
|
inc_authenticate_metric('authentication.success.anonymous' = Metric) ->
|
||||||
emqx_metrics:inc('client.authenticate'),
|
|
||||||
inc_authenticate_metric2(Metric).
|
|
||||||
|
|
||||||
inc_authenticate_metric2('authentication.success.anonymous' = Metric) ->
|
|
||||||
emqx_metrics:inc(Metric),
|
emqx_metrics:inc(Metric),
|
||||||
emqx_metrics:inc('authentication.success');
|
emqx_metrics:inc('authentication.success');
|
||||||
inc_authenticate_metric2(Metric) ->
|
inc_authenticate_metric(Metric) ->
|
||||||
emqx_metrics:inc(Metric).
|
emqx_metrics:inc(Metric).
|
||||||
|
|
Loading…
Reference in New Issue