-
Notifications
You must be signed in to change notification settings - Fork 9
/
newrelic.js
38 lines (35 loc) · 923 Bytes
/
newrelic.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/**
* 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.
*/
var config;
if (process.env.NODE_ENV === 'production') {
config = require('./build/core-server').config;
} else {
config = require('./src/core-server').config;
}
if (config.newrelic.key) {
console.log('Starting newrelic.');
exports.config = {
app_name: config.newrelic.name || 'Scrollback',
license_key: config.newrelic.key,
logging: {
level: 'info'
},
rules: {
ignore: [
'^/engine.io'
],
name: [
{ pattern: '/me', name: '/me' },
{ pattern: '/i/.*', name: '/i/*' },
{ pattern: '/s/.*', name: '/s/*' },
{ pattern: '/r/.*', name: '/r/*' },
{ pattern: /^\/([\w\-]{3,32})\/.*/, name: '/:room/:discussion' },
{ pattern: /^\/([\w\-]{3,32})$/, name: '/:room' }
]
}
};
}