File tree Expand file tree Collapse file tree
util/opentelemetry-util-genai/src/opentelemetry/util/genai Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -419,9 +419,9 @@ def _apply_tool_call_attributes(
419419
420420 Required attributes:
421421 - gen_ai.operation.name = "execute_tool"
422+ - gen_ai.tool.name
422423
423424 Recommended attributes (if available):
424- - gen_ai.tool.name
425425 - gen_ai.tool.call.id
426426 - gen_ai.tool.type
427427 - gen_ai.tool.description
@@ -439,10 +439,9 @@ def _apply_tool_call_attributes(
439439 GenAI .GenAiOperationNameValues .EXECUTE_TOOL .value ,
440440 )
441441
442- # Set RECOMMENDED attributes (if present)
443- if tool_call .name :
444- span .set_attribute (GenAI .GEN_AI_TOOL_NAME , tool_call .name )
442+ span .set_attribute (GenAI .GEN_AI_TOOL_NAME , tool_call .name )
445443
444+ # Set RECOMMENDED attributes (if present)
446445 if tool_call .id :
447446 span .set_attribute (GenAI .GEN_AI_TOOL_CALL_ID , tool_call .id )
448447
You can’t perform that action at this time.
0 commit comments