Preflight Checklist
What's Wrong?
This depends on the observability platform but I believe you should make the change instead to conform to HTML specs.
When prompt logging is enabled, the following fields are logged:
"prompt": "If you see this, you are awesome",
"prompt.id": "123456",
"prompt_length": "32",
Depending on the platform, this will break the prompt attribute since prompt.id unflattens into a nested prompt object with just an id - overwriting prompt in the process.
What Should Happen?
Every observability platform should behave the same and render all 3 fields per HTML specs. prompt.id should be renamed to prompt_id to remain consistent or a single prompt object with id, text and length should be included.
Error Messages/Logs
Steps to Reproduce
Enable logging with OTEL_LOG_USER_PROMPTS set to 1.
Log to observability platform of your choice, this was tested with CloudWatch and DataDog
Claude Model
Other
Is this a regression?
I don't know
Last Working Version
No response
Claude Code Version
2.1.191
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
No response
Preflight Checklist
What's Wrong?
This depends on the observability platform but I believe you should make the change instead to conform to HTML specs.
When prompt logging is enabled, the following fields are logged:
Depending on the platform, this will break the
promptattribute sinceprompt.idunflattens into a nestedpromptobject with just an id - overwritingpromptin the process.What Should Happen?
Every observability platform should behave the same and render all 3 fields per HTML specs.
prompt.idshould be renamed toprompt_idto remain consistent or a singlepromptobject withid,textandlengthshould be included.Error Messages/Logs
Steps to Reproduce
Enable logging with OTEL_LOG_USER_PROMPTS set to 1.
Log to observability platform of your choice, this was tested with CloudWatch and DataDog
Claude Model
Other
Is this a regression?
I don't know
Last Working Version
No response
Claude Code Version
2.1.191
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
No response