npm install pino-raven -g
$ node ./server.js | pino-raven --dsn=https://abc:def@sentry.io/1234
Or, by using configuration json file:
$ node ./server.js | pino-raven --config raven.json
--config
(-c
): read config from a JSON file (switches take precedence)--dsn
: Sentry DSN
A full settings file is:
{
"dsn": "https://abc:def@sentry.io/1234",
"logger": "node", // default
"name": "MyApp",
"release": "1.3.0",
"environment": "development", // default
"tags": {},
"extra": {
"hello": "world"
},
"sampleRate": 1.0, // default
"sendTimeout": 1, // default
"includeModules": true // default
}