Repository navigation
Description
PR #942 closed #941 after implementing detection counters and alarms. The intermittent exporter wedge itself is still unexplained and must remain tracked separately.
Evidence and eliminated hypotheses are preserved in #941 and the #660 closing comment: an er-api process logged spans and exported metrics normally but exported zero spans for its entire 40-minute lifetime; a replacement with the same image/spec exported immediately. Dispatcher exports and a synthetic span from the same pod succeeded.
Acceptance:
- Use
er.telemetry.spans_ended,spans_exported, andspan_exports_failedplus process logs to localize a recurrence to batch processing, exporter runtime, transport, or collector rejection. - Produce a deterministic reproducer of the wedge (including transient failures at first flush/boot) before changing the exporter.
- Fix the proven cause and commit a regression test in the existing OTLP socket harness; run make check.
- Verify the resulting deployment exports spans and metrics, and record evidence.
CloudWatch caveat discovered during #942 verification: awsemf emits interval deltas with er.role AND OTelLib=er-obs; query period Sum. #985 / PR #986 repairs the alarm consumer. OpenObserve retains the SDK metric stream's own temporality. A quiet process or a healthy replacement does not prove the intermittent defect fixed.
Product context (2026-11-26)
Why this matters for the API product: This is indirect. It protects operate safely: a silent API process hides request traces exactly when a customer reports a failed call. It doesn't affect API behavior.
Current state:
- The detection counters ship (
rust/crates/er-obs/src/metrics.rs:38-68). - The absent-spans alarm exists only in dev.
infra/terraform/envs/dev/alarms-telemetry.tf:45(er-dev-span-export-silence-*, namespaceER/Dev) has no counterpart underinfra/terraform/envs/prod/. The 2026-11-10 prod evidence was a manual query. A prod recurrence would go unnoticed, which is the er-api span export died silently for a whole pod lifetime — nothing alarms on absent spans #941 failure mode again. - No exporter change has landed since that evidence. The only
er-obscommits since 2026-11-09 are feat(obs): spans, PII boundary and audit coverage for the key and docs surface (#869) #1227 (request-span attributes) and the DuckFleet golden commit b784c21. - Recurrence since 2026-11-10 is unverified, because AWS was unavailable for this review.
- The local transport probe lives on one developer machine (
.tools/er-987-transport-probe/), not in the repo.
Definition of done: As above. Also: a prod span-export-silence alarm, so that "localize a recurrence" can actually trigger.
Dependencies / sequencing: None blocking. The prod alarm should come first, because without it this ticket waits on chance.
Open product decision: Whether to time-box it. If the prod alarm sees no recurrence in an agreed window, close as cannot-reproduce, with the alarm as the standing guard.
Size: About 0.25 engineer-weeks for the prod alarm. The reproduction is open-ended. Budget 1 week before revisiting.
Activity
athvin commentedon Nov 10, 2026
Continuation evidence, 2026-11-10: the production readiness repair #1077 is deployed, and the current API process exported 144 of 144 ended spans in the 18:35 UTC CloudWatch interval (
ER/Prod,er.role=api,OTelLib=er-obs, Sum). This is evidence for this process only; it does not close the intermittent defect.A local diagnostic exercised 36 fresh API-role processes through the real
er_obs::initand owned exporter runtime, using the repository’s exact telemetry dependency versions. A loopback collector rejected the first traces batch with HTTP 503, closed the first connection, or held the first response beyond the 10-second request timeout (12 independent boots per case). Each process logged the expected failed batch, then delivered the next named span and metrics successfully. No exporter code was changed. These three first-flush transport failures did not reproduce a permanent wedge on macOS; they do not eliminate a Linux-only boot race or another failure mode.An additional 12 fresh processes tested the SDK’s automatic five-second batch timer (four boots per failure mode). No explicit flush ran before the named recovery span arrived: delivery occurred around 15 seconds after boot for 503/disconnect and around 20 seconds for a timed-out first request, before the process reached its 27-second shutdown. All 12 logged the injected failed batch and recovered automatically. This closes the diagnostic gap where force-flush itself could have rescued a stuck timer; it still does not reproduce or fix the historical production defect.
Evidence retained on
Mac-87.lan, Codex session01a1be1a-66a7-72f3-8e78-32c20c5e0da9:.tools/er-987-transport-probe/contains the diagnostic source, dependency lock, JSONL results and per-process logs. The next investigation still needs a deterministic reproducer or recurrence localized by the three counters before changing the exporter. This ticket remains open.athvin commentedon Nov 29, 2026
Time-box decision (2026-11-29). The ticket left open whether to time-box this, and I'm taking that call. The prod alarm lands as 1442.
er-prod-span-export-silence-*norer-dev-span-export-silence-*reaches ALARM in that window, close this as cannot-reproduce, with both alarms as the standing guard.span_exports_failedrising means transport or collector; ended>0 with exported==0 and no failures means in-process. Then build the reproducer.Recurrence since 2026-11-10 could not be checked today: the read-only SSO session has expired and needs an interactive login.
obs(prod): a span-export-silence alarm for er-prod, the twin of dev's (…