feat(database): Capture query data behind dataCollection
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
Direzione di ricerca
Inizia dal percorso JDBC P6Spy StatementInformation.getSql() e dalle integrazioni Android SupportSQLite e SQLiteDriver, tracciando dove è disponibile databaseQueryData. Usa i casi elencati di abilitato/disabilitato, forma dei parametri, dimensione, batch e argomenti di binding Android per definire la copertura; completato significa una raccolta limitata al tempo di origine senza modificare i campi di query sanificati, oltre alla documentazione delle categorie supportate.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem
The Java SDK exposes dataCollection.databaseQueryData, but the current first-party database integrations do not collect any of the value-bearing data controlled by that option:
- JDBC records the original statement text through P6Spy's
StatementInformation.getSql(), not bound parameter values. - Android SQLite receives bind arguments but does not attach them to spans.
- Neither integration captures write payloads or returned result data.
As a result, databaseQueryData currently has no production consumer in these integrations.
Sanitized or parameterized db.query.text, db.query.summary, and structural database metadata are intentionally outside this option and should continue to be collected independently.
Proposal
In the next major version, add source-time collection of supported database query data and guard it with dataCollection.databaseQueryData.
Start with the value-bearing data already available to first-party instrumentation:
- JDBC prepared/callable statement bind values, where P6Spy exposes them safely.
- Android SQLite bind arguments in the SupportSQLite and SQLiteDriver integrations.
Evaluate write-operation payloads and returned result data separately; only add them where useful, bounded, and supported by established Sentry span conventions.
Requirements
- Apply the policy when first-party instrumentation writes the data, not later during serialization or export.
- Do not put bound values into span descriptions, span names,
db.query.text, ordb.query.summary. - Use standardized structured span attributes for parameters where available, such as
db.query.parameter.<key>. databaseQueryData=falsemust prevent value-bearing query data from being attached.- Query text must remain sanitized/parameterized independently of this option.
- Add size/count limits and fail-closed handling for unsupported or malformed values.
- Preserve explicitly supplied customer span data.
- Add tests for enabled/disabled behavior, positional and named parameters, null/binary/large values, batch operations, and Android bind arguments.
- Document which integrations and database data categories are supported.
Related
- Data Collection specification:
databaseQueryDatacontrols bound query parameters, write-operation payloads, and returned result data. - SQL sanitization and
db.query.summarygeneration are separate concerns and should not be made conditional on this option.
- Lingua principale
- Kotlin
- Stelle
- 1.4k
- Fork
- 478
- Merge medio
- 3g 2h
- PR unite (30g)
- 70
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di getsentry/sentry-java
-
Improvement Java Platform: Java
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
getsentry/sentry-java#6145 · 1 commento ·
-
Bug Java Platform: Java
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
getsentry/sentry-java#6138 · 1 commento ·
-
Feature Java Platform: Java Spans
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
getsentry/sentry-java#5984 · 1 commento ·
-
Android Task Traces
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
getsentry/sentry-java#5376 · 1 commento ·
-
Android Docs Errors
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
getsentry/sentry-java#5375 · 1 commento ·
Tutte le issue di getsentry/sentry-java
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Telegram !!! Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
Xposed-Modules-Repo/com.fuck.iab#24 · 3 commenti · 1 reazione ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
SimonHalvdansson/Harmonic-HN#361 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
johanhaleby/occurrent#1120 ·