Skip to content

fix(core): detect minified receiver-prefixed sentryWrapped frames in thirdPartyErrorFilterIntegration - #27195

Open
Lokesh0652H wants to merge 1 commit into
getsentry:developfrom
Lokesh0652H:fix/ignore-sentry-internal-frames-listener
Open

Lokesh0652H wants to merge 1 commit into
getsentry:developfrom
Lokesh0652H:fix/ignore-sentry-internal-frames-listener

Conversation

@Lokesh0652H

Copy link
Copy Markdown

Fixes #27176

Summary

When sentryWrapped is invoked as a DOM event listener (e.g., img.addEventListener('error', ...) or iframe.addEventListener('load', ...)), V8 formats the stack frame's function name with a receiver prefix such as Image.r or HTMLIFrameElement.r.

isLikelyMinifiedSentryWrappedFrame previously checked frame.function.length <= 2, which missed receiver-prefixed minified names like Image.r.

Changes

  • packages/core/src/integrations/third-party-errors-filter.ts: Check the trailing function identifier (frame.function.split('.').pop()) for <= 2 characters in isLikelyMinifiedSentryWrappedFrame.
  • packages/core/test/lib/integrations/third-party-errors-filter.test.ts: Added a regression test covering Image.r, HTMLIFrameElement.r, and Element.ab.

Verification

  • tsc --noEmit in packages/core (passed)
  • vitest run test/lib/integrations/third-party-errors-filter.test.ts -t "ignoreSentryInternalFrames" (17 passed, 13 skipped)

@github-actions github-actions Bot added the external PR from an external contributor label Dec 5, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external PR from an external contributor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ignoreSentryInternalFrames doesn't detect minified sentryWrapped frame in event listeners (Image.r, HTMLIFrameElement.r)

1 participant