Skip to content

Commit efdf029

Browse files
committed
execute tool with correct tool call name
1 parent e3cfd57 commit efdf029

File tree

1 file changed

+2
-1
lines changed
  • packages/node/src/integrations/tracing/vercelai

1 file changed

+2
-1
lines changed

packages/node/src/integrations/tracing/vercelai/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,13 @@ const _vercelAIIntegration = ((options: VercelAiOptions = {}) => {
6464
name === 'ai.toolCall'
6565
) {
6666
addOriginToSpan(span, 'auto.vercelai.otel');
67+
span.updateName(`execute_tool ${attributes[AI_TOOL_CALL_NAME_ATTRIBUTE]}`);
68+
6769
span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_OP, 'gen_ai.execute_tool');
6870
renameAttributeKey(attributes, AI_TOOL_CALL_NAME_ATTRIBUTE, 'gen_ai.tool.name');
6971
renameAttributeKey(attributes, AI_TOOL_CALL_ID_ATTRIBUTE, 'gen_ai.tool.call.id');
7072
renameAttributeKey(attributes, AI_TOOL_CALL_ARGS_ATTRIBUTE, 'gen_ai.tool.input');
7173
renameAttributeKey(attributes, AI_TOOL_CALL_RESULT_ATTRIBUTE, 'gen_ai.tool.output');
72-
span.updateName(`execute_tool ${attributes[AI_TOOL_CALL_NAME_ATTRIBUTE]}`);
7374

7475
// https://opentelemetry.io/docs/specs/semconv/registry/attributes/gen-ai/#gen-ai-tool-type
7576
if (!attributes['gen_ai.tool.type']) {

0 commit comments

Comments
 (0)