[FEATURE] claude_code.tool spans don't identify which skill or agent was invoked
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
When OTEL tracing is enabled (beta), claude_code.tool spans for Skill and Agent tool invocations only include the generic tool_name (e.g., "Skill" or "Agent"). The specific skill being invoked (e.g., "compose-render", "direct-creative-brief") is not present on the span.
The corresponding claude_code.tool_result log records do include the specific name via tool_parameters and tool_input attributes, but log records do not carry traceId or spanId, so they cannot be linked back to their span.
Current span attributes:
{
"span.type": "tool",
"tool_name": "Skill",
"duration_ms": 6
}
Proposed Solution
Resolve tool_name to the actual skill/agent name instead of the generic wrapper name (e.g., "fix-docs" instead of "Skill").
Alternative Solutions
_No response_
Priority
Critical - Blocking my work
Feature Category
Developer tools/SDK
Use Case Example
When building an observability dashboard over Claude Code sessions (e.g., tracking which skills are used most, measuring per-skill latency, building operation DAGs), the span tree is the natural data source it provides timing, parent-child relationships, and trace context.
However, with tool_name: "Skill" on every skill span, it is not possible to break down metrics by actual skill without falling back to log records, which lack trace linkage.
Additional Context
_No response_
This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗