File tree Expand file tree Collapse file tree
lib/opentelemetry/instrumentation/ruby_llm/patches Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -58,6 +58,7 @@ def complete(&)
5858
5959 def execute_tool ( tool_call )
6060 attributes = {
61+ "gen_ai.operation.name" => "execute_tool" ,
6162 "gen_ai.tool.name" => tool_call . name ,
6263 "gen_ai.tool.call.id" => tool_call . id ,
6364 "gen_ai.tool.call.arguments" => tool_call . arguments . to_json ,
Original file line number Diff line number Diff line change @@ -168,6 +168,7 @@ def execute(expression:)
168168 tool_span = tool_spans . first
169169 assert_equal OpenTelemetry ::Trace ::SpanKind ::INTERNAL , tool_span . kind
170170 assert_equal "execute_tool calculator" , tool_span . name
171+ assert_equal "execute_tool" , tool_span . attributes [ "gen_ai.operation.name" ]
171172 assert_equal "calculator" , tool_span . attributes [ "gen_ai.tool.name" ]
172173 assert_equal '{"expression":"2+2"}' , tool_span . attributes [ "gen_ai.tool.call.arguments" ]
173174 assert_equal "4" , tool_span . attributes [ "gen_ai.tool.call.result" ]
You can’t perform that action at this time.
0 commit comments