getsentry / getsentry/sentry-java

Add SQL span data

Offen
#6,018 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Feature Java Platform: Java Spans
Vorherrschende Sprache
Kotlin
Sterne
1.4k
Forks
478
Ø Merge
2 T. 23 Std.
Gemergte PRs (30 T.)
67

Beschreibung

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
android, java, kotlin, sqlite
Bereich
databases, observability
Issue-Typ
Feature
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Aktiv
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
48/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.