-
Notifications
You must be signed in to change notification settings - Fork 2
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
Update the metric names to match Prometheus conventions #97
base: main
Are you sure you want to change the base?
Conversation
I found a few improvements to the metrics based on https://prometheus.io/docs/practices/naming/ These are good recommendations in general, and having standard units makes it easier to use the metrics in queries. For example, having everything in bytes, means you can just divide one metric by another without conversion. Having the timestamp in seconds allows easy use with the `time()` function. Signed-off-by: Goutham <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but I'd like a review from the other requested reviewers for final approval.
| `unused_disks_last_used_at` | Last timestamp (unix ms) when this disk was used. GCP only! | | ||
| `unused_provider_duration_ms` | How long in milliseconds took to fetch this provider information | | ||
| `unused_disks_last_used_timestamp_seconds` | Last timestamp (unix seconds) when this disk was used. GCP only! | | ||
| `unused_provider_duration_seconds` | How long in milliseconds took to fetch this provider information | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here the unit is seconds but the description says milliseconds, we should fix this.
| `unused_provider_info` | CSP information | | ||
| `unused_provider_success` | Static metric indicating if collecting the metrics succeeded or not | | ||
|
||
All metrics have the `provider` and `provider_id` labels to identify to which provider instance they belong. | ||
The `unused_disks_count` and `unused_disks_size_gb` metrics have an additional `k8s_namespace` metric mapped to the `kubernetes.io/created-for/pvc/namespace` annotation assigned to persistent disks created by Kubernetes. | ||
The `unused_disks_count` and `unused_disks_total_size_bytes` metrics have an additional `k8s_namespace` metric mapped to the `kubernetes.io/created-for/pvc/namespace` annotation assigned to persistent disks created by Kubernetes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, I didn't see this line when I added unused_disk_size_bytes
and it has this label too. Not a blocker in any way, but would you mind adding it here to the list? Thanks a lot! ❤️
I found a few improvements to the metrics based on https://prometheus.io/docs/practices/naming/
These are good recommendations in general, and having standard units makes it easier to use the metrics in queries.
For example, having everything in bytes, means you can just divide one metric by another without conversion.
Having the timestamp in seconds allows easy use with the
time()
function.