Jelajahi Sumber

fix: fix static check error

EMQ-YangM 3 tahun lalu
induk
melakukan
712cdb3152

+ 1 - 1
apps/emqx_authz/src/emqx_authz.erl

@@ -268,7 +268,7 @@ init_source(#{type := Type} = Source) ->
 
 init_metrics(Source) ->
     TypeName = type(Source),
-    ok = emqx_plugin_libs_metrics:create_metrics(
+    emqx_plugin_libs_metrics:create_metrics(
         authz_metrics,
         TypeName,
         [matched, allow, deny, ignore],

+ 1 - 1
apps/emqx_plugin_libs/src/emqx_plugin_libs_metrics.erl

@@ -72,7 +72,7 @@
     rate := #{atom() => rate()}
 }.
 -type handler_name() :: atom().
--type metric_id() :: binary().
+-type metric_id() :: binary() | atom().
 
 -define(CntrRef(Name), {?MODULE, Name}).
 -define(SAMPCOUNT_5M, (?SECS_5M div ?SAMPLING)).