Task · TSO-0148

Decouple ingress WAL completion from metric collection to preserve configured DPM

Status
To Do
Priority
high
Updated
2026-09-10

Description

Ingress WAL completion currently calls the shared telemetry Provider.ForceFlush for each accepted streaming or webhook body. This initiates a fresh metric collection outside otlp.metric_interval, exports unrelated metrics sharing the provider, and resets the pinned SDK periodic-reader timer. Incoming traffic can therefore override operator-selected sample cadence and increase datapoints per minute. TSO-0147 mitigated premature flush timeouts but did not correct this contract violation. Revisit the durability and export-scheduling boundary; cadence correctness is primary and throughput is secondary. Cumulative remains the default and the required mode for this work. Delta temporality and loss of metric detail are not acceptable fixes.

Acceptance Criteria

Definition of Done

Implementation Notes

TSO-0149 supplies the local comparison harness. Its coalesced-body experiment reduces both flush barriers and disk commits and changes the rollup top-N window; it is directional evidence, not proof of a multi-entry group-commit implementation. Compare identical admitted entries when implementing this task.

Local harness delivered in TSO-0149. Two workload sizes each ran all six cases twice with exact exported byte accounting and zero pending WAL state. On the larger local case, fewer-barrier coalescing drained in about 2s versus about 15s baseline; delta about 2.45s; external collapsing about 1.6s; rollup-only about 8s; smaller OTLP batches 40-47s. These are synthetic finite-drain results with documented confounders, not production sizing or implemented multi-entry batching. See docs/wal-load-testing.md.

2026-09-11 scope correction requested by the operator: this is a high-priority metric-cadence correctness bug, not a batching enhancement. The revised description and acceptance criteria supersede the earlier throughput-first direction. Historical TSO-0149 measurements remain useful experimental evidence, but its delta case is not an actionable option for this work, and coalescing changes both disk commits and rollup windows. A design must decouple ingress durability completion from scheduled cumulative collection before any throughput claim can close this task. Source pointers: internal/app/ingresswal.go applyEnvelope; internal/app/collectors.go WAL route flush wiring; internal/telemetry/provider.go ForceFlush; internal/telemetry/processors.go newMetricReader. Task remains To Do: this update authorizes no implementation or deployment.

View the source file on GitHub