Skip to content

feat(database): [Data Collection 5] Apply query policy#5801

Draft
adinauer wants to merge 2 commits into
feat/data-collection-graphqlfrom
feat/data-collection-database-query-data
Draft

feat(database): [Data Collection 5] Apply query policy#5801
adinauer wants to merge 2 commits into
feat/data-collection-graphqlfrom
feat/data-collection-database-query-data

Conversation

@adinauer

@adinauer adinauer commented Jul 21, 2026

Copy link
Copy Markdown
Member

PR Stack (Data Collection)


📜 Description

Apply the Data Collection database query policy to JDBC and Android SQLite instrumentation.

Disabling query data removes SQL statement descriptions while preserving technical database metadata such as system, database name, timing, main-thread state, and call stacks. Existing always-collect behavior remains unchanged when Data Collection is absent.

💡 Motivation and Context

Java cannot reliably separate inline SQL values from structural query text. Suppressing the full statement when query data is disabled provides a conservative policy without losing non-query diagnostic metadata.

Refs #5666

💚 How did you test it?

  • ./gradlew spotlessApply apiDump
  • JDBC and Android SQLite focused tests
  • ./gradlew apiCheck

📝 Checklist

  • I added GH Issue ID & Linear ID
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

🔮 Next steps

Apply directional HTTP body policies to the integrations that collect body content.

#skip-changelog

⚠️ Merge this PR using a merge commit (not squash). Only the collection branch is squash-merged into main.

Suppress SQL statement descriptions when database query data collection is disabled while retaining database system, name, timing, status, and other structural span metadata. Preserve existing statement collection when Data Collection is absent.

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor
Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against 4139cb7

@adinauer adinauer mentioned this pull request Jul 21, 2026
8 tasks
@sentry

sentry Bot commented Jul 21, 2026

Copy link
Copy Markdown

📲 Install Builds

Android

🔗 App Name App ID Version Configuration
SDK Size io.sentry.tests.size 8.48.0 (1) release

⚙️ sentry-android Build Distribution Settings

Bring the queue option removal and preceding stack updates into this layer.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant