We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fc55e04 commit ed1351eCopy full SHA for ed1351e
1 file changed
tests/integrations/pydantic_ai/test_pydantic_ai.py
@@ -4345,9 +4345,13 @@ def test_image_url_base64_content_in_span(
4345
if span_streaming or stream_gen_ai_spans:
4346
items = capture_items("transaction", "span")
4347
4348
- with sentry_sdk.traces.start_span(
4349
- name="test", attributes={"sentry.op": "test"}
4350
- ):
+ ctx = (
+ sentry_sdk.traces.start_span(name="test", attributes={"sentry.op": "test"})
+ if span_streaming
4351
+ else sentry_sdk.start_transaction(op="test", name="test")
4352
+ )
4353
+
4354
+ with ctx:
4355
image_url = ImageUrl(url=url, **image_url_kwargs)
4356
user_part = UserPromptPart(content=["Look at this image:", image_url])
4357
mock_msg = MagicMock()
0 commit comments