Skip to content

fix(otel/performance): measure only live agent pods and recalibrate thresholds - #758

Open
bhavya76 wants to merge 6 commits into
mainfrom
bhavya76/otel-performance-skip-zero-pods
Open

bhavya76 wants to merge 6 commits into
mainfrom
bhavya76/otel-performance-skip-zero-pods

Conversation

@bhavya76

@bhavya76 bhavya76 commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Issue

eks_daemon:otel_performance_test never passed. Two causes:

  1. After the image patch + rollout restart, stale/old-ReplicaSet and just-restarted pods linger in the 5-min query window, so per-pod checks and the regression maxima ran on churned data.
  2. Thresholds didn't match the current agent, and per-pod CPU is too variable for a tight two-sided band.

Changes

  • Skip series with no data (all-zero/empty) in the window.
  • Measure only pods currently Running in amazon-cloudwatch (k8s API), dropping stale/old-ReplicaSet pods. Fail-soft: on API error, proceed unfiltered.
  • Recalibrate thresholds to observed clean values. Thresholds support a two-sided band (threshold +/- per-metric or per-pod error_bound) and, alternatively, an explicit per-pod max for a one-sided ceiling [0, max].
  • Treat CPU as a max ceiling for both pod classes. Per-pod CPU swings widely run-to-run on this small cluster, so a two-sided floor false-fails on the low side. Bloat is still caught by the ceiling, and drops are caught by TestRegressionCheck; memory stays two-sided.
  • Drop cluster-scraper CPU from TestRegressionCheck (too noisy cross-commit; still bounded by its ceiling).
  • Log a per-class CALIBRATION summary for future re-tuning.

License

By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.

@bhavya76
bhavya76 force-pushed the bhavya76/otel-performance-skip-zero-pods branch from 2df0d81 to 8d85be0 Compare September 10, 2026 14:00
@bhavya76
bhavya76 marked this pull request as ready for review September 10, 2026 14:09
@bhavya76
bhavya76 requested a review from a team as a code owner September 10, 2026 14:09
@bhavya76
bhavya76 force-pushed the bhavya76/otel-performance-skip-zero-pods branch from 8d85be0 to d0d2c1a Compare September 10, 2026 16:01
@bhavya76 bhavya76 changed the title fix(otel/performance): ignore agent pods reporting no utilization data fix(otel/performance): measure only live agent pods and skip empty series Sep 10, 2026
@bhavya76
bhavya76 marked this pull request as draft September 10, 2026 16:21
@bhavya76
bhavya76 force-pushed the bhavya76/otel-performance-skip-zero-pods branch from d0d2c1a to a91a8f1 Compare September 10, 2026 17:49
@bhavya76 bhavya76 changed the title fix(otel/performance): measure only live agent pods and skip empty series fix(otel/performance): measure only live agent pods and recalibrate thresholds Sep 10, 2026
@bhavya76
bhavya76 force-pushed the bhavya76/otel-performance-skip-zero-pods branch 4 times, most recently from 9b16f39 to 6e2cccd Compare September 16, 2026 14:01
…hresholds

Restrict threshold and regression measurements to pods currently running in
the amazon-cloudwatch namespace, and skip series with no data in the query
window, so metrics reflect only the current agent generation instead of
stale/old-ReplicaSet and just-restarted pods that linger after the rollout
restart.

Calibrate per-class thresholds from clean runs and support per-metric and
per-pod error_bound. Scraper CPU is highly variable at low absolute values,
so it uses a ceiling ([0%, 2%] of node) rather than a tight two-sided band.
Log a per-class calibration summary for future re-tuning.
@bhavya76
bhavya76 force-pushed the bhavya76/otel-performance-skip-zero-pods branch from 6e2cccd to 55c559b Compare September 16, 2026 14:03
@bhavya76
bhavya76 marked this pull request as ready for review September 16, 2026 14:23
Comment thread test/otel/performance/performance_test.go
Comment thread terraform/eks/daemon/otel-performance/main.tf
Comment thread test/otel/performance/k8s_pods_test.go
@bhavya76
bhavya76 force-pushed the bhavya76/otel-performance-skip-zero-pods branch from 2bc969e to e9efeb2 Compare September 17, 2026 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants