Skip to content

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

Open
s1gr1d wants to merge 1 commit into
masterfrom
sig/http-headers-collected
Open

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

Conversation

@s1gr1d

@s1gr1d s1gr1d commented Jun 1, 2026

Copy link
Copy Markdown
Member

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

vercel Bot commented Jun 1, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
sentry-docs Ready Ready Preview, Comment Jun 12, 2026 9:46am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
develop-docs Ignored Ignored Preview Jun 12, 2026 9:46am

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

@sfanahata sfanahata left a comment

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.

Looks good. Nice add!

@inventarSarah inventarSarah left a comment

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.

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

@s1gr1d s1gr1d force-pushed the sig/http-headers-collected branch from 2fa5a2a to d7bfe16 Compare June 12, 2026 09:29
Comment on lines +44 to +49
<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) are automatically scrubbed, while the header keys are kept. PII headers (such as forwarding and IP headers) are also filtered by default.

</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 documentation incorrectly shows the server-side HTTP Headers section for Cloudflare and Deno, where the required Http Integration is unsupported.
Severity: LOW

Suggested Fix

Update the documentation component to conditionally hide the server-side HTTP Headers section for platforms where the Http Integration is not supported, such as javascript.cloudflare and javascript.deno, to align with the behavior of the server-side Cookies section.

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#L44-L49

Potential issue: The documentation for server-side HTTP Headers is incorrectly displayed
for Cloudflare and Deno users. It states that the `Http Integration` captures headers by
default, but this integration is not supported on those platforms. This is inconsistent
with other parts of the documentation, such as the server-side Cookies section, which
correctly hides itself for unsupported platforms, leading to potential confusion for
developers using Cloudflare or Deno.

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