/
newrelic.js
53 lines (52 loc) · 1.62 KB
/
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
const config = require('./core/shared/config');
exports.config = {
app_name: ['Ghost'],
license_key: config.get('newRelic:licenseKey'),
labels: {
env: process.env.PRO_ENV || 'unknown',
site: config.get('hostSettings:siteId')
},
// Agent only imported when enabled, but this will further cement that
agent_enabled: config.get('newRelic:enabled'),
distributed_tracing: {
enabled: true
},
logging: {
level: 'info'
},
slow_sql: {
// Default is false.
enabled: true,
// Default is 10. Increasing this limit increases memory usage
// Defines the maximum number of slow queries the agent collects per minute.
// The agent discards additional queries after the limit is reached.
max_samples: 10
},
error_collector: {
ignore_classes: [
// @NOTE: add more error classes to ignore here
'ValidationError',
'NoPermissionError'
]
},
transaction_tracer: {
enabled: true,
record_sql: 'obfuscated'
},
allow_all_headers: true,
attributes: {
exclude: [
// Default exclusions (TODO: add more!):
'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*'
]
}
};