Skip to content

Commit f48714d

Browse files
Merge branch 'fix/sentry-logging' into 'develop'
Fix/sentry logging See merge request back-end/elastalert!15
2 parents a60877c + c0d9a04 commit f48714d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/index.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
import ElastalertServer from './elastalert_server';
22

3-
if (process.env.BITSENSOR_SENTRY_ENABLED !== 'false') {
3+
if (process.env.BITSENSOR_SENTRY_ENABLED !== 'false' && process.env.BITSENSOR_SENTRY_DSN !== undefined) {
44
var Raven = require('raven');
5-
Raven.config('http://527ee316013644b387a47f713335b085:[email protected]:9000/5').install();
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)