Title: Gatsby: Sentry.captureException() doesn't work unless reinitialized · Issue #5727 · getsentry/sentry-javascript · GitHub
Open Graph Title: Gatsby: Sentry.captureException() doesn't work unless reinitialized · Issue #5727 · getsentry/sentry-javascript
X Title: Gatsby: Sentry.captureException() doesn't work unless reinitialized · Issue #5727 · getsentry/sentry-javascript
Description: Is there an existing issue for this? I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues I have reviewed the documentation https://docs.sentry.io/ I am using the latest SDK release https://github.com/...
Open Graph Description: Is there an existing issue for this? I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues I have reviewed the documentation https://docs.sentry.io/ I am using th...
X Description: Is there an existing issue for this? I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues I have reviewed the documentation https://docs.sentry.io/ I am using th...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/5727
X: @github
Domain: github.com
IPv4 address: 140.82.113.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Gatsby: Sentry.captureException() doesn't work unless reinitialized","articleBody":"### Is there an existing issue for this?\r\n\r\n- [X] I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues\r\n- [X] I have reviewed the documentation https://docs.sentry.io/\r\n- [X] I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases\r\n\r\n### How do you use Sentry?\r\n\r\nSentry Saas (sentry.io)\r\n\r\n### Which package are you using?\r\n\r\n@sentry/gatsby\r\n\r\n### SDK Version\r\n\r\n7.12.1\r\n\r\n### Framework Version\r\n\r\nGatsby 4.14.1\r\n\r\n### Link to Sentry event\r\n\r\n_No response_\r\n\r\n### Steps to Reproduce\r\n\r\nInitialize the plugin in `gatsby-config.js`:\r\n\r\n```js\r\nmodule.exports = {\r\n plugins: [\r\n {\r\n resolve: '@sentry/gatsby',\r\n options: {\r\n dsn: 'XXXX',\r\n },\r\n },\r\n ],\r\n}\r\n```\r\n\r\nOn the client (e.g. inside a component):\r\n```js\r\nimport * as Sentry from '@sentry/gatsby';\r\nSentry.captureException(new Error('error');\r\n```\r\n\r\n### Expected Result\r\n\r\nAn exception should be sent to Sentry.\r\n\r\n### Actual Result\r\n\r\nNothing is sent to Sentry (nothing at sentry.io or in the browser's network tab) unless calling `Sentry.init({ dns: 'XXXX' })` before calling `Sentry.captureException()`. Unhandled exceptions are properly captured, but not manual calls to `Sentry.captureException()`.","author":{"url":"https://github.com/JordanVincent","@type":"Person","name":"JordanVincent"},"datePublished":"2022-09-12T21:09:03Z","url":"https://github.com/getsentry/sentry-javascript/issues/5727"}
| 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:aeab2ced-dcbe-2f5a-5480-f7bd0f62aa54 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B538:297F6F:17925:1F5FC:6B0429DF |
| html-safe-nonce | 540fe0bcc1b0e5d7d6878cbb483046387877168c1d18f189e203a07f2628c8bc |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNTM4OjI5N0Y2RjoxNzkyNToxRjVGQzo2QjA0MjlERiIsInZpc2l0b3JfaWQiOiIyNDgzNDk5NzI5MDAzMjI3NjE1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 2ee19dc943d4e6af96cd0a35f5237e04ccd0189f944045419023eb5a81ecab93 |
| hovercard-subject-tag | issue:1370519566 |
| 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/5727/issue_layout |
| twitter:image | https://opengraph.githubassets.com/089e30943f1da8b2b8bbb417ffa00f16653d31aa087004188c613ad9ef74038f/getsentry/sentry-javascript/issues/5727 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/089e30943f1da8b2b8bbb417ffa00f16653d31aa087004188c613ad9ef74038f/getsentry/sentry-javascript/issues/5727 |
| og:image:alt | Is there an existing issue for this? I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues I have reviewed the documentation https://docs.sentry.io/ I am using th... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | JordanVincent |
| hostname | github.com |
| expected-hostname | github.com |
| None | b7a1d2b9101496921b08579fbee988d014345aef2f5bd660d1f8c7332d81560e |
| 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 | c3dd496c3da6ea6b77e69c09279d2b81604654f1 |
| 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