{"name":"CLAUDE_CODE_OTEL_CONTENT_MAX_LENGTH","slug":"claude-code-otel-content-max-length","family":"env","title":"Environment variables","noun":"environment variable","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.","description_source":"code","described_by":{"bundle":"2.1.286","author":"claude-opus-5-5"},"presence":{"first_seen":"2.1.213","removed_in":null,"in_current_build":true,"newest_mined":"2.1.308","builds":84,"mined_builds":149,"first_cited":{"version":"2.1.213","released_at":"2026-07-17 22:26:26","spans":1}},"aliases":[],"entries":[{"version":"2.1.213","anchor":"otel-configurable-content-truncation-limit","heading":"OTEL: Configurable Content Truncation Limit","line":null,"released_at":"2026-07-17 22:26:26","reason":"found in this entry's text"}],"entries_total":1,"docs":[{"source":"claude-code","path":"agent-sdk\/observability","title":"Observability with OpenTelemetry","documented":false},{"source":"claude-code","path":"monitoring-usage","title":"Monitoring","documented":false}],"docs_total":2,"gates":[],"related":[{"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."},{"name":"CLAUDE_CODE_OTEL_SHUTDOWN_TIMEOUT_MS","slug":"claude-code-otel-shutdown-timeout-ms","description":"The metrics opt-out check can no longer trigger a surprise second sign-in."}],"url":"https:\/\/changelogs.core-directive.com\/reference\/env\/claude-code-otel-content-max-length","family_url":"https:\/\/changelogs.core-directive.com\/reference\/env.json"}