Skip to content

docs(data-collected): Clarify HTTP header and cookie collection differences (browser/server)#17945

Open
s1gr1d wants to merge 2 commits into
masterfrom
sig/http-headers-collected
Open

docs(data-collected): Clarify HTTP header and cookie collection differences (browser/server)#17945
s1gr1d wants to merge 2 commits into
masterfrom
sig/http-headers-collected

Conversation

@s1gr1d
Copy link
Copy Markdown
Member

@s1gr1d s1gr1d commented Jun 1, 2026

DESCRIBE YOUR PR

Clarifies header collection. Mentioned in this PR:

closes getsentry/sentry-javascript#20706

IS YOUR CHANGE URGENT?

Help us prioritize incoming PRs by letting us know when the change needs to go live.

  • Urgent deadline (GA date, etc.):
  • Other deadline:
  • None: Not urgent, can wait up to 1 week+

SLA

  • Teamwork makes the dream work, so please add a reviewer to your PRs.
  • Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it.
    Thanks in advance for your help!

PRE-MERGE CHECKLIST

Make sure you've checked the following before merging your changes:

  • Checked Vercel preview for correctness, including links
  • PR was reviewed and approved by any necessary SMEs (subject matter experts)
  • PR was reviewed and approved by a member of the Sentry docs team

@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 1, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
sentry-docs Ready Ready Preview, Comment Jun 1, 2026 4:05pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
develop-docs Ignored Ignored Preview Jun 1, 2026 4:05pm

Request Review

Comment thread docs/platforms/javascript/common/data-management/data-collected/index.mdx Outdated
Comment thread docs/platforms/javascript/common/data-management/data-collected/index.mdx Outdated
Comment on lines +34 to +41
<PlatformSection notSupported={["javascript", "javascript.angular", "javascript.capacitor", "javascript.cordova", "javascript.ember", "javascript.gatsby", "javascript.react", "javascript.solid", "javascript.svelte", "javascript.vue", "javascript.wasm"]}>

On the server-side, incoming request headers (and outgoing response headers) are added as span attributes by the <PlatformLink to="/configuration/integrations/http/">Http Integration</PlatformLink> **by default**.
Sensitive values (such as auth tokens and secrets) and PII headers (such as forwarding and IP headers) are automatically filtered.
Setting `sendDefaultPii: true` relaxes the PII-header filtering so those headers are captured too. Sensitive keys remain filtered regardless.
You can configure request headers, response headers, and cookies independently using the `dataCollection` option.

</PlatformSection>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The notSupported list for the HTTP Headers section is missing javascript.deno and javascript.cloudflare, incorrectly showing it for those platforms.
Severity: LOW

Suggested Fix

Add javascript.deno and javascript.cloudflare to the notSupported array in the component on line 34. This will align its behavior with the "Cookies" and "Request Body" sections and correctly hide the content for platforms where the Http Integration is not supported.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location:
docs/platforms/javascript/common/data-management/data-collected/index.mdx#L34-L41

Potential issue: The documentation for server-side HTTP header collection is incorrectly
displayed for `javascript.deno` and `javascript.cloudflare` users. The `notSupported`
list for the HTTP Headers section is missing these platforms, causing the documentation
to claim the Http Integration captures headers by default. However, the Http
Integration's own documentation does not list Deno or Cloudflare as supported platforms.
This creates an inconsistency with other sections like "Cookies" and "Request Body"
which correctly hide this content for Deno and Cloudflare, leading to user confusion
about feature availability.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@s1gr1d is this right?

Copy link
Copy Markdown
Contributor

@sfanahata sfanahata left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Nice add!

Copy link
Copy Markdown
Collaborator

@inventarSarah inventarSarah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me 🙌

On the server-side, incoming request headers (and outgoing response headers) are added as span attributes by the <PlatformLink to="/configuration/integrations/http/">Http Integration</PlatformLink> **by default**.
Sensitive values (such as auth tokens and secrets) and PII headers (such as forwarding and IP headers) are automatically filtered.
Setting `sendDefaultPii: true` relaxes the PII-header filtering so those headers are captured too. Sensitive keys remain filtered regardless.
You can configure request headers, response headers, and cookies independently using the `dataCollection` option.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not find dataCollection documented on the Options page -- do you know if documenting it is already planned? If not, we should create an issue for it and then also link to it from here -- wdyt?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 on waiting with this until documented

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.

HTTP Headers are not sent by default, unless sendDefaultPii is enabled.

5 participants