Skip to content

docs(python): Document scrubbing local variables in SDK 3.x - #20887

Merged
sentrivana merged 2 commits into
masterfrom
ivana/python-3x-scrub-local-variables
Nov 19, 2026
Merged

sentrivana merged 2 commits into
masterfrom
ivana/python-3x-scrub-local-variables

Conversation

@sentrivana

Copy link
Copy Markdown
Contributor

DESCRIBE YOUR PR

SDK 3.0 removed the event scrubber, and it no longer scrubs local variables in stack frames by default. The Scrubbing Sensitive Data page only mentioned this in passing, so users upgrading from 2.x could start sending variables like password or token without noticing.

  • Add a Local Variables section with a warning that all local variables are sent unscrubbed by default, and how to turn on scrubbing with data_collection's stack_frame_variables in denylist mode, including custom terms.
  • Keep the event_scrubber heading, since the options page links to it, but move the SDK 2.x setup into an expandable section.
  • Mention the default in the "Stack-locals" bullet, linking to the new section.

The built-in denylist terms and the case-insensitive substring matching are taken from sentry_sdk/data_collection.py on the 3.0 branch.

IS YOUR CHANGE URGENT?

Help us prioritize incoming PRs by letting us know when the change needs to go live.
Select exactly one option. For deadlines, replace YYYY-MM-DD with the due date. You can update this information later by editing the PR description.

  • Urgent deadline (GA date, etc.): YYYY-MM-DD
  • Other deadline: YYYY-MM-DD
  • No deadline: 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 supplied a deadline.

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

SDK 3.0 removed the event scrubber and no longer scrubs local variables in stack frames by default. Add a Local Variables section with a warning and the stack_frame_variables denylist configuration, and move the SDK 2.x event_scrubber setup into an expandable section.
@vercel

vercel Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
develop-docs Ready Ready Preview Nov 19, 2026 10:25am UTC
sentry-docs Ready Ready Preview Nov 19, 2026 10:25am UTC

Request Review

@github-actions github-actions Bot added the Priority: Normal Docs review has no urgent deadline label Nov 18, 2026
@codeowner-assignment
codeowner-assignment Bot requested a review from a team November 18, 2026 15:12
@sentrivana
sentrivana marked this pull request as ready for review November 19, 2026 10:05
@cursor

cursor Bot commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Getting ready to monitor this change · Rollout details

Status Service Environment
⏳ Getting ready to monitor this change

@codeowner-assignment
codeowner-assignment Bot requested a review from a team November 19, 2026 10:19
@sentrivana
sentrivana enabled auto-merge (squash) November 19, 2026 10:23
@sentrivana
sentrivana merged commit 9ab2629 into master Nov 19, 2026
30 checks passed
@sentrivana
sentrivana deleted the ivana/python-3x-scrub-local-variables branch November 19, 2026 10:30

This branch was successfully deployed

2 active deployments
Preview – sentry-docs — 1872d66d Deployed Nov 19, 2026 by vercel[bot]
Preview – develop-docs — 1872d66d Deployed Nov 19, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Priority: Normal Docs review has no urgent deadline

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants