mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
Stop persisting bridged log events (#29599)
## Why The 0.142.0 persistent-log filter disables target=log, but bridged log records are filtered using their original dependency target before tracing-log emits them as target=log. This allowed high-volume dependency TRACE events to keep reaching SQLite. This is a follow-up to #28224. ## What changed - Reject bridged target=log events inside the SQLite sink before formatting or queueing them.
This commit is contained in:
@@ -199,6 +199,13 @@ where
|
||||
|
||||
fn on_event(&self, event: &Event<'_>, ctx: tracing_subscriber::layer::Context<'_, S>) {
|
||||
let metadata = event.metadata();
|
||||
// `tracing-log` checks filters with the original log target before
|
||||
// dispatching an event whose tracing target is `log`, so the outer
|
||||
// target filter cannot reliably reject these bridged events.
|
||||
if metadata.target() == "log" {
|
||||
return;
|
||||
}
|
||||
|
||||
// The SDK emits DEBUG timer meta-events every second per process; these
|
||||
// were over 30% of retained logs in measured high-fanout Codex environments.
|
||||
if metadata.target() == "opentelemetry_sdk"
|
||||
|
||||
Reference in New Issue
Block a user