Sentry module for Nuxt.js
The module enables error logging through Sentry.
- Add
@nuxtjs/sentry
dependency using yarn or npm to your project - Add
@nuxtjs/sentry
tomodules
section ofnuxt.config.js
{
modules: [
'@nuxtjs/sentry',
],
sentry: {
public_key: '',
private_key: '',
project_id: '',
config: {
// Additional config
},
}
}
Make sure you use a version of Nuxt either prior to v1.0.0 or after v1.2.1.
Enter your DSN in the NuxtJS config file. Additional config settings can be found here.
Options can be passed using either environment variables or sentry
section in nuxt.config.js
.
Normally setting required DSN information would be enough.
- Type:
String
- Default:
process.env.SENTRY_DSN
- Default:
- Type:
String
- Default:
process.env.SENTRY_PUBLIC_DSN
- Default:
If value omitted it will be generated using dsn
value, by removing private key part.
- Type:
String
- Default:
process.env.SENTRY_PUBLIC_KEY
- Default:
Will be ignored if dsn
provided.
- Type:
String
- Default:
process.env.SENTRY_PRIVATE_KEY
- Default:
Will be ignored if dsn
provided.
- Type:
String
- Default:
process.env.SENTRY_HOST || 'sentry.io'
- Default:
Will be ignored if dsn
provided.
- Type:
String
- Default:
process.env.SENTRY_PROTOCOL || 'https'
- Default:
Will be ignored if dsn
provided.
- Type:
String
- Default:
process.env.SENTRY_PROJECT_ID || ''
- Default:
Will be ignored if dsn
provided.
- Type:
String
- Default:
process.env.SENTRY_PATH || '/'
- Default:
Will be ignored if dsn
provided.
- Type:
Boolean
- Default:
process.env.SENTRY_DISABLE_CLIENT_SIDE || false
- Default:
Copyright (c) Diederik van den Burger diederik@webrelated.nl