How to Use Sentry in Nuxt.JS
Jun 7, 2023
You can start by running bellow command to install the required dependency.
npm install @sentry/vue
npm install @nuxtjs/sentry
npm install @sentry/profiling-node
In the next step you have to add the module in your nuxt.config.js like this:
export default {
loading: { … , [‘@nuxtjs/sentry’ ],
sentry: {
dsn: ‘dsn’,
tracing: {
tracesSampleRate: 1.0,
},
serverIntegrations: {
ProfilingIntegration: {},
},
serverConfig: {
// Set sampling rate for profiling — this is relative to tracesSampleRate
profilesSampleRate: 1.0,
},},