getsentry / getsentry/sentry-python

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

未关闭
#5,463 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
Feature Python Spans
主要语言
Python
星标
2.2k
派生
669
平均合并
1 天 1 小时
30 天内合并 PR
213

描述

### 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

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。