Background
Tool calls have no tracing today. The tool_post_invoke hook exists (consumed by ToolMetricsPlugin) and is the right attach point. Replaces retired sub-issue #474.
Scope
- Add a
ToolTracingPlugin in tracing_plugins.py that emits a tool.call span on tool_post_invoke (and a companion pre-invoke hook if one exists, or a small prerequisite issue to add one).
- Attributes:
gen_ai.tool.name, gen_ai.tool.call.id (semconv), plus Mellea-specific mellea.tool.arguments_hash, mellea.tool.status.
- Make tool spans children of the backend generation span when possible.
Phase & dependencies
Phase 2 (coverage). Depends on Phase 1 (#1045, #1046, #1047). Can proceed in parallel with {{NEW-D}}, {{NEW-F}}, {{NEW-G}}, {{NEW-H}}, and with PR #1036 rebased onto Phase 1.
Acceptance criteria
Parent epic: #444
Background
Tool calls have no tracing today. The
tool_post_invokehook exists (consumed byToolMetricsPlugin) and is the right attach point. Replaces retired sub-issue #474.Scope
ToolTracingPluginintracing_plugins.pythat emits atool.callspan ontool_post_invoke(and a companion pre-invoke hook if one exists, or a small prerequisite issue to add one).gen_ai.tool.name,gen_ai.tool.call.id(semconv), plus Mellea-specificmellea.tool.arguments_hash,mellea.tool.status.Phase & dependencies
Phase 2 (coverage). Depends on Phase 1 (#1045, #1046, #1047). Can proceed in parallel with {{NEW-D}}, {{NEW-F}}, {{NEW-G}}, {{NEW-H}}, and with PR #1036 rebased onto Phase 1.
Acceptance criteria
Parent epic: #444