A module to add dd-trace
/ Datadog APM tracing to your Nuxt application. Captures requests passing
through the Nuxt instance / http
module in Node.js.
Note: This module is in alpha stages at the moment, and doesn't yet provide an interface to the dd-trace
scope manager.
- Install npm package
$ yarn add nuxt-datadog-trace # or npm i nuxt-datadog-trace
- Edit your
nuxt.config.js
file to add module
export default {
modules: ['nuxt-datadog-trace']
}
- Change options as needed. See Usage section for details.
- Configure
dd-trace
instance by addingdatadogTrace
tonuxt.config.js
.
export default {
datadogTrace: {
hostname: 'cool.net',
logInjection: false
// ...
}
}
- By default,
nuxt-datadog-trace
is configured like so:
export default {
datadogTrace: {
hostname: process.env.DATADOG_AGENT_HOST || 'localhost',
env: process.env.NODE_ENV,
service: `host app's [package.json].name property`,
logInjection: true,
...yourOverrides
}
}