⌨️OTEL_LOG_RAW_API_BODIES
Also known as OTEL_LOG_RAW_API_BODIES=1, CLAUDE_CODE_OTEL_CONTENT_MAX_LENGTH
It logs the full JSON of each model request and answer.
Think of it like
It is like you keep a copy of each whole letter. Not just the front.
Example
Lucy's gateway rejects one request, and she cannot see why. She saves the raw bodies to a folder and finds the bad field.
Why it matters
When a request fails in a strange way, the raw body shows exactly what was sent.
Definition
Example code
bash
export CLAUDE_CODE_ENABLE_TELEMETRY=1
export OTEL_LOG_RAW_API_BODIES=file:/tmp/claude-bodies
claudeCommon mistake
Key takeaways
- 1Full JSON. Request and answer.
- 21 or file:. Inline or to disk.
- 3Off by default. Holds the whole chat.