Skip to content

Commit 7e224c8

Browse files
ref(openai-agents): Remove set_data_normalized for primitive attributes (#5509)
Remove `set_data_normalized()` for attributes that do not require normalization because they are primitive. Only instances `McpCall` in the `output` field of `agents.Result` are iterated over, and these have a string `name` field.
1 parent 624ead2 commit 7e224c8

File tree

1 file changed

+2
-4
lines changed
  • sentry_sdk/integrations/openai_agents

1 file changed

+2
-4
lines changed

sentry_sdk/integrations/openai_agents/utils.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -239,10 +239,8 @@ def _create_mcp_execute_tool_spans(
239239
description=f"execute_tool {output.name}",
240240
start_timestamp=span.start_timestamp,
241241
) as execute_tool_span:
242-
set_data_normalized(execute_tool_span, SPANDATA.GEN_AI_TOOL_TYPE, "mcp")
243-
set_data_normalized(
244-
execute_tool_span, SPANDATA.GEN_AI_TOOL_NAME, output.name
245-
)
242+
execute_tool_span.set_data(SPANDATA.GEN_AI_TOOL_TYPE, "mcp")
243+
execute_tool_span.set_data(SPANDATA.GEN_AI_TOOL_NAME, output.name)
246244
if should_send_default_pii():
247245
execute_tool_span.set_data(
248246
SPANDATA.GEN_AI_TOOL_INPUT, output.arguments

0 commit comments

Comments
 (0)