-
Notifications
You must be signed in to change notification settings - Fork 4k
[NoQA] Tag injected third-party script errors in Sentry with third_party_code
#97223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
WojtekBoman
wants to merge
13
commits into
Expensify:main
Choose a base branch
from
software-mansion-labs:instrument-opaque-rejection-app-cn8
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
ba2b5ba
Enrich opaque "Cannot call a class as a function" Sentry rejections
WojtekBoman baff312
Generalize injected-script Sentry enrichment to hosts-only diagnostics
WojtekBoman f3bc8e5
chore: remove temporary debug logging from injected-script enrichment
WojtekBoman c984a0f
fix(telemetry): keep loadedScriptHosts host-only for injected-script …
WojtekBoman d968d57
feat(telemetry): attribute opaque errors to injected scripts via nume…
WojtekBoman 53c3f5f
chore(telemetry): drop unused exports from enrichInjectedScriptError
WojtekBoman a9947a4
refactor(telemetry): move injected-script enrichment to a web-only mo…
WojtekBoman 128f688
fix(telemetry): require content hash before attributing stack to own …
WojtekBoman baff81d
fix(telemetry): harden own-code attribution in injected-script enrich…
WojtekBoman d8a867d
fix(telemetry): keep zero-column frames and over-budget scripts from …
WojtekBoman e8b59f2
refactor(telemetry): attribute injected-script errors via Sentry's th…
WojtekBoman 3fbc602
refactor(telemetry): read Sentry application key from a shared const
WojtekBoman 8fbc028
refactor(telemetry): gate injected-script filter on the stamped appli…
WojtekBoman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| /** | ||
| * Key that `@sentry/webpack-plugin` stamps into every web chunk at build time, and that | ||
| * `thirdPartyErrorFilterIntegration` matches frames against at runtime to tell our own code from | ||
| * injected code (consent tools, tag managers, browser extensions). | ||
| * | ||
| * Both halves live in different worlds (bundler config and app source) and can only agree by literal | ||
| * string, so they share this const. Keep this module free of imports: it is loaded by | ||
| * `config/rsbuild/rsbuild.common.ts`, where module aliases are not resolved yet. | ||
| */ | ||
| const SENTRY_APPLICATION_KEY = 'expensify-app'; | ||
|
|
||
| export default SENTRY_APPLICATION_KEY; |
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the build-time half of the guard pair (see my note on
index.web.ts:34). The key is stamped whenever the plugin runs — gated onisDevelopmentat line 320 — while the runtime integration is gated separately onisDevelopment().They agree for all normal builds, but the two conditions are independent. A one-line comment here pointing at the runtime guard (and vice versa) would prevent a future edit to either from silently mislabeling every app error as
third_party_code.