-
Notifications
You must be signed in to change notification settings - Fork 0
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
Doesn't work with typescript #2
Comments
Hi Ronen, I've found two things that need to change. Please try applying this change in the file where you set up your Sentry integration, and this change in the bundler.js file. Let me know if this works! |
Hey kevin, it works partially - I'm not able to get it to work with the Sentry.ErrorBoundary component. It seems to require global initialization using Sentry.init. And when I move away from working with an instance of Sentry.BrowserClient to working with Sentry globally, errors are not being reported. Here's what I get in that case (with sentry debug flag turned on):
Questions:
Thanks! |
Also, problem is I'm loosing the entire react related stack trace, see here, that why I wanted to use Sentry.ErrorBoundary to see if it solves it. Any way to solve this? |
Hey @kevinwilde-at would love to know why do I need to create an instance of BrowserClient and why can't I work with Sentry globally? It looks like if I don't work with sentry globally I'll need to add event handlers for all possible browser errors myself to report them to sentry. Is that correct? |
Hey @kevinwilde-at any way to work with Sentry globally, without having to add event handlers for all possible browser errors myself to report them to sentry? |
Hi Ronen, you will need to use a BrowserClient instance as we initialize Sentry for our own error tracking and Sentry doesn't support multiple hubs, as far as I know. Can you explain what you mean by "having to add event handlers for all possible browser errors myself"? Does adding an error event listener on window not work? |
Hey Kevin,
This is in relation to this:
https://community.airtable.com/t/blocks-cli-2-0-0-is-here/47253/10
If you prefer to reopen the topic so I can post there, let me know.
Your sentry example does work and does report errors but the source maps don't work with typescript. I tried to change tsconfig.json to both sourceMaps and inlineSourceMaps and neither work.
See here for what's going on in sentry.
Here's bundler.js:
Thanks,
Ronen
The text was updated successfully, but these errors were encountered: