-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SWATCH-3295: Normalize the payg metrics to use the same tags and format #4159
base: main
Are you sure you want to change the base?
Conversation
4ca3d92
to
baee756
Compare
I prefer the formatting we use in our config files: |
I also prefer the same formatting we use in our config files, will change it for all the payg metrics. |
371d2c8
to
6c44867
Compare
The counter "swatch_metrics_ingested_usage_total" is being displaying the metric as: ``` swatch_metrics_ingested_usage_total{billing_provider="aws",metric_id="Instance-hours",product="rosa"} 609.8702973568641 ``` And it should be using the upper format: ``` swatch_metrics_ingested_usage_total{billing_provider="aws",metric_id="INSTANCE_HOURS",product="rosa"} 609.8702973568641 ``` This is to work as the other metrics/counters.
6cf175e
to
86c863e
Compare
This reverts commit d831fdc.
86c863e
to
2f400ac
Compare
Jira issue: SWATCH-3295
Depends on #4157
Description
All the payg metrics should have the same tags, units and use the same format to be used in the grafana dashboard.
This pull request addresses the following changes:
Change format of metric ID to use the metric ID code instead of the uppercase format
Some metrics were using one format or the another. All the metrics should use the same one.
Wrong billing_provider_id in "swatch_tally_tallied_usage_total", it should be "billing_provider"
The metric "swatch_tally_tallied_usage_total" was double counting. Fixed by reusing the logic to exclude duplicate snaps.
The metrics "swatch_contract_usage_total", "swatch_billable_usage_total" and "swatch_producer_metered_total" were expressed in billing units instead of metric units. We need to use the metric units, so the numbers in the grafana dashboard are consistent.
Reverts commit d831fdc. We're not using the json format anylonger in tests.
Testing
IQE Test MR: https://gitlab.cee.redhat.com/insights-qe/iqe-rhsm-subscriptions-plugin/-/merge_requests/1040