spacewander commented on code in PR #7412:
URL: https://github.com/apache/apisix/pull/7412#discussion_r919694784
##########
apisix/plugins/prometheus/exporter.lua:
##########
@@ -122,6 +122,14 @@ function _M.http_init(prometheus_enabled_in_stream)
"Etcd modify index for APISIX keys",
{"key"})
+ metrics.shared_dict_capacity_bytes =
prometheus:gauge("shared_dict_capacity_bytes",
+ "capacity every moment of nginx shared DICT since APISIX start",
Review Comment:
I am afraid I can't understand what this means...
Could you change the description?
##########
apisix/plugins/prometheus/exporter.lua:
##########
@@ -352,13 +360,50 @@ local function etcd_modify_index()
end
+local function shared_dict_status()
+ local attr = plugin.plugin_attr(plugin_name)
+ if not attr or not attr.shared_DICT then
+ return
+ end
+
+ local name = {}
+ local set_shared_dict_param = function (shared_dict_name)
Review Comment:
We can put this in the for loop instead of defining a new function to solve
it?
The function definition can't be JIT and should be avoided.
##########
apisix/plugins/prometheus/exporter.lua:
##########
@@ -352,13 +360,50 @@ local function etcd_modify_index()
end
+local function shared_dict_status()
+ local attr = plugin.plugin_attr(plugin_name)
Review Comment:
We can list the shdict in
https://github.com/apache/apisix/blob/master/apisix/cli/ngx_tpl.lua, instead of
requiring the users to configure them? Since the usage of shdict is an
implementation detail.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]