Skip to content

feat(producer,cli): full telemetry visibility for DE parallel-router/inversion failures#2115

Open
vanceingalls wants to merge 1 commit into
mainfrom
de-parallel-router-failure-telemetry
Open

feat(producer,cli): full telemetry visibility for DE parallel-router/inversion failures#2115
vanceingalls wants to merge 1 commit into
mainfrom
de-parallel-router-failure-telemetry

Conversation

@vanceingalls

Copy link
Copy Markdown
Collaborator

Summary

Follow-up to #2095. Closes a gap found while assessing default-flip readiness: render_error carried zero DE-cohort context, so a hard failure while routed (worker crash, OOM, capture timeout from the router's fixed 3-worker pin overriding calibration) was indistinguishable from any unrelated failure in PostHog.

  • RenderCaptureObservability now records dePreInversionWorkers/dePreRouterWorkers — the worker count calibration would have picked absent the experiment — set live at the same point deWorkerInversion/deParallelRouter are set, so it survives into job.errorDetails on a hard failure, not just into the success-path perfSummary.
  • Added capture-sourced de_* fields to the shared RenderObservabilityTelemetryPayload, consumed by both trackRenderComplete and trackRenderError. On render_complete, the existing explicit perfSummary-sourced fields still win (moved the shared-payload spread to the front of the event object) — this addition is purely a failure-path fallback, no change to existing success-path values.
  • This directly enables the two signals discussed for the router's telemetry soak: correlating hard failures with de_pre_router_workers (was calibration overridden from a lower count?) and with de_self_verify_fallback/de_worker_count/de_memory_exhaustion_detected (already-existing fields, now reachable on failure too via the same fallback path).

Test plan

  • bunx vitest run on renderOrchestrator.test.ts, observability.test.ts, events.test.ts, renderObservability.test.ts — 150/150 pass
  • New test: render_error carries de_parallel_router/de_pre_router_workers/capture_worker_count/capture_memory_exhaustion_detected on a hard failure
  • New test: explicit de_worker_inversion on render_complete wins over a divergent capture-observability fallback value
  • New tests: renderObservabilityTelemetryPayload projects router/inversion cohort + pre-worker-count + self-verify-fallback correctly
  • tsc --noEmit, oxlint, oxfmt clean on all touched files

🤖 Generated with Claude Code

…inversion failures

render_error previously carried zero DE-cohort context — a hard failure while
routed (worker crash, OOM, capture timeout from the fixed 3-worker pin
overriding calibration) was indistinguishable from any other failure. The
data existed (RenderCaptureObservability is mutated live and survives into
job.errorDetails on the failure path) but was never projected into the
render_error payload, which only ever drew de_* fields from perfSummary
(success-only).

- RenderCaptureObservability now also records dePreInversionWorkers /
  dePreRouterWorkers — the worker count calibration would have picked absent
  the experiment — so a resource-pressure failure can be correlated with the
  router overriding a lower calibrated count.
- New capture-sourced de_* fields on RenderObservabilityTelemetryPayload,
  shared by trackRenderComplete and trackRenderError. Explicit
  perfSummary-sourced fields still win on render_complete (spread moved
  first in the event object) — this is purely a failure-path fallback.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.

1 participant