# OTEL_LOG_USER_PROMPTS

> Set to 1, it puts your prompt text into telemetry logs.

**Field:** Artificial Intelligence  
**Category:** Claude Code  
**Also known as:** OTEL_LOG_ASSISTANT_RESPONSES

## Think of it like

It is like a call log that keeps what was said. Not just the time.

## Definition

OTEL_LOG_USER_PROMPTS set to 1 puts the text of your prompts in the logs. By default the prompts are hidden. A twin, for the model's answers, does the same for what it says back. If the twin is not set, it follows this one. Project settings skip both.

## Example

Emma's team must keep a record of what people asked the AI. She turns this on, and each prompt lands in the team's log store.

## Example code

```bash
export CLAUDE_CODE_ENABLE_TELEMETRY=1
export OTEL_LOG_USER_PROMPTS=1
claude
```

Log prompts for a team audit.

## Why it matters

Prompts can hold private data. Hiding them by default keeps that data out of logs.

## Common mistake

Turning it on without checking who can read the logs. Prompts may hold secrets.

## Three principles

- **Prompt text in logs.** When set.
- **Hidden by default.** Redacted.
- **Answers have a twin.** ASSISTANT_RESPONSES.

## Related terms

- [CLAUDE_CODE_ENABLE_TELEMETRY](https://learn.benibix.com/term/ai/claude-code-enable-telemetry-variable)
- [OTEL_LOG_TOOL_DETAILS](https://learn.benibix.com/term/ai/otel-log-tool-details-variable)
- [OTEL_LOG_RAW_API_BODIES](https://learn.benibix.com/term/ai/otel-log-raw-api-bodies-variable)

---

Source: https://learn.benibix.com/term/ai/otel-log-user-prompts-variable
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-17
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
