jiasanshou commented on issue #8065:
URL: https://github.com/apache/apisix/issues/8065#issuecomment-1277130276
> > @jiasanshou Could you show more details about how to reproduce the
problem? the `prometheus.get_prometheus()` seems that it won't be `nil` anyway
>
> I have no idea. I just upgrade the apisix from 2.12 to 2.15, and after
that ,the kafka-logger report this error. I checked the configs, and it seams
that there is nothing special.
I find that in the plugin.lua。there is
` -- some plugins need to be initialized in init* phases
if is_http and core.table.array_find(http_plugin_names, "prometheus")
then
local prometheus_enabled_in_stream =
core.table.array_find(stream_plugin_names, "prometheus")
require("apisix.plugins.prometheus.exporter").http_init(prometheus_enabled_in_stream)
elseif not is_http and core.table.array_find(stream_plugin_names,
"prometheus") then
require("apisix.plugins.prometheus.exporter").stream_init()
end` in line 671. so , if we do not use the plugin prometheus, whether
the method "http_init" will be executed?
[init
prometheus](https://github.com/apache/apisix/blob/2.15.0/apisix/plugin.lua)
--
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]