Task · FSG-0001

Replace the hand-concatenated two-registry /metrics response

Status
To Do
Updated
2026-08-14

Description

The exporter serves two registries: module-level collectors live in prometheus_client’s global REGISTRY, per-scrape collectors live in a fresh CollectorRegistry. metrics() in exporter.py joins them by decoding both to text, stripping the first, and concatenating with a newline. The FIXME at exporter.py:127 marks it as hacky and it has outlived the comment. Text-level joining bypasses the exposition-format machinery: it hardcodes the assumption that the negotiated format is line-oriented text, so a future content-type negotiation (OpenMetrics) silently produces a malformed body rather than an error, and the strip/newline handling is doing by hand what a registry merge does correctly.

Acceptance Criteria

Definition of Done

View the source file on GitHub