Skip to content

Commit

Permalink
fix: the leak of prometheus metrics (#10655)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sn0rt authored Dec 25, 2023
1 parent 8f3b026 commit 59a6be4
Show file tree
Hide file tree
Showing 2 changed files with 509 additions and 0 deletions.
1 change: 1 addition & 0 deletions apisix/plugins/prometheus/exporter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,7 @@ local function collect(ctx, stream_only)

-- update upstream_status metrics
local stats = control.get_health_checkers()
metrics.upstream_status:reset()
for _, stat in ipairs(stats) do
for _, node in ipairs(stat.nodes) do
metrics.upstream_status:set(
Expand Down
Loading

0 comments on commit 59a6be4

Please sign in to comment.