Skip to content

Commit c0d9a04

Browse files
Capture unhandled rejections
1 parent 6aab06c commit c0d9a04

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@ import ElastalertServer from './elastalert_server';
22

33
if (process.env.BITSENSOR_SENTRY_ENABLED !== 'false' && process.env.BITSENSOR_SENTRY_DSN !== undefined) {
44
var Raven = require('raven');
5-
Raven.config(process.env.BITSENSOR_SENTRY_DSN).install(console.log('Sentry logging enabled for Elastalert'));
5+
Raven.config(process.env.BITSENSOR_SENTRY_DSN, {
6+
captureUnhandledRejections: true
7+
}).install();
8+
console.log('Sentry logging enabled for Elastalert');
69

710
Raven.context(function () {
811
let server = new ElastalertServer();

0 commit comments

Comments
 (0)