fix(bench): gate demo capture on frontend-proxy readiness + slice steady state (PR-N3.2) - #75
Conversation
…ady state (PR-N3.2) The first successful capture (run 26715857483) produced a real but unhealthy corpus: ~34% was the load generator's ERR_NAME_NOT_RESOLVED against frontend-proxy, repeated as two templates. Root cause: the load-generator only depends_on frontend (service_started, not healthy), frontend-proxy has no healthcheck, and our readiness gate waited only for otel-collector. So the Playwright browser tasks hammered Envoy before it was serving and flooded the corpus, while the actual business services (checkout, cart, payment, …) barely emitted. Fix: - Wait for the real traffic path: poll Envoy's published admin /ready endpoint (frontend-proxy) after the collector is up, with diagnostics (compose ps + frontend-proxy logs) on timeout. - Restart the load-generator once Envoy is serving so its tasks run fresh against a resolvable, ready proxy instead of replaying the startup-race failures. - Capture to logs.raw.jsonl, mark the line offset after a post-restart settle, and slice only the steady-state window into the final logs.jsonl — deterministically discarding the startup/pre-restart noise. Raw file is uploaded too for debugging. All ~20 demo containers came up fine on the runner in the prior run, so this is purely a readiness/ordering fix, not resources. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis PR enhances the OTel Demo corpus capture workflow by adding raw log export via a new file-based exporter, implementing Envoy readiness probing to avoid startup races, and refactoring the capture logic to use offset-based slicing of steady-state logs with validation. ChangesOTel Demo Corpus Capture Workflow
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Pull request overview
Fixes the OTel Demo corpus capture workflow so the captured corpus reflects real service diversity rather than load-generator startup-race errors. After the collector is up, the workflow now actively probes the frontend-proxy (Envoy) admin /ready endpoint, restarts the load generator once Envoy is serving, and then slices a steady-state window out of a raw capture file by line offset for the final logs.jsonl.
Changes:
- Add an
ENVOY_ADMIN_PORTenv and a new "Wait for the traffic path to be ready" step that polls Envoy/readyand then restartsload-generator. - Switch the file exporter to write
logs.raw.jsonl, mark a line offset after warmup, and slice the post-settle window intologs.jsonlin a dedicated step (also splits teardown into anif: always()step and uploads the raw file as artifact). - Update collector extras to write to
logs.raw.jsonlwith an explanatory comment.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| .github/workflows/capture-otel-demo-corpus.yml | Adds Envoy readiness gating, load-generator restart, steady-state slice + verify, separate teardown, and raw-file artifact upload. |
| .github/otel-demo-capture-extras.yml | Renames the file exporter output to logs.raw.jsonl so the workflow can slice the steady-state window from it. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
What
Makes the OTel Demo capture produce a healthy corpus. Follow-up to the first successful capture (run 26715857483), which ran but yielded a skewed corpus.
The problem with the first corpus
6,004 records / ~485 templates / 12 services — real diversity, but:
ERR_NAME_NOT_RESOLVEDagainstfrontend-proxy, just two templates repeated ~2,030×.Root cause (from the run logs + the demo compose): the
load-generatoronlydepends_on: frontend(service_started, not healthy),frontend-proxy(Envoy — the host the load generator actually targets viaLOCUST_HOST) has no healthcheck, and our readiness gate waited only forotel-collector. The load-generator even started 0.4s before frontend-proxy. So its Playwright browser tasks hammered Envoy before it was resolvable/serving and flooded the corpus with one error, while real traffic never ramped.Fix
/readyendpoint (localhost:${ENVOY_ADMIN_PORT}) until it returns 200 — the true "frontend-proxy is serving" signal. On timeout, dumpcompose ps+ frontend-proxy logs.logs.raw.jsonl; after a post-restart settle the workflow marks the raw line offset and slices only the post-settle window into the finallogs.jsonl, deterministically discarding all startup/pre-restart noise. Raw file is uploaded too for debugging.All ~20 demo containers came up fine on the runner last time, so this is purely a readiness/ordering fix — not a resource problem.
Verification
🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes