Skip to content

feat(http): [Data Collection 11] Apply response header policy#5807

Draft
adinauer wants to merge 2 commits into
feat/data-collection-http-request-headersfrom
feat/data-collection-http-response-headers
Draft

feat(http): [Data Collection 11] Apply response header policy#5807
adinauer wants to merge 2 commits into
feat/data-collection-http-request-headersfrom
feat/data-collection-http-response-headers

Conversation

@adinauer

@adinauer adinauer commented Jul 21, 2026

Copy link
Copy Markdown
Member

PR Stack (Data Collection)


📜 Description

Apply the response-header Data Collection policy to OkHttp, Ktor, and Apollo 3/4 failed-request events.

Explicit Data Collection supports off, deny-list, and allow-list behavior with canonical sensitive-key filtering. When Data Collection is absent, sendDefaultPii=false continues to omit response headers and sendDefaultPii=true continues to collect headers while omitting legacy-sensitive names.

💡 Motivation and Context

These are the current global response-header consumers. Central filtering provides granular response-header control while preserving historical behavior for applications that have not opted into Data Collection. Session Replay network headers remain governed by Replay-specific integration controls.

Refs #5666

💚 How did you test it?

  • ./gradlew spotlessApply apiDump
  • Full OkHttp, Ktor, Apollo 3, and Apollo 4 tests
  • git diff --check

📝 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

Migrate cookie and query-parameter collection and coordinate Replay inheritance from global Data Collection policies.

#skip-changelog

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

Filter automatically collected response headers through the Data Collection policy in OkHttp, Ktor, and Apollo failed-request events. Preserve sendDefaultPii behavior 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 8bad568

@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

@github-actions

Copy link
Copy Markdown
Contributor

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 420.65 ms 465.46 ms 44.81 ms
Size 0 B 0 B 0 B

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