Skip to content

fix(tests): support new Prometheus metric names - #3638

Merged
mkoura merged 1 commit into
masterfrom
reconnect_metrics_names
Aug 20, 2026
Merged

fix(tests): support new Prometheus metric names#3638
mkoura merged 1 commit into
masterfrom
reconnect_metrics_names

Conversation

@mkoura

@mkoura mkoura commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

Node 11.1.0 renamed the metrics used by test_metrics_reconnect: integer gauges gained an _int suffix and the peerSelection counters are now capitalized. Look the metrics up under both the new and the old names, so the test keeps working with older nodes.

A missing metric now raises AssertionError instead of KeyError, so the existing retry loop covers a counter that is not registered yet right after a node restart.

Parse the response in a dedicated helper. A metric line is name[{labels}] value [timestamp], so split the value off after the labels, ignore comment lines and sum the values of all the series of a labelled metric.

Node 11.1.0 renamed the metrics used by `test_metrics_reconnect`:
integer gauges gained an `_int` suffix and the `peerSelection`
counters are now capitalized. Look the metrics up under both the
new and the old names, so the test keeps working with older nodes.

A missing metric now raises `AssertionError` instead of `KeyError`,
so the existing retry loop covers a counter that is not registered
yet right after a node restart.

Parse the response in a dedicated helper. A metric line is
`name[{labels}] value [timestamp]`, so split the value off after
the labels, ignore comment lines and sum the values of all the
series of a labelled metric.
@mkoura
mkoura requested a review from saratomaz as a code owner August 20, 2026 14:23
@mkoura
mkoura merged commit ac8fae8 into master Aug 20, 2026
3 checks passed
@mkoura
mkoura deleted the reconnect_metrics_names branch August 20, 2026 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant