Skip to content

Commit 7c773d9

Browse files
Merge branch 'webb/narrow-capture-items' into webb/remove-filters
2 parents 71cc30a + 9bdffec commit 7c773d9

4 files changed

Lines changed: 16 additions & 16 deletions

File tree

tests/integrations/django/test_basic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1629,7 +1629,7 @@ def test_does_not_capture_403(
16291629
_experiments={"trace_lifecycle": "stream" if span_streaming else "static"},
16301630
)
16311631
if span_streaming:
1632-
items = capture_items("span")
1632+
items = capture_items("event", "transaction", "span")
16331633

16341634
_, status, _ = unpack_werkzeug_response(client.get(reverse(endpoint)))
16351635
assert status.lower() == "403 forbidden"

tests/integrations/langchain/test_langchain.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4149,7 +4149,7 @@ def test_langchain_embeddings_span_hierarchy(
41494149
_experiments={"trace_lifecycle": "stream" if span_streaming else "static"},
41504150
)
41514151
if span_streaming:
4152-
items = capture_items("span", "transaction")
4152+
items = capture_items("span")
41534153

41544154
# Mock the actual API call
41554155
with mock.patch.object(

tests/integrations/litellm/test_litellm.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1530,7 +1530,7 @@ def test_span_origin(
15301530
request_headers={"X-Stainless-Raw-Response": "true"},
15311531
)
15321532
if span_streaming:
1533-
items = capture_items("span", "transaction")
1533+
items = capture_items("span")
15341534

15351535
with mock.patch.object(
15361536
client.completions._client._client,
@@ -1637,7 +1637,7 @@ def test_multiple_providers(
16371637
)
16381638

16391639
if span_streaming:
1640-
items = capture_items("span", "transaction")
1640+
items = capture_items("span")
16411641

16421642
with mock.patch.object(
16431643
openai_client.completions._client._client,

tests/integrations/pydantic_ai/test_pydantic_ai.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ async def test_agent_run_async(
9494
test_agent = get_test_agent()
9595

9696
if span_streaming:
97-
items = capture_items("span", "transaction")
97+
items = capture_items("span")
9898

9999
result = await test_agent.run(
100100
["Message demonstrating the absence of truncation.", "Test input"]
@@ -314,7 +314,7 @@ def test_agent_run_sync(
314314
test_agent = get_test_agent()
315315

316316
if span_streaming:
317-
items = capture_items("span", "transaction")
317+
items = capture_items("span")
318318

319319
result = test_agent.run_sync(
320320
["Message demonstrating the absence of truncation.", "Test input"]
@@ -480,7 +480,7 @@ async def test_agent_run_stream(
480480
test_agent = get_test_agent()
481481

482482
if span_streaming:
483-
items = capture_items("span", "transaction")
483+
items = capture_items("span")
484484

485485
async with test_agent.run_stream(
486486
["Message demonstrating the absence of truncation.", "Test input"]
@@ -633,7 +633,7 @@ async def test_agent_run_stream_events(
633633
test_agent = get_test_agent()
634634

635635
if span_streaming:
636-
items = capture_items("span", "transaction")
636+
items = capture_items("span")
637637

638638
if PYDANTIC_AI_VERSION > (2,):
639639
async with test_agent.run_stream_events(
@@ -1364,7 +1364,7 @@ async def test_error_handling(
13641364
)
13651365

13661366
if span_streaming:
1367-
items = capture_items("transaction")
1367+
items = capture_items("span")
13681368

13691369
# Simple run that should succeed
13701370
await agent.run("Hello")
@@ -1553,7 +1553,7 @@ async def run_agent(input_text):
15531553
return await test_agent.run(input_text)
15541554

15551555
if span_streaming:
1556-
items = capture_items("transaction")
1556+
items = capture_items("span")
15571557

15581558
# Run 3 agents concurrently
15591559
results = await asyncio.gather(*[run_agent(f"Input {i}") for i in range(3)])
@@ -2162,7 +2162,7 @@ async def test_invoke_agent_with_list_user_prompt(
21622162
)
21632163

21642164
if span_streaming:
2165-
items = capture_items("transaction")
2165+
items = capture_items("span")
21662166

21672167
# Use a list as user prompt
21682168
await agent.run(["First part", "Second part"])
@@ -2474,7 +2474,7 @@ async def test_agent_data_from_scope(
24742474
)
24752475

24762476
if span_streaming:
2477-
items = capture_items("transaction")
2477+
items = capture_items("span")
24782478

24792479
# The integration automatically sets agent in scope during execution
24802480
await agent.run("Test input")
@@ -2795,7 +2795,7 @@ async def test_agent_without_name(
27952795
)
27962796

27972797
if span_streaming:
2798-
items = capture_items("transaction")
2798+
items = capture_items("span")
27992799

28002800
await agent.run("Test input")
28012801

@@ -3958,7 +3958,7 @@ async def test_binary_content_encoding_image(
39583958
)
39593959

39603960
if span_streaming:
3961-
items = capture_items("transaction")
3961+
items = capture_items("span")
39623962

39633963
with sentry_sdk.traces.start_span(
39643964
name="test", attributes={"sentry.op": "test"}
@@ -4045,7 +4045,7 @@ async def test_binary_content_encoding_mixed_content(
40454045
)
40464046

40474047
if span_streaming:
4048-
items = capture_items("transaction")
4048+
items = capture_items("span")
40494049

40504050
with sentry_sdk.traces.start_span(
40514051
name="test", attributes={"sentry.op": "test"}
@@ -4225,7 +4225,7 @@ async def test_set_usage_data_with_cache_tokens(
42254225
)
42264226

42274227
if span_streaming:
4228-
items = capture_items("transaction")
4228+
items = capture_items("span")
42294229

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

0 commit comments

Comments
 (0)