René's URL Explorer Experiment


Title: Refactor Stack Parsing · Issue #4543 · getsentry/sentry-javascript · GitHub

Open Graph Title: Refactor Stack Parsing · Issue #4543 · getsentry/sentry-javascript

X Title: Refactor Stack Parsing · Issue #4543 · getsentry/sentry-javascript

Description: Currently the JavaScript stack parsing is made up of: Highly modified version of Tracekit for the browser Mildly modified version of node-stack-parse for node.js These are currently working well but there is scope for improvement: Multip...

Open Graph Description: Currently the JavaScript stack parsing is made up of: Highly modified version of Tracekit for the browser Mildly modified version of node-stack-parse for node.js These are currently working well bu...

X Description: Currently the JavaScript stack parsing is made up of: Highly modified version of Tracekit for the browser Mildly modified version of node-stack-parse for node.js These are currently working well bu...

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

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.4


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Refactor Stack Parsing","articleBody":"Currently the JavaScript stack parsing is made up of:\r\n - Highly modified version of Tracekit for the browser\r\n - Mildly modified version of `node-stack-parse` for node.js\r\n\r\nThese are currently working well but there is scope for improvement:\r\n- Multiple refactors have resulted in unused fields/code paths and unnecessary abstractions\r\n- Downstream SDKs cannot configure the parser\r\n  - In Electron we need to use both Chrome and node.js line parsers in the renderer (https://github.com/getsentry/sentry-electron/issues/308)\r\n  - SDK users might want to exclude certain parsers to reduce bundle size\r\n\r\nThis [quick PoC](https://github.com/timfish/sentry-javascript/blob/tracekit-seperater-parsers/packages/browser/src/tracekit.ts) shows that the stack line parsers can be moved into individual functions that will allow features to be configurable.\r\n\r\n## Rough Plan\r\nMake incremental improvements, starting with non-breaking changes:\r\n\r\n- [x] Refactor and improve tests and make some minor parser simplifications \r\n  - #4514\r\n- [x] Remove unnecessary types and more simplifications \r\n  - #4523 \r\n- [x] Split line parsers into individual functions\r\n  - #4555\r\n- [x] Migrate `node-stack-parse` to the common parser\r\n  - [x] Improve Node tests\r\n    - #4564 \r\n  - [x] Move context line fetching to an integration \r\n    - #3729\r\n  - [x] Update docs to deprecate `frameContextLines` \r\n    - https://github.com/getsentry/sentry-docs/pull/4746 \r\n  - [ ] Run node CI tests on Windows\r\n    - https://github.com/getsentry/sentry-javascript/pull/4616\r\n  - [x] Refactor node parser to be line orientated and use common parser\r\n    - #4612\r\n- [x] More stack parse improvements and consolidation\r\n  - #4669\r\n\r\nThen breaking changes for next major version:\r\n - [x] Add `stackParser` to `init` options so it can be overridden in downstream SDKs\r\n   - This will require modifications to exports in eventbuilder\r\n   - #4902\r\n - [x] Remove usages of deprecated `event.stacktrace`\r\n   - #4885\r\n - [x] Drop default Opera support since its not in the list of supported browsers\r\n   -  #4923\r\n - [x] Remove `frameContextLines` from `NodeOptions` since this will now be passed to the integration\r\n   - #4884\r\n - [x] Remove `eventbuilder` exports which were at some point used in `@sentry/electron`\r\n   - #4887\r\n\r\n\r\nA stack parser that can handle both Chrome and Node.js frames might be constructed like:\r\n```ts\r\nimport { createStackParser } from '@sentry/utils';\r\nimport { chrome } from '@sentry/browser';\r\nimport { node} from '@sentry/node';\r\nimport { Exception } from '@sentry.types';\r\n\r\nconst stackParser = createStackParser(chrome, node);\r\n\r\ntry {\r\n  throw new Error('bad things');\r\n} catch(e) {\r\n  const ex: Exception = stackParser(e);\r\n}\r\n\r\n```\r\n ","author":{"url":"https://github.com/timfish","@type":"Person","name":"timfish"},"datePublished":"2022-02-10T18:22:12Z","url":"https://github.com/getsentry/sentry-javascript/issues/4543"}

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:3c08dea9-c624-e38c-38a2-a9eef8966162
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id8366:27A224:CB16:10C5D:6B0429A6
html-safe-nonce0481ce22c4baec6c72d2d6d1b145ea89a8a5acd302cfce9e9735a7fd0ab4aca7
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MzY2OjI3QTIyNDpDQjE2OjEwQzVEOjZCMDQyOUE2IiwidmlzaXRvcl9pZCI6Ijc2MzUyNzc1MzI3MTUyOTcxOTAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac5470096ec0983e5d5facf5c134d147c69307a68199a5b0f3a437e0f80f69f0a7
hovercard-subject-tagissue:1130617894
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/4543/issue_layout
twitter:imagehttps://opengraph.githubassets.com/62799465d76c3ab6806471b436a9e568a44039bfd55644331dd9c98780a9189f/getsentry/sentry-javascript/issues/4543
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/62799465d76c3ab6806471b436a9e568a44039bfd55644331dd9c98780a9189f/getsentry/sentry-javascript/issues/4543
og:image:altCurrently the JavaScript stack parsing is made up of: Highly modified version of Tracekit for the browser Mildly modified version of node-stack-parse for node.js These are currently working well bu...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernametimfish
hostnamegithub.com
expected-hostnamegithub.com
Noneb7a1d2b9101496921b08579fbee988d014345aef2f5bd660d1f8c7332d81560e
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
releasec3dd496c3da6ea6b77e69c09279d2b81604654f1
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/getsentry/sentry-javascript/issues/4543#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-javascript%2Fissues%2F4543
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%2F4543
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/4543
Reloadhttps://github.com/getsentry/sentry-javascript/issues/4543
Reloadhttps://github.com/getsentry/sentry-javascript/issues/4543
getsentryhttps://github.com/getsentry
sentry-javascripthttps://github.com/getsentry/sentry-javascript
Codehttps://github.com/getsentry/sentry-javascript
Issues341 (341)https://github.com/getsentry/sentry-javascript/issues
Pull requests58 (58)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/4543
New issuehttps://github.com/login?return_to=https://github.com/getsentry/sentry-javascript/issues/4543
Refactor Stack Parsinghttps://github.com/getsentry/sentry-javascript/issues/4543#top
7.0.0https://github.com/getsentry/sentry-javascript/milestone/7
https://github.com/timfish
timfishhttps://github.com/timfish
on Feb 10, 2022https://github.com/getsentry/sentry-javascript/issues/4543#issue-1130617894
Missing stacktrace in renderer process when using Node.js API integration sentry-electron#308https://github.com/getsentry/sentry-electron/issues/308
quick PoChttps://github.com/timfish/sentry-javascript/blob/tracekit-seperater-parsers/packages/browser/src/tracekit.ts
ref(browser): Simplify TraceKit parser and reorganize tests #4514https://github.com/getsentry/sentry-javascript/pull/4514
ref(browser): Replace TracekitStackFrame with Sentry StackFrame #4523https://github.com/getsentry/sentry-javascript/pull/4523
ref(browser): Split stack line parsers into individual functions and simplify further #4555https://github.com/getsentry/sentry-javascript/pull/4555
ref(node): Increase stack parse test coverage #4564https://github.com/getsentry/sentry-javascript/pull/4564
ref(node): Refactor node source fetching into integration #3729https://github.com/getsentry/sentry-javascript/pull/3729
feat(nodejs): Deprecate frameContextLines option and move to integration sentry-docs#4746https://github.com/getsentry/sentry-docs/pull/4746
ref(node): Run Node CI tests on Windows #4616https://github.com/getsentry/sentry-javascript/pull/4616
ref(node): Refactor node stack parsing to use common parser #4612https://github.com/getsentry/sentry-javascript/pull/4612
ref(stackparse): More stack parse improvements and consolidation #4669https://github.com/getsentry/sentry-javascript/pull/4669
ref: Expose configurable stack parser #4902https://github.com/getsentry/sentry-javascript/pull/4902
Remove usage of deprecated event.stacktrace #4885https://github.com/getsentry/sentry-javascript/pull/4885
Remove stack parser support for Opera pre v15 #4923https://github.com/getsentry/sentry-javascript/pull/4923
[v7] Remove deprecated frameContextLines #4884https://github.com/getsentry/sentry-javascript/pull/4884
[v7] Remove eventbuilder exports which were historically used in @sentry/electron #4887https://github.com/getsentry/sentry-javascript/pull/4887
getsantryhttps://github.com/apps/getsantry
Status: Untriagedhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Status%3A%20Untriaged%22
on Feb 10, 2022https://github.com/getsentry/sentry-javascript/issues/4543#event-6044631133
AbhiPrasadhttps://github.com/AbhiPrasad
Status: Backloghttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Status%3A%20Backlog%22
on Feb 10, 2022https://github.com/getsentry/sentry-javascript/issues/4543#event-6044663670
getsantryhttps://github.com/apps/getsantry
Status: Untriagedhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Status%3A%20Untriaged%22
on Feb 10, 2022https://github.com/getsentry/sentry-javascript/issues/4543#event-6044663797
AbhiPrasadhttps://github.com/AbhiPrasad
7.0.0https://github.com/getsentry/sentry-javascript/milestone/7
on Feb 10, 2022https://github.com/getsentry/sentry-javascript/issues/4543#event-6044663894
AbhiPrasadhttps://github.com/AbhiPrasad
Package: browserhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Package%3A%20browser%22
Package: nodehttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Package%3A%20node%22
on Feb 10, 2022https://github.com/getsentry/sentry-javascript/issues/4543#event-6044665250
https://github.com/timfish
timfishhttps://github.com/timfish
on Feb 14, 2022https://github.com/getsentry/sentry-javascript/issues/4543#issuecomment-1039021288
#3729https://github.com/getsentry/sentry-javascript/pull/3729
https://github.com/timfish
timfishhttps://github.com/timfish
on Feb 14, 2022https://github.com/getsentry/sentry-javascript/issues/4543#issuecomment-1039217819
https://github.com/AbhiPrasad
AbhiPrasadhttps://github.com/AbhiPrasad
on Feb 14, 2022https://github.com/getsentry/sentry-javascript/issues/4543#issuecomment-1039483318
https://github.com/getsentry/sentry-javascript/pull/4527/files#diff-98566cdbe00d44614c2fa27bf3e2ffabc236cf66528242495ea172d7fcb6ca0aR18-R25https://github.com/getsentry/sentry-javascript/pull/4527/files#diff-98566cdbe00d44614c2fa27bf3e2ffabc236cf66528242495ea172d7fcb6ca0aR18-R25
https://github.com/timfish
timfishhttps://github.com/timfish
on Feb 14, 2022https://github.com/getsentry/sentry-javascript/issues/4543#issuecomment-1039665849
https://github.com/timfish
timfishhttps://github.com/timfish
on Mar 2, 2022https://github.com/getsentry/sentry-javascript/issues/4543#issuecomment-1057111030
https://github.com/AbhiPrasad
AbhiPrasadhttps://github.com/AbhiPrasad
on Mar 2, 2022https://github.com/getsentry/sentry-javascript/issues/4543#issuecomment-1057113413
https://github.com/getsentry/sentry-react-native/blob/33232d9ef157e4c4059f618cee348f9bd16af8fd/src/js/backend.ts#L45-L61https://github.com/getsentry/sentry-react-native/blob/33232d9ef157e4c4059f618cee348f9bd16af8fd/src/js/backend.ts#L45-L61
AbhiPrasadhttps://github.com/AbhiPrasad
Status: In Progresshttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Status%3A%20In%20Progress%22
Status: Backloghttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Status%3A%20Backlog%22
on Mar 2, 2022https://github.com/getsentry/sentry-javascript/issues/4543#event-6172190183
https://github.com/AbhiPrasad
AbhiPrasadhttps://github.com/AbhiPrasad
on Apr 26, 2022https://github.com/getsentry/sentry-javascript/issues/4543#issuecomment-1109941423
@timfishhttps://github.com/timfish
https://github.com/timfish
timfishhttps://github.com/timfish
on Apr 26, 2022https://github.com/getsentry/sentry-javascript/issues/4543#issuecomment-1109944268
timfishhttps://github.com/timfish
completedhttps://github.com/getsentry/sentry-javascript/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Apr 26, 2022https://github.com/getsentry/sentry-javascript/issues/4543#event-6499931787
AbhiPrasadhttps://github.com/AbhiPrasad
Status: In Progresshttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Status%3A%20In%20Progress%22
on Apr 26, 2022https://github.com/getsentry/sentry-javascript/issues/4543#event-6499955405
Sign up for freehttps://github.com/signup?return_to=https://github.com/getsentry/sentry-javascript/issues/4543
Sign in to commenthttps://github.com/login?return_to=https://github.com/getsentry/sentry-javascript/issues/4543
7.0.0https://github.com/getsentry/sentry-javascript/milestone/7
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.