Skip to content

fix: classify third-party frames below anonymous wrappers - #22854

Open
christian-byrne wants to merge 3 commits into
mainfrom
cb/classify-third-party-anonymous
Open

christian-byrne wants to merge 3 commits into
mainfrom
cb/classify-third-party-anonymous

Conversation

@christian-byrne

Copy link
Copy Markdown
Contributor

Summary

  • skip anonymous/native wrapper frames when classifying a Sentry error origin
  • stop at the first attributable frame, preserving first-party ownership even when extension frames appear lower
  • cover the GTM _etmc stack shape seen in production

Why

A production GTM error placed <anonymous> above www.googletagmanager.com/gtm.js, so the existing top-frame classifier left known third-party noise untagged and it reached the immediate Slack route.

Testing

  • pnpm vitest run src/platform/telemetry/sentryBeforeSend.test.ts src/platform/telemetry/thirdPartyErrorNoise.test.ts (38 passed)
  • pnpm typecheck
  • pre-push dependency, knip, and changed-file fallow gates

Related: #22403 and backport #22853.

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

Labels

risk:high PR risk grade (advisory shadow check; grader-owned)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants