gridsome-plugin-sentry

1.1.0 • Public • Published

Downloads

Sentry plugin for error tracking in Gridsome projects

Make error tracking in your next Gridsome project easier than ever.

Install

  • npm install gridsome-plugin-sentry --save
  • yarn add gridsome-plugin-sentry

Usage

Add the following to the gridsome.config.js to initalize Sentry error tracking

module.exports = {
  plugins: [
    {
      use: 'gridsome-plugin-sentry',
      options: {
        dsn: 'sentry.url',
        attachProps: true // defaults to true
        logErrors: process.env.NODE_ENV === 'development' // defaults to false, see below for further info
      }
    }
  ]
}
  1. For a quick and easy test, add the following to any component that is included in your index page
mounted () {
  throw 'testing Sentry connection';
}
  1. Run npm run develop from the root directory
  2. Navigate to your Sentry dashboard and confirm the error was captured

Further Info

New to Sentry? Check out sentry.io

logErrors option

By default Sentry will not call the internal logError function of Vue and will not be seen in the developers console. You can enable logging errors in the browsers development console with any statement that evaluates to a boolean. See Vue integration docs for more info

Silencing errors from localhost

If you want Sentry to ignore events from localhost or any specific IP address you can do so from your Sentry dashboard with inbound filters. From you dashboard, Settings -> Projects -> 'Project Name' -> Inbound Filters

Configuration options and examples, docs.sentry.io

Package Sidebar

Install

npm i gridsome-plugin-sentry

Weekly Downloads

15

Version

1.1.0

License

MIT

Unpacked Size

4.14 kB

Total Files

4

Last publish

Collaborators

  • frnd.colin