Files
codex/codex-rs/state
T
Zanie Blue d81fcdf8ef Reduce SQLite contention from OpenTelemetry SDK debug logs (#26396)
## Summary

- skip `opentelemetry_sdk` DEBUG and TRACE events before formatting or
queueing them for the SQLite log sink
- preserve INFO, WARN, and ERROR events from the SDK, along with TRACE
events from application targets
- add a persistence-level regression test for the target and level
policy

## Why

OpenTelemetry's batch log processor emits internal
`BatchLogProcessor.ExportingDueToTimer` meta-events every second per
Codex process. In measured high-fanout `logs_2.sqlite` databases,
low-level `opentelemetry_sdk` events accounted for over 30% of retained
rows (30-60% on the machines of people I asked to check).

Persisting this SDK bookkeeping across many processes adds substantial
write volume and contention without representing application activity.

## Validation

- `just test -p codex-state` (132/132 tests passed, plus bench smoke)
- `just fix -p codex-state`
- `just fmt`
d81fcdf8ef ยท 2026-06-04 10:12:08 -05:00
History
..