mirror of
https://github.com/Donkie/Spoolman.git
synced 2026-10-22 01:52:17 -05:00
The metrics refresh only ever set label sets, never removed them, so a spool that was archived or deleted (or a deleted filament, or a renamed filament's old info labels) kept being exported with its last values until the server restarted. Each refresh now drops the label sets the database no longer has. The current values are set before the stale ones are removed rather than clearing the gauges first, because /metrics is served from a worker thread and a scrape landing mid-refresh would otherwise see live series briefly disappear.