Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

gouthamve
Copy link
Member

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.

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]>
@inkel inkel requested review from logyball and paulajulve and removed request for logyball May 6, 2024 11:26
Copy link
Collaborator

@inkel inkel left a 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 |
Copy link
Collaborator

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.
Copy link
Contributor

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! ❤️

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.

4 participants