Skip to content

Distinguish async vs sync database drivers in Python DB spans (FastAPI / SQLAlchemy / asyncpg) #5463

@zycon

Description

@zycon

Problem Statement

In Sentry Performance for Python async applications (FastAPI + SQLAlchemy async), all database spans appear generically as:

op: db
description: SELECT ...

There is currently no visible way in the UI or span attributes to determine whether the underlying database driver is:

async (e.g., asyncpg, SQLAlchemy asyncio), or

sync (e.g., psycopg2, synchronous SQLAlchemy)

This makes it difficult to verify that async applications are using non-blocking database drivers and not accidentally introducing sync DB calls inside async endpoints.

Solution Brainstorm

No response

Product Area

Insights

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status

    Waiting for: Product Owner

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions