Skip to content

Commit b158d5d

Browse files
narrow capture_items
1 parent 1493e35 commit b158d5d

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

tests/integrations/pydantic_ai/test_pydantic_ai.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ async def test_agent_run_async(
8080
test_agent = get_test_agent()
8181

8282
if span_streaming:
83-
items = capture_items("transaction", "span")
83+
items = capture_items("span")
8484

8585
result = await test_agent.run(
8686
["Message demonstrating the absence of truncation.", "Test input"]
@@ -300,7 +300,7 @@ def test_agent_run_sync(
300300
test_agent = get_test_agent()
301301

302302
if span_streaming:
303-
items = capture_items("transaction", "span")
303+
items = capture_items("span")
304304

305305
result = test_agent.run_sync(
306306
["Message demonstrating the absence of truncation.", "Test input"]
@@ -469,7 +469,7 @@ async def test_agent_run_stream(
469469
test_agent = get_test_agent()
470470

471471
if span_streaming:
472-
items = capture_items("transaction", "span")
472+
items = capture_items("span")
473473

474474
async with test_agent.run_stream(
475475
["Message demonstrating the absence of truncation.", "Test input"]
@@ -622,7 +622,7 @@ async def test_agent_run_stream_events(
622622
test_agent = get_test_agent()
623623

624624
if span_streaming:
625-
items = capture_items("transaction", "span")
625+
items = capture_items("span")
626626

627627
if PYDANTIC_AI_VERSION > (2,):
628628
async with test_agent.run_stream_events(
@@ -1353,7 +1353,7 @@ async def test_error_handling(
13531353
)
13541354

13551355
if span_streaming:
1356-
items = capture_items("transaction", "span")
1356+
items = capture_items("span")
13571357

13581358
# Simple run that should succeed
13591359
await agent.run("Hello")
@@ -1542,7 +1542,7 @@ async def run_agent(input_text):
15421542
return await test_agent.run(input_text)
15431543

15441544
if span_streaming:
1545-
items = capture_items("transaction", "span")
1545+
items = capture_items("span")
15461546

15471547
# Run 3 agents concurrently
15481548
results = await asyncio.gather(*[run_agent(f"Input {i}") for i in range(3)])
@@ -2151,7 +2151,7 @@ async def test_invoke_agent_with_list_user_prompt(
21512151
)
21522152

21532153
if span_streaming:
2154-
items = capture_items("transaction", "span")
2154+
items = capture_items("span")
21552155

21562156
# Use a list as user prompt
21572157
await agent.run(["First part", "Second part"])
@@ -2465,7 +2465,7 @@ async def test_agent_data_from_scope(
24652465
)
24662466

24672467
if span_streaming:
2468-
items = capture_items("transaction", "span")
2468+
items = capture_items("span")
24692469

24702470
# The integration automatically sets agent in scope during execution
24712471
await agent.run("Test input")
@@ -2786,7 +2786,7 @@ async def test_agent_without_name(
27862786
)
27872787

27882788
if span_streaming:
2789-
items = capture_items("transaction", "span")
2789+
items = capture_items("span")
27902790

27912791
await agent.run("Test input")
27922792

@@ -4216,7 +4216,7 @@ async def test_set_usage_data_with_cache_tokens(
42164216
)
42174217

42184218
if span_streaming:
4219-
items = capture_items("transaction", "span")
4219+
items = capture_items("span")
42204220

42214221
with sentry_sdk.traces.start_span(
42224222
name="test", attributes={"sentry.op": "test"}

0 commit comments

Comments
 (0)