Skip to content

coverage: emit zero for missing metrics from coverage show output#33

Merged
rjarry merged 1 commit intoopenstack-k8s-operators:mainfrom
abhiramnarayana:emitzerometrics
Jan 29, 2026
Merged

coverage: emit zero for missing metrics from coverage show output#33
rjarry merged 1 commit intoopenstack-k8s-operators:mainfrom
abhiramnarayana:emitzerometrics

Conversation

@abhiramnarayana
Copy link
Contributor

@abhiramnarayana abhiramnarayana commented Jan 21, 2026

The ovs-appctl coverage/show command only reports counters that have non-zero values. This causes the exporter to not emit metrics that have not incremented yet, making it difficult to set up alerts for error conditions before they occur.

Iterate over all defined metrics and emit 0 for any not present in the OVS output.

In test comparison logic handle the exporter now reporting more fields than what OVS returns.

The ovs-appctl coverage/show command only reports counters that have
non-zero values. This causes the exporter to not emit metrics that
have not incremented yet, making it difficult to set up alerts for
error conditions before they occur.

Iterate over all defined metrics and emit 0 for any not present in
the OVS output.

In test comparison logic handle the exporter now reporting more
fields than what OVS returns.

Signed-off-by: Abhiram R N <abhiramrn@gmail.com>
@rjarry rjarry merged commit 232da16 into openstack-k8s-operators:main Jan 29, 2026
4 checks passed
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.

2 participants