{"version":"2.1.333","anchor":"otel-shutdown-and-flush-reworked","canonical_anchor":"otel-shutdown-and-flush-reworked","heading":"Telemetry shutdown and flushing on exit reworked","tier":"notice","area":"Telemetry","scope":"org","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.333\/e\/otel-shutdown-and-flush-reworked","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.333","markdown":"### Telemetry shutdown and flushing on exit reworked\n\nHow Claude Code flushes and shuts down its OpenTelemetry metrics, logs and traces on exit has been restructured\n\n**What**\n\nOpenTelemetry is the standard Claude Code can use to send metrics, logs and traces to a monitoring system you run. The way Claude Code shuts these down and pushes out (flushes) any remaining data when it exits has changed:\n\n- Metrics, logs and traces are shut down through a restructured sequence.\n\n- Flushing now always finishes with a clean-up step, even when something fails.\n\n- The exit step is set up one of two ways, depending on whether any exporter is configured.\n\n- When session tokens are sent as OTLP headers, extra named headers can now be added.\n\n- The Prometheus exporter is no longer wrapped in a compatibility layer.\n\n`CLAUDE_CODE_OTEL_FLUSH_TIMEOUT_MS` still sets how long the flush may take.\n\n**Why**\n\nIf you have telemetry switched on, the way Claude Code exits may behave slightly differently.\n\n- Area: Telemetry\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 1\/5\n- Scope: org\n- Heads-up: no"}