You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our JDBC and Android SQLite integrations currently use caller-provided SQL directly as the span description. If a customer interpolates values instead of using placeholders, literals and comments can contain PII, credentials, or other sensitive data and are sent to Sentry. The Java SDK has no SQL sanitizer today.
Solution Brainstorm
Introduce a shared internal SQL analyzer used by sentry-jdbc and sentry-android-sqlite.
Requirements:
Sanitize every statement, including prepared-statement text.
Replace literal values with placeholders while preserving SQL structure and existing parameter markers.
Never fall back to, attach, or log the original query if analysis fails; fail closed to safe structural metadata.
Use sanitized query text as the transaction-based span description.
Cover JDBC, SupportSQLiteOpenHelper, and SQLiteDriver instrumentation.
Add malformed-input, dialect, secret-canary, fuzz/robustness, and performance tests.
OpenTelemetry Java's Apache-2.0 JFlex SqlSanitizerWithSummary.jflex is strong prior art and can likely be adapted, but should not be vendored unchanged: OTel preserves comments, may skip sanitization for prepared statements, and preserves unknown fragments. Vendoring requires source attribution and a THIRD_PARTY_NOTICES.md entry.
Activity
linear-code commentedon Aug 27, 2026
JAVA-712