Skip to content

feat(core): Support filtering stackFrameVariables by variable name - #22494

Merged
chargome merged 2 commits into
developfrom
cg/local-vars-filtering
Jul 22, 2026
Merged

feat(core): Support filtering stackFrameVariables by variable name#22494
chargome merged 2 commits into
developfrom
cg/local-vars-filtering

Conversation

@chargome

Copy link
Copy Markdown
Member

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.

@chargome chargome self-assigned this Jul 22, 2026
@github-actions

github-actions Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 27.76 kB - -
@sentry/browser - with treeshaking flags 26.2 kB - -
@sentry/browser (incl. Tracing) 46.59 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 48.4 kB - -
@sentry/browser (incl. Tracing, Profiling) 51.39 kB - -
@sentry/browser (incl. Tracing, Replay) 85.83 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 75.47 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 90.56 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 103.22 kB - -
@sentry/browser (incl. Feedback) 44.95 kB - -
@sentry/browser (incl. sendFeedback) 32.56 kB - -
@sentry/browser (incl. FeedbackAsync) 37.62 kB - -
@sentry/browser (incl. Metrics) 28.84 kB - -
@sentry/browser (incl. Logs) 29.06 kB - -
@sentry/browser (incl. Metrics & Logs) 29.76 kB - -
@sentry/react 29.55 kB - -
@sentry/react (incl. Tracing) 48.87 kB - -
@sentry/vue 33.18 kB - -
@sentry/vue (incl. Tracing) 48.56 kB - -
@sentry/svelte 27.78 kB - -
CDN Bundle 30.1 kB - -
CDN Bundle (incl. Tracing) 48.48 kB - -
CDN Bundle (incl. Logs, Metrics) 31.68 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 49.78 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 70.94 kB - -
CDN Bundle (incl. Tracing, Replay) 85.99 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 87.31 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 91.8 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 93.07 kB - -
CDN Bundle - uncompressed 89.72 kB - -
CDN Bundle (incl. Tracing) - uncompressed 146.59 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 94.43 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 150.57 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 219.19 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 265.83 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 269.8 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 279.54 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 283.49 kB - -
@sentry/nextjs (client) 51.38 kB - -
@sentry/sveltekit (client) 47 kB - -
@sentry/core/server 80.13 kB - -
@sentry/core/browser 51.97 kB - -
@sentry/node 124.25 kB +0.04% +38 B 🔺
@sentry/node (incl. diagnostics channel injection) 149.68 kB +0.02% +26 B 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 70.03 kB +0.01% +2 B 🔺
@sentry/node - without tracing 74.43 kB +0.07% +52 B 🔺
@sentry/aws-serverless 83.9 kB +0.05% +35 B 🔺
@sentry/cloudflare (withSentry) - minified 196.59 kB - -
@sentry/cloudflare (withSentry) 483.84 kB - -

View base workflow run

@chargome

chargome commented Jul 22, 2026

Copy link
Copy Markdown
Member Author

buglitzer run

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit a77586d. Configure here.

Comment thread packages/node/test/integrations/localvariables.test.ts
@chargome
chargome marked this pull request as ready for review July 22, 2026 13:54
@chargome
chargome requested review from a team as code owners July 22, 2026 13:54
@chargome
chargome requested review from JPeer264 and isaacs and removed request for a team July 22, 2026 13:54
@chargome
chargome merged commit 088a1ec into develop Jul 22, 2026
283 checks passed
@chargome
chargome deleted the cg/local-vars-filtering branch July 22, 2026 14:53
chargome added a commit that referenced this pull request Jul 23, 2026
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.

2 participants