question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to integrate gatsby.js with Sentry.io?

See original GitHub issue

I have tried to install sentry.io with raven.js in two ways, but none of them seems to catch the errors correctly…

  1. Add the raven.js script tag into page
<script src="https://cdn.ravenjs.com/3.20.1/raven.min.js" crossorigin="anonymous"></script>
  1. Use raven-js via npm

I wonder what kinds of error catching methods or utilities I can use in gatsby.js.

I can report the error manually using Raven.captureException(e), which is stated at https://docs.sentry.io/clients/javascript/usage/#raven-js-reporting-errors

The official documentation is available at https://docs.sentry.io/clients/javascript/integrations/react/

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

5reactions
octalmagecommented, Dec 17, 2017

I actually made a plugin for this, you can find it here:

https://www.npmjs.com/package/gatsby-plugin-sentry

1reaction
KyleAMathewscommented, Jan 29, 2018

@octalmage awesome thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Gatsby - Sentry Documentation
You can configure the SDK in one of two ways discussed below: by creating a configuration file, or defining the options along with...
Read more >
gatsby-plugin-sentry
gatsby -plugin-sentry Gatsby plugin to add Sentry error tracking to your site. Learn more about Sentry here. Install How to use Now is…...
Read more >
@sentry/gatsby - npm
Official Sentry SDK for GatsbyJS. Register the package as a plugin in gatsby-config.js : module.exports = ...
Read more >
Gatsby | Sentry Documentation
Learn how to use Sentry with Gatsby.
Read more >
Integrating Sentry.io with GatbsyJS - Matt Claffey
When a web application has a lot of incoming traffic we want to have some form of logging to monitor errors across the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found