feat(controller): export capacity metrics over OTLP - #1651
Open
hpliStartAgain wants to merge 2 commits into
Open
feat(controller): export capacity metrics over OTLP#1651hpliStartAgain wants to merge 2 commits into
hpliStartAgain wants to merge 2 commits into
Conversation
hpliStartAgain
marked this pull request as ready for review
August 27, 2026 02:51
hpliStartAgain
requested review from
Generalwin,
Pangjiping,
Spground,
fengcone,
hittyt,
jwx0925,
kevinlynx and
ninan-nn
as code owners
August 27, 2026 02:51
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: df7540a9b2
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Provide low-cardinality Pool and BatchSandbox capacity signals so operators can size warm pools and estimate requested resource costs without duplicating runtime usage metrics. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Keep capacity resource gauges aligned with the Pool reconciler by excluding mislabeled and stale Pods that are not owned by the current Pool UID. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
hpliStartAgain
force-pushed
the
feat/controller-capacity-metrics
branch
from
August 27, 2026 03:41
8a2593d to
15be023
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1650.
Summary
The existing controller-runtime Prometheus endpoint is unchanged. Capacity metrics omit sandbox, BatchSandbox, and Pod identifiers; current values are aggregated by namespace, Pool, lifecycle phase, allocation mode, and bounded state values.
Testing
Commands run:
cd kubernetes && go test ./internal/controller -run 'TestCapacityMetrics' -count=1cd kubernetes && make testcd kubernetes && make lintcd kubernetes && make buildcd docs && corepack pnpm docs:build./scripts/verify-license.shgit diff --checkBreaking Changes
The feature is additive and defaults to disabled. It activates only when
OTEL_EXPORTER_OTLP_METRICS_ENDPOINTorOTEL_EXPORTER_OTLP_ENDPOINTis explicitly set.Checklist