[DOCS] OpenTelemetry documentation does not explain CLAUDE_CODE_OTEL_CONTENT_MAX_LENGTH

Status Open
Reported on v2.1.214
Maintainer reply None cached
Activity 0 comments · opened Jul 18, 2026

Documentation Type

Missing documentation (feature not documented)

Documentation Location

https://code.claude.com/docs/en/monitoring-usage

Section/Topic

OpenTelemetry configuration variables and the sections describing content-bearing attributes.

Current Documentation

The configuration table currently says:

OTEL_LOG_TOOL_CONTENT — Enable logging of tool input and output content in span events (default: disabled). Requires tracing. Content is truncated at 60 KB.

It similarly describes inline API-body events as being truncated at 60 KB. The Agent SDK observability page also describes content as truncated at 60 KB, but neither page documents CLAUDE_CODE_OTEL_CONTENT_MAX_LENGTH.

What's Wrong or Missing?

Claude Code 2.1.214 adds CLAUDE_CODE_OTEL_CONTENT_MAX_LENGTH to configure the 60 KB truncation limit on OpenTelemetry content attributes. The documentation presents 60 KB as a fixed limit and does not tell operators that the limit is configurable, what value format or units the variable accepts, which content-bearing attributes it affects, or how the setting interacts with inline API-body and tool-content logging.

Organizations tuning telemetry volume and privacy controls cannot discover or safely configure this new option from the OpenTelemetry reference.

Suggested Improvement

Add CLAUDE_CODE_OTEL_CONTENT_MAX_LENGTH to the configuration table and explain:

  • its default value and accepted value format/units;
  • the content attributes and event types it controls;
  • whether it applies to traces, log events, or both;
  • how 0, an unset value, and invalid values behave; and
  • whether file-mode raw API bodies remain untruncated as documented.

Update the 60 KB references in both observability pages to say that 60 KB is the default when the new variable is unset.

Impact

Medium - Makes feature difficult to understand

Additional Context

Affected Pages:

| Page | Context |
|------|---------|
| https://code.claude.com/docs/en/monitoring-usage | OpenTelemetry environment-variable reference and content limits |
| https://code.claude.com/docs/en/agent-sdk/observability | Agent SDK content-export and privacy guidance |

Release: Claude Code 2.1.214.

View original on GitHub ↗