fix(telemetry): drop untraceable Cannot call a class as a function noise from Sentry - #98866
Draft
WojtekBoman wants to merge 2 commits into
Draft
fix(telemetry): drop untraceable Cannot call a class as a function noise from Sentry#98866WojtekBoman wants to merge 2 commits into
WojtekBoman wants to merge 2 commits into
Conversation
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
WojtekBoman
force-pushed
the
class-call-check-noise-filter
branch
from
August 18, 2026 13:29
3789971 to
fd637d6
Compare
WojtekBoman
force-pushed
the
class-call-check-noise-filter
branch
from
August 18, 2026 13:41
fd637d6 to
873e845
Compare
Contributor
Author
|
Codex Review: Didn't find any major issues. Hooray! Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Explanation of Change
This adds a web-only
classCallCheckNoiseFilterIntegrationthat drops the untraceableTypeError: Cannot call a class as a functionnoise (APP-CN8 and siblings) coming from injected third-party scripts. It only discards an event when all three conditions hold: the message matches Babel's_classCallChecksignature, every stack frame is anonymous, and the event is already taggedthird_party_code. The integration must run afterthirdPartyErrorFilterIntegration, since it reads the tag that one sets - that ordering is pinned insetupSentryand covered by a dedicated unit test.Fixed Issues
$ #93837
PROPOSAL:
Tests
npx jest tests/unit/classCallCheckNoiseFilterTest.ts tests/unit/setupSentryIntegrationOrderTest.tsand verify both suites pass (predicate cases + integration order).npm run web), open the app in Chrome, enable the Sentry debug toggles in the dev tools menu ("Send data to Sentry" off, "Log Sentry to console" on), then in the browser console run:filename: 'app:///76-abc123.bundle.js'(named frame)tags: {}(nothird_party_codetag)Verify each of those events IS logged as an outgoing envelope, i.e. only the all-anonymous third-party signature is dropped.
throw new Error('sentry sanity check')in the console) and verify it is still logged as an outgoing envelope, confirming no regression in regular error reporting.undefinedon native and must not appear in the integration list.Offline tests
N/A - no API calls or Onyx operations; the change only filters events inside the Sentry SDK pipeline before transport.
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
Same as tests (steps 1-4 are dev-only; on staging, verify the app loads on all platforms and that errors intentionally triggered in the app still appear in Sentry, while
third_party_code:TrueCannot call a class as a functionevents stop arriving for the staging release).PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari