feat: Add control plane telemetry - workerpool desired and ready workers gauges - #826
Open
Angela (Angelawork) wants to merge 2 commits into
Open
Conversation
Angela (Angelawork)
force-pushed
the
feature/workerpool-telemetry
branch
from
August 10, 2026 17:59
ecffc4b to
b64c940
Compare
Jeff Luo (JeffLuoo)
requested changes
Aug 10, 2026
Angela (Angelawork)
force-pushed
the
feature/workerpool-telemetry
branch
from
August 10, 2026 20:36
b64c940 to
976b5b4
Compare
Jeff Luo (JeffLuoo)
requested changes
Aug 10, 2026
Comment on lines
+179
to
+181
| if err := r.List(ctx, &list); err != nil { | ||
| return nil | ||
| } |
Collaborator
There was a problem hiding this comment.
Consider log the error here, otherwise the error here will fail silently.
Comment on lines
+152
to
+154
| if meter == nil { | ||
| meter = otel.Meter("atecontroller") | ||
| } |
Collaborator
There was a problem hiding this comment.
Suggested change
| if meter == nil { | |
| meter = otel.Meter("atecontroller") | |
| } |
nit - We don't need this block. All InitMetrics won't pass a nil metrics meter.
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.
Part of #564 (Part 4, Fixes #564)
Description
This PR implements Part 4 of #564 by adding OpenTelemetry gauge instrumentation for
ate.workerpool.desired_workersandate.workerpool.ready_workersinatecontroller.Key Changes:
ReadyReplicas int32toWorkerPoolStatuswith+kubebuilder:printcolumn:name="Ready"annotation inpkg/api/v1alpha1/workerpool_types.goand regenerated the CRD manifest.WorkerPoolReconciler.syncStatusto synchronizedep.Status.ReadyReplicasintowp.Status.ReadyReplicas.InitMetrics(meter)registeringate.workerpool.desired_workersandate.workerpool.ready_workersas OpenTelemetry Observable UpDownCounters ({worker}) with an asynchronous observer callback that samples controller-runtime's local informer cache (r.Client.List).ateattr.WorkerPoolNamespaceKeyandateattr.WorkerPoolNameKey.Testing
go test -buildvcs=false ./cmd/ateapi/internal/controlapi/...go test -buildvcs=false ./cmd/atenet/internal/router/...make testE2E Test
./hack/create-kind-cluster.sh./hack/install-ate-kind.sh --deploy-ate-system --deploy-demo-counter./hack/run-e2e.sh ./internal/e2e/suites/metrics/...