Fix duplicate metrics in openstack_nova_quota* and openstack_neutron_quota*#513
Fix duplicate metrics in openstack_nova_quota* and openstack_neutron_quota*#513EnDjeee wants to merge 5 commits intoopenstack-exporter:mainfrom
Conversation
…a* metrics; update README.md
|
Wow @EnDjeee! This is great! I'll get it reviewed and hopefully merged soon |
There was a problem hiding this comment.
Pull request overview
This PR fixes a critical bug where Nova and Neutron quota metrics failed to be collected due to duplicate metric descriptor errors in Prometheus. The fix adds tenant_id as an additional label to all quota metrics, ensuring each metric is uniquely identified even when tenants share the same name across different domains.
Key Changes:
- Added
tenant_idlabel to all Nova quota metric descriptors (14 quota types) - Added
tenant_idlabel to all Neutron quota metric descriptors (9 quota types) - Updated metric emission calls to include project ID alongside project name
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| exporters/nova.go | Added tenant_id to quota metric label definitions and updated all quota metric emissions to include p.ID |
| exporters/neutron.go | Added tenant_id to quota metric label definitions and updated all quota metric emissions to include p.ID |
| exporters/nova_test.go | Updated expected test output to include tenant_id label in all quota metrics |
| exporters/neutron_test.go | Updated expected test output to include tenant_id label in all quota metrics |
| README.md | Updated documentation examples to show the new tenant_id label in quota metrics |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Oh, i ran into the same issue on my v2 branch, so i've fixed it, but a bit different in terms of code... |
|
@vooon i.e. you've fixed this in your re-write PR? I'm aware of the fact that your rewrite is getting very large. In this case, I'm not against merging it, just thinking we'll want to test it extensively before merging |
|
@Sharpz7 yes. But if you wish to release 1.8.0 first, then better if you merge this PR, then i'll update v2 branch. |
|
I am happy not releasing v1.8.0 for a while while we stabilize the codebase. We can work on testing in more substacks. |
|
@Sharpz7 just considering amount of changes, perhaps better to release v2 as 2.0.0, even though it remains compatible... |
|
@vooon I am open to that. @niedbalski @mnaser ? |
This PR addresses issue #492, where the exporter failed to collect nova_quota* and neutron_quota* metrics due to duplicate metric names
The fix adds tenant_id to the metric descriptors in both the Nova and Neutron quota exporters, ensuring the metrics are uniquely identified and no longer conflict.
Tested locally and confirmed the exporter works as expected.