Title: Better stacktrace data for non-file routes behind login wall · Issue #8656 · getsentry/sentry-javascript · GitHub
Open Graph Title: Better stacktrace data for non-file routes behind login wall · Issue #8656 · getsentry/sentry-javascript
X Title: Better stacktrace data for non-file routes behind login wall · Issue #8656 · getsentry/sentry-javascript
Description: Submitting on behalf of a customer (see linked Jira ticket for customer-specific details): Problem Statement In some cases of the same issue, stack traces have rich context, but in other cases, there is no context. The pages in question ...
Open Graph Description: Submitting on behalf of a customer (see linked Jira ticket for customer-specific details): Problem Statement In some cases of the same issue, stack traces have rich context, but in other cases, the...
X Description: Submitting on behalf of a customer (see linked Jira ticket for customer-specific details): Problem Statement In some cases of the same issue, stack traces have rich context, but in other cases, the...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/8656
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Better stacktrace data for non-file routes behind login wall","articleBody":"Submitting on behalf of a customer (see linked Jira ticket for customer-specific details):\n\n## Problem Statement\n\nIn some cases of the same issue, stack traces have rich context, but in other cases, there is no context. The pages in question involve [HAML](https://haml.info/)\n\n### Example A (already behaves how we want)\nURL: `http://some-client.myexamplesite.com/admin`:\n\n\n\nWhen we visit the actual URL and look at the page source, we can see that line 289 is present and matches the source context shown in Sentry:\n\n\u003cimg width=\"539\" alt=\"Screenshot 2023-07-26 at 9 16 37 AM\" src=\"https://github.com/getsentry/sentry/assets/12092849/2e78c90d-866f-4100-9537-548284c33f89\">\n\nGreat -- this is what we want.\n\n### Example B (want different behavior)\nURL: `http://another-client.myexamplesite.com/admin`:\n\n\n\nWhen we visit the actual URL and look at the page source, we see that line 407, where the error occurred, does not exist:\n\n\u003cimg width=\"478\" alt=\"Screenshot 2023-07-26 at 9 16 48 AM\" src=\"https://github.com/getsentry/sentry/assets/12092849/ad331067-145a-4bc4-805b-546b9cc00c80\">\n\nThe desired behavior is to have similar detailed source context even for errors behind login walls.\n\n### Why this happens\n\nI and colleague @Prithvirajkumar spoke internally to @kamilogorek on Slack, who mentioned that the problem with the missing stack trace is that the captured error is pointing to a route, in the case of the example it’s /admin.\n\n- The problem is that the captured error is pointing to a route, in this case it's /admin.\n- There’s no such artifact, as it’s not a file, so we reach out to scrape the page.\n- We do so successfully for pages that have no login wall (if we view the page source in our browser without logging in, we see the line where the error was triggered)\n- Whereas, for events with no context, it’s getting a “login” page served, effectively not being able to resolve it (if we visit the page source in our browser without logging in, the line number where the error occurred does not exist, indicating that it took place behind a login wall)\n\n### Solution Brainstorm\n\nOur customer writes:\n\n> Because our haml sections are legacy code they're also more prone to errors, so being able to pinpoint the code is pretty important for us. Unfortunately the majority of our important errors happen while users are logged in.\n> Because Bugsnag does provide context for these same errors, it looks like there's room for improvement. They must be capturing that context as the event happens and sending it along with the initial payload. I'm going to look at doing the same and capture/send it as metadata, but that won't show up as a stack trace. Can I make a feature request for parity with Bugsnag here?\n>\n> I've confirmed that Bugsnag sends this helpful data with the event. Here's a screenshot for reference\n>\n> \n\nThe customer also provided this screenshot from Bugsnag:\n\n\u003cimg width=\"1312\" alt=\"Screenshot 2023-07-25 at 3 39 09 PM\" src=\"https://github.com/getsentry/sentry/assets/12092849/25335c20-0f5b-4809-883a-5c906b94f459\">\n\nThe ideal situation would be to have stack trace information shown even for errors occurring behind login-walled routes, such as `/admin` in the example. \n\nThis could require capturing and including stacktrace data at the time of the crash rather than scraping the page and encountering the login wall.\n\n### Product Area\n\nIssues\n\n┆Issue is synchronized with this [Jira Improvement](https://getsentry.atlassian.net/browse/FEEDBACK-1896) by [Unito](https://www.unito.io)\n","author":{"url":"https://github.com/cstavitsky","@type":"Person","name":"cstavitsky"},"datePublished":"2023-07-25T22:19:12Z","url":"https://github.com/getsentry/sentry-javascript/issues/8656"}
| react-profiling | 0 |
| react-import-map | react,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-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:90a766f7-9c01-6140-ae88-05c46d3169a1 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A946:1978BF:3AF37B:4F7253:6B04897E |
| html-safe-nonce | 475272c1e70584980c9358ae38ab18e34fbdbf2798577c3af426d1cf0caffed0 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBOTQ2OjE5NzhCRjozQUYzN0I6NEY3MjUzOjZCMDQ4OTdFIiwidmlzaXRvcl9pZCI6IjY4ODczNTc4NTQ4NDQ3NTAyMDYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | d7cfb41f43365c3fb18946b85cf803b598fa343b687cab05c9e7fa47563bc823 |
| hovercard-subject-tag | issue:1823111569 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-javascript/8656/issue_layout |
| twitter:image | https://opengraph.githubassets.com/fe8ef4c08d41d53c50af6f494d3df290fc9f315da6ebdfe30a40659fc85c27e9/getsentry/sentry-javascript/issues/8656 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/fe8ef4c08d41d53c50af6f494d3df290fc9f315da6ebdfe30a40659fc85c27e9/getsentry/sentry-javascript/issues/8656 |
| og:image:alt | Submitting on behalf of a customer (see linked Jira ticket for customer-specific details): Problem Statement In some cases of the same issue, stack traces have rich context, but in other cases, the... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | cstavitsky |
| hostname | github.com |
| expected-hostname | github.com |
| None | 1d5c152376e38b7d2e37f3d5179be29a73bee93b85110da28a4eebe1159cdc70 |
| turbo-cache-control | no-preview |
| go-import | github.com/getsentry/sentry-javascript git https://github.com/getsentry/sentry-javascript.git |
| octolytics-dimension-user_id | 1396951 |
| octolytics-dimension-user_login | getsentry |
| octolytics-dimension-repository_id | 3328572 |
| octolytics-dimension-repository_nwo | getsentry/sentry-javascript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 3328572 |
| octolytics-dimension-repository_network_root_nwo | getsentry/sentry-javascript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | f5017e8ff4ea25a8011fcf0f2a0e430c60dc86c8 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width