shreemaan-abhishek commented on code in PR #11117:
URL: https://github.com/apache/apisix/pull/11117#discussion_r1557966808
##########
apisix/plugin.lua:
##########
@@ -344,6 +346,15 @@ function _M.load(config)
if not ok then
core.log.error("failed to load plugins: ", err)
end
+
+ local enabled = core.table.array_find(http_plugin_names,
"prometheus") ~= nil
+ local active = exporter.get_prometheus() ~= nil
Review Comment:
no I think the second if check needs the `active` status. Consider this case:
- apisix is running with prometheus active and enabled
- hit plugin reload
In this case `enabled == true` and `active == true`. But we need not call
`http_init()` in prometheus because it is already running during this
operation.
--
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]