fix(telemetry): emit Tool.execute span for MCP and plugin tools (#25452)

This commit is contained in:
Kit Langton
2026-05-02 14:49:56 -04:00
committed by GitHub
parent b3a7513765
commit 6cd02c05c2
2 changed files with 22 additions and 4 deletions

View File

@@ -154,7 +154,16 @@ export const layer: Layer.Layer<
...(out.truncated && { outputPath: out.outputPath }),
},
}
}),
}).pipe(
Effect.withSpan("Tool.execute", {
attributes: {
"tool.name": id,
"session.id": toolCtx.sessionID,
"message.id": toolCtx.messageID,
...(toolCtx.callID ? { "tool.call_id": toolCtx.callID } : {}),
},
}),
),
}
}