docs(plans): add the usage-data emission hardening plan

Context

#377 (closed) is the last open child of the S23 usage-data epic. This plan covers all three of its items plus the additions from its review thread (the corrected five-guard census and the sizing benchmark), and absorbs #424 (closed): Step 3 exports the datastore enumerations and closes it, Step 2 lands its maven test gaps.

What the plan delivers

Four implementation steps:

  1. A tracker-owned TrackAnchored seam: gate skips become dropped_events_total increments (new source label, four new reasons, reworded help text) plus a rate-limited WARN that keeps the join keys; a disabled tracker becomes fully silent.
  2. Caller migration with npm's missing nil guards and concretely typed wire seams, closing the typed-nil boot gap; the raw kind and format codes start riding on AnchoredEvent here, since deleting LogSkippedEvent deletes the format-side pre-gates with it; plus #424 (closed)'s maven test gaps.
  3. Centralized code-to-dimension maps over exported datastore enumerations, pinned at the slice itself (closes #424 (closed)).
  4. Shutdown drain reconciliation against the emitter's overflow counter, plus the two-arm benchmark the rollout gate asked for.

The MR also adds a point-in-time Edit: pointer to the S23 spec's observability section, so a reader does not cite the pre-hardening counter shape as current. The spec's record of what S23 built is unchanged.

Design decisions and their rationale are in the plan's Approach section, including the deliberate deviations (limiter keyed by source/event/reason rather than per namespace; benchmark framed as loss-capable live-path cost rather than sustainable throughput).

Related to #377 (closed) Related to #424 (closed)

Edited by João Pereira

Merge request reports

Loading
Loading