From d428d86bd2befd9c74a4fab5a4c29b6314aaa24d Mon Sep 17 00:00:00 2001 From: Ivana Kellyer Date: Thu, 21 May 2026 16:14:52 +0200 Subject: [PATCH] fix: Use name, not description in OpenAI agents spans --- sentry_sdk/integrations/openai_agents/spans/ai_client.py | 2 +- sentry_sdk/integrations/openai_agents/utils.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sentry_sdk/integrations/openai_agents/spans/ai_client.py b/sentry_sdk/integrations/openai_agents/spans/ai_client.py index b797aca56c..b060c29aaf 100644 --- a/sentry_sdk/integrations/openai_agents/spans/ai_client.py +++ b/sentry_sdk/integrations/openai_agents/spans/ai_client.py @@ -31,7 +31,7 @@ def ai_client_span( span = sentry_sdk.start_span( op=OP.GEN_AI_CHAT, - description=f"chat {model_name}", + name=f"chat {model_name}", origin=SPAN_ORIGIN, ) # TODO-anton: remove hardcoded stuff and replace something that also works for embedding and so on diff --git a/sentry_sdk/integrations/openai_agents/utils.py b/sentry_sdk/integrations/openai_agents/utils.py index e4157418a3..5ffdb915ba 100644 --- a/sentry_sdk/integrations/openai_agents/utils.py +++ b/sentry_sdk/integrations/openai_agents/utils.py @@ -224,7 +224,7 @@ def _create_mcp_execute_tool_spans( if output.__class__.__name__ == "McpCall": with sentry_sdk.start_span( op=OP.GEN_AI_EXECUTE_TOOL, - description=f"execute_tool {output.name}", + name=f"execute_tool {output.name}", start_timestamp=span.start_timestamp, ) as execute_tool_span: execute_tool_span.set_data(SPANDATA.GEN_AI_TOOL_NAME, output.name)