Skip to content

Fix metric label order#132

Merged
d0ugal merged 2 commits intomainfrom
fix-metric-label-order
Oct 27, 2025
Merged

Fix metric label order#132
d0ugal merged 2 commits intomainfrom
fix-metric-label-order

Conversation

@d0ugal
Copy link
Copy Markdown
Owner

@d0ugal d0ugal commented Oct 27, 2025

No description provided.

@d0ugal d0ugal enabled auto-merge (rebase) October 27, 2025 19:49
@d0ugal d0ugal force-pushed the fix-metric-label-order branch from b84bd81 to 9860575 Compare October 27, 2025 19:49
Fix label mapping mismatch where collection metrics expected 'repo'
label but were receiving 'name' label. This was causing panics:

panic: label name "repo" missing in label map

The metrics definitions in ghcr_registry.go specify:
- CollectionFailedCounter: []string{"repo", "interval"}
- CollectionSuccessCounter: []string{"repo", "interval"}
- CollectionIntervalGauge: []string{"repo", "interval"}
- CollectionDurationGauge: []string{"repo", "interval"}
- CollectionTimestampGauge: []string{"repo", "interval"}

But the collector was using 'name' instead of 'repo' in the labels.

This highlights the need for better integration tests that would
catch label mapping mismatches before deployment.
@d0ugal d0ugal force-pushed the fix-metric-label-order branch from 9860575 to fb84718 Compare October 27, 2025 20:10
@d0ugal d0ugal merged commit 31a2c94 into main Oct 27, 2025
4 of 5 checks passed
@d0ugal d0ugal deleted the fix-metric-label-order branch October 27, 2025 20:12
@d0ugal d0ugal restored the fix-metric-label-order branch October 27, 2025 20:16
@d0ugal d0ugal deleted the fix-metric-label-order branch October 27, 2025 20:20
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