Skip to content

test(aiomysql): Add span streaming variants to aiomysql tests#6601

Merged
ericapisani merged 1 commit into
masterfrom
py-2523-add-span-streaming-tests-to-aiomysql
Jun 18, 2026
Merged

test(aiomysql): Add span streaming variants to aiomysql tests#6601
ericapisani merged 1 commit into
masterfrom
py-2523-add-span-streaming-tests-to-aiomysql

test(aiomysql): Add span streaming variants to aiomysql tests

320544f
Select commit
Loading
Failed to load commit list.
@sentry/warden / warden: code-review completed Jun 17, 2026

1 issue

code-review: Found 1 issue (1 low)

Low

Streaming `test_no_query_source_if_duration_too_short` verifies no-op behavior, not threshold logic - `tests/integrations/aiomysql/test_aiomysql.py:704-708`

The fake_record_sql_queries_streaming context manager exits the inner with record_sql_queries(...) as span: pass block immediately, which triggers span._end()client._capture_telemetry()span._to_json() and batches the already-serialized span before yield span. Since add_query_source(span) is called by the aiomysql wrapper only after the yield, any attributes it might add to span._attributes won't appear in the captured payload — so the assertion assert "code.line.number" not in data always passes regardless of whether the threshold check is broken.


⏱ 6m 23s · 810.7k in / 24.2k out · $0.97