mirror of
https://github.com/openai/codex.git
synced 2026-09-20 12:47:38 +00:00
## Why An account change can select different OpenTelemetry collector settings. The long-running app server needs to stop exporting telemetry with the previous account's configuration. ## What changed - Rebuild and install the log, trace, and metrics exporters when authentication changes, and shut down the previous provider without blocking the app server. - Make cached global metrics clients and the tracing layer follow the replacement provider so existing callers continue exporting through the current account's configuration. - Clear the cached cloud configuration loader after login and logout so telemetry reloads from the new account context. ## Testing - Add an app-server integration test that switches accounts and verifies logs, traces, and metrics reach the new collector while trace context is preserved. - Add a metrics test covering cached clients after provider replacement. GitOrigin-RevId: a74359777a35edbee5bbe0b2baccc155074cb172