File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
sentry_sdk/integrations/openai_agents Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -166,11 +166,13 @@ def _create_mcp_execute_tool_spans(span, result):
166166 op = OP .GEN_AI_EXECUTE_TOOL ,
167167 description = f"execute_tool { output .name } " ,
168168 start_timestamp = span .start_timestamp ,
169- ) as span :
170- span .set_tag (SPANDATA .GEN_AI_TOOL_TYPE , "mcp" )
171- span .set_tag (SPANDATA .GEN_AI_TOOL_NAME , output .name )
169+ ) as execute_tool_span :
170+ execute_tool_span .set_tag (SPANDATA .GEN_AI_TOOL_TYPE , "mcp" )
171+ execute_tool_span .set_tag (SPANDATA .GEN_AI_TOOL_NAME , output .name )
172172 if should_send_default_pii ():
173- span .set_data (SPANDATA .GEN_AI_TOOL_INPUT , output .arguments )
173+ execute_tool_span .set_data (
174+ SPANDATA .GEN_AI_TOOL_INPUT , output .arguments
175+ )
174176 span .set_data (SPANDATA .GEN_AI_TOOL_OUTPUT , output .output )
175177 if output .error :
176- span .set_status (SPANSTATUS .ERROR )
178+ execute_tool_span .set_status (SPANSTATUS .ERROR )
You can’t perform that action at this time.
0 commit comments