Skip to content

Commit e129cc9

Browse files
authored
1 parent aa16cc7 commit e129cc9

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

config/env/default.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,7 @@ module.exports = {
227227
enabled: false,
228228
options: {
229229
dsn: '',
230+
// Note: integrations are defined directly at `Sentry.init()`, don't add them here.
230231
},
231232
},
232233
// Webpack bundle analyzer

config/lib/app.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,13 @@ const mongoose = require('./mongoose');
66
const express = require('./express');
77
const chalk = require('chalk');
88
const Sentry = require('@sentry/node');
9+
const Tracing = require('@sentry/tracing');
910

1011
if (config.sentry.enabled) {
11-
Sentry.init(config.sentry.options);
12+
Sentry.init({
13+
...config.sentry.options,
14+
integrations: [new Tracing.Integrations.Mongo({ useMongoose: true })],
15+
});
1216
}
1317

1418
// Initialize Models
@@ -78,6 +82,12 @@ module.exports.start = function start(callback) {
7882
: 'off'),
7983
),
8084
);
85+
console.log(
86+
chalk.green(
87+
'Sentry:\t\t' +
88+
(config.sentry && config.sentry.enabled === true ? 'on' : 'off'),
89+
),
90+
);
8191

8292
// Reset console color
8393
console.log(chalk.white('--'));

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
"@sentry/browser": "6.2.5",
6868
"@sentry/integrations": "6.2.5",
6969
"@sentry/node": "6.2.5",
70+
"@sentry/tracing": "6.2.5",
7071
"acl": "0.4.11",
7172
"agenda": "1.0.3",
7273
"angular": "1.6.10",

0 commit comments

Comments
 (0)