Skip to content
This repository has been archived by the owner on Oct 26, 2019. It is now read-only.

Commit

Permalink
Add new relic monitoring
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexandru Rosianu committed May 10, 2016
1 parent ba15c0b commit 1bd7a55
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
17 changes: 17 additions & 0 deletions newrelic.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
'use strict';

/**
* New Relic agent configuration.
*
* See lib/config.defaults.js in the agent distribution for a more complete
* description of configuration variables and their potential values.
*
* Required env vars:
* - NEW_RELIC_APP_NAME
* - NEW_RELIC_LICENSE_KEY
*/
exports.config = {
logging: {
level: 'info'
}
};
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"express": "4.13.4",
"github4": "0.6.0",
"morgan": "1.7.0",
"newrelic": "1.27.2",
"request": "2.72.0",
"semver": "5.1.0"
},
Expand Down
5 changes: 5 additions & 0 deletions src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ import * as updateCtrl from './controllers/update';
import * as downloadCtrl from './controllers/download';
import * as statsCtrl from './controllers/stats';

// Import New Relic if it's set up
if (process.env.NEW_RELIC_LICENSE_KEY) {
require('newrelic');
}

const app = express();
app.use(morgan('common'));

Expand Down

0 comments on commit 1bd7a55

Please sign in to comment.