Skip to content

fix(cluster-agent): restore rate_limit_queries telemetry after external metrics refactor - #54273

Open
a7i wants to merge 1 commit into
DataDog:mainfrom
a7i:fix/restore-rate-limit-queries-metrics
Open

fix(cluster-agent): restore rate_limit_queries telemetry after external metrics refactor#54273
a7i wants to merge 1 commit into
DataDog:mainfrom
a7i:fix/restore-rate-limit-queries-metrics

Conversation

@a7i

@a7i a7i commented Jul 30, 2026

Copy link
Copy Markdown

What does this PR do?

Restores the call to updateRateLimitingMetrics() at the end of QueryExternalMetric, so the cluster-agent again publishes rate_limit_queries_{limit,remaining,period,reset} on its Prometheus metrics endpoint.

Motivation

#33272 refactored external metrics querying to run chunks in parallel but dropped the updateRateLimitingMetrics() call that used to run after queries completed. The helper and gauges still exist, but only rate_limit_queries_remaining_min is updated today (inside queryDatadogExternal). Integrations and dashboards expecting datadog.cluster_agent.datadog.rate_limit_queries.limit (and related metrics) see no data on DCA 7.66+.

Describe how you validated your changes

GOWORK=off GOTOOLCHAIN=auto go test -tags "kubeapiserver,test" ./pkg/util/kubernetes/autoscalers/... -count=1

Additional Notes

QueryExternalMetric still documents that it updates rate limit statistics; this restores that behavior without changing query batching semantics.

Made with Cursor

…al metrics refactor

QueryExternalMetric stopped calling updateRateLimitingMetrics() when parallel
query batching landed in DataDog#33272, so limit/remaining/period/reset gauges were no
longer published on the cluster-agent metrics endpoint.

Co-authored-by: Cursor <cursoragent@cursor.com>
@a7i
a7i force-pushed the fix/restore-rate-limit-queries-metrics branch from c64d39d to 9972a40 Compare July 30, 2026 19:00
@a7i
a7i marked this pull request as ready for review July 30, 2026 19:23
@a7i
a7i requested review from a team as code owners July 30, 2026 19:23
@sblumenthal sblumenthal added qa/rc-required Only for a PR that requires validation on the Release Candidate changelog/no-changelog No changelog entry needed and removed team/container-platform The Container Platform Team team/kubernetes-experiences labels Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/no-changelog No changelog entry needed community qa/rc-required Only for a PR that requires validation on the Release Candidate team/container-integrations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants