Skip to content

docs(data-collection): Allow stackFrameVariables to filter by variable name - #18783

Merged
chargome merged 1 commit into
masterfrom
cg/dataCollection-vars-filtering
Jul 22, 2026
Merged

docs(data-collection): Allow stackFrameVariables to filter by variable name#18783
chargome merged 1 commit into
masterfrom
cg/dataCollection-vars-filtering

Conversation

@chargome

Copy link
Copy Markdown
Member

Updates the dataCollection spec so stackFrameVariables can filter which local variables are captured by name, in addition to the existing Boolean toggle. The default stays true (collect all variables).

  • Bumped spec version 0.8.00.9.0 and added a changelog entry
  • Changed the stackFrameVariables type to boolean | KeyValueCollectionBehavior
  • Added a warning about the minification caveat: filtering by name requires knowing the post-bundle variable names, since minifiers rename locals

@chargome chargome self-assigned this Jul 21, 2026
@vercel

vercel Bot commented Jul 21, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
develop-docs Ready Ready Preview Jul 21, 2026 1:45pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
sentry-docs Ignored Ignored Jul 21, 2026 1:45pm

Request Review

@chargome
chargome requested review from cleptric and ericapisani and removed request for cleptric July 21, 2026 13:40
@github-actions github-actions Bot added the sdk-develop-docs PRs touching develop-docs/sdk label Jul 21, 2026
@chargome
chargome merged commit 3768ee8 into master Jul 22, 2026
23 checks passed
@chargome
chargome deleted the cg/dataCollection-vars-filtering branch July 22, 2026 08:09
chargome added a commit to getsentry/sentry-javascript that referenced this pull request Jul 22, 2026
…22494)

Implements the spec change from getsentry/sentry-docs#18783, which
widens dataCollection.stackFrameVariables from `boolean` to `boolean |
KeyValueCollectionBehavior` so local variables can be filtered by name,
not just toggled on/off.

- Widened `stackFrameVariables` to `boolean | CollectBehavior`
- Made `filterKeyValueData` generic over its value type so it can filter
local variables while leaving existing string callers unchanged,
avoiding a duplicate implementation of the allow/deny + sensitive-key
logic.
- Wired the Node `LocalVariables` sync and async integrations to filter
captured frame variables by name before attaching them.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sdk-develop-docs PRs touching develop-docs/sdk

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants