{"version":"2.1.300","anchor":"otel-spans-get-gen-ai-attributes-prompt-redaction-handle","canonical_anchor":"otel-spans-get-gen-ai-attributes-prompt-redaction-handle","heading":"OpenTelemetry traces now carry standard AI attributes and support prompt redaction","tier":"notice","area":"Telemetry","scope":"org","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.300\/e\/otel-spans-get-gen-ai-attributes-prompt-redaction-handle","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.300","markdown":"### OpenTelemetry traces now carry standard AI attributes and support prompt redaction\n\nInteraction and tool spans in OpenTelemetry traces now include standard gen_ai attributes, and the recorded prompt can be redacted afterwards\n\n**What**\n\nOpenTelemetry (OTel) is an open standard for sending traces, which are timed records of what a program did, to a monitoring tool of your choice. When you have it set up, Claude Code sends spans: one for each interaction, and one for each tool call (an action such as running a command or editing a file). Before, the interaction span carried only the prompt, its length and a sequence number. The interaction and tool spans now also carry these attributes:\n\n- `gen_ai.operation.name`, set to `invoke_agent`\n\n- `gen_ai.conversation.id`, identifying the conversation\n\n- `gen_ai.provider.name`, naming the model provider, for example `aws.bedrock`, `gcp.vertex_ai` or `anthropic`\n\nThe prompt text on the interaction span, which is tied to the `OTEL_LOG_USER_PROMPTS` environment variable, can now be redacted after the span has been recorded.\n\n**Why**\n\nThese attribute names follow the OpenTelemetry conventions for generative AI, so tools that understand those conventions can group and label Claude Code traces without custom mapping. None of this appears unless you have configured OpenTelemetry yourself.\n\n- Area: Telemetry\n- Tier: You'll notice\n- Useful: 3\/5\n- Signal: 2\/5\n- Scope: org\n- Heads-up: no"}