fix(metrics): remove the client. prefix for AuthN/AuthZ metrics
This commit is contained in:
parent
4d0c60cacf
commit
45aa9d604b
|
@ -82,8 +82,8 @@ run_hooks(Name, Args, Acc) ->
|
||||||
|
|
||||||
-compile({inline, [inc_authz_metrics/1]}).
|
-compile({inline, [inc_authz_metrics/1]}).
|
||||||
inc_authz_metrics(allow) ->
|
inc_authz_metrics(allow) ->
|
||||||
emqx_metrics:inc('client.authorization.allow');
|
emqx_metrics:inc('authorization.allow');
|
||||||
inc_authz_metrics(deny) ->
|
inc_authz_metrics(deny) ->
|
||||||
emqx_metrics:inc('client.authorization.deny');
|
emqx_metrics:inc('authorization.deny');
|
||||||
inc_authz_metrics(cache_hit) ->
|
inc_authz_metrics(cache_hit) ->
|
||||||
emqx_metrics:inc('client.authorization.cache_hit').
|
emqx_metrics:inc('authorization.cache_hit').
|
||||||
|
|
|
@ -255,9 +255,9 @@
|
||||||
|
|
||||||
%% Statistic metrics for ACL checking
|
%% Statistic metrics for ACL checking
|
||||||
-define(STASTS_ACL_METRICS, [
|
-define(STASTS_ACL_METRICS, [
|
||||||
{counter, 'client.authorization.allow'},
|
{counter, 'authorization.allow'},
|
||||||
{counter, 'client.authorization.deny'},
|
{counter, 'authorization.deny'},
|
||||||
{counter, 'client.authorization.cache_hit'}
|
{counter, 'authorization.cache_hit'}
|
||||||
]).
|
]).
|
||||||
|
|
||||||
%% Overload protetion counters
|
%% Overload protetion counters
|
||||||
|
@ -687,9 +687,9 @@ reserved_idx('session.resumed') -> 221;
|
||||||
reserved_idx('session.takenover') -> 222;
|
reserved_idx('session.takenover') -> 222;
|
||||||
reserved_idx('session.discarded') -> 223;
|
reserved_idx('session.discarded') -> 223;
|
||||||
reserved_idx('session.terminated') -> 224;
|
reserved_idx('session.terminated') -> 224;
|
||||||
reserved_idx('client.authorization.allow') -> 300;
|
reserved_idx('authorization.allow') -> 300;
|
||||||
reserved_idx('client.authorization.deny') -> 301;
|
reserved_idx('authorization.deny') -> 301;
|
||||||
reserved_idx('client.authorization.cache_hit') -> 302;
|
reserved_idx('authorization.cache_hit') -> 302;
|
||||||
reserved_idx('olp.delay.ok') -> 400;
|
reserved_idx('olp.delay.ok') -> 400;
|
||||||
reserved_idx('olp.delay.timeout') -> 401;
|
reserved_idx('olp.delay.timeout') -> 401;
|
||||||
reserved_idx('olp.hbn') -> 402;
|
reserved_idx('olp.hbn') -> 402;
|
||||||
|
|
|
@ -52,9 +52,9 @@
|
||||||
|
|
||||||
-type sources() :: [source()].
|
-type sources() :: [source()].
|
||||||
|
|
||||||
-define(METRIC_ALLOW, 'client.authorization.matched.allow').
|
-define(METRIC_ALLOW, 'authorization.matched.allow').
|
||||||
-define(METRIC_DENY, 'client.authorization.matched.deny').
|
-define(METRIC_DENY, 'authorization.matched.deny').
|
||||||
-define(METRIC_NOMATCH, 'client.authorization.nomatch').
|
-define(METRIC_NOMATCH, 'authorization.nomatch').
|
||||||
|
|
||||||
-define(METRICS, [?METRIC_ALLOW, ?METRIC_DENY, ?METRIC_NOMATCH]).
|
-define(METRICS, [?METRIC_ALLOW, ?METRIC_DENY, ?METRIC_NOMATCH]).
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue