Skip to content

Look at the Dialect for SQLAlchemy, and small cleanup

78009c0
Select commit
Loading
Failed to load commit list.
Merged

feat: Add db.driver.name spans to database integrations #6082

Look at the Dialect for SQLAlchemy, and small cleanup
78009c0
Select commit
Loading
Failed to load commit list.
@sentry/warden / warden completed Apr 15, 2026 in 5m 9s

1 issue

High

Test assertion will fail: DB_DRIVER_NAME not set for parameter-less execute calls - `tests/integrations/asyncpg/test_asyncpg.py:557`

The new assertion assert data.get(SPANDATA.DB_DRIVER_NAME) == "asyncpg" will fail because _wrap_execute does not call _set_db_data() when len(args) <= 2. The test calls conn.execute("INSERT INTO ...") with only a query string (no parameters), so it goes through the code path at lines 76-88 in asyncpg.py which uses record_sql_queries but never sets DB_DRIVER_NAME. The span will be missing this attribute, causing the test to fail.

4 skills analyzed
Skill Findings Duration Cost
code-review 1 1m 57s $2.82
find-bugs 0 5m 6s $5.53
skill-scanner 0 2m 12s $0.98
security-review 0 2m 42s $0.62

Duration: 11m 57s · Tokens: 4.4M in / 45.8k out · Cost: $9.95 (+extraction: $0.00)