getsentry / getsentry/sentry-java

Add SQL span data

未关闭
#6,018 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
Feature Java Platform: Java Spans
主要语言
Kotlin
星标
1.4k
派生
478
平均合并
2 天 22 小时
30 天内合并 PR
69

描述

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

贡献指南

打开贡献指南

调研方向

Start by locating the first-party JDBC and Android SQLite span instrumentation, then review Sentry database conventions and the linked issue 6019. Check the data-collection guidance before implementation. Done means the relevant spans attach sanitized or parameterized db.query.text and low-cardinality db.query.summary, with matching derived attributes where applicable.

由索引模型根据 Issue 内容生成。

评估

技术栈
android, java, kotlin, sqlite
领域
databases, observability
Issue 类型
功能
难度
4/5
预计耗时
3-5 天
活跃度
活跃
描述清晰度
基本清楚
新手友好度
48/100

把新 issue 发到你的邮箱

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