Skip to content

Conversation

@chargome
Copy link
Member

Some users get flooded by third party errors despite having set their third party error filtering to "drop-error-if-contains-third-party-frames". This comes from the fact that often the stacktrace includes our internal wrapper logic as last trace in the stack.

With this PR we're trying to work around this by specifically ignoring these frames with a new opt-in mechanism. Marked this as experimental, so users will know this option might lead to errors being misclassified.

  • Adds a new experimental option experimentalExcludeSentryInternalFrames to the thirdPartyErrorFilterIntegration
  • Once enabled we apply a strict filter for frames to detect our internal wrapping logic and filter them out so they do not misclassify injected code as internal errors.

Closes #13835

@chargome chargome self-assigned this Dec 29, 2025
@linear
Copy link

linear bot commented Dec 29, 2025

@chargome chargome changed the title feat(core): Add experimental option for excluding sentry internal frames for thirdPartyErrorFilterIntegration feat(core): Add experimentalExcludeSentryInternalFrames option to thirdPartyErrorFilterIntegration Dec 29, 2025
@chargome chargome requested review from Lms24 and timfish December 29, 2025 15:13
@github-actions
Copy link
Contributor

github-actions bot commented Dec 29, 2025

node-overhead report 🧳

Note: This is a synthetic benchmark with a minimal express app and does not necessarily reflect the real-world performance impact in an application.

Scenario Requests/s % of Baseline Prev. Requests/s Change %
GET Baseline 9,278 - 9,247 +0%
GET With Sentry 1,775 19% 1,801 -1%
GET With Sentry (error only) 6,227 67% 6,311 -1%
POST Baseline 1,204 - 1,237 -3%
POST With Sentry 606 50% 605 +0%
POST With Sentry (error only) 1,058 88% 1,077 -2%
MYSQL Baseline 3,330 - 3,428 -3%
MYSQL With Sentry 510 15% 524 -3%
MYSQL With Sentry (error only) 2,687 81% 2,767 -3%

View base workflow run

@Lms24
Copy link
Member

Lms24 commented Dec 29, 2025

It makes sense to not alter existing behaviour in the major but if this proves to be valuable, perhaps it should become default behaviour in the next major?

@chargome
Copy link
Member Author

I renamed the option to exclude the experimental prefix, we'll leave this undocumented for now and if users find this valuable we can make this the default behaviour in v11

@chargome chargome changed the title feat(core): Add experimentalExcludeSentryInternalFrames option to thirdPartyErrorFilterIntegration feat(core): Add ignoreSentryInternalFrames option to thirdPartyErrorFilterIntegration Dec 30, 2025
@chargome chargome merged commit fdbddaa into develop Dec 30, 2025
402 of 404 checks passed
@chargome chargome deleted the cg/JS-114/thirdpartyerrorfilterintegration-does-not-filter-errors-correctly branch December 30, 2025 12:27
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.

thirdPartyErrorFilterIntegration does not filter errors correctly

4 participants