Skip to content

Commit ed1351e

Browse files
test
1 parent fc55e04 commit ed1351e

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

tests/integrations/pydantic_ai/test_pydantic_ai.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4345,9 +4345,13 @@ def test_image_url_base64_content_in_span(
43454345
if span_streaming or stream_gen_ai_spans:
43464346
items = capture_items("transaction", "span")
43474347

4348-
with sentry_sdk.traces.start_span(
4349-
name="test", attributes={"sentry.op": "test"}
4350-
):
4348+
ctx = (
4349+
sentry_sdk.traces.start_span(name="test", attributes={"sentry.op": "test"})
4350+
if span_streaming
4351+
else sentry_sdk.start_transaction(op="test", name="test")
4352+
)
4353+
4354+
with ctx:
43514355
image_url = ImageUrl(url=url, **image_url_kwargs)
43524356
user_part = UserPromptPart(content=["Look at this image:", image_url])
43534357
mock_msg = MagicMock()

0 commit comments

Comments
 (0)