Skip to content

Reproduce and fix intermittent per-boot span-export silence #987

Open

Description

@athvin

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, and span_exports_failed plus 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:

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

  1. athvin commented on Nov 10, 2026

    @athvin
    OwnerAuthor

    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::init and 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 session 01a1be1a-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.

  2. athvin commented on Nov 29, 2026

    @athvin
    OwnerAuthor

    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.

    • From the day it applies, the window is 14 days.
    • If neither er-prod-span-export-silence-* nor er-dev-span-export-silence-* reaches ALARM in that window, close this as cannot-reproduce, with both alarms as the standing guard.
    • If either fires, the alarm description's localisation applies: span_exports_failed rising 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions