Reduce SQLite contention from OpenTelemetry SDK debug logs#26396
Merged
Conversation
These are just noise and can make up a huge proportion of the log volume and increase database contention
Contributor
Author
|
I'm hoping to reduce the number of concurrent app-servers separately, e.g., with changes to the Codex application, but these logs don't seem worthwhile anyway. |
Contributor
Author
|
I think the number reported is a bit high — I'll see if I can get some more samples. |
Contributor
Author
|
I had two other people check volume and they had 35% and 55% respectively. |
jif-oai
approved these changes
Jun 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
opentelemetry_sdkDEBUG and TRACE events before formatting or queueing them for the SQLite log sinkWhy
OpenTelemetry's batch log processor emits internal
BatchLogProcessor.ExportingDueToTimermeta-events every second per Codex process. In measured high-fanoutlogs_2.sqlitedatabases, low-levelopentelemetry_sdkevents 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-statejust fmt