Skip to content
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

Bugsnag integration #858

Closed
ollieh-m opened this issue Jul 3, 2018 · 3 comments
Closed

Bugsnag integration #858

ollieh-m opened this issue Jul 3, 2018 · 3 comments

Comments

@ollieh-m
Copy link

ollieh-m commented Jul 3, 2018

We've been trying to hook up https://www.bugsnag.com/ to log errors from within the React app, but can't get it to work with the server-side rendering. Would really appreciate any advice on implementing this.

The bugsnag-react library (https://docs.bugsnag.com/platforms/browsers/react/) works by letting you wrap the App in a component, but creating the ErrorBoundary component seems to rely on the bugsnag function provided by bugsnag-js. The problem is that this function seems to rely on accessing window. This means that while we can wrap ClientApp (from app.js) in the ErrorBoundary, we can't wrap ServerApp.

Ultimately we're looking for a way to catch any and all errors from within React and log them to Bugsnag. I think we could use the existing log file written to support Raven, but that relies on calling .error() whenever we want to log an error, whereas the ErrorBoundary implementation catches all errors.

@Gnito
Copy link
Contributor

Gnito commented Jul 9, 2018

@ollieh-m Sorry, I'm not familiar with Bugsnag.

Bugsnag-react seems to direct users to separate node-implementation for SSR
bugsnag/bugsnag-react#4

Side note: Current Sentry setup catches unhandled exceptions, we just decided to add error reporting to steps that matter (mainly to transaction process). We felt that reporting all the errors "as-is" is probably too noisy (i.e. we wanted to organize important errors with keywords like update-listing-failed).

@lyyder
Copy link
Contributor

lyyder commented Jul 23, 2018

@ollieh-m are you still having problems with the error logging? Otherwise I'll close this.

@lyyder
Copy link
Contributor

lyyder commented Aug 1, 2018

Closing this due to inactivity.

@lyyder lyyder closed this as completed Aug 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants