Skip to content

Conversation

@dprotaso
Copy link
Member

Fixes #16200

Proposed Changes

  • This switches instruments to async allow us to remove them when revisions go away

Release Note

Switch to async metric instrumentation to avoid unbounded memory growth

@knative-prow knative-prow bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 11, 2025
@knative-prow knative-prow bot requested review from dsimansk and skonto December 11, 2025 01:40
@knative-prow knative-prow bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Dec 11, 2025
@codecov
Copy link

codecov bot commented Dec 11, 2025

Codecov Report

❌ Patch coverage is 94.07407% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.06%. Comparing base (5fbd94e) to head (41c9473).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
pkg/autoscaler/scaling/metrics.go 94.02% 4 Missing ⚠️
pkg/autoscaler/scaling/autoscaler.go 80.00% 2 Missing ⚠️
pkg/reconciler/autoscaling/kpa/metrics.go 93.33% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #16300      +/-   ##
==========================================
- Coverage   80.10%   80.06%   -0.04%     
==========================================
  Files         215      215              
  Lines       13332    13361      +29     
==========================================
+ Hits        10679    10697      +18     
- Misses       2294     2305      +11     
  Partials      359      359              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dprotaso dprotaso changed the title [wip] Make autoscaler instrument async so we can remove metric attributes when revisions go away Make autoscaler instrument async so we can remove metric attributes when revisions go away Dec 11, 2025
@knative-prow knative-prow bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 11, 2025
@dprotaso
Copy link
Member Author

Ok tested this locally and confirmed the metrics go away when the revisions are deleted

/assign @Cali0707 @linkvt

Copy link
Member

@Cali0707 Cali0707 left a comment

Choose a reason for hiding this comment

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

/lgtm

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label Dec 11, 2025
@knative-prow
Copy link

knative-prow bot commented Dec 11, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Cali0707, dprotaso

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow knative-prow bot merged commit 6d9d1b6 into knative:main Dec 11, 2025
93 checks passed
@dprotaso dprotaso deleted the otel-remove branch December 11, 2025 19:23
@dprotaso
Copy link
Member Author

/cherry-pick release-1.19
/cherry-pick release-1.20

@knative-prow-robot
Copy link
Contributor

@dprotaso: new pull request created: #16301

Details

In response to this:

/cherry-pick release-1.19
/cherry-pick release-1.20

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@knative-prow-robot
Copy link
Contributor

@dprotaso: new pull request created: #16302

Details

In response to this:

/cherry-pick release-1.19
/cherry-pick release-1.20

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

norman465 pushed a commit to src2img/knative-serving that referenced this pull request Dec 15, 2025
…hen revisions go away (knative#16300)

* switch autoscaler metrics to be async - allowing removal

* allow removing kpa metrics when a revision goes away
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Autoscaler is reporting stale metrics for services/revisions

4 participants