Jelajahi Sumber

Merge pull request #10457 from HJianBo/hide-statsd

chore: deprecate statsd
zhongwencool 2 tahun lalu
induk
melakukan
72685beb72

+ 1 - 1
apps/emqx_statsd/src/emqx_statsd.app.src

@@ -1,7 +1,7 @@
 %% -*- mode: erlang -*-
 {application, emqx_statsd, [
     {description, "EMQX Statsd"},
-    {vsn, "5.0.8"},
+    {vsn, "5.0.9"},
     {registered, []},
     {mod, {emqx_statsd_app, []}},
     {applications, [

+ 2 - 0
apps/emqx_statsd/src/emqx_statsd_api.erl

@@ -49,6 +49,7 @@ schema("/statsd") ->
         'operationId' => statsd,
         get =>
             #{
+                deprecated => true,
                 description => ?DESC(get_statsd_config_api),
                 tags => ?API_TAG_STATSD,
                 responses =>
@@ -56,6 +57,7 @@ schema("/statsd") ->
             },
         put =>
             #{
+                deprecated => true,
                 description => ?DESC(update_statsd_config_api),
                 tags => ?API_TAG_STATSD,
                 'requestBody' => statsd_config_schema(),

+ 2 - 1
apps/emqx_statsd/src/emqx_statsd_schema.erl

@@ -32,7 +32,8 @@
 
 namespace() -> "statsd".
 
-roots() -> ["statsd"].
+roots() ->
+    [{"statsd", hoconsc:mk(hoconsc:ref(?MODULE, "statsd"), #{importance => ?IMPORTANCE_HIDDEN})}].
 
 fields("statsd") ->
     [

+ 4 - 0
changes/ce/feat-10457.en.md

@@ -0,0 +1,4 @@
+Deprecates the integration with StatsD.
+
+Since StatsD is not used a lot. So we will deprecate it in the next release
+and plan to remove it in 5.1