Skip to content

Commit a94870e

Browse files
Update sentry_sdk/integrations/pydantic_ai/spans/invoke_agent.py
Co-authored-by: Ivana Kellyer <[email protected]>
1 parent 7263a77 commit a94870e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sentry_sdk/integrations/pydantic_ai/spans/invoke_agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def invoke_agent_span(user_prompt, agent, model, model_settings):
1919

2020
# Determine agent name for span
2121
name = "agent"
22-
if agent and hasattr(agent, "name") and agent.name:
22+
if agent and getattr(agent, "name", None):
2323
name = agent.name
2424

2525
span = start_span_function(

0 commit comments

Comments
 (0)