nic-6443 commented on code in PR #14034:
URL: https://github.com/apache/apisix/pull/14034#discussion_r4280006561
##########
apisix/plugins/prometheus/exporter.lua:
##########
@@ -1457,6 +1475,8 @@ end
function _M.destroy()
+ process_metrics.stop()
Review Comment:
Added in 6d33fdb, in `t/cli/test_prometheus_reload.sh`. It drives the real
config through the plugin reload API with 2 workers and the privileged agent,
and every step polls for at most 20s:
- enabled: all three processes report, and the error log shows exactly 3
`process metrics started` lines, one per process
- disabled and reloaded: exactly 3 `process metrics stopped` lines, and the
endpoint returns `{}`
- re-enabled and reloaded: exactly 3 new `started` lines (6 in total), and
all three processes report again
- reloaded again with prometheus still enabled: the counts stay at 6 started
/ 3 stopped, so a reload keeps the running timer instead of starting a second
chain
To make the timer state observable, the collector now logs one info line
when it starts a reporting timer and one when that timer stops after a disable.
--
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]