Skip to content

fix(settings): Prevent spurious Sentry errors from invalid data scrubbing selectors - #123104

Draft
sentry[bot] wants to merge 1 commit into
masterfrom
seer/fix/data-scrubbing-selector-sentry-error
Draft

fix(settings): Prevent spurious Sentry errors from invalid data scrubbing selectors#123104
sentry[bot] wants to merge 1 commit into
masterfrom
seer/fix/data-scrubbing-selector-sentry-error

Conversation

@sentry

@sentry sentry Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

The TraceItemFieldSelector.toField() method in static/app/views/settings/components/dataScrubbing/utils.tsx was unconditionally calling Sentry.captureException when it failed to parse a selector string. This meant that any invalid user input in the data scrubbing selector field, particularly during a blur event, would generate a Sentry error event instead of simply failing validation gracefully in the UI.

This change removes the Sentry.captureException call from toField(). Now, when toField() cannot parse a selector, it will quietly return null. The calling function, validateTraceItemFieldSelector, is already equipped to handle this null return by setting isValid: false and providing a user-facing error message, thus preventing unnecessary Sentry error reports for expected user input validation failures.

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

Fixes JAVASCRIPT-3BNH

@sentry <feedback>: Autofix iterates on these changes
@sentry stop iterating: Autofix stops iterating on this run

This PR was automatically generated by Sentry. You can adjust this setting at any time.

@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Aug 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants