Skip to content

Commit

Permalink
fix: add config new relic
Browse files Browse the repository at this point in the history
  • Loading branch information
Beor18 committed Aug 3, 2019
1 parent 4690529 commit a378705
Show file tree
Hide file tree
Showing 4 changed files with 172 additions and 2 deletions.
1 change: 1 addition & 0 deletions app.js
@@ -1,3 +1,4 @@
require('newrelic');
const express = require('express');
const mongoose = require('mongoose');
const bodyParser = require('body-parser');
Expand Down
53 changes: 53 additions & 0 deletions newrelic.js
@@ -0,0 +1,53 @@
'use strict'
/**
* New Relic agent configuration.
*
* See lib/config/default.js in the agent distribution for a more complete
* description of configuration variables and their potential values.
*/
exports.config = {
/**
* Array of application names.
*/
app_name: ['api-mas-tv'],
/**
* Your New Relic license key.
*/
license_key: '95f1f304023d07c55a14010b11d30c05eb275554',
logging: {
/**
* Level at which to log. 'trace' is most useful to New Relic when diagnosing
* issues with the agent, 'info' and higher will impose the least overhead on
* production applications.
*/
level: 'info'
},
/**
* When true, all request headers except for those listed in attributes.exclude
* will be captured for all traces, unless otherwise specified in a destination's
* attributes include/exclude lists.
*/
allow_all_headers: true,
attributes: {
/**
* Prefix of attributes to exclude from all destinations. Allows * as wildcard
* at end.
*
* NOTE: If excluding headers, they must be in camelCase form to be filtered.
*
* @env NEW_RELIC_ATTRIBUTES_EXCLUDE
*/
exclude: [
'request.headers.cookie',
'request.headers.authorization',
'request.headers.proxyAuthorization',
'request.headers.setCookie*',
'request.headers.x*',
'response.headers.cookie',
'response.headers.authorization',
'response.headers.proxyAuthorization',
'response.headers.setCookie*',
'response.headers.x*'
]
}
}
115 changes: 115 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Expand Up @@ -29,12 +29,13 @@
"jsonwebtoken": "^8.3.0",
"mocha": "^5.2.0",
"mongoose": "^5.4.10",
"newrelic": "^5.11.0",
"passport": "^0.4.0",
"passport-jwt": "^4.0.0",
"restify": "^4.3.0",
"restify-cookies": "^0.2.2",
"validator": "^10.5.0",
"standard-version": "^6.0.1"
"standard-version": "^6.0.1",
"validator": "^10.5.0"
},
"devDependencies": {
"nodemon": "^1.18.3"
Expand Down

0 comments on commit a378705

Please sign in to comment.