fix(connectors): stop rendering counter metrics with a doubled _total - #3921
Merged
Conversation
The runtime registered its six counter families under names that already ended in _total, and the OpenMetrics encoder appends that suffix itself, so every scrape exposed names like iggy_connector_errors_total_total. The runtime README documented the un-doubled names all along, so no scraper ever saw what the docs promised. Drop the literal suffix at registration and let the encoder add it. Gauges stay as they are: the encoder appends nothing to them, so their names already rendered correctly, including the ones that end in _total. The existing tests could not catch this. They asserted with contains() on a name that is a substring of the doubled one, which passes on broken and on fixed code alike. The new test compares the full set of rendered series names, so a silent rename fails too, and the live-runtime scrape test now rejects a doubled suffix on the wire. This changes operator-facing series names, so anything scraping the doubled names has to be updated.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3921 +/- ##
=============================================
- Coverage 83.82% 58.69% -25.14%
Complexity 1358 1358
=============================================
Files 1212 1211 -1
Lines 166148 137650 -28498
Branches 133622 105124 -28498
=============================================
- Hits 139272 80789 -58483
- Misses 23253 53374 +30121
+ Partials 3623 3487 -136
🚀 New features to boost your workflow:
|
spetz
approved these changes
Aug 19, 2026
mmodzelewski
approved these changes
Aug 19, 2026
numinnex
approved these changes
Aug 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The runtime registered its six counter families under names that
already ended in _total, and the OpenMetrics encoder appends that
suffix itself, so every scrape exposed names like
iggy_connector_errors_total_total. The runtime README documented the
un-doubled names all along, so no scraper ever saw what the docs
promised.
Drop the literal suffix at registration and let the encoder add it.
Gauges stay as they are: the encoder appends nothing to them, so
their names already rendered correctly, including the ones that end
in _total.
The existing tests could not catch this. They asserted with
contains() on a name that is a substring of the doubled one, which
passes on broken and on fixed code alike. The new test compares the
full set of rendered series names, so a silent rename fails too, and
the live-runtime scrape test now rejects a doubled suffix on the
wire.
This changes operator-facing series names, so anything scraping the
doubled names has to be updated.