claude-code - 💡(How to fix) Fix [DOCS] Monitoring reference missing new OpenTelemetry tool event attributes [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#52615Fetched 2026-04-24 06:02:23
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
0
Author
Participants
Timeline (top)
labeled ×3

Error Message

  • error: Error message (if failed)
RAW_BUFFERClick to expand / collapse

Documentation Type

Incorrect/outdated documentation

Documentation Location

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

Section/Topic

Events → claude_code.tool_result and claude_code.tool_decision

Current Documentation

The docs currently list these attributes for the two tool-related OpenTelemetry events:

Event Name: claude_code.tool_result

  • event.name: "tool_result"
  • tool_name: Name of the tool
  • success: "true" or "false"
  • duration_ms: Execution time in milliseconds
  • error: Error message (if failed)
  • decision_type: Either "accept" or "reject"
  • decision_source: Decision source - "config", "hook", "user_permanent", "user_temporary", "user_abort", or "user_reject"
  • tool_result_size_bytes: Size of the tool result in bytes

and:

Event Name: claude_code.tool_decision

  • event.name: "tool_decision"
  • tool_name: Name of the tool (for example, "Read", "Edit", "Write", "NotebookEdit")
  • decision: Either "accept" or "reject"
  • source: Decision source - "config", "hook", "user_permanent", "user_temporary", "user_abort", or "user_reject"

I could not find any mention on this page of tool_use_id for either event or tool_input_size_bytes for tool_result.

What's Wrong or Missing?

Changelog v2.1.119 says:

OpenTelemetry: tool_result and tool_decision events now include tool_use_id; tool_result also includes tool_input_size_bytes

But the monitoring reference still shows the older event schemas.

That leaves the canonical OpenTelemetry event documentation outdated in two ways:

A. Missing tool_use_id on both tool events

Users reading the docs will not know that claude_code.tool_result and claude_code.tool_decision can now be correlated to a specific tool invocation with tool_use_id.

B. Missing tool_input_size_bytes on tool_result

Users reading the docs will not know that claude_code.tool_result now also exposes tool input size in bytes, alongside the already-documented tool_result_size_bytes.

Suggested Improvement

Update the attribute lists in the Monitoring reference for both events:

  • Add tool_use_id to claude_code.tool_result
  • Add tool_use_id to claude_code.tool_decision
  • Add tool_input_size_bytes to claude_code.tool_result

It would also help to briefly describe what each new field is used for:

  • tool_use_id: identifier that lets users join decision/result events back to the same tool invocation
  • tool_input_size_bytes: size of the tool input payload in bytes

If there are any conditions on when these attributes are emitted, document those conditions in the same section.

Impact

Medium - Makes feature difficult to understand

Additional Context

Affected Pages:

PageContext
https://code.claude.com/docs/en/monitoring-usageCanonical OpenTelemetry reference for Claude Code event names and attributes
https://code.claude.com/docs/en/agent-sdk/observabilitySends Agent SDK users to the Monitoring reference for the complete list of event names and attributes

Total scope: 2 pages affected

Source: Changelog v2.1.119

Exact changelog entry:

OpenTelemetry: tool_result and tool_decision events now include tool_use_id; tool_result also includes tool_input_size_bytes

extent analysis

TL;DR

Update the Monitoring reference documentation to include tool_use_id for both claude_code.tool_result and claude_code.tool_decision events, and add tool_input_size_bytes to claude_code.tool_result.

Guidance

  • Review the Changelog v2.1.119 entry to understand the changes made to the OpenTelemetry events.
  • Update the attribute lists in the Monitoring reference for both claude_code.tool_result and claude_code.tool_decision events to include the new fields.
  • Add brief descriptions for the new fields: tool_use_id for correlating events to a specific tool invocation, and tool_input_size_bytes for the size of the tool input payload in bytes.
  • Verify that the updated documentation accurately reflects the current event schemas.

Example

No code snippet is necessary for this issue, as it pertains to documentation updates.

Notes

The updates should be made to the canonical OpenTelemetry reference for Claude Code event names and attributes, as well as any other affected pages, such as the Agent SDK documentation.

Recommendation

Apply the suggested improvements to the documentation to ensure that users have accurate and up-to-date information about the OpenTelemetry events.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING