Title: Capture all repeated `Cookie` and `Set-Cookie` header values · Issue #5982 · getsentry/sentry-java · GitHub
Open Graph Title: Capture all repeated `Cookie` and `Set-Cookie` header values · Issue #5982 · getsentry/sentry-java
X Title: Capture all repeated `Cookie` and `Set-Cookie` header values · Issue #5982 · getsentry/sentry-java
Description: Problem The OkHttp, Ktor, and Apollo integrations capture only one Cookie or Set-Cookie header value when creating request and response contexts. Their current header accessors select a single value, so additional cookie fields are omitt...
Open Graph Description: Problem The OkHttp, Ktor, and Apollo integrations capture only one Cookie or Set-Cookie header value when creating request and response contexts. Their current header accessors select a single valu...
X Description: Problem The OkHttp, Ktor, and Apollo integrations capture only one Cookie or Set-Cookie header value when creating request and response contexts. Their current header accessors select a single valu...
Opengraph URL: https://github.com/getsentry/sentry-java/issues/5982
X: @github
Domain: github.com
IPv4 address: 140.82.113.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Capture all repeated `Cookie` and `Set-Cookie` header values","articleBody":"## Problem\n\nThe OkHttp, Ktor, and Apollo integrations capture only one `Cookie` or `Set-Cookie` header value when creating request and response contexts. Their current header accessors select a **single value**, so additional cookie fields are omitted from Sentry telemetry.\n\nThis is valid HTTP behavior. In particular, HTTP/2 allows clients to split the `Cookie` field into **multiple header fields** for compression. Responses also commonly contain multiple `Set-Cookie` fields.\n\nThis is follow-up completeness work from #5811 and supports #5666.\n\n**Check what other SDKs are doing before implementing.**\n\n## Proposed solution\n\nMake cookie extraction list-aware across OkHttp, Ktor, Apollo 3, and Apollo 4:\n\n- Combine repeated request `Cookie` fields with `; ` before applying the effective cookie policy.\n- Process each response `Set-Cookie` field independently because each field represents one cookie and its attributes.\n- Do not comma-join or comma-split `Set-Cookie` values. A valid `Expires` attribute contains a comma.\n- Add shared core helpers or integration-specific adapters that apply the effective cookie policy to every value.\n- Preserve valid `Set-Cookie` attributes and fail closed for malformed input.\n\nPreserve the existing absent-Data-Collection compatibility behavior for each integration.\n\n## Acceptance criteria\n\n- OkHttp, Ktor, Apollo 3, and Apollo 4 capture all repeated cookie header values supported by their header APIs.\n- Multiple request `Cookie` fields are combined with `; ` and filtered as one cookie string.\n- Multiple response `Set-Cookie` fields are filtered independently without comma splitting or joining.\n- Built-in sensitive-cookie filtering and configured allow-list, deny-list, and off behavior apply to every cookie value.\n- Malformed cookie values never bypass filtering.\n- Integration tests cover at least two request `Cookie` fields and two response `Set-Cookie` fields where the underlying header API supports repeated values.\n","author":{"url":"https://github.com/adinauer","@type":"Person","name":"adinauer"},"datePublished":"2026-08-24T07:58:29Z","url":"https://github.com/getsentry/sentry-java/issues/5982"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:cfe1ecc1-b01d-bce4-9e7c-dd932fa99c90 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C4C8:BACBA:1BA2B3E:266D43A:6B0449B6 |
| html-safe-nonce | 1be3d1d61bd24eb84ec5538ae20240d96fb46725f52642dd35c8de45c520e4a6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNEM4OkJBQ0JBOjFCQTJCM0U6MjY2RDQzQTo2QjA0NDlCNiIsInZpc2l0b3JfaWQiOiI3NzI3MDI5ODE5NTQ4MTI1NjIyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 039794c96e6d20f766d62908705662be3e56687d23bb0c235b5915b8243db989 |
| hovercard-subject-tag | issue:5232416105 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-java/5982/issue_layout |
| twitter:image | https://opengraph.githubassets.com/710fa57bd33ef47cef699bd53bb1770726381fdbd3e3d64c5420ec1b10805776/getsentry/sentry-java/issues/5982 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/710fa57bd33ef47cef699bd53bb1770726381fdbd3e3d64c5420ec1b10805776/getsentry/sentry-java/issues/5982 |
| og:image:alt | Problem The OkHttp, Ktor, and Apollo integrations capture only one Cookie or Set-Cookie header value when creating request and response contexts. Their current header accessors select a single valu... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | adinauer |
| hostname | github.com |
| expected-hostname | github.com |
| None | d4495c3631faba668036f176d1f5946901c5172efd73a6edb984029e7d4f8e46 |
| turbo-cache-control | no-preview |
| go-import | github.com/getsentry/sentry-java git https://github.com/getsentry/sentry-java.git |
| octolytics-dimension-user_id | 1396951 |
| octolytics-dimension-user_login | getsentry |
| octolytics-dimension-repository_id | 3368190 |
| octolytics-dimension-repository_nwo | getsentry/sentry-java |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 3368190 |
| octolytics-dimension-repository_network_root_nwo | getsentry/sentry-java |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9ac4337fb7c6a5846cdfdb1a04f154d3c33ebc77 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width