-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add metric and logging for activator-autoscaler connectivity #16318
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
base: main
Are you sure you want to change the base?
Conversation
|
Welcome @prashanthjos! It looks like this is your first PR to knative/serving 🎉 |
|
Hi @prashanthjos. Thanks for your PR. I'm waiting for a github.com member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: prashanthjos The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
This change adds observability for the websocket connection between the activator and autoscaler components: - Add `activator_autoscaler_reachable` gauge metric (1=reachable, 0=not reachable) - Log ERROR when autoscaler is not reachable during stat sending - Add periodic connection status monitor (every 5s) to detect connection establishment failures - Add unit tests for the new AutoscalerConnectionStatusMonitor function The metric is recorded in two scenarios: 1. When SendRaw fails/succeeds during stat message sending 2. When the periodic status check detects connection not established This helps operators identify connectivity issues between activator and autoscaler that could impact autoscaling decisions.
|
/ok-to-test |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #16318 +/- ##
==========================================
- Coverage 80.09% 80.08% -0.02%
==========================================
Files 215 216 +1
Lines 13391 13429 +38
==========================================
+ Hits 10725 10754 +29
- Misses 2304 2312 +8
- Partials 362 363 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
/retest |
|
Related docs PR: |
Description
This PR adds observability for the websocket connection between the activator and autoscaler components. When the autoscaler is not reachable, operators currently have no easy way to identify this issue, which can lead to autoscaling failures.
Changes
New Metric
kn.activator.autoscaler.reachable1(reachable),0(not reachable)New Logging
"Autoscaler is not reachable from activator. Stats were not sent."(on send failure)"Autoscaler is not reachable from activator."(on connection check failure)How It Works
The metric is recorded in two scenarios:
Periodic check (every 5s):
On stat send:
Testing
go test ./pkg/activator/... -v)