{"name":"CLAUDE_CODE_OTEL_SHUTDOWN_TIMEOUT_MS","slug":"claude-code-otel-shutdown-timeout-ms","family":"env","title":"Environment variables","noun":"environment variable","description":"The metrics opt-out check can no longer trigger a surprise second sign-in.","description_source":"entry","described_by":{"version":"2.1.247","anchor":"metrics-opt-out-check-no-longer-triggers-a-second-sign-in-re"},"presence":{"first_seen":"2.1.138","removed_in":null,"in_current_build":true,"newest_mined":"2.1.309","builds":150,"mined_builds":150,"first_cited":null},"aliases":[],"entries":[{"version":"2.1.285","anchor":"opentelemetry-shutdown-flushes-another-provider","heading":"Telemetry shutdown now flushes an additional data source","line":"When Claude Code exits, OpenTelemetry shutdown now flushes and closes one more data source, and a broken reference is fixed","released_at":"2026-09-29 17:32:09","reason":"found in this entry's text, named in this entry"},{"version":"2.1.247","anchor":"metrics-opt-out-check-no-longer-triggers-a-second-sign-in-re","heading":"Metrics opt-out check no longer triggers a second sign-in refresh","line":"The metrics opt-out check can no longer trigger a surprise second sign-in.","released_at":"2026-08-26 18:02:01","reason":"named in this entry, found in this entry's text"},{"version":"0.2.126","anchor":"opentelemetry-enhancements","heading":"OpenTelemetry Enhancements","line":null,"released_at":"2025-05-22 02:22:07","reason":"found in this entry's text"}],"entries_total":3,"docs":[],"docs_total":0,"gates":[],"related":[{"name":"CLAUDE_CODE_OTEL_CONTENT_MAX_LENGTH","slug":"claude-code-otel-content-max-length","description":"Maximum characters of content (user prompts, system prompts, model output, tool input and tool results) Claude Code puts into a single OpenTelemetry attribute; longer content is cut and ends with a `[TRUNCATED - Content exceeds ... limit]` marker. Default `61440`; the smallest of this and any set `OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT`, `OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT` or `OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT` applies. A positive integer, digits only."},{"name":"CLAUDE_CODE_OTEL_DIAG_STDERR","slug":"claude-code-otel-diag-stderr","description":"When true, OpenTelemetry diagnostic errors are also written to stderr with the prefix `[3P telemetry] OTEL diag error:`, in addition to the debug log. Claude Code sets it to `1` in the environment of the sessions it launches with `CLAUDE_CODE_ENVIRONMENT_KIND` set to `byoc`."},{"name":"CLAUDE_CODE_OTEL_FLUSH_TIMEOUT_MS","slug":"claude-code-otel-flush-timeout-ms","description":"Milliseconds Claude Code waits for its OpenTelemetry providers to flush before giving up and logging `Telemetry flush timed out after ...ms. Some metrics may not be exported.` Default `5000` when unset or not a number; `0` is taken literally, so the flush times out at once."},{"name":"CLAUDE_CODE_OTEL_HEADERS_HELPER_DEBOUNCE_MS","slug":"claude-code-otel-headers-helper-debounce-ms","description":"Milliseconds Claude Code reuses the headers produced by the `otelHeadersHelper` script before running the script again. Default `1740000` (29 minutes); a non-numeric value uses the default."}],"url":"https:\/\/changelogs.core-directive.com\/reference\/env\/claude-code-otel-shutdown-timeout-ms","family_url":"https:\/\/changelogs.core-directive.com\/reference\/env.json"}