dataCollection docs example uses wrong shape for httpHeaders
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 78/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- javascript, typescript
- Domain
- documentation
Research direction
Open the linked sendDefaultPii deprecation section and compare its httpHeaders example with the DataCollection type in @sentry/core@10.64.0. Update the example to use the nested request and response forms, then verify that cookies and queryParams remain unchanged and the documentation example matches the type.
Written by the indexing model from the issue text.
Description
The code example in the sendDefaultPii deprecation section shows httpHeaders as a flat CollectBehavior value:
httpHeaders: { deny: ["forwarded", "-ip", "remote-", "via", "-user"] },
But the actual DataCollection TypeScript type (verified in @sentry/core@10.64.0) defines httpHeaders as a nested per-direction object:
httpHeaders?: {
request?: CollectBehavior;
response?: CollectBehavior;
};
Passing { deny: [...] } directly causes a TypeScript error because deny is not a valid key on { request?, response? }.
Workaround — use the nested form:
httpHeaders: {
request: { deny: ["forwarded", "-ip", "remote-", "via", "-user"] },
response: { deny: ["forwarded", "-ip", "remote-", "via", "-user"] },
},
cookies and queryParams use CollectBehavior directly and are correct in the example. Only httpHeaders is wrong.
--
- Dominant language
- MDX
- Stars
- 446
- Forks
- 1.7k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 312
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from getsentry/sentry-docs
-
Docs Platform: Android SDKs
Difficulty 1/5 Under an hour Newbie friendliness 95/100
getsentry/sentry-docs#19438 · 1 comment ·
-
Docs Platform: Python SDKs
Difficulty 1/5 Under an hour Newbie friendliness 92/100
getsentry/sentry-docs#19432 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
getsentry/sentry-docs#19347 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
getsentry/sentry-docs#19182 · 1 comment ·
-
Docs Good First Issue Platform: PHP SDKs
Difficulty 1/5 Under an hour Newbie friendliness 90/100
getsentry/sentry-docs#19177 · 2 comments ·
All issues in getsentry/sentry-docs
Similar issues
-
user-reported
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Kong/developer.konghq.com#7316 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
HarperFast/skills#96 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·
-
bug triage:deciding
Difficulty 1/5 Under an hour Newbie friendliness 88/100
open-telemetry/otel-arrow#4132 ·
-
Ecosystem: ClawMetry — the Qwen Code reader is now free and open source (follow-up to #9294 / #9338) Opencategory/integration priority/P3 scope/documentation status/ready-for-human type/feature-request
Difficulty 1/5 Under an hour Newbie friendliness 84/100