Skip to content

feat: make status histogram buckets configurable#164

Merged
jonathan-innis merged 2 commits intoawslabs:mainfrom
aidan-canva:metrics-add-historgram-bucket-config
Jun 24, 2025
Merged

feat: make status histogram buckets configurable#164
jonathan-innis merged 2 commits intoawslabs:mainfrom
aidan-canva:metrics-add-historgram-bucket-config

Conversation

@aidan-canva
Copy link
Copy Markdown
Contributor

Issue #, if available:

Description of changes:

Following breadcrumbs from Karpenter.

We are drilling into attributing costs to the lifecycle of Nodes (EC2 instances) within our platform. The Karpenter project uses awslabs/operatorpkg to emit metrics on status condition changes for CRDs like NodeClaim and NodePool - exactly what we are after.

Unfortunately, these metrics are emitted as histograms with non configurable buckets (defaults to prometheus.DefBuckets). As objects like NodeClaim can take seconds to many minutes (or longer) to transition state, the default max bucket of 5seconds makes these metrics less useful.

This PR allows consumers to optionally configure the histogram metrics buckets, keeping the existing default behavior.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@aidan-canva aidan-canva requested a review from a team as a code owner June 19, 2025 05:58
Copy link
Copy Markdown
Contributor

@jonathan-innis jonathan-innis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Thanks for the change! 🎉

@jonathan-innis jonathan-innis enabled auto-merge (squash) June 24, 2025 00:48
@aidan-canva
Copy link
Copy Markdown
Contributor Author

aidan-canva commented Jun 24, 2025

Thanks @jonathan-innis - is there anything extra needed to pass the presubmit verification? I'll open up the other Karpenter related PR's once this is merged.

image

@jonathan-innis jonathan-innis merged commit e997719 into awslabs:main Jun 24, 2025
1 check passed
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.

2 participants