Make error tracking in your next Gridsome project easier than ever.
npm install gridsome-plugin-sentry --save
yarn add gridsome-plugin-sentry
Add the following to the gridsome.config.js to initallize Sentry error tracking
module.exports = {
plugins: [
{
use: 'gridsome-plugin-sentry',
options: {
dsn: 'sentry.url',
attachProps: true // defaults to true
}
}
]
}
- For a quick and easy test, add the following to any component that is included in your index page
mounted () {
throw 'testing Sentry connection';
}
- Run
npm run develop
from the root directory - Navigate to your Sentry dashboard and confirm the error was captured
New to Sentry? Check out sentry.io
Configuration options and examples, docs.sentry.io