getsentry / getsentry/sentry-java
Add SQL span data
- 主要語言
- Kotlin
- 星號
- 1.4k
- 分支
- 478
- 平均合併
- 3 天 4 小時
- 30 天內合併 PR
- 72
描述
### Problem Statement
First-party JDBC and Android SQLite spans currently keep the SQL statement only in the span description and attach limited database metadata (`db.system` and `db.name`). They do not attach `db.query.text` or generate `db.query.summary`.
### Solution Brainstorm
Attach database query semantic data to first-party JDBC and Android SQLite spans:
- `db.query.text`: the parameterized or SDK-sanitized statement. We should run this through a sanitizer.
- `db.query.summary`: a low-cardinality operation/target summary such as `UPDATE users`.
- Consider attaching analyzer-derived operation, collection/table, and stored-procedure attributes where they match Sentry conventions.
Check sentry conventions for more (query derived) attributes we can attach.
There's currently no data collection option to gate sanitized/parameterized `db.query.text` or `db.query.summary` so we can just attach them. Best double check https://develop.sentry.dev/sdk/foundations/client/data-collection/ when implementing.
Closely related to https://github.com/getsentry/sentry-java/issues/6019
貢獻指南
研究方向
首先定位 first-party JDBC 和 Android SQLite span instrumentation,接著檢視 Sentry 的資料庫慣例以及連結的 issue 6019。在實作之前檢查資料收集指南。完成的標準是:相關 span 附加經過清理或參數化的 db.query.text 和低基數的 db.query.summary,並在適用時附加相符的衍生屬性。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- android, java, kotlin, sqlite
- 領域
- databases, observability
- Issue 類型
- 功能
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 活躍
- 描述清晰度
- 基本清楚
- 新手友好度
- 48/100