René's URL Explorer Experiment


Title: Ensure usage of `captureException()` / `captureMessage()` with non-Error has correct top frame · Issue #8396 · getsentry/sentry-javascript · GitHub

Open Graph Title: Ensure usage of `captureException()` / `captureMessage()` with non-Error has correct top frame · Issue #8396 · getsentry/sentry-javascript

X Title: Ensure usage of `captureException()` / `captureMessage()` with non-Error has correct top frame · Issue #8396 · getsentry/sentry-javascript

Description: As brought up in #8296, currently the top frame points to internal code when using e.g.: Sentry.captureException(pojo); Sentry.captureMessage(pojo); This should point to the place where this was actually called. We use a synthetic except...

Open Graph Description: As brought up in #8296, currently the top frame points to internal code when using e.g.: Sentry.captureException(pojo); Sentry.captureMessage(pojo); This should point to the place where this was ac...

X Description: As brought up in #8296, currently the top frame points to internal code when using e.g.: Sentry.captureException(pojo); Sentry.captureMessage(pojo); This should point to the place where this was ac...

Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/8396

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.112.3


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Ensure usage of `captureException()` / `captureMessage()` with non-Error has correct top frame","articleBody":"As brought up in https://github.com/getsentry/sentry-javascript/issues/8296, currently the top frame points to internal code when using e.g.:\r\n\r\n```js\r\nSentry.captureException(pojo);\r\nSentry.captureMessage(pojo);\r\n```\r\n\r\nThis should point to the place where this was actually called.\r\n\r\nWe use a synthetic exception here, which has the stack from exactly where it was called - which is in the Sentry internals. So we need a way to remove this again somehow.\r\n\r\nSadly, this is different in different browsers, and made harder by minifaction. Some examples, non exhaustive but giving a good overview:\r\n\r\n## Chrome\r\n\r\nUnminified:\r\n```\r\nError: Sentry syntheticException\r\n    at Hub.captureException (hub.ts:200:1)\r\n    at Module.captureException (exports.ts:39:1)\r\n    at updateCount (HelloWorld.vue:16:12)\r\n    at callWithErrorHandling (runtime-core.esm-bundler.js:157:22)\r\n    at callWithAsyncErrorHandling (runtime-core.esm-bundler.js:166:21)\r\n    at HTMLButtonElement.invoker (runtime-dom.esm-bundler.js:345:9)\r\n    at HTMLButtonElement.sentryWrapped (helpers.ts:98:1)\r\n```\r\n\r\nMinified:\r\n\r\n```\r\nError: Sentry syntheticException\r\n    at Dl.captureException (hub.js:123:32)\r\n    at Is (exports.js:20:26)\r\n    at n (HelloWorld.vue:16:5)\r\n    at Ce (runtime-core.esm-bundler.js:157:22)\r\n    at qt (runtime-core.esm-bundler.js:166:21)\r\n    at HTMLButtonElement.n (runtime-dom.esm-bundler.js:345:9)\r\n    at HTMLButtonElement.r (helpers.js:90:17)\r\n```\r\n\r\n## Safari\r\n\r\nUnminified:\r\n```\r\ncaptureException@http://localhost:5173/@fs/Users/francesco/git/sentry-javascript/packages/core/build/esm/hub.js?t=1687528488715:123:41\r\nupdateCount@http://localhost:5173/src/components/HelloWorld.vue?t=1687528678533:22:28\r\ncallWithErrorHandling@http://localhost:5173/node_modules/.vite/deps/vue.js?v=9b021ca7:1378:20\r\ncallWithAsyncErrorHandling@http://localhost:5173/node_modules/.vite/deps/vue.js?v=9b021ca7:1386:38\r\ninvoker@http://localhost:5173/node_modules/.vite/deps/vue.js?v=9b021ca7:7574:31\r\nsentryWrapped@http://localhost:5173/@fs/Users/francesco/git/sentry-javascript/packages/browser/build/npm/esm/helpers.js?t=1687528678440:90:22\r\n```\r\n\r\nMinified:\r\n```\r\ncaptureException@http://localhost:4173/assets/index.8e4e6fdb.js:7:10497\r\nn@http://localhost:4173/assets/index.8e4e6fdb.js:37:3522\r\nCe@http://localhost:4173/assets/index.8e4e6fdb.js:1:12584\r\nqt@http://localhost:4173/assets/index.8e4e6fdb.js:1:12663\r\nn@http://localhost:4173/assets/index.8e4e6fdb.js:1:51488\r\nr@http://localhost:4173/assets/index.8e4e6fdb.js:19:1496\r\n```\r\n\r\n## Firefox\r\n\r\nUnminified:\r\n```\r\ncaptureException@http://localhost:5173/@fs/Users/francesco/git/sentry-javascript/packages/core/build/esm/hub.js?t=1687528488715:123:32\r\ncaptureException@http://localhost:5173/@fs/Users/francesco/git/sentry-javascript/packages/core/build/esm/exports.js?t=1687528488715:20:26\r\nupdateCount@http://localhost:5173/src/components/HelloWorld.vue?t=1687528678533:22:12\r\ncallWithErrorHandling@http://localhost:5173/node_modules/.vite/deps/vue.js?v=9b021ca7:1378:18\r\ncallWithAsyncErrorHandling@http://localhost:5173/node_modules/.vite/deps/vue.js?v=9b021ca7:1386:38\r\ninvoker@http://localhost:5173/node_modules/.vite/deps/vue.js?v=9b021ca7:7574:31\r\nsentryWrapped@http://localhost:5173/@fs/Users/francesco/git/sentry-javascript/packages/browser/build/npm/esm/helpers.js?t=1687528678440:90:17\r\n```\r\n\r\nMinified:\r\n```\r\ncaptureException@http://localhost:4173/assets/index.8e4e6fdb.js:7:10488\r\nIs@http://localhost:4173/assets/index.8e4e6fdb.js:11:906\r\nn@http://localhost:4173/assets/index.8e4e6fdb.js:37:3520\r\nCe@http://localhost:4173/assets/index.8e4e6fdb.js:1:12583\r\nqt@http://localhost:4173/assets/index.8e4e6fdb.js:1:12663\r\nn@http://localhost:4173/assets/index.8e4e6fdb.js:1:51488\r\nr@http://localhost:4173/assets/index.8e4e6fdb.js:19:1491\r\nEventListener.handleEvent*lm/\u003c/\u003c@http://localhost:4173/assets/index.8e4e6fdb.js:19:15731\r\nGh/\u003c/\u003c/\u003c@http://localhost:4173/assets/index.8e4e6fdb.js:5:3547\r\nVf@http://localhost:4173/assets/index.8e4e6fdb.js:1:50852\r\nXf@http://localhost:4173/assets/index.8e4e6fdb.js:1:51058\r\nrh@http://localhost:4173/assets/index.8e4e6fdb.js:1:51826\r\nH@http://localhost:4173/assets/index.8e4e6fdb.js:1:34294\r\nA@http://localhost:4173/assets/index.8e4e6fdb.js:1:33991\r\nT@http://localhost:4173/assets/index.8e4e6fdb.js:1:33421\r\nR@http://localhost:4173/assets/index.8e4e6fdb.js:1:34890\r\nH@http://localhost:4173/assets/index.8e4e6fdb.js:1:34172\r\nA@http://localhost:4173/assets/index.8e4e6fdb.js:1:33991\r\nT@http://localhost:4173/assets/index.8e4e6fdb.js:1:33421\r\nR@http://localhost:4173/assets/index.8e4e6fdb.js:1:34890\r\nnt@http://localhost:4173/assets/index.8e4e6fdb.js:1:36286\r\nT@http://localhost:4173/assets/index.8e4e6fdb.js:1:33383\r\nw@http://localhost:4173/assets/index.8e4e6fdb.js:1:37616\r\nrun@http://localhost:4173/assets/index.8e4e6fdb.js:1:4686\r\ntt/f.update@http://localhost:4173/assets/index.8e4e6fdb.js:1:37884\r\ntt@http://localhost:4173/assets/index.8e4e6fdb.js:1:37910\r\nV@http://localhost:4173/assets/index.8e4e6fdb.js:1:36747\r\nI@http://localhost:4173/assets/index.8e4e6fdb.js:1:36540\r\nT@http://localhost:4173/assets/index.8e4e6fdb.js:1:33446\r\nR@http://localhost:4173/assets/index.8e4e6fdb.js:1:34890\r\nnt@http://localhost:4173/assets/index.8e4e6fdb.js:1:36286\r\nT@http://localhost:4173/assets/index.8e4e6fdb.js:1:33383\r\nw@http://localhost:4173/assets/index.8e4e6fdb.js:1:37616\r\nrun@http://localhost:4173/assets/index.8e4e6fdb.js:1:4686\r\ntt/f.update@http://localhost:4173/assets/index.8e4e6fdb.js:1:37884\r\ntt@http://localhost:4173/assets/index.8e4e6fdb.js:1:37910\r\nV@http://localhost:4173/assets/index.8e4e6fdb.js:1:36747\r\nI@http://localhost:4173/assets/index.8e4e6fdb.js:1:36540\r\nT@http://localhost:4173/assets/index.8e4e6fdb.js:1:33446\r\nMt@http://localhost:4173/assets/index.8e4e6fdb.js:1:41571\r\nmount@http://localhost:4173/assets/index.8e4e6fdb.js:1:31962\r\nch/e.mount@http://localhost:4173/assets/index.8e4e6fdb.js:1:52858\r\n```\r\n\r\n## Current output frames (e.g. Chrome)\r\n\r\n```\r\n[\r\n  {\r\n    \"filename\": \"http://localhost:5173/node_modules/.vite/deps/vue.js?v=9b021ca7\",\r\n    \"function\": \"HTMLButtonElement.invoker\",\r\n    \"in_app\": true,\r\n    \"lineno\": 7574,\r\n    \"colno\": 5\r\n  },\r\n  {\r\n    \"filename\": \"http://localhost:5173/node_modules/.vite/deps/vue.js?v=9b021ca7\",\r\n    \"function\": \"callWithAsyncErrorHandling\",\r\n    \"in_app\": true,\r\n    \"lineno\": 1386,\r\n    \"colno\": 17\r\n  },\r\n  {\r\n    \"filename\": \"http://localhost:5173/node_modules/.vite/deps/vue.js?v=9b021ca7\",\r\n    \"function\": \"callWithErrorHandling\",\r\n    \"in_app\": true,\r\n    \"lineno\": 1378,\r\n    \"colno\": 18\r\n  },\r\n  {\r\n    \"filename\": \"http://localhost:5173/src/components/HelloWorld.vue?t=1687529456042\",\r\n    \"function\": \"updateCount\",\r\n    \"in_app\": true,\r\n    \"lineno\": 22,\r\n    \"colno\": 12\r\n  },\r\n  {\r\n    \"filename\": \"http://localhost:5173/@fs/Users/francesco/git/sentry-javascript/packages/core/build/esm/exports.js\",\r\n    \"function\": \"Module.captureException\",\r\n    \"in_app\": true,\r\n    \"lineno\": 20,\r\n    \"colno\": 26\r\n  }\r\n]\r\n```\r\n\r\nNote that Safari seems to have a correct frames output, but FF & Chrome do not.\r\n\r\n## Expected output frames\r\n\r\n```\r\n[\r\n  {\r\n    \"filename\": \"http://localhost:5173/node_modules/.vite/deps/vue.js?v=9b021ca7\",\r\n    \"function\": \"HTMLButtonElement.invoker\",\r\n    \"in_app\": true,\r\n    \"lineno\": 7574,\r\n    \"colno\": 5\r\n  },\r\n  {\r\n    \"filename\": \"http://localhost:5173/node_modules/.vite/deps/vue.js?v=9b021ca7\",\r\n    \"function\": \"callWithAsyncErrorHandling\",\r\n    \"in_app\": true,\r\n    \"lineno\": 1386,\r\n    \"colno\": 17\r\n  },\r\n  {\r\n    \"filename\": \"http://localhost:5173/node_modules/.vite/deps/vue.js?v=9b021ca7\",\r\n    \"function\": \"callWithErrorHandling\",\r\n    \"in_app\": true,\r\n    \"lineno\": 1378,\r\n    \"colno\": 18\r\n  },\r\n  {\r\n    \"filename\": \"http://localhost:5173/src/components/HelloWorld.vue\",\r\n    \"function\": \"updateCount\",\r\n    \"in_app\": true,\r\n    \"lineno\": 22,\r\n    \"colno\": 12\r\n  }\r\n]\r\n```\r\n","author":{"url":"https://github.com/mydea","@type":"Person","name":"mydea"},"datePublished":"2023-06-23T14:13:34Z","url":"https://github.com/getsentry/sentry-javascript/issues/8396"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:9cc1cafb-647b-b0dd-7882-77dec2ee5160
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC24E:AF089:626822:84A91F:6B04A2F6
html-safe-nonceb827e6b7ff5e7e256c97fa3fc5d2d8327f2cb7322cc8b7c8db4c7cfcf09d008f
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMjRFOkFGMDg5OjYyNjgyMjo4NEE5MUY6NkIwNEEyRjYiLCJ2aXNpdG9yX2lkIjoiMzE2MzMwNjgwMDQyNjgyMDM0MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacf46634a9b48ecd60e9039c2468e0174784c4a1b199d12366625af760453e8f15
hovercard-subject-tagissue:1771536044
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-javascript/8396/issue_layout
twitter:imagehttps://opengraph.githubassets.com/cda809ba2fb6c153188c49bfe018a04e2da886d73945097bb6262efe855d4d51/getsentry/sentry-javascript/issues/8396
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/cda809ba2fb6c153188c49bfe018a04e2da886d73945097bb6262efe855d4d51/getsentry/sentry-javascript/issues/8396
og:image:altAs brought up in #8296, currently the top frame points to internal code when using e.g.: Sentry.captureException(pojo); Sentry.captureMessage(pojo); This should point to the place where this was ac...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamemydea
hostnamegithub.com
expected-hostnamegithub.com
None9784b6f42e2d5eac4e394fa88cad134c0dc5b6662b4ff2787a1ed1ef5a96331d
turbo-cache-controlno-preview
go-importgithub.com/getsentry/sentry-javascript git https://github.com/getsentry/sentry-javascript.git
octolytics-dimension-user_id1396951
octolytics-dimension-user_logingetsentry
octolytics-dimension-repository_id3328572
octolytics-dimension-repository_nwogetsentry/sentry-javascript
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id3328572
octolytics-dimension-repository_network_root_nwogetsentry/sentry-javascript
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release3fd14143b75b2af7b76bbd23b069867d091adfcc
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/getsentry/sentry-javascript/issues/8396#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-javascript%2Fissues%2F8396
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-javascript%2Fissues%2F8396
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=getsentry%2Fsentry-javascript
Reloadhttps://github.com/getsentry/sentry-javascript/issues/8396
Reloadhttps://github.com/getsentry/sentry-javascript/issues/8396
Reloadhttps://github.com/getsentry/sentry-javascript/issues/8396
getsentryhttps://github.com/getsentry
sentry-javascripthttps://github.com/getsentry/sentry-javascript
Codehttps://github.com/getsentry/sentry-javascript
Issues333 (333)https://github.com/getsentry/sentry-javascript/issues
Pull requests52 (52)https://github.com/getsentry/sentry-javascript/pulls
Discussionshttps://github.com/getsentry/sentry-javascript/discussions
Actionshttps://github.com/getsentry/sentry-javascript/actions
Security and quality7 (7)https://github.com/getsentry/sentry-javascript/security
Insightshttps://github.com/getsentry/sentry-javascript/insights
https://github.com/getsentry/sentry-javascript
New issuehttps://github.com/login?return_to=https://github.com/getsentry/sentry-javascript/issues/8396
New issuehttps://github.com/login?return_to=https://github.com/getsentry/sentry-javascript/issues/8396
#8710https://github.com/getsentry/sentry-javascript/pull/8710
Ensure usage of captureException() / captureMessage() with non-Error has correct top framehttps://github.com/getsentry/sentry-javascript/issues/8396#top
#8710https://github.com/getsentry/sentry-javascript/pull/8710
https://github.com/mydea
mydeahttps://github.com/mydea
on Jun 23, 2023https://github.com/getsentry/sentry-javascript/issues/8396#issue-1771536044
#8296https://github.com/getsentry/sentry-javascript/issues/8296
mydeahttps://github.com/mydea
Type: Bughttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Type%3A%20Bug%22
Package: Browserhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Package%3A%20Browser%22
on Jun 23, 2023https://github.com/getsentry/sentry-javascript/issues/8396#event-9618315732
kamilogorekhttps://github.com/kamilogorek
completedhttps://github.com/getsentry/sentry-javascript/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#8710https://github.com/getsentry/sentry-javascript/pull/8710
on Aug 2, 2023https://github.com/getsentry/sentry-javascript/issues/8396#event-9986909396
kamilogorekhttps://github.com/kamilogorek
on Aug 2, 2023https://github.com/getsentry/sentry-javascript/issues/8396#event-9986909575
fix(core): Filter internal API frames for synthetic frames (#8710)https://github.com/getsentry/sentry-javascript/commit/6196bc5bd3942a6fb309b320f67bb6692578b276
#8710https://github.com/getsentry/sentry-javascript/pull/8710
6196bc5https://github.com/getsentry/sentry-javascript/commit/6196bc5bd3942a6fb309b320f67bb6692578b276
Sign up for freehttps://github.com/signup?return_to=https://github.com/getsentry/sentry-javascript/issues/8396
Sign in to commenthttps://github.com/login?return_to=https://github.com/getsentry/sentry-javascript/issues/8396
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.