newrelic 13.1.0 → 13.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NEWS.md +46 -0
- package/README.md +2 -4
- package/THIRD_PARTY_NOTICES.md +3 -3
- package/esm-loader.mjs +9 -1
- package/index.js +2 -2
- package/lib/agent.js +1 -2
- package/lib/config/build-instrumentation-config.js +3 -0
- package/lib/config/default.js +1397 -1395
- package/lib/config/index.js +15 -19
- package/lib/context-manager/context.js +13 -4
- package/lib/harvester.js +11 -13
- package/lib/instrumentation/@google/genai.js +8 -3
- package/lib/instrumentation/@hapi/hapi.js +4 -6
- package/lib/instrumentation/@nestjs/core.js +12 -14
- package/lib/instrumentation/aws-sdk/v3/bedrock.js +2 -2
- package/lib/instrumentation/kafkajs/producer.js +13 -19
- package/lib/instrumentation/openai.js +2 -2
- package/lib/instrumentation/undici.js +48 -40
- package/lib/instrumentations.js +14 -5
- package/lib/llm-events/aws-bedrock/utils.js +1 -1
- package/lib/metrics/names.js +8 -0
- package/lib/metrics/normalizer.js +1 -3
- package/lib/otel/context.js +18 -14
- package/lib/otel/metrics/bootstrap-metrics.js +1 -1
- package/lib/patch-module.js +70 -0
- package/lib/serverless/aws-lambda.js +1 -3
- package/lib/shim/webframework-shim/middleware-mounter.js +1 -3
- package/lib/shimmer.js +56 -8
- package/lib/subscriber-configs.js +17 -0
- package/lib/subscribers/application-logs.js +55 -0
- package/lib/subscribers/base.js +177 -0
- package/lib/subscribers/create-config.js +27 -0
- package/lib/subscribers/db-operation.js +21 -0
- package/lib/subscribers/db-query.js +54 -0
- package/lib/subscribers/db.js +57 -0
- package/lib/subscribers/elasticsearch/config.js +49 -0
- package/lib/subscribers/elasticsearch/elasticsearch.js +42 -0
- package/lib/subscribers/elasticsearch/opensearch.js +15 -0
- package/lib/subscribers/elasticsearch/transport.js +14 -0
- package/lib/subscribers/ioredis/config.js +37 -0
- package/lib/subscribers/ioredis/index.js +48 -0
- package/lib/subscribers/mcp-sdk/client-prompt.js +23 -0
- package/lib/subscribers/mcp-sdk/client-resource.js +24 -0
- package/lib/subscribers/mcp-sdk/client-tool.js +23 -0
- package/lib/subscribers/mcp-sdk/client.js +29 -0
- package/lib/subscribers/mcp-sdk/config.js +104 -0
- package/lib/subscribers/pino/config.js +20 -0
- package/lib/subscribers/pino/index.js +102 -0
- package/lib/transaction/trace/aggregator.js +7 -9
- package/lib/util/camel-case.js +1 -3
- package/lib/util/get-package-version.js +34 -0
- package/lib/w3c/tracestate.js +3 -3
- package/package.json +7 -5
- package/lib/instrumentation/@elastic/elasticsearch.js +0 -62
- package/lib/instrumentation/@opensearch-project/opensearch.js +0 -66
- package/lib/instrumentation/ioredis.js +0 -50
- package/lib/instrumentation/pino/nr-hooks.js +0 -19
- package/lib/instrumentation/pino/pino.js +0 -168
package/lib/config/default.js
CHANGED
|
@@ -22,1750 +22,1752 @@ const pkgInstrumentation = require('./build-instrumentation-config')
|
|
|
22
22
|
*
|
|
23
23
|
* @returns {object} configuration definition
|
|
24
24
|
*/
|
|
25
|
-
defaultConfig.definition = () =>
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Array of application names.
|
|
33
|
-
*/
|
|
34
|
-
app_name: {
|
|
35
|
-
formatter(val) {
|
|
36
|
-
return val.split(/[;,]/).map((k) => k.trim())
|
|
37
|
-
},
|
|
38
|
-
default: []
|
|
39
|
-
},
|
|
40
|
-
/**
|
|
41
|
-
* The user's license key. Must be set by per-app configuration file.
|
|
42
|
-
*/
|
|
43
|
-
license_key: '',
|
|
44
|
-
/**
|
|
45
|
-
*
|
|
46
|
-
* Enables/Disables security policies. Paste your security policies
|
|
47
|
-
* token from the New Relic Admin below.
|
|
48
|
-
*/
|
|
49
|
-
security_policies_token: '',
|
|
50
|
-
/**
|
|
51
|
-
* Hostname for the New Relic collector proxy.
|
|
52
|
-
*
|
|
53
|
-
* You shouldn't need to change this.
|
|
54
|
-
*/
|
|
55
|
-
host: '',
|
|
56
|
-
/**
|
|
57
|
-
* Endpoint to send OpenTelemetry spans to.
|
|
58
|
-
*
|
|
59
|
-
* This should be automatically deduced from your region and other
|
|
60
|
-
* settings, but if desired, you can override it.
|
|
61
|
-
*/
|
|
62
|
-
otlp_endpoint: '',
|
|
63
|
-
/**
|
|
64
|
-
* The port on which the collector proxy will be listening.
|
|
65
|
-
*
|
|
66
|
-
* You shouldn't need to change this.
|
|
67
|
-
*/
|
|
68
|
-
port: {
|
|
69
|
-
formatter: int,
|
|
70
|
-
default: 443
|
|
71
|
-
},
|
|
72
|
-
/**
|
|
73
|
-
* Whether or not to use SSL to connect to New Relic's servers.
|
|
74
|
-
*
|
|
75
|
-
* NOTE: This option can no longer be disabled.
|
|
76
|
-
*/
|
|
77
|
-
ssl: {
|
|
78
|
-
env: 'NEW_RELIC_USE_SSL',
|
|
79
|
-
formatter(_, logger) {
|
|
80
|
-
logger.warn('SSL config key can no longer be disabled, not updating.')
|
|
81
|
-
return true
|
|
82
|
-
},
|
|
83
|
-
default: true
|
|
84
|
-
},
|
|
85
|
-
/**
|
|
86
|
-
* Proxy url
|
|
87
|
-
*
|
|
88
|
-
* A proxy url can be used in place of setting
|
|
89
|
-
* proxy_host, proxy_port, proxy_user, and proxy_pass.
|
|
90
|
-
*
|
|
91
|
-
* e.g. http://user:pass@host:port/
|
|
92
|
-
*
|
|
93
|
-
* Setting proxy will override other proxy settings.
|
|
94
|
-
*/
|
|
95
|
-
proxy: {
|
|
96
|
-
env: 'NEW_RELIC_PROXY_URL',
|
|
97
|
-
default: ''
|
|
98
|
-
},
|
|
99
|
-
/**
|
|
100
|
-
* Proxy host to use to connect to the internet.
|
|
101
|
-
*/
|
|
102
|
-
proxy_host: '',
|
|
103
|
-
/**
|
|
104
|
-
* Proxy port to use to connect to the internet.
|
|
105
|
-
*/
|
|
106
|
-
proxy_port: '',
|
|
107
|
-
/**
|
|
108
|
-
* Proxy user name when required.
|
|
109
|
-
*/
|
|
110
|
-
proxy_user: '',
|
|
111
|
-
/**
|
|
112
|
-
* Proxy password when required.
|
|
113
|
-
*/
|
|
114
|
-
proxy_pass: '',
|
|
115
|
-
// Serverless DT config defaults
|
|
116
|
-
trusted_account_key: {
|
|
117
|
-
default: null
|
|
118
|
-
},
|
|
119
|
-
primary_application_id: {
|
|
120
|
-
default: null
|
|
121
|
-
},
|
|
122
|
-
account_id: {
|
|
123
|
-
default: null
|
|
124
|
-
},
|
|
125
|
-
/**
|
|
126
|
-
* Custom SSL certificates
|
|
127
|
-
*
|
|
128
|
-
* If your proxy uses a custom SSL certificate, you can add the CA text to
|
|
129
|
-
* this array, one entry per certificate.
|
|
130
|
-
*
|
|
131
|
-
* The easiest way to do this is with `fs.readFileSync` e.g.
|
|
132
|
-
*
|
|
133
|
-
* certificates: [
|
|
134
|
-
* require('fs').readFileSync('custom.crt', 'utf8') // don't forget the utf8
|
|
135
|
-
* ]
|
|
136
|
-
*
|
|
137
|
-
*/
|
|
138
|
-
certificates: {
|
|
139
|
-
formatter: array,
|
|
140
|
-
default: []
|
|
141
|
-
},
|
|
142
|
-
/**
|
|
143
|
-
* Whether the module is enabled.
|
|
144
|
-
*/
|
|
145
|
-
agent_enabled: {
|
|
146
|
-
env: 'NEW_RELIC_ENABLED',
|
|
147
|
-
formatter: boolean,
|
|
148
|
-
default: true
|
|
149
|
-
},
|
|
150
|
-
|
|
151
|
-
/**
|
|
152
|
-
* Collects configuration related to New Relic Agent Control, i.e. centralized
|
|
153
|
-
* agent management in container based environments.
|
|
154
|
-
*/
|
|
155
|
-
agent_control: {
|
|
156
|
-
/**
|
|
157
|
-
* Indicates that the agent is being managed by Agent Control. Must be set
|
|
158
|
-
* to true health monitoring.
|
|
159
|
-
*/
|
|
160
|
-
enabled: {
|
|
161
|
-
formatter: boolean,
|
|
162
|
-
default: false
|
|
25
|
+
defaultConfig.definition = () => {
|
|
26
|
+
return {
|
|
27
|
+
newrelic_home: {
|
|
28
|
+
env: 'NEW_RELIC_HOME',
|
|
29
|
+
default: null
|
|
163
30
|
},
|
|
164
31
|
|
|
165
32
|
/**
|
|
166
|
-
*
|
|
33
|
+
* Array of application names.
|
|
167
34
|
*/
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
* health status files to. Must be set for health monitoring to be
|
|
172
|
-
* enabled.
|
|
173
|
-
*/
|
|
174
|
-
delivery_location: {
|
|
175
|
-
default: 'file:///newrelic/apm/health'
|
|
35
|
+
app_name: {
|
|
36
|
+
formatter(val) {
|
|
37
|
+
return val.split(/[;,]/).map((k) => k.trim())
|
|
176
38
|
},
|
|
177
|
-
|
|
178
|
-
/**
|
|
179
|
-
* The time, in seconds, that the agent should wait between writing
|
|
180
|
-
* updates to its health status. The default interval is 5 seconds.
|
|
181
|
-
*/
|
|
182
|
-
frequency: {
|
|
183
|
-
formatter: int,
|
|
184
|
-
default: 5
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
},
|
|
188
|
-
|
|
189
|
-
/**
|
|
190
|
-
* The default Apdex tolerating / threshold value for applications, in
|
|
191
|
-
* seconds. The default for Node is apdexT to 100 milliseconds, which is
|
|
192
|
-
* lower than New Relic standard, but Node.js applications tend to be more
|
|
193
|
-
* latency-sensitive than most.
|
|
194
|
-
*
|
|
195
|
-
* NOTE: This setting can not be modified locally. Use server-side configuration
|
|
196
|
-
* to change your application's apdex.
|
|
197
|
-
*
|
|
198
|
-
* @see https://docs.newrelic.com/docs/apm/new-relic-apm/apdex/changing-your-apdex-settings
|
|
199
|
-
*/
|
|
200
|
-
apdex_t: {
|
|
201
|
-
formatter: float,
|
|
202
|
-
default: 0.1
|
|
203
|
-
},
|
|
204
|
-
/**
|
|
205
|
-
* When true, all request headers except for those listed in attributes.exclude
|
|
206
|
-
* will be captured for all traces, unless otherwise specified in a destination's
|
|
207
|
-
* attributes include/exclude lists.
|
|
208
|
-
*/
|
|
209
|
-
allow_all_headers: {
|
|
210
|
-
formatter: boolean,
|
|
211
|
-
default: false
|
|
212
|
-
},
|
|
213
|
-
|
|
214
|
-
/**
|
|
215
|
-
* If the data compression threshold is reached in the payload, the
|
|
216
|
-
* agent compresses data, using gzip compression by default. The
|
|
217
|
-
* config option `compressed_content_encoding` can be set to 'deflate'
|
|
218
|
-
* to use deflate compression.
|
|
219
|
-
*/
|
|
220
|
-
compressed_content_encoding: 'gzip',
|
|
221
|
-
|
|
222
|
-
/**
|
|
223
|
-
* Attributes are key-value pairs containing information that determines
|
|
224
|
-
* the properties of an event or transaction.
|
|
225
|
-
*/
|
|
226
|
-
attributes: {
|
|
227
|
-
/**
|
|
228
|
-
* If `true`, enables capture of attributes for all destinations.
|
|
229
|
-
* If there are specific parameters you want ignored, use `attributes.exclude`.
|
|
230
|
-
*/
|
|
231
|
-
enabled: {
|
|
232
|
-
formatter: boolean,
|
|
233
|
-
default: true
|
|
39
|
+
default: []
|
|
234
40
|
},
|
|
235
|
-
|
|
236
41
|
/**
|
|
237
|
-
*
|
|
238
|
-
* value. The default is 256 characters, with a maximum of 4,096.
|
|
42
|
+
* The user's license key. Must be set by per-app configuration file.
|
|
239
43
|
*/
|
|
240
|
-
|
|
241
|
-
formatter: int,
|
|
242
|
-
/**
|
|
243
|
-
* Maximum value is 4,096.
|
|
244
|
-
*/
|
|
245
|
-
default: 256
|
|
246
|
-
},
|
|
247
|
-
|
|
44
|
+
license_key: '',
|
|
248
45
|
/**
|
|
249
|
-
* Prefix of attributes to exclude from all destinations. Allows * as wildcard at end.
|
|
250
46
|
*
|
|
251
|
-
*
|
|
47
|
+
* Enables/Disables security policies. Paste your security policies
|
|
48
|
+
* token from the New Relic Admin below.
|
|
252
49
|
*/
|
|
253
|
-
|
|
254
|
-
formatter: array,
|
|
255
|
-
default: []
|
|
256
|
-
},
|
|
257
|
-
|
|
50
|
+
security_policies_token: '',
|
|
258
51
|
/**
|
|
259
|
-
*
|
|
52
|
+
* Hostname for the New Relic collector proxy.
|
|
260
53
|
*
|
|
261
|
-
*
|
|
54
|
+
* You shouldn't need to change this.
|
|
262
55
|
*/
|
|
263
|
-
|
|
264
|
-
formatter: array,
|
|
265
|
-
default: []
|
|
266
|
-
},
|
|
267
|
-
|
|
56
|
+
host: '',
|
|
268
57
|
/**
|
|
269
|
-
*
|
|
270
|
-
*
|
|
58
|
+
* Endpoint to send OpenTelemetry spans to.
|
|
59
|
+
*
|
|
60
|
+
* This should be automatically deduced from your region and other
|
|
61
|
+
* settings, but if desired, you can override it.
|
|
271
62
|
*/
|
|
272
|
-
|
|
273
|
-
formatter: boolean,
|
|
274
|
-
default: true
|
|
275
|
-
},
|
|
276
|
-
|
|
63
|
+
otlp_endpoint: '',
|
|
277
64
|
/**
|
|
278
|
-
*
|
|
279
|
-
*
|
|
280
|
-
*
|
|
65
|
+
* The port on which the collector proxy will be listening.
|
|
66
|
+
*
|
|
67
|
+
* You shouldn't need to change this.
|
|
281
68
|
*/
|
|
282
|
-
|
|
69
|
+
port: {
|
|
283
70
|
formatter: int,
|
|
284
|
-
default:
|
|
285
|
-
}
|
|
286
|
-
},
|
|
287
|
-
logging: {
|
|
288
|
-
/**
|
|
289
|
-
* Verbosity of the module's logging. This module uses bunyan
|
|
290
|
-
* (https://github.com/trentm/node-bunyan) for its logging, and as such the
|
|
291
|
-
* valid logging levels are 'fatal', 'error', 'warn', 'info', 'debug' and
|
|
292
|
-
* 'trace'. Logging at levels 'info' and higher is very terse. For support
|
|
293
|
-
* requests, attaching logs captured at 'trace' level are extremely helpful
|
|
294
|
-
* in chasing down bugs.
|
|
295
|
-
*/
|
|
296
|
-
level: {
|
|
297
|
-
default: 'info',
|
|
298
|
-
env: 'NEW_RELIC_LOG_LEVEL'
|
|
299
|
-
},
|
|
300
|
-
/**
|
|
301
|
-
* Where to put the log file -- by default just uses process.cwd +
|
|
302
|
-
* 'newrelic_agent.log'. A special case is a filepath of 'stdout',
|
|
303
|
-
* in which case all logging will go to stdout, or 'stderr', in which
|
|
304
|
-
* case all logging will go to stderr.
|
|
305
|
-
*/
|
|
306
|
-
filepath: {
|
|
307
|
-
default: require('path').join(process.cwd(), 'newrelic_agent.log'),
|
|
308
|
-
env: 'NEW_RELIC_LOG'
|
|
309
|
-
},
|
|
310
|
-
/**
|
|
311
|
-
* Whether to write to a log file at all
|
|
312
|
-
*/
|
|
313
|
-
enabled: {
|
|
314
|
-
formatter: boolean,
|
|
315
|
-
default: true,
|
|
316
|
-
env: 'NEW_RELIC_LOG_ENABLED'
|
|
317
|
-
},
|
|
318
|
-
|
|
319
|
-
/**
|
|
320
|
-
* Enables extra debugging at `warn` level. No need to enable except under
|
|
321
|
-
* specific debugging conditions.
|
|
322
|
-
*/
|
|
323
|
-
diagnostics: {
|
|
324
|
-
formatter: boolean,
|
|
325
|
-
deafult: false
|
|
326
|
-
}
|
|
327
|
-
},
|
|
328
|
-
audit_log: {
|
|
329
|
-
/**
|
|
330
|
-
* Enables logging of out bound traffic from the Agent to the Collector.
|
|
331
|
-
* This field is ignored if trace level logging is enabled.
|
|
332
|
-
* With trace logging, all traffic is logged.
|
|
333
|
-
*/
|
|
334
|
-
enabled: {
|
|
335
|
-
formatter: boolean,
|
|
336
|
-
default: false
|
|
71
|
+
default: 443
|
|
337
72
|
},
|
|
338
|
-
|
|
339
73
|
/**
|
|
340
|
-
*
|
|
341
|
-
*
|
|
342
|
-
*
|
|
343
|
-
* in the filter will be logged
|
|
344
|
-
* Methods include: error_data, metric_data, and analytic_event_data
|
|
74
|
+
* Whether or not to use SSL to connect to New Relic's servers.
|
|
75
|
+
*
|
|
76
|
+
* NOTE: This option can no longer be disabled.
|
|
345
77
|
*/
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
/**
|
|
352
|
-
* Whether to collect & submit error traces to New Relic.
|
|
353
|
-
*/
|
|
354
|
-
error_collector: {
|
|
355
|
-
attributes: {
|
|
356
|
-
/**
|
|
357
|
-
* If `true`, the agent captures attributes from error collection.
|
|
358
|
-
*/
|
|
359
|
-
enabled: {
|
|
360
|
-
formatter: boolean,
|
|
361
|
-
default: true
|
|
78
|
+
ssl: {
|
|
79
|
+
env: 'NEW_RELIC_USE_SSL',
|
|
80
|
+
formatter(_, logger) {
|
|
81
|
+
logger.warn('SSL config key can no longer be disabled, not updating.')
|
|
82
|
+
return true
|
|
362
83
|
},
|
|
363
|
-
/**
|
|
364
|
-
* Prefix of attributes to exclude from error collection.
|
|
365
|
-
* Allows * as wildcard at end.
|
|
366
|
-
*/
|
|
367
|
-
exclude: {
|
|
368
|
-
formatter: array,
|
|
369
|
-
default: []
|
|
370
|
-
},
|
|
371
|
-
/**
|
|
372
|
-
* Prefix of attributes to include in error collection.
|
|
373
|
-
* Allows * as wildcard at end.
|
|
374
|
-
*/
|
|
375
|
-
include: {
|
|
376
|
-
formatter: array,
|
|
377
|
-
default: []
|
|
378
|
-
}
|
|
379
|
-
},
|
|
380
|
-
/**
|
|
381
|
-
* Disabling the error tracer just means that errors aren't collected
|
|
382
|
-
* and sent to New Relic -- it DOES NOT remove any instrumentation.
|
|
383
|
-
*/
|
|
384
|
-
enabled: {
|
|
385
|
-
formatter: boolean,
|
|
386
84
|
default: true
|
|
387
85
|
},
|
|
388
86
|
/**
|
|
389
|
-
*
|
|
390
|
-
* Ignoring a status code means that the transaction is not renamed to
|
|
391
|
-
* match the code, and the request is not treated as an error by the error
|
|
392
|
-
* collector.
|
|
87
|
+
* Proxy url
|
|
393
88
|
*
|
|
394
|
-
*
|
|
395
|
-
*
|
|
89
|
+
* A proxy url can be used in place of setting
|
|
90
|
+
* proxy_host, proxy_port, proxy_user, and proxy_pass.
|
|
396
91
|
*
|
|
397
|
-
*
|
|
398
|
-
*/
|
|
399
|
-
ignore_status_codes: {
|
|
400
|
-
env: 'NEW_RELIC_ERROR_COLLECTOR_IGNORE_ERROR_CODES',
|
|
401
|
-
formatter: array,
|
|
402
|
-
default: [404]
|
|
403
|
-
},
|
|
404
|
-
/**
|
|
405
|
-
* Whether error events are collected.
|
|
406
|
-
*/
|
|
407
|
-
capture_events: {
|
|
408
|
-
formatter: boolean,
|
|
409
|
-
default: true
|
|
410
|
-
},
|
|
411
|
-
/**
|
|
412
|
-
* The agent will collect all error events up to this number per minute.
|
|
413
|
-
* If there are more than that, a statistical sampling will be collected.
|
|
414
|
-
* Currently this uses a priority sampling algorithm.
|
|
92
|
+
* e.g. http://user:pass@host:port/
|
|
415
93
|
*
|
|
416
|
-
*
|
|
417
|
-
* requirements of the agent as well as increasing the payload to the New
|
|
418
|
-
* Relic servers. The memory concerns are something you should consider for
|
|
419
|
-
* your own server's sake. The payload of events is compressed, but if it
|
|
420
|
-
* grows too large the New Relic servers may reject it.
|
|
94
|
+
* Setting proxy will override other proxy settings.
|
|
421
95
|
*/
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
default:
|
|
425
|
-
},
|
|
426
|
-
|
|
427
|
-
expected_classes: {
|
|
428
|
-
formatter: array,
|
|
429
|
-
default: [],
|
|
430
|
-
env: 'NEW_RELIC_ERROR_COLLECTOR_EXPECTED_ERRORS'
|
|
431
|
-
},
|
|
432
|
-
expected_messages: {
|
|
433
|
-
formatter: object,
|
|
434
|
-
default: {}
|
|
435
|
-
},
|
|
436
|
-
expected_status_codes: {
|
|
437
|
-
formatter: array,
|
|
438
|
-
default: [],
|
|
439
|
-
env: 'NEW_RELIC_ERROR_COLLECTOR_EXPECTED_ERROR_CODES'
|
|
440
|
-
},
|
|
441
|
-
ignore_classes: {
|
|
442
|
-
formatter: array,
|
|
443
|
-
default: [],
|
|
444
|
-
env: 'NEW_RELIC_ERROR_COLLECTOR_IGNORE_ERRORS'
|
|
96
|
+
proxy: {
|
|
97
|
+
env: 'NEW_RELIC_PROXY_URL',
|
|
98
|
+
default: ''
|
|
445
99
|
},
|
|
446
|
-
ignore_messages: {
|
|
447
|
-
formatter: object,
|
|
448
|
-
default: {}
|
|
449
|
-
}
|
|
450
|
-
},
|
|
451
|
-
/**
|
|
452
|
-
* Error message redaction
|
|
453
|
-
*
|
|
454
|
-
* Options regarding how the agent handles the redaction of error messages.
|
|
455
|
-
*
|
|
456
|
-
*/
|
|
457
|
-
strip_exception_messages: {
|
|
458
100
|
/**
|
|
459
|
-
*
|
|
460
|
-
* errors.
|
|
101
|
+
* Proxy host to use to connect to the internet.
|
|
461
102
|
*/
|
|
462
|
-
|
|
463
|
-
formatter: boolean,
|
|
464
|
-
default: false
|
|
465
|
-
}
|
|
466
|
-
},
|
|
467
|
-
cloud: {
|
|
468
|
-
aws: {
|
|
469
|
-
/**
|
|
470
|
-
* The AWS account ID for the AWS account associated with this app.
|
|
471
|
-
*/
|
|
472
|
-
account_id: {
|
|
473
|
-
formatter: int,
|
|
474
|
-
default: null
|
|
475
|
-
}
|
|
476
|
-
}
|
|
477
|
-
},
|
|
478
|
-
/**
|
|
479
|
-
* Options regarding collecting system information. Used for system
|
|
480
|
-
* utilization based pricing scheme.
|
|
481
|
-
*/
|
|
482
|
-
utilization: {
|
|
103
|
+
proxy_host: '',
|
|
483
104
|
/**
|
|
484
|
-
*
|
|
485
|
-
* to get info about the vm the process is running on.
|
|
105
|
+
* Proxy port to use to connect to the internet.
|
|
486
106
|
*/
|
|
487
|
-
|
|
488
|
-
formatter: boolean,
|
|
489
|
-
default: true
|
|
490
|
-
},
|
|
107
|
+
proxy_port: '',
|
|
491
108
|
/**
|
|
492
|
-
*
|
|
493
|
-
* the process is running on Pivotal Cloud Foundry.
|
|
109
|
+
* Proxy user name when required.
|
|
494
110
|
*/
|
|
495
|
-
|
|
496
|
-
formatter: boolean,
|
|
497
|
-
default: true
|
|
498
|
-
},
|
|
111
|
+
proxy_user: '',
|
|
499
112
|
/**
|
|
500
|
-
*
|
|
501
|
-
* get info about the vm the process is running on.
|
|
113
|
+
* Proxy password when required.
|
|
502
114
|
*/
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
115
|
+
proxy_pass: '',
|
|
116
|
+
// Serverless DT config defaults
|
|
117
|
+
trusted_account_key: {
|
|
118
|
+
default: null
|
|
506
119
|
},
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
formatter: boolean,
|
|
513
|
-
default: true
|
|
120
|
+
primary_application_id: {
|
|
121
|
+
default: null
|
|
122
|
+
},
|
|
123
|
+
account_id: {
|
|
124
|
+
default: null
|
|
514
125
|
},
|
|
515
126
|
/**
|
|
516
|
-
*
|
|
517
|
-
*
|
|
127
|
+
* Custom SSL certificates
|
|
128
|
+
*
|
|
129
|
+
* If your proxy uses a custom SSL certificate, you can add the CA text to
|
|
130
|
+
* this array, one entry per certificate.
|
|
131
|
+
*
|
|
132
|
+
* The easiest way to do this is with `fs.readFileSync` e.g.
|
|
133
|
+
*
|
|
134
|
+
* certificates: [
|
|
135
|
+
* require('fs').readFileSync('custom.crt', 'utf8') // don't forget the utf8
|
|
136
|
+
* ]
|
|
518
137
|
*
|
|
519
|
-
* env NEW_RELIC_UTILIZATION_DETECT_DOCKER
|
|
520
138
|
*/
|
|
521
|
-
|
|
522
|
-
formatter:
|
|
523
|
-
default:
|
|
139
|
+
certificates: {
|
|
140
|
+
formatter: array,
|
|
141
|
+
default: []
|
|
524
142
|
},
|
|
525
|
-
|
|
526
143
|
/**
|
|
527
|
-
*
|
|
528
|
-
* to get info about the vm the process is running on.
|
|
144
|
+
* Whether the module is enabled.
|
|
529
145
|
*/
|
|
530
|
-
|
|
146
|
+
agent_enabled: {
|
|
147
|
+
env: 'NEW_RELIC_ENABLED',
|
|
531
148
|
formatter: boolean,
|
|
532
149
|
default: true
|
|
533
150
|
},
|
|
534
151
|
|
|
535
152
|
/**
|
|
536
|
-
*
|
|
537
|
-
*
|
|
153
|
+
* Collects configuration related to New Relic Agent Control, i.e. centralized
|
|
154
|
+
* agent management in container based environments.
|
|
538
155
|
*/
|
|
539
|
-
|
|
540
|
-
formatter: boolean,
|
|
541
|
-
default: true
|
|
542
|
-
},
|
|
543
|
-
logical_processors: {
|
|
544
|
-
formatter: float,
|
|
545
|
-
default: null
|
|
546
|
-
},
|
|
547
|
-
billing_hostname: {
|
|
548
|
-
default: null
|
|
549
|
-
},
|
|
550
|
-
total_ram_mib: {
|
|
551
|
-
formatter: int,
|
|
552
|
-
default: null
|
|
553
|
-
},
|
|
554
|
-
|
|
156
|
+
agent_control: {
|
|
555
157
|
/**
|
|
556
|
-
*
|
|
557
|
-
* to
|
|
158
|
+
* Indicates that the agent is being managed by Agent Control. Must be set
|
|
159
|
+
* to true health monitoring.
|
|
558
160
|
*/
|
|
559
|
-
gcp_use_instance_as_host: {
|
|
560
|
-
default: true,
|
|
561
|
-
formatter: boolean
|
|
562
|
-
}
|
|
563
|
-
},
|
|
564
|
-
transaction_tracer: {
|
|
565
|
-
attributes: {
|
|
566
|
-
/**
|
|
567
|
-
* If `true`, the agent captures attributes from transaction traces.
|
|
568
|
-
*/
|
|
569
161
|
enabled: {
|
|
570
162
|
formatter: boolean,
|
|
571
|
-
default:
|
|
163
|
+
default: false
|
|
572
164
|
},
|
|
165
|
+
|
|
573
166
|
/**
|
|
574
|
-
*
|
|
575
|
-
* Allows * as wildcard at end.
|
|
167
|
+
* Settings specific to the health monitoring aspect of Agent Control.
|
|
576
168
|
*/
|
|
577
|
-
|
|
578
|
-
formatter: array,
|
|
579
|
-
default: []
|
|
580
|
-
},
|
|
169
|
+
health: {
|
|
581
170
|
/**
|
|
582
|
-
*
|
|
583
|
-
*
|
|
171
|
+
* A string file path to a directory that the agent is expected to write
|
|
172
|
+
* health status files to. Must be set for health monitoring to be
|
|
173
|
+
* enabled.
|
|
584
174
|
*/
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
175
|
+
delivery_location: {
|
|
176
|
+
default: 'file:///newrelic/apm/health'
|
|
177
|
+
},
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* The time, in seconds, that the agent should wait between writing
|
|
181
|
+
* updates to its health status. The default interval is 5 seconds.
|
|
182
|
+
*/
|
|
183
|
+
frequency: {
|
|
184
|
+
formatter: int,
|
|
185
|
+
default: 5
|
|
186
|
+
}
|
|
588
187
|
}
|
|
589
188
|
},
|
|
189
|
+
|
|
590
190
|
/**
|
|
591
|
-
*
|
|
592
|
-
*
|
|
593
|
-
*
|
|
594
|
-
*
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
default: true,
|
|
599
|
-
env: 'NEW_RELIC_TRACER_ENABLED'
|
|
600
|
-
},
|
|
601
|
-
/**
|
|
602
|
-
* Sets the time, in seconds, for a transaction to be considered slow.
|
|
603
|
-
* When a transaction exceeds this threshold, a transaction trace will be recorded. When set to 'apdex_f', the threshold will be set to
|
|
604
|
-
* 4 * apdex_t, which with a default apdex_t value of 500 milliseconds will
|
|
605
|
-
* be 2 seconds.
|
|
191
|
+
* The default Apdex tolerating / threshold value for applications, in
|
|
192
|
+
* seconds. The default for Node is apdexT to 100 milliseconds, which is
|
|
193
|
+
* lower than New Relic standard, but Node.js applications tend to be more
|
|
194
|
+
* latency-sensitive than most.
|
|
195
|
+
*
|
|
196
|
+
* NOTE: This setting can not be modified locally. Use server-side configuration
|
|
197
|
+
* to change your application's apdex.
|
|
606
198
|
*
|
|
607
|
-
*
|
|
199
|
+
* @see https://docs.newrelic.com/docs/apm/new-relic-apm/apdex/changing-your-apdex-settings
|
|
608
200
|
*/
|
|
609
|
-
|
|
201
|
+
apdex_t: {
|
|
610
202
|
formatter: float,
|
|
611
|
-
default:
|
|
612
|
-
env: 'NEW_RELIC_TRACER_THRESHOLD'
|
|
203
|
+
default: 0.1
|
|
613
204
|
},
|
|
614
205
|
/**
|
|
615
|
-
*
|
|
616
|
-
*
|
|
617
|
-
*
|
|
618
|
-
*
|
|
619
|
-
* Transactions are named based on the request (see the README for the
|
|
620
|
-
* details of how requests are mapped to transactions), and top_n refers to
|
|
621
|
-
* the "top n slowest transactions" grouped by these names. The module will
|
|
622
|
-
* only replace a recorded trace with a new trace if the new trace is
|
|
623
|
-
* slower than the previous slowest trace of that name. The default value
|
|
624
|
-
* for this setting is 20, as the transaction trace view page also defaults
|
|
625
|
-
* to showing the 20 slowest transactions.
|
|
626
|
-
*
|
|
627
|
-
* If you want to record the absolute slowest transaction over the last
|
|
628
|
-
* minute, set top_n to 0 or 1. This used to be the default, and has a
|
|
629
|
-
* problem in that it will allow one very slow route to dominate your slow
|
|
630
|
-
* transaction traces.
|
|
631
|
-
*
|
|
632
|
-
* The module will always record at least 5 different slow transactions in
|
|
633
|
-
* the reporting periods after it starts up, and will reset its internal
|
|
634
|
-
* slow trace aggregator if no slow transactions have been recorded for the
|
|
635
|
-
* last 5 harvest cycles, restarting the aggregation process.
|
|
636
|
-
*
|
|
637
|
-
* env NEW_RELIC_TRACER_TOP_N
|
|
206
|
+
* When true, all request headers except for those listed in attributes.exclude
|
|
207
|
+
* will be captured for all traces, unless otherwise specified in a destination's
|
|
208
|
+
* attributes include/exclude lists.
|
|
638
209
|
*/
|
|
639
|
-
|
|
640
|
-
formatter:
|
|
641
|
-
default:
|
|
642
|
-
env: 'NEW_RELIC_TRACER_TOP_N'
|
|
210
|
+
allow_all_headers: {
|
|
211
|
+
formatter: boolean,
|
|
212
|
+
default: false
|
|
643
213
|
},
|
|
644
214
|
|
|
645
215
|
/**
|
|
646
|
-
*
|
|
647
|
-
*
|
|
648
|
-
*
|
|
649
|
-
*
|
|
650
|
-
* or 'obfuscated' and other criteria (slow_sql.enabled etc) are met
|
|
651
|
-
* for a query. The raw or obfuscated sql will be included in the
|
|
652
|
-
* transaction trace and a slow query sample will be collected.
|
|
216
|
+
* If the data compression threshold is reached in the payload, the
|
|
217
|
+
* agent compresses data, using gzip compression by default. The
|
|
218
|
+
* config option `compressed_content_encoding` can be set to 'deflate'
|
|
219
|
+
* to use deflate compression.
|
|
653
220
|
*/
|
|
654
|
-
|
|
655
|
-
formatter: allowList.bind(null, ['off', 'obfuscated', 'raw']),
|
|
656
|
-
default: 'obfuscated',
|
|
657
|
-
env: 'NEW_RELIC_RECORD_SQL'
|
|
658
|
-
},
|
|
221
|
+
compressed_content_encoding: 'gzip',
|
|
659
222
|
|
|
660
223
|
/**
|
|
661
|
-
*
|
|
662
|
-
*
|
|
663
|
-
* to be considered for for slow query and inclusion in transaction traces.
|
|
664
|
-
*/
|
|
665
|
-
explain_threshold: {
|
|
666
|
-
formatter: int,
|
|
667
|
-
default: 500,
|
|
668
|
-
env: 'NEW_RELIC_EXPLAIN_THRESHOLD'
|
|
669
|
-
}
|
|
670
|
-
},
|
|
671
|
-
/**
|
|
672
|
-
* Rules for naming or ignoring transactions.
|
|
673
|
-
*/
|
|
674
|
-
rules: {
|
|
675
|
-
/**
|
|
676
|
-
* A list of rules of the format {pattern: 'pattern', name: 'name'} for
|
|
677
|
-
* matching incoming request URLs and naming the associated New Relic
|
|
678
|
-
* transactions. Both pattern and name are required. Additional attributes
|
|
679
|
-
* are ignored. Patterns may have capture groups (following JavaScript
|
|
680
|
-
* conventions), and names will use $1-style replacement strings. See
|
|
681
|
-
* the documentation for addNamingRule for important caveats.
|
|
224
|
+
* Attributes are key-value pairs containing information that determines
|
|
225
|
+
* the properties of an event or transaction.
|
|
682
226
|
*/
|
|
683
|
-
|
|
684
|
-
formatter: objectList,
|
|
685
|
-
default: [],
|
|
686
|
-
env: 'NEW_RELIC_NAMING_RULES'
|
|
687
|
-
},
|
|
227
|
+
attributes: {
|
|
688
228
|
/**
|
|
689
|
-
*
|
|
690
|
-
*
|
|
691
|
-
*
|
|
692
|
-
* By default, socket.io long-polling is ignored.
|
|
693
|
-
*
|
|
694
|
-
* env NEW_RELIC_IGNORING_RULES
|
|
229
|
+
* If `true`, enables capture of attributes for all destinations.
|
|
230
|
+
* If there are specific parameters you want ignored, use `attributes.exclude`.
|
|
695
231
|
*/
|
|
696
|
-
ignore: {
|
|
697
|
-
formatter: array,
|
|
698
|
-
default: ['^/socket.io/.*/xhr-polling/'],
|
|
699
|
-
env: 'NEW_RELIC_IGNORING_RULES'
|
|
700
|
-
}
|
|
701
|
-
},
|
|
702
|
-
/**
|
|
703
|
-
* By default, any transactions that are not affected by other bits of
|
|
704
|
-
* naming logic (the API, rules, or metric normalization rules) will
|
|
705
|
-
* have their names set to 'NormalizedUri/*'. Setting this value to
|
|
706
|
-
* false will set them instead to Uri/path/to/resource. Don't change
|
|
707
|
-
* this setting unless you understand the implications of New Relic's
|
|
708
|
-
* metric grouping issues and are confident your application isn't going
|
|
709
|
-
* to run afoul of them. Your application could end up getting blocked!
|
|
710
|
-
* Nobody wants that.
|
|
711
|
-
*/
|
|
712
|
-
enforce_backstop: {
|
|
713
|
-
formatter: boolean,
|
|
714
|
-
default: true
|
|
715
|
-
},
|
|
716
|
-
/**
|
|
717
|
-
* Browser Monitoring
|
|
718
|
-
*
|
|
719
|
-
* Browser monitoring lets you correlate transactions between the server and browser
|
|
720
|
-
* giving you accurate data on how long a page request takes, from request,
|
|
721
|
-
* through the server response, up until the actual page render completes.
|
|
722
|
-
*/
|
|
723
|
-
browser_monitoring: {
|
|
724
|
-
attributes: {
|
|
725
|
-
/**
|
|
726
|
-
* If `true`, the agent captures attributes from browser monitoring.
|
|
727
|
-
*/
|
|
728
232
|
enabled: {
|
|
729
233
|
formatter: boolean,
|
|
730
|
-
default:
|
|
234
|
+
default: true
|
|
731
235
|
},
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* Defines the number of characters allowed for each individual attribute's
|
|
239
|
+
* value. The default is 256 characters, with a maximum of 4,096.
|
|
240
|
+
*/
|
|
241
|
+
value_size_limit: {
|
|
242
|
+
formatter: int,
|
|
243
|
+
/**
|
|
244
|
+
* Maximum value is 4,096.
|
|
245
|
+
*/
|
|
246
|
+
default: 256
|
|
247
|
+
},
|
|
248
|
+
|
|
732
249
|
/**
|
|
733
|
-
* Prefix of attributes to exclude from
|
|
734
|
-
*
|
|
250
|
+
* Prefix of attributes to exclude from all destinations. Allows * as wildcard at end.
|
|
251
|
+
*
|
|
252
|
+
* NOTE: If excluding headers, they must be in camelCase form to be filtered.
|
|
735
253
|
*/
|
|
736
254
|
exclude: {
|
|
737
255
|
formatter: array,
|
|
738
256
|
default: []
|
|
739
257
|
},
|
|
258
|
+
|
|
740
259
|
/**
|
|
741
|
-
* Prefix of attributes to include in
|
|
742
|
-
*
|
|
260
|
+
* Prefix of attributes to include in all destinations. Allows * as wildcard at end.
|
|
261
|
+
*
|
|
262
|
+
* NOTE: If including headers, they must be in camelCase form to be filtered.
|
|
743
263
|
*/
|
|
744
264
|
include: {
|
|
745
265
|
formatter: array,
|
|
746
266
|
default: []
|
|
747
|
-
}
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
* This script must be manually injected into your templates, as high as possible
|
|
768
|
-
* in the header, but _after_ any X-UA-COMPATIBLE HTTP-EQUIV meta tags.
|
|
769
|
-
* Otherwise you may hurt IE!
|
|
770
|
-
*
|
|
771
|
-
* This method must be called _during_ a transaction, and must be called every
|
|
772
|
-
* time you want to generate the headers.
|
|
773
|
-
*
|
|
774
|
-
* Do *not* reuse the headers between users, or even between requests.
|
|
775
|
-
*/
|
|
776
|
-
enable: {
|
|
777
|
-
formatter: boolean,
|
|
778
|
-
default: true,
|
|
779
|
-
env: 'NEW_RELIC_BROWSER_MONITOR_ENABLE'
|
|
267
|
+
},
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* If `true`, patterns may be added to the `attributes.include`
|
|
271
|
+
* list.
|
|
272
|
+
*/
|
|
273
|
+
include_enabled: {
|
|
274
|
+
formatter: boolean,
|
|
275
|
+
default: true
|
|
276
|
+
},
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* Controls how many attribute include/exclude rule results are cached by
|
|
280
|
+
* the filter. Increasing this limit will cause greater memory usage and is
|
|
281
|
+
* only necessary if you have an extremely high variety of attributes.
|
|
282
|
+
*/
|
|
283
|
+
filter_cache_limit: {
|
|
284
|
+
formatter: int,
|
|
285
|
+
default: 1000
|
|
286
|
+
}
|
|
780
287
|
},
|
|
288
|
+
logging: {
|
|
781
289
|
/**
|
|
782
|
-
*
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
}
|
|
789
|
-
},
|
|
790
|
-
/**
|
|
791
|
-
* API Configuration
|
|
792
|
-
*
|
|
793
|
-
* Some API end points can be turned off via configuration settings to
|
|
794
|
-
* allow for more flexible security options. All API configuration
|
|
795
|
-
* options are disabled when high-security mode is enabled.
|
|
796
|
-
*/
|
|
797
|
-
api: {
|
|
798
|
-
/**
|
|
799
|
-
* Controls for the `API.addCustomAttribute` method.
|
|
290
|
+
* Verbosity of the module's logging. This module uses bunyan
|
|
291
|
+
* (https://github.com/trentm/node-bunyan) for its logging, and as such the
|
|
292
|
+
* valid logging levels are 'fatal', 'error', 'warn', 'info', 'debug' and
|
|
293
|
+
* 'trace'. Logging at levels 'info' and higher is very terse. For support
|
|
294
|
+
* requests, attaching logs captured at 'trace' level are extremely helpful
|
|
295
|
+
* in chasing down bugs.
|
|
800
296
|
*/
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
297
|
+
level: {
|
|
298
|
+
default: 'info',
|
|
299
|
+
env: 'NEW_RELIC_LOG_LEVEL'
|
|
300
|
+
},
|
|
301
|
+
/**
|
|
302
|
+
* Where to put the log file -- by default just uses process.cwd +
|
|
303
|
+
* 'newrelic_agent.log'. A special case is a filepath of 'stdout',
|
|
304
|
+
* in which case all logging will go to stdout, or 'stderr', in which
|
|
305
|
+
* case all logging will go to stderr.
|
|
306
|
+
*/
|
|
307
|
+
filepath: {
|
|
308
|
+
default: require('path').join(process.cwd(), 'newrelic_agent.log'),
|
|
309
|
+
env: 'NEW_RELIC_LOG'
|
|
310
|
+
},
|
|
311
|
+
/**
|
|
312
|
+
* Whether to write to a log file at all
|
|
313
|
+
*/
|
|
314
|
+
enabled: {
|
|
315
|
+
formatter: boolean,
|
|
316
|
+
default: true,
|
|
317
|
+
env: 'NEW_RELIC_LOG_ENABLED'
|
|
318
|
+
},
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* Enables extra debugging at `warn` level. No need to enable except under
|
|
322
|
+
* specific debugging conditions.
|
|
323
|
+
*/
|
|
324
|
+
diagnostics: {
|
|
325
|
+
formatter: boolean,
|
|
326
|
+
deafult: false
|
|
327
|
+
}
|
|
805
328
|
},
|
|
329
|
+
audit_log: {
|
|
806
330
|
/**
|
|
807
|
-
*
|
|
331
|
+
* Enables logging of out bound traffic from the Agent to the Collector.
|
|
332
|
+
* This field is ignored if trace level logging is enabled.
|
|
333
|
+
* With trace logging, all traffic is logged.
|
|
808
334
|
*/
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
335
|
+
enabled: {
|
|
336
|
+
formatter: boolean,
|
|
337
|
+
default: false
|
|
338
|
+
},
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* Specify which methods are logged. Used in conjunction with the audit_log flag
|
|
342
|
+
* If audit_log is enabled and this property is empty, all methods will be logged
|
|
343
|
+
* Otherwise, if the audit log is enabled, only the methods specified
|
|
344
|
+
* in the filter will be logged
|
|
345
|
+
* Methods include: error_data, metric_data, and analytic_event_data
|
|
346
|
+
*/
|
|
347
|
+
endpoints: {
|
|
348
|
+
formatter: array,
|
|
349
|
+
default: []
|
|
350
|
+
}
|
|
813
351
|
},
|
|
814
352
|
/**
|
|
815
|
-
*
|
|
353
|
+
* Whether to collect & submit error traces to New Relic.
|
|
816
354
|
*/
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
default: true,
|
|
820
|
-
env: 'NEW_RELIC_API_NOTICE_ERROR'
|
|
821
|
-
}
|
|
822
|
-
},
|
|
823
|
-
/**
|
|
824
|
-
* Transaction Events
|
|
825
|
-
*
|
|
826
|
-
* Transaction events are sent to New Relic Insights. This event data
|
|
827
|
-
* includes transaction timing, transaction name, and any custom parameters.
|
|
828
|
-
*
|
|
829
|
-
* Read more here: http://newrelic.com/insights
|
|
830
|
-
*/
|
|
831
|
-
transaction_events: {
|
|
832
|
-
attributes: {
|
|
355
|
+
error_collector: {
|
|
356
|
+
attributes: {
|
|
833
357
|
/**
|
|
834
|
-
* If `true`, the agent captures attributes from
|
|
358
|
+
* If `true`, the agent captures attributes from error collection.
|
|
359
|
+
*/
|
|
360
|
+
enabled: {
|
|
361
|
+
formatter: boolean,
|
|
362
|
+
default: true
|
|
363
|
+
},
|
|
364
|
+
/**
|
|
365
|
+
* Prefix of attributes to exclude from error collection.
|
|
366
|
+
* Allows * as wildcard at end.
|
|
367
|
+
*/
|
|
368
|
+
exclude: {
|
|
369
|
+
formatter: array,
|
|
370
|
+
default: []
|
|
371
|
+
},
|
|
372
|
+
/**
|
|
373
|
+
* Prefix of attributes to include in error collection.
|
|
374
|
+
* Allows * as wildcard at end.
|
|
375
|
+
*/
|
|
376
|
+
include: {
|
|
377
|
+
formatter: array,
|
|
378
|
+
default: []
|
|
379
|
+
}
|
|
380
|
+
},
|
|
381
|
+
/**
|
|
382
|
+
* Disabling the error tracer just means that errors aren't collected
|
|
383
|
+
* and sent to New Relic -- it DOES NOT remove any instrumentation.
|
|
835
384
|
*/
|
|
836
385
|
enabled: {
|
|
837
386
|
formatter: boolean,
|
|
838
387
|
default: true
|
|
839
388
|
},
|
|
840
389
|
/**
|
|
841
|
-
*
|
|
842
|
-
*
|
|
390
|
+
* List of HTTP error status codes the error tracer should disregard.
|
|
391
|
+
* Ignoring a status code means that the transaction is not renamed to
|
|
392
|
+
* match the code, and the request is not treated as an error by the error
|
|
393
|
+
* collector.
|
|
843
394
|
*
|
|
844
|
-
*
|
|
395
|
+
* NOTE: This configuration value has no effect on errors recorded using
|
|
396
|
+
* `noticeError()`.
|
|
397
|
+
*
|
|
398
|
+
* Defaults to 404 NOT FOUND.
|
|
845
399
|
*/
|
|
846
|
-
|
|
400
|
+
ignore_status_codes: {
|
|
401
|
+
env: 'NEW_RELIC_ERROR_COLLECTOR_IGNORE_ERROR_CODES',
|
|
847
402
|
formatter: array,
|
|
848
|
-
default: []
|
|
403
|
+
default: [404]
|
|
404
|
+
},
|
|
405
|
+
/**
|
|
406
|
+
* Whether error events are collected.
|
|
407
|
+
*/
|
|
408
|
+
capture_events: {
|
|
409
|
+
formatter: boolean,
|
|
410
|
+
default: true
|
|
849
411
|
},
|
|
850
412
|
/**
|
|
851
|
-
*
|
|
852
|
-
*
|
|
413
|
+
* The agent will collect all error events up to this number per minute.
|
|
414
|
+
* If there are more than that, a statistical sampling will be collected.
|
|
415
|
+
* Currently this uses a priority sampling algorithm.
|
|
853
416
|
*
|
|
854
|
-
*
|
|
417
|
+
* By increasing this setting you are both increasing the memory
|
|
418
|
+
* requirements of the agent as well as increasing the payload to the New
|
|
419
|
+
* Relic servers. The memory concerns are something you should consider for
|
|
420
|
+
* your own server's sake. The payload of events is compressed, but if it
|
|
421
|
+
* grows too large the New Relic servers may reject it.
|
|
855
422
|
*/
|
|
856
|
-
|
|
423
|
+
max_event_samples_stored: {
|
|
424
|
+
formatter: int,
|
|
425
|
+
default: 100
|
|
426
|
+
},
|
|
427
|
+
|
|
428
|
+
expected_classes: {
|
|
857
429
|
formatter: array,
|
|
858
|
-
default: []
|
|
430
|
+
default: [],
|
|
431
|
+
env: 'NEW_RELIC_ERROR_COLLECTOR_EXPECTED_ERRORS'
|
|
432
|
+
},
|
|
433
|
+
expected_messages: {
|
|
434
|
+
formatter: object,
|
|
435
|
+
default: {}
|
|
436
|
+
},
|
|
437
|
+
expected_status_codes: {
|
|
438
|
+
formatter: array,
|
|
439
|
+
default: [],
|
|
440
|
+
env: 'NEW_RELIC_ERROR_COLLECTOR_EXPECTED_ERROR_CODES'
|
|
441
|
+
},
|
|
442
|
+
ignore_classes: {
|
|
443
|
+
formatter: array,
|
|
444
|
+
default: [],
|
|
445
|
+
env: 'NEW_RELIC_ERROR_COLLECTOR_IGNORE_ERRORS'
|
|
446
|
+
},
|
|
447
|
+
ignore_messages: {
|
|
448
|
+
formatter: object,
|
|
449
|
+
default: {}
|
|
859
450
|
}
|
|
860
451
|
},
|
|
861
452
|
/**
|
|
862
|
-
*
|
|
863
|
-
*
|
|
864
|
-
|
|
865
|
-
enabled: {
|
|
866
|
-
formatter: boolean,
|
|
867
|
-
default: true
|
|
868
|
-
},
|
|
869
|
-
/**
|
|
870
|
-
* The agent will collect all events up to this number per minute. If
|
|
871
|
-
* there are more than that, a statistical sampling will be collected.
|
|
872
|
-
*/
|
|
873
|
-
max_samples_stored: {
|
|
874
|
-
formatter: int,
|
|
875
|
-
default: 10000
|
|
876
|
-
}
|
|
877
|
-
},
|
|
878
|
-
/**
|
|
879
|
-
* Custom Insights Events
|
|
880
|
-
*
|
|
881
|
-
* Custom insights events are JSON object that are sent to New Relic
|
|
882
|
-
* Insights. You can tell the agent to send your custom events via the
|
|
883
|
-
* `newrelic.recordCustomEvent()` API. These events are sampled once the max
|
|
884
|
-
* queue size is reached. You can tune this setting below.
|
|
885
|
-
*
|
|
886
|
-
* Read more here: http://newrelic.com/insights
|
|
887
|
-
*/
|
|
888
|
-
custom_insights_events: {
|
|
889
|
-
/**
|
|
890
|
-
* If this is disabled, the agent does not collect, nor try to send, custom
|
|
891
|
-
* event data.
|
|
892
|
-
*/
|
|
893
|
-
enabled: {
|
|
894
|
-
formatter: boolean,
|
|
895
|
-
default: true
|
|
896
|
-
},
|
|
897
|
-
/**
|
|
898
|
-
* The agent will collect all events up to this number per minute. If there
|
|
899
|
-
* are more than that, a statistical sampling will be collected. Currently
|
|
900
|
-
* this uses a priority sampling algorithm.
|
|
453
|
+
* Error message redaction
|
|
454
|
+
*
|
|
455
|
+
* Options regarding how the agent handles the redaction of error messages.
|
|
901
456
|
*
|
|
902
|
-
* By increasing this setting you are both increasing the memory
|
|
903
|
-
* requirements of the agent as well as increasing the payload to the New
|
|
904
|
-
* Relic servers. The memory concerns are something you should consider for
|
|
905
|
-
* your own server's sake. The payload of events is compressed, but if it
|
|
906
|
-
* grows too large the New Relic servers may reject it.
|
|
907
457
|
*/
|
|
908
|
-
|
|
909
|
-
formatter: int,
|
|
910
|
-
default: 3000
|
|
911
|
-
}
|
|
912
|
-
},
|
|
913
|
-
/**
|
|
914
|
-
* This is used to configure properties about the user's host name.
|
|
915
|
-
*/
|
|
916
|
-
process_host: {
|
|
458
|
+
strip_exception_messages: {
|
|
917
459
|
/**
|
|
918
|
-
*
|
|
460
|
+
* When `true`, the agent will redact the messages of captured
|
|
461
|
+
* errors.
|
|
919
462
|
*/
|
|
920
|
-
|
|
463
|
+
enabled: {
|
|
464
|
+
formatter: boolean,
|
|
465
|
+
default: false
|
|
466
|
+
}
|
|
467
|
+
},
|
|
468
|
+
cloud: {
|
|
469
|
+
aws: {
|
|
470
|
+
/**
|
|
471
|
+
* The AWS account ID for the AWS account associated with this app.
|
|
472
|
+
*/
|
|
473
|
+
account_id: {
|
|
474
|
+
formatter: int,
|
|
475
|
+
default: null
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
},
|
|
921
479
|
/**
|
|
922
|
-
*
|
|
480
|
+
* Options regarding collecting system information. Used for system
|
|
481
|
+
* utilization based pricing scheme.
|
|
923
482
|
*/
|
|
924
|
-
|
|
925
|
-
formatter: allowList.bind(null, ['4', '6']),
|
|
926
|
-
default: '4',
|
|
927
|
-
env: 'NEW_RELIC_IPV_PREFERENCE'
|
|
928
|
-
}
|
|
929
|
-
},
|
|
930
|
-
/**
|
|
931
|
-
* High Security
|
|
932
|
-
*
|
|
933
|
-
* High security mode (v2) is a setting which prevents any sensitive data from
|
|
934
|
-
* being sent to New Relic. The local setting must match the server setting.
|
|
935
|
-
* If there is a mismatch the agent will log a message and act as if it is
|
|
936
|
-
* disabled.
|
|
937
|
-
*
|
|
938
|
-
* Attributes of high security mode (when enabled):
|
|
939
|
-
* requires SSL
|
|
940
|
-
* does not allow capturing of http params
|
|
941
|
-
* does not allow custom params
|
|
942
|
-
*
|
|
943
|
-
* To read more see: https://docs.newrelic.com/docs/subscriptions/high-security
|
|
944
|
-
*/
|
|
945
|
-
high_security: {
|
|
946
|
-
formatter: boolean,
|
|
947
|
-
default: false
|
|
948
|
-
},
|
|
949
|
-
|
|
950
|
-
/**
|
|
951
|
-
* Labels
|
|
952
|
-
*
|
|
953
|
-
* An object of label names and values that will be applied to the data sent
|
|
954
|
-
* from this agent. Both label names and label values have a maximum length of
|
|
955
|
-
* 255 characters. This object should contain at most 64 labels.
|
|
956
|
-
*/
|
|
957
|
-
labels: {
|
|
958
|
-
default: {}
|
|
959
|
-
},
|
|
960
|
-
/**
|
|
961
|
-
* These options control behavior for slow queries, but do not affect sql
|
|
962
|
-
* nodes in transaction traces.
|
|
963
|
-
*/
|
|
964
|
-
slow_sql: {
|
|
483
|
+
utilization: {
|
|
965
484
|
/**
|
|
966
|
-
*
|
|
485
|
+
* This flag dictates whether the agent attempts to reach out to AWS
|
|
486
|
+
* to get info about the vm the process is running on.
|
|
967
487
|
*/
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
488
|
+
detect_aws: {
|
|
489
|
+
formatter: boolean,
|
|
490
|
+
default: true
|
|
491
|
+
},
|
|
492
|
+
/**
|
|
493
|
+
* This flag dictates whether the agent attempts to detect if the
|
|
494
|
+
* the process is running on Pivotal Cloud Foundry.
|
|
495
|
+
*/
|
|
496
|
+
detect_pcf: {
|
|
497
|
+
formatter: boolean,
|
|
498
|
+
default: true
|
|
499
|
+
},
|
|
500
|
+
/**
|
|
501
|
+
* This flag dictates whether the agent attempts to reach out to Azure to
|
|
502
|
+
* get info about the vm the process is running on.
|
|
503
|
+
*/
|
|
504
|
+
detect_azure: {
|
|
505
|
+
formatter: boolean,
|
|
506
|
+
default: true
|
|
507
|
+
},
|
|
508
|
+
/**
|
|
509
|
+
* This flag dictates whether the agent attempts to read environment variables
|
|
510
|
+
* and invocation context to get info about the Azure Function called.
|
|
511
|
+
*/
|
|
512
|
+
detect_azurefunction: {
|
|
513
|
+
formatter: boolean,
|
|
514
|
+
default: true
|
|
515
|
+
},
|
|
516
|
+
/**
|
|
517
|
+
* This flag dictates whether the agent attempts to read files
|
|
518
|
+
* to get info about the container the process is running in.
|
|
519
|
+
*
|
|
520
|
+
* env NEW_RELIC_UTILIZATION_DETECT_DOCKER
|
|
521
|
+
*/
|
|
522
|
+
detect_docker: {
|
|
523
|
+
formatter: boolean,
|
|
524
|
+
default: true
|
|
525
|
+
},
|
|
972
526
|
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
*/
|
|
979
|
-
max_samples: {
|
|
980
|
-
formatter: int,
|
|
981
|
-
default: 10,
|
|
982
|
-
env: 'NEW_RELIC_MAX_SQL_SAMPLES'
|
|
983
|
-
}
|
|
984
|
-
},
|
|
985
|
-
/**
|
|
986
|
-
* Controls behavior of datastore instance metrics.
|
|
987
|
-
*
|
|
988
|
-
* @property {object} instance_reporting container around enabling flag
|
|
989
|
-
* @property {boolean} [instance_reporting.enabled=true]
|
|
990
|
-
* Enables reporting the host and port/path/id of database servers. Default
|
|
991
|
-
* is `true`.
|
|
992
|
-
* @property {object} database_name_reporting container around enabling flag
|
|
993
|
-
* @property {boolean} [database_name_reporting.enabled=true]
|
|
994
|
-
* Enables reporting of database/schema names. Default is `true`.
|
|
995
|
-
*/
|
|
996
|
-
datastore_tracer: {
|
|
997
|
-
instance_reporting: {
|
|
998
|
-
enabled: {
|
|
527
|
+
/**
|
|
528
|
+
* This flag dictates whether the agent attempts to reach out to GCP
|
|
529
|
+
* to get info about the vm the process is running on.
|
|
530
|
+
*/
|
|
531
|
+
detect_gcp: {
|
|
999
532
|
formatter: boolean,
|
|
533
|
+
default: true
|
|
534
|
+
},
|
|
535
|
+
|
|
536
|
+
/**
|
|
537
|
+
* This flag dictates whether the agent attempts to reach out to
|
|
538
|
+
* Kubernetes to get info about the container the process is running on.
|
|
539
|
+
*/
|
|
540
|
+
detect_kubernetes: {
|
|
541
|
+
formatter: boolean,
|
|
542
|
+
default: true
|
|
543
|
+
},
|
|
544
|
+
logical_processors: {
|
|
545
|
+
formatter: float,
|
|
546
|
+
default: null
|
|
547
|
+
},
|
|
548
|
+
billing_hostname: {
|
|
549
|
+
default: null
|
|
550
|
+
},
|
|
551
|
+
total_ram_mib: {
|
|
552
|
+
formatter: int,
|
|
553
|
+
default: null
|
|
554
|
+
},
|
|
555
|
+
|
|
556
|
+
/**
|
|
557
|
+
* When enabled, it will use GCP metadata id
|
|
558
|
+
* to set the hostname of the running application.
|
|
559
|
+
*/
|
|
560
|
+
gcp_use_instance_as_host: {
|
|
1000
561
|
default: true,
|
|
1001
|
-
|
|
562
|
+
formatter: boolean
|
|
1002
563
|
}
|
|
1003
564
|
},
|
|
1004
|
-
|
|
565
|
+
transaction_tracer: {
|
|
566
|
+
attributes: {
|
|
567
|
+
/**
|
|
568
|
+
* If `true`, the agent captures attributes from transaction traces.
|
|
569
|
+
*/
|
|
570
|
+
enabled: {
|
|
571
|
+
formatter: boolean,
|
|
572
|
+
default: true
|
|
573
|
+
},
|
|
574
|
+
/**
|
|
575
|
+
* Prefix of attributes to exclude from transaction traces.
|
|
576
|
+
* Allows * as wildcard at end.
|
|
577
|
+
*/
|
|
578
|
+
exclude: {
|
|
579
|
+
formatter: array,
|
|
580
|
+
default: []
|
|
581
|
+
},
|
|
582
|
+
/**
|
|
583
|
+
* Prefix of attributes to include in transaction traces.
|
|
584
|
+
* Allows * as wildcard at end.
|
|
585
|
+
*/
|
|
586
|
+
include: {
|
|
587
|
+
formatter: array,
|
|
588
|
+
default: []
|
|
589
|
+
}
|
|
590
|
+
},
|
|
591
|
+
/**
|
|
592
|
+
* Whether to collect & submit slow transaction traces to New Relic. The
|
|
593
|
+
* instrumentation is loaded regardless of this setting, as it's necessary
|
|
594
|
+
* to gather metrics. Disable the agent to prevent the instrumentation from
|
|
595
|
+
* loading.
|
|
596
|
+
*/
|
|
1005
597
|
enabled: {
|
|
1006
598
|
formatter: boolean,
|
|
1007
599
|
default: true,
|
|
1008
|
-
env: '
|
|
600
|
+
env: 'NEW_RELIC_TRACER_ENABLED'
|
|
601
|
+
},
|
|
602
|
+
/**
|
|
603
|
+
* Sets the time, in seconds, for a transaction to be considered slow.
|
|
604
|
+
* When a transaction exceeds this threshold, a transaction trace will be recorded. When set to 'apdex_f', the threshold will be set to
|
|
605
|
+
* 4 * apdex_t, which with a default apdex_t value of 500 milliseconds will
|
|
606
|
+
* be 2 seconds.
|
|
607
|
+
*
|
|
608
|
+
* If a number is provided, it is set in seconds.
|
|
609
|
+
*/
|
|
610
|
+
transaction_threshold: {
|
|
611
|
+
formatter: float,
|
|
612
|
+
default: 'apdex_f',
|
|
613
|
+
env: 'NEW_RELIC_TRACER_THRESHOLD'
|
|
614
|
+
},
|
|
615
|
+
/**
|
|
616
|
+
* Increase this parameter to increase the diversity of the slow
|
|
617
|
+
* transaction traces recorded by your application over time. Confused?
|
|
618
|
+
* Read on.
|
|
619
|
+
*
|
|
620
|
+
* Transactions are named based on the request (see the README for the
|
|
621
|
+
* details of how requests are mapped to transactions), and top_n refers to
|
|
622
|
+
* the "top n slowest transactions" grouped by these names. The module will
|
|
623
|
+
* only replace a recorded trace with a new trace if the new trace is
|
|
624
|
+
* slower than the previous slowest trace of that name. The default value
|
|
625
|
+
* for this setting is 20, as the transaction trace view page also defaults
|
|
626
|
+
* to showing the 20 slowest transactions.
|
|
627
|
+
*
|
|
628
|
+
* If you want to record the absolute slowest transaction over the last
|
|
629
|
+
* minute, set top_n to 0 or 1. This used to be the default, and has a
|
|
630
|
+
* problem in that it will allow one very slow route to dominate your slow
|
|
631
|
+
* transaction traces.
|
|
632
|
+
*
|
|
633
|
+
* The module will always record at least 5 different slow transactions in
|
|
634
|
+
* the reporting periods after it starts up, and will reset its internal
|
|
635
|
+
* slow trace aggregator if no slow transactions have been recorded for the
|
|
636
|
+
* last 5 harvest cycles, restarting the aggregation process.
|
|
637
|
+
*
|
|
638
|
+
* env NEW_RELIC_TRACER_TOP_N
|
|
639
|
+
*/
|
|
640
|
+
top_n: {
|
|
641
|
+
formatter: int,
|
|
642
|
+
default: 20,
|
|
643
|
+
env: 'NEW_RELIC_TRACER_TOP_N'
|
|
644
|
+
},
|
|
645
|
+
|
|
646
|
+
/**
|
|
647
|
+
* This option affects both slow-queries and record_sql for transaction
|
|
648
|
+
* traces. It can have one of 3 values: 'off', 'obfuscated' or 'raw'
|
|
649
|
+
* When it is 'off' no slow queries will be captured, and backtraces
|
|
650
|
+
* and sql will not be included in transaction traces. If it is 'raw'
|
|
651
|
+
* or 'obfuscated' and other criteria (slow_sql.enabled etc) are met
|
|
652
|
+
* for a query. The raw or obfuscated sql will be included in the
|
|
653
|
+
* transaction trace and a slow query sample will be collected.
|
|
654
|
+
*/
|
|
655
|
+
record_sql: {
|
|
656
|
+
formatter: allowList.bind(null, ['off', 'obfuscated', 'raw']),
|
|
657
|
+
default: 'obfuscated',
|
|
658
|
+
env: 'NEW_RELIC_RECORD_SQL'
|
|
659
|
+
},
|
|
660
|
+
|
|
661
|
+
/**
|
|
662
|
+
* This option affects both slow-queries and record_sql for transaction
|
|
663
|
+
* traces. This is the minimum duration a query must take (in ms) for it
|
|
664
|
+
* to be considered for for slow query and inclusion in transaction traces.
|
|
665
|
+
*/
|
|
666
|
+
explain_threshold: {
|
|
667
|
+
formatter: int,
|
|
668
|
+
default: 500,
|
|
669
|
+
env: 'NEW_RELIC_EXPLAIN_THRESHOLD'
|
|
1009
670
|
}
|
|
1010
|
-
}
|
|
1011
|
-
},
|
|
1012
|
-
/**
|
|
1013
|
-
* Controls behavior of gRPC server instrumentation.
|
|
1014
|
-
*/
|
|
1015
|
-
grpc: {
|
|
671
|
+
},
|
|
1016
672
|
/**
|
|
1017
|
-
*
|
|
673
|
+
* Rules for naming or ignoring transactions.
|
|
674
|
+
*/
|
|
675
|
+
rules: {
|
|
676
|
+
/**
|
|
677
|
+
* A list of rules of the format {pattern: 'pattern', name: 'name'} for
|
|
678
|
+
* matching incoming request URLs and naming the associated New Relic
|
|
679
|
+
* transactions. Both pattern and name are required. Additional attributes
|
|
680
|
+
* are ignored. Patterns may have capture groups (following JavaScript
|
|
681
|
+
* conventions), and names will use $1-style replacement strings. See
|
|
682
|
+
* the documentation for addNamingRule for important caveats.
|
|
683
|
+
*/
|
|
684
|
+
name: {
|
|
685
|
+
formatter: objectList,
|
|
686
|
+
default: [],
|
|
687
|
+
env: 'NEW_RELIC_NAMING_RULES'
|
|
688
|
+
},
|
|
689
|
+
/**
|
|
690
|
+
* A list of patterns for matching incoming request URLs to be ignored by
|
|
691
|
+
* the agent. Patterns may be strings or regular expressions.
|
|
692
|
+
*
|
|
693
|
+
* By default, socket.io long-polling is ignored.
|
|
694
|
+
*
|
|
695
|
+
* env NEW_RELIC_IGNORING_RULES
|
|
696
|
+
*/
|
|
697
|
+
ignore: {
|
|
698
|
+
formatter: array,
|
|
699
|
+
default: ['^/socket.io/.*/xhr-polling/'],
|
|
700
|
+
env: 'NEW_RELIC_IGNORING_RULES'
|
|
701
|
+
}
|
|
702
|
+
},
|
|
703
|
+
/**
|
|
704
|
+
* By default, any transactions that are not affected by other bits of
|
|
705
|
+
* naming logic (the API, rules, or metric normalization rules) will
|
|
706
|
+
* have their names set to 'NormalizedUri/*'. Setting this value to
|
|
707
|
+
* false will set them instead to Uri/path/to/resource. Don't change
|
|
708
|
+
* this setting unless you understand the implications of New Relic's
|
|
709
|
+
* metric grouping issues and are confident your application isn't going
|
|
710
|
+
* to run afoul of them. Your application could end up getting blocked!
|
|
711
|
+
* Nobody wants that.
|
|
1018
712
|
*/
|
|
1019
|
-
|
|
713
|
+
enforce_backstop: {
|
|
1020
714
|
formatter: boolean,
|
|
1021
715
|
default: true
|
|
1022
716
|
},
|
|
1023
717
|
/**
|
|
1024
|
-
*
|
|
1025
|
-
* Ignoring a status code means that the transaction is not renamed to
|
|
1026
|
-
* match the code, and the request is not treated as an error by the error
|
|
1027
|
-
* collector.
|
|
718
|
+
* Browser Monitoring
|
|
1028
719
|
*
|
|
1029
|
-
*
|
|
1030
|
-
*
|
|
720
|
+
* Browser monitoring lets you correlate transactions between the server and browser
|
|
721
|
+
* giving you accurate data on how long a page request takes, from request,
|
|
722
|
+
* through the server response, up until the actual page render completes.
|
|
723
|
+
*/
|
|
724
|
+
browser_monitoring: {
|
|
725
|
+
attributes: {
|
|
726
|
+
/**
|
|
727
|
+
* If `true`, the agent captures attributes from browser monitoring.
|
|
728
|
+
*/
|
|
729
|
+
enabled: {
|
|
730
|
+
formatter: boolean,
|
|
731
|
+
default: false
|
|
732
|
+
},
|
|
733
|
+
/**
|
|
734
|
+
* Prefix of attributes to exclude from browser monitoring.
|
|
735
|
+
* Allows * as wildcard at end.
|
|
736
|
+
*/
|
|
737
|
+
exclude: {
|
|
738
|
+
formatter: array,
|
|
739
|
+
default: []
|
|
740
|
+
},
|
|
741
|
+
/**
|
|
742
|
+
* Prefix of attributes to include in browser monitoring.
|
|
743
|
+
* Allows * as wildcard at end.
|
|
744
|
+
*/
|
|
745
|
+
include: {
|
|
746
|
+
formatter: array,
|
|
747
|
+
default: []
|
|
748
|
+
}
|
|
749
|
+
},
|
|
750
|
+
/**
|
|
751
|
+
* Enable browser monitoring header generation.
|
|
752
|
+
*
|
|
753
|
+
* This does not auto-instrument, rather it enables the agent to generate headers.
|
|
754
|
+
* The newrelic module can generate the appropriate <script> header, but you must
|
|
755
|
+
* inject the header yourself, or use a module that does so.
|
|
756
|
+
*
|
|
757
|
+
* Usage:
|
|
758
|
+
*
|
|
759
|
+
* var newrelic = require('newrelic');
|
|
760
|
+
*
|
|
761
|
+
* router.get('/', function (req, res) {
|
|
762
|
+
* var header = newrelic.getBrowserTimingHeader();
|
|
763
|
+
* res.write(header)
|
|
764
|
+
* // write the rest of the page
|
|
765
|
+
* });
|
|
766
|
+
*
|
|
767
|
+
* This generates the <script>...</script> header necessary for Browser Monitoring
|
|
768
|
+
* This script must be manually injected into your templates, as high as possible
|
|
769
|
+
* in the header, but _after_ any X-UA-COMPATIBLE HTTP-EQUIV meta tags.
|
|
770
|
+
* Otherwise you may hurt IE!
|
|
771
|
+
*
|
|
772
|
+
* This method must be called _during_ a transaction, and must be called every
|
|
773
|
+
* time you want to generate the headers.
|
|
774
|
+
*
|
|
775
|
+
* Do *not* reuse the headers between users, or even between requests.
|
|
776
|
+
*/
|
|
777
|
+
enable: {
|
|
778
|
+
formatter: boolean,
|
|
779
|
+
default: true,
|
|
780
|
+
env: 'NEW_RELIC_BROWSER_MONITOR_ENABLE'
|
|
781
|
+
},
|
|
782
|
+
/**
|
|
783
|
+
* Request un-minified sources from the server.
|
|
784
|
+
*/
|
|
785
|
+
debug: {
|
|
786
|
+
formatter: boolean,
|
|
787
|
+
default: false,
|
|
788
|
+
env: 'NEW_RELIC_BROWSER_MONITOR_DEBUG'
|
|
789
|
+
}
|
|
790
|
+
},
|
|
791
|
+
/**
|
|
792
|
+
* API Configuration
|
|
1031
793
|
*
|
|
1032
|
-
*
|
|
794
|
+
* Some API end points can be turned off via configuration settings to
|
|
795
|
+
* allow for more flexible security options. All API configuration
|
|
796
|
+
* options are disabled when high-security mode is enabled.
|
|
1033
797
|
*/
|
|
1034
|
-
|
|
1035
|
-
formatter: array,
|
|
1036
|
-
default: []
|
|
1037
|
-
}
|
|
1038
|
-
},
|
|
1039
|
-
/**
|
|
1040
|
-
* Controls the behavior of span events produced by the agent.
|
|
1041
|
-
*/
|
|
1042
|
-
span_events: {
|
|
798
|
+
api: {
|
|
1043
799
|
/**
|
|
1044
|
-
*
|
|
800
|
+
* Controls for the `API.addCustomAttribute` method.
|
|
1045
801
|
*/
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
attributes: {
|
|
802
|
+
custom_attributes_enabled: {
|
|
803
|
+
formatter: boolean,
|
|
804
|
+
default: true,
|
|
805
|
+
env: 'NEW_RELIC_API_CUSTOM_ATTRIBUTES'
|
|
806
|
+
},
|
|
1052
807
|
/**
|
|
1053
|
-
*
|
|
808
|
+
* Controls for the `API.recordCustomEvent` method.
|
|
1054
809
|
*/
|
|
1055
|
-
|
|
810
|
+
custom_events_enabled: {
|
|
1056
811
|
formatter: boolean,
|
|
1057
|
-
default: true
|
|
812
|
+
default: true,
|
|
813
|
+
env: 'NEW_RELIC_API_CUSTOM_EVENTS'
|
|
1058
814
|
},
|
|
1059
815
|
/**
|
|
1060
|
-
*
|
|
1061
|
-
* Allows * as wildcard at end.
|
|
816
|
+
* Controls for the `API.noticeError` method.
|
|
1062
817
|
*/
|
|
1063
|
-
|
|
1064
|
-
formatter:
|
|
1065
|
-
default:
|
|
818
|
+
notice_error_enabled: {
|
|
819
|
+
formatter: boolean,
|
|
820
|
+
default: true,
|
|
821
|
+
env: 'NEW_RELIC_API_NOTICE_ERROR'
|
|
822
|
+
}
|
|
823
|
+
},
|
|
824
|
+
/**
|
|
825
|
+
* Transaction Events
|
|
826
|
+
*
|
|
827
|
+
* Transaction events are sent to New Relic Insights. This event data
|
|
828
|
+
* includes transaction timing, transaction name, and any custom parameters.
|
|
829
|
+
*
|
|
830
|
+
* Read more here: http://newrelic.com/insights
|
|
831
|
+
*/
|
|
832
|
+
transaction_events: {
|
|
833
|
+
attributes: {
|
|
834
|
+
/**
|
|
835
|
+
* If `true`, the agent captures attributes from transaction events.
|
|
836
|
+
*/
|
|
837
|
+
enabled: {
|
|
838
|
+
formatter: boolean,
|
|
839
|
+
default: true
|
|
840
|
+
},
|
|
841
|
+
/**
|
|
842
|
+
* Prefix of attributes to exclude in transaction events.
|
|
843
|
+
* Allows * as wildcard at end.
|
|
844
|
+
*
|
|
845
|
+
* env NEW_RELIC_TRANSACTION_EVENTS_ATTRIBUTES_EXCLUDE
|
|
846
|
+
*/
|
|
847
|
+
exclude: {
|
|
848
|
+
formatter: array,
|
|
849
|
+
default: []
|
|
850
|
+
},
|
|
851
|
+
/**
|
|
852
|
+
* Prefix of attributes to include in transaction events.
|
|
853
|
+
* Allows * as wildcard at end.
|
|
854
|
+
*
|
|
855
|
+
* env NEW_RELIC_TRANSACTION_EVENTS_ATTRIBUTES_INCLUDE
|
|
856
|
+
*/
|
|
857
|
+
include: {
|
|
858
|
+
formatter: array,
|
|
859
|
+
default: []
|
|
860
|
+
}
|
|
861
|
+
},
|
|
862
|
+
/**
|
|
863
|
+
* If this is disabled, the agent does not collect, nor try to send,
|
|
864
|
+
* analytic data.
|
|
865
|
+
*/
|
|
866
|
+
enabled: {
|
|
867
|
+
formatter: boolean,
|
|
868
|
+
default: true
|
|
1066
869
|
},
|
|
1067
870
|
/**
|
|
1068
|
-
*
|
|
1069
|
-
*
|
|
871
|
+
* The agent will collect all events up to this number per minute. If
|
|
872
|
+
* there are more than that, a statistical sampling will be collected.
|
|
1070
873
|
*/
|
|
1071
|
-
|
|
1072
|
-
formatter:
|
|
1073
|
-
default:
|
|
874
|
+
max_samples_stored: {
|
|
875
|
+
formatter: int,
|
|
876
|
+
default: 10000
|
|
1074
877
|
}
|
|
1075
878
|
},
|
|
1076
879
|
/**
|
|
1077
|
-
*
|
|
1078
|
-
*
|
|
880
|
+
* Custom Insights Events
|
|
881
|
+
*
|
|
882
|
+
* Custom insights events are JSON object that are sent to New Relic
|
|
883
|
+
* Insights. You can tell the agent to send your custom events via the
|
|
884
|
+
* `newrelic.recordCustomEvent()` API. These events are sampled once the max
|
|
885
|
+
* queue size is reached. You can tune this setting below.
|
|
886
|
+
*
|
|
887
|
+
* Read more here: http://newrelic.com/insights
|
|
888
|
+
*/
|
|
889
|
+
custom_insights_events: {
|
|
890
|
+
/**
|
|
891
|
+
* If this is disabled, the agent does not collect, nor try to send, custom
|
|
892
|
+
* event data.
|
|
1079
893
|
*/
|
|
1080
|
-
max_samples_stored: {
|
|
1081
|
-
formatter: int,
|
|
1082
|
-
default: 2000
|
|
1083
|
-
}
|
|
1084
|
-
},
|
|
1085
|
-
/**
|
|
1086
|
-
* Controls the behavior of transaction segments produced by the agent.
|
|
1087
|
-
*/
|
|
1088
|
-
transaction_segments: {
|
|
1089
|
-
attributes: {
|
|
1090
|
-
/**
|
|
1091
|
-
* If `true`, the agent captures attributes from transaction segments.
|
|
1092
|
-
*/
|
|
1093
894
|
enabled: {
|
|
1094
895
|
formatter: boolean,
|
|
1095
896
|
default: true
|
|
1096
897
|
},
|
|
1097
898
|
/**
|
|
1098
|
-
*
|
|
1099
|
-
*
|
|
899
|
+
* The agent will collect all events up to this number per minute. If there
|
|
900
|
+
* are more than that, a statistical sampling will be collected. Currently
|
|
901
|
+
* this uses a priority sampling algorithm.
|
|
902
|
+
*
|
|
903
|
+
* By increasing this setting you are both increasing the memory
|
|
904
|
+
* requirements of the agent as well as increasing the payload to the New
|
|
905
|
+
* Relic servers. The memory concerns are something you should consider for
|
|
906
|
+
* your own server's sake. The payload of events is compressed, but if it
|
|
907
|
+
* grows too large the New Relic servers may reject it.
|
|
1100
908
|
*/
|
|
1101
|
-
|
|
1102
|
-
formatter:
|
|
1103
|
-
default:
|
|
1104
|
-
}
|
|
909
|
+
max_samples_stored: {
|
|
910
|
+
formatter: int,
|
|
911
|
+
default: 3000
|
|
912
|
+
}
|
|
913
|
+
},
|
|
914
|
+
/**
|
|
915
|
+
* This is used to configure properties about the user's host name.
|
|
916
|
+
*/
|
|
917
|
+
process_host: {
|
|
918
|
+
/**
|
|
919
|
+
* Configurable display name for hosts
|
|
920
|
+
*/
|
|
921
|
+
display_name: '',
|
|
1105
922
|
/**
|
|
1106
|
-
*
|
|
1107
|
-
* Allows * as wildcard at end.
|
|
923
|
+
* ip address preference when creating hostnames
|
|
1108
924
|
*/
|
|
1109
|
-
|
|
1110
|
-
formatter:
|
|
1111
|
-
default:
|
|
925
|
+
ipv_preference: {
|
|
926
|
+
formatter: allowList.bind(null, ['4', '6']),
|
|
927
|
+
default: '4',
|
|
928
|
+
env: 'NEW_RELIC_IPV_PREFERENCE'
|
|
1112
929
|
}
|
|
1113
|
-
}
|
|
1114
|
-
},
|
|
1115
|
-
|
|
1116
|
-
/**
|
|
1117
|
-
* Controls the method of cross agent tracing in the agent.
|
|
1118
|
-
* Distributed tracing lets you see the path that a request takes through your
|
|
1119
|
-
* distributed system. Enabling distributed tracing changes the behavior of some
|
|
1120
|
-
* New Relic features, so carefully consult the transition guide before you enable
|
|
1121
|
-
* this feature: https://docs.newrelic.com/docs/transition-guide-distributed-tracing
|
|
1122
|
-
* Default is true.
|
|
1123
|
-
*/
|
|
1124
|
-
distributed_tracing: {
|
|
930
|
+
},
|
|
1125
931
|
/**
|
|
1126
|
-
*
|
|
932
|
+
* High Security
|
|
933
|
+
*
|
|
934
|
+
* High security mode (v2) is a setting which prevents any sensitive data from
|
|
935
|
+
* being sent to New Relic. The local setting must match the server setting.
|
|
936
|
+
* If there is a mismatch the agent will log a message and act as if it is
|
|
937
|
+
* disabled.
|
|
938
|
+
*
|
|
939
|
+
* Attributes of high security mode (when enabled):
|
|
940
|
+
* requires SSL
|
|
941
|
+
* does not allow capturing of http params
|
|
942
|
+
* does not allow custom params
|
|
943
|
+
*
|
|
944
|
+
* To read more see: https://docs.newrelic.com/docs/subscriptions/high-security
|
|
1127
945
|
*/
|
|
1128
|
-
|
|
946
|
+
high_security: {
|
|
1129
947
|
formatter: boolean,
|
|
1130
|
-
default:
|
|
948
|
+
default: false
|
|
1131
949
|
},
|
|
1132
950
|
|
|
1133
951
|
/**
|
|
1134
|
-
*
|
|
1135
|
-
*
|
|
1136
|
-
*
|
|
1137
|
-
*
|
|
952
|
+
* Labels
|
|
953
|
+
*
|
|
954
|
+
* An object of label names and values that will be applied to the data sent
|
|
955
|
+
* from this agent. Both label names and label values have a maximum length of
|
|
956
|
+
* 255 characters. This object should contain at most 64 labels.
|
|
1138
957
|
*/
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
default: false
|
|
958
|
+
labels: {
|
|
959
|
+
default: {}
|
|
1142
960
|
},
|
|
1143
|
-
|
|
1144
961
|
/**
|
|
1145
|
-
*
|
|
1146
|
-
*
|
|
1147
|
-
|
|
1148
|
-
|
|
962
|
+
* These options control behavior for slow queries, but do not affect sql
|
|
963
|
+
* nodes in transaction traces.
|
|
964
|
+
*/
|
|
965
|
+
slow_sql: {
|
|
966
|
+
/**
|
|
967
|
+
* Enables and disables `slow_sql` recording.
|
|
1149
968
|
*/
|
|
1150
|
-
in_process_spans: {
|
|
1151
969
|
enabled: {
|
|
1152
970
|
formatter: boolean,
|
|
1153
|
-
default:
|
|
1154
|
-
}
|
|
1155
|
-
},
|
|
971
|
+
default: false
|
|
972
|
+
},
|
|
1156
973
|
|
|
1157
|
-
sampler: {
|
|
1158
974
|
/**
|
|
1159
|
-
*
|
|
1160
|
-
*
|
|
1161
|
-
* with a priority value of "2". When set to `always_off`, the local
|
|
1162
|
-
* transaction will never be sampled. At the default setting, the sampling
|
|
1163
|
-
* decision will be determined according to the normal algorithm.
|
|
975
|
+
* Sets the maximum number of slow query samples that will be collected in a
|
|
976
|
+
* single harvest cycle.
|
|
1164
977
|
*
|
|
1165
|
-
*
|
|
1166
|
-
* setting.
|
|
978
|
+
* env NEW_RELIC_MAX_SQL_SAMPLES
|
|
1167
979
|
*/
|
|
1168
|
-
|
|
1169
|
-
formatter:
|
|
1170
|
-
default:
|
|
980
|
+
max_samples: {
|
|
981
|
+
formatter: int,
|
|
982
|
+
default: 10,
|
|
983
|
+
env: 'NEW_RELIC_MAX_SQL_SAMPLES'
|
|
984
|
+
}
|
|
985
|
+
},
|
|
986
|
+
/**
|
|
987
|
+
* Controls behavior of datastore instance metrics.
|
|
988
|
+
*
|
|
989
|
+
* @property {object} instance_reporting container around enabling flag
|
|
990
|
+
* @property {boolean} [instance_reporting.enabled=true]
|
|
991
|
+
* Enables reporting the host and port/path/id of database servers. Default
|
|
992
|
+
* is `true`.
|
|
993
|
+
* @property {object} database_name_reporting container around enabling flag
|
|
994
|
+
* @property {boolean} [database_name_reporting.enabled=true]
|
|
995
|
+
* Enables reporting of database/schema names. Default is `true`.
|
|
996
|
+
*/
|
|
997
|
+
datastore_tracer: {
|
|
998
|
+
instance_reporting: {
|
|
999
|
+
enabled: {
|
|
1000
|
+
formatter: boolean,
|
|
1001
|
+
default: true,
|
|
1002
|
+
env: 'NEW_RELIC_DATASTORE_INSTANCE_REPORTING_ENABLED'
|
|
1003
|
+
}
|
|
1004
|
+
},
|
|
1005
|
+
database_name_reporting: {
|
|
1006
|
+
enabled: {
|
|
1007
|
+
formatter: boolean,
|
|
1008
|
+
default: true,
|
|
1009
|
+
env: 'NEW_RELIC_DATASTORE_DATABASE_NAME_REPORTING_ENABLED'
|
|
1010
|
+
}
|
|
1011
|
+
}
|
|
1012
|
+
},
|
|
1013
|
+
/**
|
|
1014
|
+
* Controls behavior of gRPC server instrumentation.
|
|
1015
|
+
*/
|
|
1016
|
+
grpc: {
|
|
1017
|
+
/**
|
|
1018
|
+
* Enables recording of non-zero gRPC status codes. Default is `true`.
|
|
1019
|
+
*/
|
|
1020
|
+
record_errors: {
|
|
1021
|
+
formatter: boolean,
|
|
1022
|
+
default: true
|
|
1171
1023
|
},
|
|
1172
|
-
|
|
1173
1024
|
/**
|
|
1174
|
-
*
|
|
1175
|
-
*
|
|
1176
|
-
*
|
|
1177
|
-
*
|
|
1178
|
-
* according to the normal algorithm.
|
|
1025
|
+
* List of gRPC error status codes the error tracer should disregard.
|
|
1026
|
+
* Ignoring a status code means that the transaction is not renamed to
|
|
1027
|
+
* match the code, and the request is not treated as an error by the error
|
|
1028
|
+
* collector.
|
|
1179
1029
|
*
|
|
1180
|
-
* This
|
|
1181
|
-
*
|
|
1030
|
+
* NOTE: This configuration value has no effect on errors recorded using
|
|
1031
|
+
* `noticeError()`.
|
|
1032
|
+
*
|
|
1033
|
+
* Defaults to no codes ignored.
|
|
1182
1034
|
*/
|
|
1183
|
-
|
|
1184
|
-
formatter:
|
|
1185
|
-
default:
|
|
1035
|
+
ignore_status_codes: {
|
|
1036
|
+
formatter: array,
|
|
1037
|
+
default: []
|
|
1186
1038
|
}
|
|
1187
|
-
}
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
* This feature has been deprecated in favor of Distributed Tracing (DT).
|
|
1196
|
-
* To fully enable this feature, you must also disable DT in your configuration.
|
|
1197
|
-
*/
|
|
1198
|
-
cross_application_tracer: {
|
|
1199
|
-
enabled: {
|
|
1200
|
-
formatter: boolean,
|
|
1201
|
-
default: false
|
|
1202
|
-
}
|
|
1203
|
-
},
|
|
1204
|
-
/**
|
|
1205
|
-
* Controls behavior of message broker tracing.
|
|
1206
|
-
*
|
|
1207
|
-
* @property {object} segment_parameters property around enabling flag
|
|
1208
|
-
* @property {boolean} [segment_parameters.enabled=true]
|
|
1209
|
-
* Enables reporting parameters on message broker segments.
|
|
1210
|
-
*/
|
|
1211
|
-
message_tracer: {
|
|
1212
|
-
segment_parameters: {
|
|
1039
|
+
},
|
|
1040
|
+
/**
|
|
1041
|
+
* Controls the behavior of span events produced by the agent.
|
|
1042
|
+
*/
|
|
1043
|
+
span_events: {
|
|
1044
|
+
/**
|
|
1045
|
+
* Enables/disables span event generation
|
|
1046
|
+
*/
|
|
1213
1047
|
enabled: {
|
|
1214
1048
|
formatter: boolean,
|
|
1215
1049
|
default: true
|
|
1216
|
-
}
|
|
1217
|
-
}
|
|
1218
|
-
},
|
|
1219
|
-
/**
|
|
1220
|
-
* Controls the use of infinite tracing.
|
|
1221
|
-
*/
|
|
1222
|
-
infinite_tracing: {
|
|
1223
|
-
trace_observer: {
|
|
1224
|
-
/**
|
|
1225
|
-
* The URI HOST of the observer. Setting this enables infinite tracing.
|
|
1226
|
-
*/
|
|
1227
|
-
host: '',
|
|
1228
|
-
/**
|
|
1229
|
-
* The URI PORT of the observer.
|
|
1230
|
-
*/
|
|
1231
|
-
port: {
|
|
1232
|
-
formatter: int,
|
|
1233
|
-
default: 443
|
|
1234
1050
|
},
|
|
1051
|
+
|
|
1052
|
+
attributes: {
|
|
1235
1053
|
/**
|
|
1236
|
-
*
|
|
1054
|
+
* If `true`, the agent captures attributes from span events.
|
|
1237
1055
|
*/
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1056
|
+
enabled: {
|
|
1057
|
+
formatter: boolean,
|
|
1058
|
+
default: true
|
|
1059
|
+
},
|
|
1060
|
+
/**
|
|
1061
|
+
* Prefix of attributes to exclude in span events.
|
|
1062
|
+
* Allows * as wildcard at end.
|
|
1063
|
+
*/
|
|
1064
|
+
exclude: {
|
|
1065
|
+
formatter: array,
|
|
1066
|
+
default: []
|
|
1067
|
+
},
|
|
1068
|
+
/**
|
|
1069
|
+
* Prefix of attributes to include in span events.
|
|
1070
|
+
* Allows * as wildcard at end.
|
|
1071
|
+
*/
|
|
1072
|
+
include: {
|
|
1073
|
+
formatter: array,
|
|
1074
|
+
default: []
|
|
1075
|
+
}
|
|
1241
1076
|
},
|
|
1242
|
-
},
|
|
1243
|
-
span_events: {
|
|
1244
1077
|
/**
|
|
1245
|
-
* The
|
|
1078
|
+
* The agent will collect all events up to this number per minute. If
|
|
1079
|
+
* there are more than that, a statistical sampling will be collected.
|
|
1246
1080
|
*/
|
|
1247
|
-
|
|
1081
|
+
max_samples_stored: {
|
|
1248
1082
|
formatter: int,
|
|
1249
|
-
default:
|
|
1250
|
-
}
|
|
1083
|
+
default: 2000
|
|
1084
|
+
}
|
|
1085
|
+
},
|
|
1086
|
+
/**
|
|
1087
|
+
* Controls the behavior of transaction segments produced by the agent.
|
|
1088
|
+
*/
|
|
1089
|
+
transaction_segments: {
|
|
1090
|
+
attributes: {
|
|
1251
1091
|
/**
|
|
1252
|
-
*
|
|
1092
|
+
* If `true`, the agent captures attributes from transaction segments.
|
|
1253
1093
|
*/
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1094
|
+
enabled: {
|
|
1095
|
+
formatter: boolean,
|
|
1096
|
+
default: true
|
|
1097
|
+
},
|
|
1098
|
+
/**
|
|
1099
|
+
* Prefix of attributes to exclude in transaction segments.
|
|
1100
|
+
* Allows * as wildcard at end.
|
|
1101
|
+
*/
|
|
1102
|
+
exclude: {
|
|
1103
|
+
formatter: array,
|
|
1104
|
+
default: []
|
|
1105
|
+
},
|
|
1106
|
+
/**
|
|
1107
|
+
* Prefix of attributes to include in transaction segments.
|
|
1108
|
+
* Allows * as wildcard at end.
|
|
1109
|
+
*/
|
|
1110
|
+
include: {
|
|
1111
|
+
formatter: array,
|
|
1112
|
+
default: []
|
|
1113
|
+
}
|
|
1257
1114
|
}
|
|
1258
1115
|
},
|
|
1259
|
-
|
|
1260
|
-
formatter: boolean,
|
|
1261
|
-
default: true
|
|
1262
|
-
},
|
|
1263
|
-
compression: {
|
|
1264
|
-
formatter: boolean,
|
|
1265
|
-
default: true
|
|
1266
|
-
}
|
|
1267
|
-
},
|
|
1268
|
-
|
|
1269
|
-
/**
|
|
1270
|
-
* When `true`, the AWS Lambda instrumentation will add the necessary
|
|
1271
|
-
* data to support the new (as of 2025) unified APM UI.
|
|
1272
|
-
*/
|
|
1273
|
-
apm_lambda_mode: {
|
|
1274
|
-
default: false,
|
|
1275
|
-
formatter: boolean
|
|
1276
|
-
},
|
|
1277
|
-
|
|
1278
|
-
/**
|
|
1279
|
-
* Specifies whether the agent will be used to monitor serverless functions.
|
|
1280
|
-
* For example: AWS Lambda
|
|
1281
|
-
*/
|
|
1282
|
-
serverless_mode: {
|
|
1283
|
-
enabled: {
|
|
1284
|
-
formatter: boolean,
|
|
1285
|
-
default: process.env.AWS_LAMBDA_FUNCTION_NAME != null
|
|
1286
|
-
}
|
|
1287
|
-
},
|
|
1288
|
-
plugins: {
|
|
1116
|
+
|
|
1289
1117
|
/**
|
|
1290
|
-
* Controls
|
|
1291
|
-
*
|
|
1118
|
+
* Controls the method of cross agent tracing in the agent.
|
|
1119
|
+
* Distributed tracing lets you see the path that a request takes through your
|
|
1120
|
+
* distributed system. Enabling distributed tracing changes the behavior of some
|
|
1121
|
+
* New Relic features, so carefully consult the transition guide before you enable
|
|
1122
|
+
* this feature: https://docs.newrelic.com/docs/transition-guide-distributed-tracing
|
|
1123
|
+
* Default is true.
|
|
1292
1124
|
*/
|
|
1293
|
-
|
|
1294
|
-
enabled: {
|
|
1295
|
-
formatter: boolean,
|
|
1296
|
-
default: true,
|
|
1297
|
-
env: 'NEW_RELIC_NATIVE_METRICS_ENABLED'
|
|
1298
|
-
}
|
|
1299
|
-
}
|
|
1300
|
-
},
|
|
1301
|
-
/**
|
|
1302
|
-
*
|
|
1303
|
-
* Controls the behavior of Logs in Context within agent
|
|
1304
|
-
*/
|
|
1305
|
-
application_logging: {
|
|
1125
|
+
distributed_tracing: {
|
|
1306
1126
|
/**
|
|
1307
|
-
*
|
|
1127
|
+
* Enables/disables distributed tracing.
|
|
1308
1128
|
*/
|
|
1309
|
-
enabled: {
|
|
1310
|
-
formatter: boolean,
|
|
1311
|
-
default: true
|
|
1312
|
-
},
|
|
1313
|
-
forwarding: {
|
|
1314
|
-
/**
|
|
1315
|
-
* Toggles whether the agent gathers log records for sending to New Relic.
|
|
1316
|
-
*/
|
|
1317
1129
|
enabled: {
|
|
1318
1130
|
formatter: boolean,
|
|
1319
1131
|
default: true
|
|
1320
1132
|
},
|
|
1133
|
+
|
|
1321
1134
|
/**
|
|
1322
|
-
*
|
|
1135
|
+
* Excludes New Relic format distributed tracing header (`newrelic`) on
|
|
1136
|
+
* outbound requests when set to `true`. By default (when false)
|
|
1137
|
+
* both W3C TraceContext (`traceparent`, `tracecontext`) and
|
|
1138
|
+
* New Relic formats will be sent.
|
|
1323
1139
|
*/
|
|
1324
|
-
|
|
1325
|
-
formatter:
|
|
1326
|
-
default:
|
|
1140
|
+
exclude_newrelic_header: {
|
|
1141
|
+
formatter: boolean,
|
|
1142
|
+
default: false
|
|
1327
1143
|
},
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1144
|
+
|
|
1145
|
+
/**
|
|
1146
|
+
* Controls whether the agent will generate spans for in-process actions.
|
|
1147
|
+
* When disabled, this will only create spans for entry and exit spans.
|
|
1148
|
+
* entry spans - initial actions for web servers and messsage queue consumption.
|
|
1149
|
+
* exit spans - all outgoing calls to external services(external and database calls)
|
|
1150
|
+
*/
|
|
1151
|
+
in_process_spans: {
|
|
1332
1152
|
enabled: {
|
|
1333
1153
|
formatter: boolean,
|
|
1334
|
-
default:
|
|
1154
|
+
default: true
|
|
1155
|
+
}
|
|
1156
|
+
},
|
|
1157
|
+
|
|
1158
|
+
sampler: {
|
|
1159
|
+
/**
|
|
1160
|
+
* When set to `always_on`, the sampled flag in the `traceparent` header
|
|
1161
|
+
* being set to "true" will result in the local transaction being sampled
|
|
1162
|
+
* with a priority value of "2". When set to `always_off`, the local
|
|
1163
|
+
* transaction will never be sampled. At the default setting, the sampling
|
|
1164
|
+
* decision will be determined according to the normal algorithm.
|
|
1165
|
+
*
|
|
1166
|
+
* This setting takes precedence over the `remote_parent_not_sampled`
|
|
1167
|
+
* setting.
|
|
1168
|
+
*/
|
|
1169
|
+
remote_parent_sampled: {
|
|
1170
|
+
formatter: allowList.bind(null, ['always_on', 'always_off', 'default']),
|
|
1171
|
+
default: 'default'
|
|
1335
1172
|
},
|
|
1173
|
+
|
|
1336
1174
|
/**
|
|
1337
|
-
*
|
|
1175
|
+
* When set to `always_on`, the local transaction will be sampled with a
|
|
1176
|
+
* priority of "2".
|
|
1177
|
+
* When set to `always_off`, the local transaction will never be sampled.
|
|
1178
|
+
* At the default setting, the sampling decision will be determined
|
|
1179
|
+
* according to the normal algorithm.
|
|
1180
|
+
*
|
|
1181
|
+
* This setting only affects decisions when the traceparent sampled flag
|
|
1182
|
+
* is set to 0.
|
|
1338
1183
|
*/
|
|
1339
|
-
|
|
1340
|
-
formatter:
|
|
1341
|
-
default:
|
|
1184
|
+
remote_parent_not_sampled: {
|
|
1185
|
+
formatter: allowList.bind(null, ['always_on', 'always_off', 'default']),
|
|
1186
|
+
default: 'default'
|
|
1342
1187
|
}
|
|
1343
1188
|
}
|
|
1344
1189
|
},
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
/**
|
|
1356
|
-
* Toggles whether the agent performs log decoration on standard log output.
|
|
1357
|
-
*/
|
|
1190
|
+
|
|
1191
|
+
/**
|
|
1192
|
+
* Controls the use of cross-application tracing.
|
|
1193
|
+
*
|
|
1194
|
+
* @property {boolean} [enabled=false]
|
|
1195
|
+
* Enables tracing transactions across multiple applications. Default is `false`.
|
|
1196
|
+
* This feature has been deprecated in favor of Distributed Tracing (DT).
|
|
1197
|
+
* To fully enable this feature, you must also disable DT in your configuration.
|
|
1198
|
+
*/
|
|
1199
|
+
cross_application_tracer: {
|
|
1358
1200
|
enabled: {
|
|
1359
1201
|
formatter: boolean,
|
|
1360
1202
|
default: false
|
|
1361
1203
|
}
|
|
1362
|
-
}
|
|
1363
|
-
},
|
|
1364
|
-
/**
|
|
1365
|
-
* You may want more control over how your agent is configured and want to
|
|
1366
|
-
* disallow the use of New Relic's server-side configuration for agents.
|
|
1367
|
-
* To do so, set this to true.
|
|
1368
|
-
*
|
|
1369
|
-
* env NEW_RELIC_IGNORE_SERVER_SIDE_CONFIG
|
|
1370
|
-
*/
|
|
1371
|
-
ignore_server_configuration: {
|
|
1372
|
-
formatter: boolean,
|
|
1373
|
-
default: false,
|
|
1374
|
-
env: 'NEW_RELIC_IGNORE_SERVER_SIDE_CONFIG'
|
|
1375
|
-
},
|
|
1376
|
-
|
|
1377
|
-
/**
|
|
1378
|
-
* Toggles whether to capture code.* attributes on spans
|
|
1379
|
-
*/
|
|
1380
|
-
code_level_metrics: {
|
|
1381
|
-
enabled: {
|
|
1382
|
-
formatter: boolean,
|
|
1383
|
-
default: true
|
|
1384
|
-
}
|
|
1385
|
-
},
|
|
1386
|
-
|
|
1387
|
-
/**
|
|
1388
|
-
* Obfuscates URL parameters
|
|
1389
|
-
* for outgoing and incoming requests
|
|
1390
|
-
* for distrubuted tracing attributes - both transaction and span attributes
|
|
1391
|
-
* for transaction trace transaction details
|
|
1392
|
-
*/
|
|
1393
|
-
url_obfuscation: {
|
|
1204
|
+
},
|
|
1394
1205
|
/**
|
|
1395
|
-
*
|
|
1206
|
+
* Controls behavior of message broker tracing.
|
|
1207
|
+
*
|
|
1208
|
+
* @property {object} segment_parameters property around enabling flag
|
|
1209
|
+
* @property {boolean} [segment_parameters.enabled=true]
|
|
1210
|
+
* Enables reporting parameters on message broker segments.
|
|
1396
1211
|
*/
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1212
|
+
message_tracer: {
|
|
1213
|
+
segment_parameters: {
|
|
1214
|
+
enabled: {
|
|
1215
|
+
formatter: boolean,
|
|
1216
|
+
default: true
|
|
1217
|
+
}
|
|
1218
|
+
}
|
|
1400
1219
|
},
|
|
1401
|
-
|
|
1402
|
-
|
|
1220
|
+
/**
|
|
1221
|
+
* Controls the use of infinite tracing.
|
|
1222
|
+
*/
|
|
1223
|
+
infinite_tracing: {
|
|
1224
|
+
trace_observer: {
|
|
1403
1225
|
/**
|
|
1404
|
-
*
|
|
1226
|
+
* The URI HOST of the observer. Setting this enables infinite tracing.
|
|
1405
1227
|
*/
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1228
|
+
host: '',
|
|
1229
|
+
/**
|
|
1230
|
+
* The URI PORT of the observer.
|
|
1231
|
+
*/
|
|
1232
|
+
port: {
|
|
1233
|
+
formatter: int,
|
|
1234
|
+
default: 443
|
|
1235
|
+
},
|
|
1236
|
+
/**
|
|
1237
|
+
* For testing only. This allows the connection to an insecure gRPC server.
|
|
1238
|
+
*/
|
|
1239
|
+
insecure: {
|
|
1240
|
+
formatter: boolean,
|
|
1241
|
+
default: false
|
|
1242
|
+
},
|
|
1409
1243
|
},
|
|
1410
|
-
|
|
1244
|
+
span_events: {
|
|
1411
1245
|
/**
|
|
1412
|
-
*
|
|
1246
|
+
* The amount of spans to hold onto before dropping them
|
|
1413
1247
|
*/
|
|
1414
|
-
|
|
1415
|
-
|
|
1248
|
+
queue_size: {
|
|
1249
|
+
formatter: int,
|
|
1250
|
+
default: 10000
|
|
1251
|
+
},
|
|
1252
|
+
/**
|
|
1253
|
+
* Size of batches to post to 8T server
|
|
1254
|
+
*/
|
|
1255
|
+
batch_size: {
|
|
1256
|
+
formatter: int,
|
|
1257
|
+
default: 750
|
|
1258
|
+
}
|
|
1416
1259
|
},
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
default:
|
|
1260
|
+
batching: {
|
|
1261
|
+
formatter: boolean,
|
|
1262
|
+
default: true
|
|
1263
|
+
},
|
|
1264
|
+
compression: {
|
|
1265
|
+
formatter: boolean,
|
|
1266
|
+
default: true
|
|
1424
1267
|
}
|
|
1425
|
-
}
|
|
1426
|
-
|
|
1427
|
-
/**
|
|
1428
|
-
* Security agent configurations
|
|
1429
|
-
*/
|
|
1430
|
-
security: {
|
|
1268
|
+
},
|
|
1269
|
+
|
|
1431
1270
|
/**
|
|
1432
|
-
*
|
|
1271
|
+
* When `true`, the AWS Lambda instrumentation will add the necessary
|
|
1272
|
+
* data to support the new (as of 2025) unified APM UI.
|
|
1433
1273
|
*/
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1274
|
+
apm_lambda_mode: {
|
|
1275
|
+
default: false,
|
|
1276
|
+
formatter: boolean
|
|
1437
1277
|
},
|
|
1438
1278
|
|
|
1439
1279
|
/**
|
|
1440
|
-
*
|
|
1441
|
-
*
|
|
1280
|
+
* Specifies whether the agent will be used to monitor serverless functions.
|
|
1281
|
+
* For example: AWS Lambda
|
|
1442
1282
|
*/
|
|
1443
|
-
|
|
1283
|
+
serverless_mode: {
|
|
1444
1284
|
enabled: {
|
|
1445
1285
|
formatter: boolean,
|
|
1446
|
-
default:
|
|
1286
|
+
default: process.env.AWS_LAMBDA_FUNCTION_NAME != null
|
|
1447
1287
|
}
|
|
1448
1288
|
},
|
|
1449
|
-
|
|
1289
|
+
plugins: {
|
|
1450
1290
|
/**
|
|
1451
|
-
*
|
|
1291
|
+
* Controls usage of the native metrics module which samples VM and event
|
|
1292
|
+
* loop data.
|
|
1452
1293
|
*/
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1294
|
+
native_metrics: {
|
|
1295
|
+
enabled: {
|
|
1296
|
+
formatter: boolean,
|
|
1297
|
+
default: true,
|
|
1298
|
+
env: 'NEW_RELIC_NATIVE_METRICS_ENABLED'
|
|
1299
|
+
}
|
|
1300
|
+
}
|
|
1456
1301
|
},
|
|
1457
|
-
|
|
1458
1302
|
/**
|
|
1459
|
-
*
|
|
1303
|
+
*
|
|
1304
|
+
* Controls the behavior of Logs in Context within agent
|
|
1460
1305
|
*/
|
|
1461
|
-
|
|
1462
|
-
default: 'wss://csec.nr-data.net'
|
|
1463
|
-
},
|
|
1464
|
-
|
|
1306
|
+
application_logging: {
|
|
1465
1307
|
/**
|
|
1466
|
-
*
|
|
1308
|
+
* Toggles the ability for all application logging features to be enabled.
|
|
1467
1309
|
*/
|
|
1468
|
-
|
|
1469
|
-
|
|
1310
|
+
enabled: {
|
|
1311
|
+
formatter: boolean,
|
|
1312
|
+
default: true
|
|
1313
|
+
},
|
|
1314
|
+
forwarding: {
|
|
1315
|
+
/**
|
|
1316
|
+
* Toggles whether the agent gathers log records for sending to New Relic.
|
|
1317
|
+
*/
|
|
1470
1318
|
enabled: {
|
|
1471
1319
|
formatter: boolean,
|
|
1472
1320
|
default: true
|
|
1321
|
+
},
|
|
1322
|
+
/**
|
|
1323
|
+
* Number of log records to send per minute to New Relic.
|
|
1324
|
+
*/
|
|
1325
|
+
max_samples_stored: {
|
|
1326
|
+
formatter: int,
|
|
1327
|
+
default: 10000
|
|
1328
|
+
},
|
|
1329
|
+
labels: {
|
|
1330
|
+
/**
|
|
1331
|
+
* If `true`, the agent attaches labels to log records.
|
|
1332
|
+
*/
|
|
1333
|
+
enabled: {
|
|
1334
|
+
formatter: boolean,
|
|
1335
|
+
default: false
|
|
1336
|
+
},
|
|
1337
|
+
/**
|
|
1338
|
+
* A case-insensitive array containing the labels to exclude from log records.
|
|
1339
|
+
*/
|
|
1340
|
+
exclude: {
|
|
1341
|
+
formatter: array,
|
|
1342
|
+
default: []
|
|
1343
|
+
}
|
|
1473
1344
|
}
|
|
1474
1345
|
},
|
|
1475
|
-
|
|
1346
|
+
metrics: {
|
|
1347
|
+
/**
|
|
1348
|
+
* Toggles whether the agent gathers logging metrics.
|
|
1349
|
+
*/
|
|
1476
1350
|
enabled: {
|
|
1477
1351
|
formatter: boolean,
|
|
1478
1352
|
default: true
|
|
1479
1353
|
}
|
|
1480
1354
|
},
|
|
1481
|
-
|
|
1355
|
+
local_decorating: {
|
|
1356
|
+
/**
|
|
1357
|
+
* Toggles whether the agent performs log decoration on standard log output.
|
|
1358
|
+
*/
|
|
1482
1359
|
enabled: {
|
|
1483
1360
|
formatter: boolean,
|
|
1484
|
-
default:
|
|
1361
|
+
default: false
|
|
1485
1362
|
}
|
|
1486
1363
|
}
|
|
1487
1364
|
},
|
|
1365
|
+
/**
|
|
1366
|
+
* You may want more control over how your agent is configured and want to
|
|
1367
|
+
* disallow the use of New Relic's server-side configuration for agents.
|
|
1368
|
+
* To do so, set this to true.
|
|
1369
|
+
*
|
|
1370
|
+
* env NEW_RELIC_IGNORE_SERVER_SIDE_CONFIG
|
|
1371
|
+
*/
|
|
1372
|
+
ignore_server_configuration: {
|
|
1373
|
+
formatter: boolean,
|
|
1374
|
+
default: false,
|
|
1375
|
+
env: 'NEW_RELIC_IGNORE_SERVER_SIDE_CONFIG'
|
|
1376
|
+
},
|
|
1488
1377
|
|
|
1489
1378
|
/**
|
|
1490
|
-
*
|
|
1379
|
+
* Toggles whether to capture code.* attributes on spans
|
|
1491
1380
|
*/
|
|
1492
|
-
|
|
1381
|
+
code_level_metrics: {
|
|
1382
|
+
enabled: {
|
|
1383
|
+
formatter: boolean,
|
|
1384
|
+
default: true
|
|
1385
|
+
}
|
|
1386
|
+
},
|
|
1493
1387
|
|
|
1494
1388
|
/**
|
|
1495
|
-
*
|
|
1389
|
+
* Obfuscates URL parameters
|
|
1390
|
+
* for outgoing and incoming requests
|
|
1391
|
+
* for distrubuted tracing attributes - both transaction and span attributes
|
|
1392
|
+
* for transaction trace transaction details
|
|
1496
1393
|
*/
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
default: 3600
|
|
1394
|
+
url_obfuscation: {
|
|
1395
|
+
/**
|
|
1396
|
+
* Toggles whether to obfuscate URL parameters
|
|
1397
|
+
*/
|
|
1398
|
+
enabled: {
|
|
1399
|
+
formatter: boolean,
|
|
1400
|
+
default: false
|
|
1505
1401
|
},
|
|
1402
|
+
|
|
1403
|
+
regex: {
|
|
1506
1404
|
/**
|
|
1507
|
-
*
|
|
1508
|
-
* Values are 0 or 1, 0 signifies run on all application instances
|
|
1405
|
+
* A regular expression to match URL parameters to obfuscate
|
|
1509
1406
|
*/
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1407
|
+
pattern: {
|
|
1408
|
+
formatter: regex,
|
|
1409
|
+
default: null
|
|
1410
|
+
},
|
|
1411
|
+
|
|
1412
|
+
/**
|
|
1413
|
+
* A string containing RegEx flags to use when matching URL parameters
|
|
1414
|
+
*/
|
|
1415
|
+
flags: {
|
|
1416
|
+
default: ''
|
|
1417
|
+
},
|
|
1418
|
+
|
|
1419
|
+
/**
|
|
1420
|
+
* A string containing a replacement value for URL parameters
|
|
1421
|
+
* can contain refferences to capture groups in the pattern
|
|
1422
|
+
*/
|
|
1423
|
+
replacement: {
|
|
1424
|
+
default: ''
|
|
1425
|
+
}
|
|
1513
1426
|
}
|
|
1514
1427
|
},
|
|
1515
1428
|
/**
|
|
1516
|
-
*
|
|
1429
|
+
* Security agent configurations
|
|
1517
1430
|
*/
|
|
1518
|
-
|
|
1431
|
+
security: {
|
|
1432
|
+
/**
|
|
1433
|
+
* Toggles the generation of security events by the security agent.
|
|
1434
|
+
*/
|
|
1435
|
+
enabled: {
|
|
1436
|
+
formatter: boolean,
|
|
1437
|
+
default: false
|
|
1438
|
+
},
|
|
1439
|
+
|
|
1519
1440
|
/**
|
|
1520
|
-
*
|
|
1521
|
-
*
|
|
1441
|
+
* Flag to tell the Node.js agent to load the security agent.
|
|
1442
|
+
* This property is read only once at application start.
|
|
1522
1443
|
*/
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1444
|
+
agent: {
|
|
1445
|
+
enabled: {
|
|
1446
|
+
formatter: boolean,
|
|
1447
|
+
default: false
|
|
1448
|
+
}
|
|
1526
1449
|
},
|
|
1450
|
+
|
|
1527
1451
|
/**
|
|
1528
|
-
*
|
|
1529
|
-
* time in minutes that the IAST scan will run
|
|
1452
|
+
* Security agent provides two modes: IAST and RASP. Default is IAST.
|
|
1530
1453
|
*/
|
|
1531
|
-
|
|
1532
|
-
formatter:
|
|
1533
|
-
default:
|
|
1454
|
+
mode: {
|
|
1455
|
+
formatter: allowList.bind(null, ['IAST', 'RASP']),
|
|
1456
|
+
default: 'IAST'
|
|
1534
1457
|
},
|
|
1458
|
+
|
|
1535
1459
|
/**
|
|
1536
|
-
*
|
|
1537
|
-
* By default, schedule is disabled
|
|
1538
|
-
*
|
|
1460
|
+
* Security agent validator URL. Must be prefixed with wss://.
|
|
1539
1461
|
*/
|
|
1540
|
-
|
|
1462
|
+
validator_service_url: {
|
|
1463
|
+
default: 'wss://csec.nr-data.net'
|
|
1464
|
+
},
|
|
1465
|
+
|
|
1541
1466
|
/**
|
|
1542
|
-
*
|
|
1543
|
-
* and the security agent will use this collected data to perform
|
|
1544
|
-
* an IAST scan at the scheduled time
|
|
1467
|
+
* Provide ability to toggle sending security events for the following rules.
|
|
1545
1468
|
*/
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1469
|
+
detection: {
|
|
1470
|
+
rci: {
|
|
1471
|
+
enabled: {
|
|
1472
|
+
formatter: boolean,
|
|
1473
|
+
default: true
|
|
1474
|
+
}
|
|
1475
|
+
},
|
|
1476
|
+
rxss: {
|
|
1477
|
+
enabled: {
|
|
1478
|
+
formatter: boolean,
|
|
1479
|
+
default: true
|
|
1480
|
+
}
|
|
1481
|
+
},
|
|
1482
|
+
deserialization: {
|
|
1483
|
+
enabled: {
|
|
1484
|
+
formatter: boolean,
|
|
1485
|
+
default: true
|
|
1486
|
+
}
|
|
1487
|
+
}
|
|
1488
|
+
},
|
|
1551
1489
|
|
|
1552
|
-
/**
|
|
1553
|
-
* The exclude from IAST scan setting allows to exclude specific APIs,
|
|
1554
|
-
* vulnerability categories, and parameters from IAST analysis.
|
|
1555
|
-
*/
|
|
1556
|
-
exclude_from_iast_scan: {
|
|
1557
1490
|
/**
|
|
1558
|
-
*
|
|
1559
|
-
* The regex pattern should provide a full match for the URL without the endpoint.
|
|
1491
|
+
* Unique test identifier when runnning IAST with CI/CD
|
|
1560
1492
|
*/
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
default: []
|
|
1564
|
-
},
|
|
1493
|
+
iast_test_identifier: '',
|
|
1494
|
+
|
|
1565
1495
|
/**
|
|
1566
|
-
*
|
|
1496
|
+
* IAST scan controllers to get more control over IAST analysis
|
|
1567
1497
|
*/
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
formatter:
|
|
1575
|
-
default:
|
|
1498
|
+
scan_controllers: {
|
|
1499
|
+
/**
|
|
1500
|
+
* The maximum number of analysis probes or requests
|
|
1501
|
+
* that can be sent to the application in one minute.
|
|
1502
|
+
*/
|
|
1503
|
+
iast_scan_request_rate_limit: {
|
|
1504
|
+
formatter: int,
|
|
1505
|
+
default: 3600
|
|
1576
1506
|
},
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1507
|
+
/**
|
|
1508
|
+
* The number of application instances for a specific entity where IAST analysis is performed.
|
|
1509
|
+
* Values are 0 or 1, 0 signifies run on all application instances
|
|
1510
|
+
*/
|
|
1511
|
+
scan_instance_count: {
|
|
1512
|
+
formatter: int,
|
|
1513
|
+
default: 0
|
|
1580
1514
|
}
|
|
1581
1515
|
},
|
|
1582
1516
|
/**
|
|
1583
|
-
*
|
|
1584
|
-
* for which IAST analysis will be applied or ignored.
|
|
1517
|
+
* Schedule start and stop of IAST scan
|
|
1585
1518
|
*/
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
formatter:
|
|
1593
|
-
default:
|
|
1594
|
-
},
|
|
1595
|
-
sql_injection: {
|
|
1596
|
-
formatter: boolean,
|
|
1597
|
-
default: false
|
|
1598
|
-
},
|
|
1599
|
-
nosql_injection: {
|
|
1600
|
-
formatter: boolean,
|
|
1601
|
-
default: false
|
|
1602
|
-
},
|
|
1603
|
-
ldap_injection: {
|
|
1604
|
-
formatter: boolean,
|
|
1605
|
-
default: false
|
|
1606
|
-
},
|
|
1607
|
-
javascript_injection: {
|
|
1608
|
-
formatter: boolean,
|
|
1609
|
-
default: false
|
|
1519
|
+
scan_schedule: {
|
|
1520
|
+
/**
|
|
1521
|
+
* The delay field specifies the time in minutes
|
|
1522
|
+
* before an IAST scan begins after the application starts
|
|
1523
|
+
*/
|
|
1524
|
+
delay: {
|
|
1525
|
+
formatter: int,
|
|
1526
|
+
default: 0
|
|
1610
1527
|
},
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1528
|
+
/**
|
|
1529
|
+
* The duration field specifies the amount of
|
|
1530
|
+
* time in minutes that the IAST scan will run
|
|
1531
|
+
*/
|
|
1532
|
+
duration: {
|
|
1533
|
+
formatter: int,
|
|
1534
|
+
default: 0
|
|
1614
1535
|
},
|
|
1615
|
-
|
|
1536
|
+
/**
|
|
1537
|
+
* The schedule field specifies a unix cron expression that defines when the IAST scan should run.
|
|
1538
|
+
* By default, schedule is disabled
|
|
1539
|
+
*
|
|
1540
|
+
*/
|
|
1541
|
+
schedule: '',
|
|
1542
|
+
/**
|
|
1543
|
+
* Allows IAST to actively collect trace data in the background
|
|
1544
|
+
* and the security agent will use this collected data to perform
|
|
1545
|
+
* an IAST scan at the scheduled time
|
|
1546
|
+
*/
|
|
1547
|
+
always_sample_traces: {
|
|
1616
1548
|
formatter: boolean,
|
|
1617
1549
|
default: false
|
|
1550
|
+
}
|
|
1551
|
+
},
|
|
1552
|
+
|
|
1553
|
+
/**
|
|
1554
|
+
* The exclude from IAST scan setting allows to exclude specific APIs,
|
|
1555
|
+
* vulnerability categories, and parameters from IAST analysis.
|
|
1556
|
+
*/
|
|
1557
|
+
exclude_from_iast_scan: {
|
|
1558
|
+
/**
|
|
1559
|
+
* Ignore specific APIs from IAST analysis.
|
|
1560
|
+
* The regex pattern should provide a full match for the URL without the endpoint.
|
|
1561
|
+
*/
|
|
1562
|
+
api: {
|
|
1563
|
+
formatter: array,
|
|
1564
|
+
default: []
|
|
1618
1565
|
},
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1566
|
+
/**
|
|
1567
|
+
* Ignore specific HTTP request parameters from IAST analysis.
|
|
1568
|
+
*/
|
|
1569
|
+
http_request_parameters: {
|
|
1570
|
+
header: {
|
|
1571
|
+
formatter: array,
|
|
1572
|
+
default: []
|
|
1573
|
+
},
|
|
1574
|
+
query: {
|
|
1575
|
+
formatter: array,
|
|
1576
|
+
default: []
|
|
1577
|
+
},
|
|
1578
|
+
body: {
|
|
1579
|
+
formatter: array,
|
|
1580
|
+
default: []
|
|
1581
|
+
}
|
|
1622
1582
|
},
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1583
|
+
/**
|
|
1584
|
+
* Allows users to specify categories of vulnerabilities
|
|
1585
|
+
* for which IAST analysis will be applied or ignored.
|
|
1586
|
+
*/
|
|
1587
|
+
iast_detection_category: {
|
|
1588
|
+
insecure_settings: {
|
|
1589
|
+
formatter: boolean,
|
|
1590
|
+
default: false
|
|
1591
|
+
},
|
|
1592
|
+
invalid_file_access: {
|
|
1593
|
+
formatter: boolean,
|
|
1594
|
+
default: false
|
|
1595
|
+
},
|
|
1596
|
+
sql_injection: {
|
|
1597
|
+
formatter: boolean,
|
|
1598
|
+
default: false
|
|
1599
|
+
},
|
|
1600
|
+
nosql_injection: {
|
|
1601
|
+
formatter: boolean,
|
|
1602
|
+
default: false
|
|
1603
|
+
},
|
|
1604
|
+
ldap_injection: {
|
|
1605
|
+
formatter: boolean,
|
|
1606
|
+
default: false
|
|
1607
|
+
},
|
|
1608
|
+
javascript_injection: {
|
|
1609
|
+
formatter: boolean,
|
|
1610
|
+
default: false
|
|
1611
|
+
},
|
|
1612
|
+
command_injection: {
|
|
1613
|
+
formatter: boolean,
|
|
1614
|
+
default: false
|
|
1615
|
+
},
|
|
1616
|
+
xpath_injection: {
|
|
1617
|
+
formatter: boolean,
|
|
1618
|
+
default: false
|
|
1619
|
+
},
|
|
1620
|
+
ssrf: {
|
|
1621
|
+
formatter: boolean,
|
|
1622
|
+
default: false
|
|
1623
|
+
},
|
|
1624
|
+
rxss: {
|
|
1625
|
+
formatter: boolean,
|
|
1626
|
+
default: false
|
|
1627
|
+
}
|
|
1626
1628
|
}
|
|
1627
1629
|
}
|
|
1628
|
-
}
|
|
1629
|
-
},
|
|
1630
|
-
|
|
1631
|
-
/**
|
|
1632
|
-
* When enabled, it will use `process.env.DYNO`
|
|
1633
|
-
* to set the hostname of the running application
|
|
1634
|
-
*/
|
|
1635
|
-
heroku: {
|
|
1636
|
-
use_dyno_names: {
|
|
1637
|
-
default: true,
|
|
1638
|
-
formatter: boolean
|
|
1639
|
-
}
|
|
1640
|
-
},
|
|
1641
|
-
|
|
1642
|
-
/**
|
|
1643
|
-
* When enabled, it will allow loading of the agent
|
|
1644
|
-
* in worker threads.
|
|
1645
|
-
*
|
|
1646
|
-
* In 11.0.0 we added code to prevent loading in worker threads
|
|
1647
|
-
* to cut down on unnecessary overhead of the agent. We have found
|
|
1648
|
-
* in testing that traces and spans were useless unless work was
|
|
1649
|
-
* completely self contained in the worker thread.
|
|
1650
|
-
*/
|
|
1651
|
-
worker_threads: {
|
|
1652
|
-
enabled: {
|
|
1653
|
-
formatter: boolean,
|
|
1654
|
-
default: false
|
|
1655
|
-
}
|
|
1656
|
-
},
|
|
1630
|
+
},
|
|
1657
1631
|
|
|
1658
|
-
/**
|
|
1659
|
-
* When enabled, instrumentation of supported AI libraries will be in
|
|
1660
|
-
* effect.
|
|
1661
|
-
*/
|
|
1662
|
-
ai_monitoring: {
|
|
1663
1632
|
/**
|
|
1664
|
-
*
|
|
1633
|
+
* When enabled, it will use `process.env.DYNO`
|
|
1634
|
+
* to set the hostname of the running application
|
|
1665
1635
|
*/
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1636
|
+
heroku: {
|
|
1637
|
+
use_dyno_names: {
|
|
1638
|
+
default: true,
|
|
1639
|
+
formatter: boolean
|
|
1640
|
+
}
|
|
1669
1641
|
},
|
|
1670
1642
|
|
|
1671
1643
|
/**
|
|
1672
|
-
* When enabled,
|
|
1673
|
-
*
|
|
1674
|
-
*
|
|
1644
|
+
* When enabled, it will allow loading of the agent
|
|
1645
|
+
* in worker threads.
|
|
1646
|
+
*
|
|
1647
|
+
* In 11.0.0 we added code to prevent loading in worker threads
|
|
1648
|
+
* to cut down on unnecessary overhead of the agent. We have found
|
|
1649
|
+
* in testing that traces and spans were useless unless work was
|
|
1650
|
+
* completely self contained in the worker thread.
|
|
1675
1651
|
*/
|
|
1676
|
-
|
|
1652
|
+
worker_threads: {
|
|
1677
1653
|
enabled: {
|
|
1678
1654
|
formatter: boolean,
|
|
1679
|
-
default:
|
|
1655
|
+
default: false
|
|
1680
1656
|
}
|
|
1681
1657
|
},
|
|
1682
1658
|
|
|
1683
1659
|
/**
|
|
1684
|
-
*
|
|
1685
|
-
*
|
|
1660
|
+
* When enabled, instrumentation of supported AI libraries will be in
|
|
1661
|
+
* effect.
|
|
1662
|
+
*/
|
|
1663
|
+
ai_monitoring: {
|
|
1664
|
+
/**
|
|
1665
|
+
* Toggles the generation of AI monitoring events by the agent.
|
|
1686
1666
|
*/
|
|
1687
|
-
streaming: {
|
|
1688
1667
|
enabled: {
|
|
1689
1668
|
formatter: boolean,
|
|
1690
|
-
default:
|
|
1669
|
+
default: false
|
|
1670
|
+
},
|
|
1671
|
+
|
|
1672
|
+
/**
|
|
1673
|
+
* When enabled, the content of LLM messages will be included in the
|
|
1674
|
+
* recorded spans (i.e. delivered to the New Relic collector). This is
|
|
1675
|
+
* enabled by default.
|
|
1676
|
+
*/
|
|
1677
|
+
record_content: {
|
|
1678
|
+
enabled: {
|
|
1679
|
+
formatter: boolean,
|
|
1680
|
+
default: true
|
|
1681
|
+
}
|
|
1682
|
+
},
|
|
1683
|
+
|
|
1684
|
+
/**
|
|
1685
|
+
* Toggles the capturing of Llm events when using streaming
|
|
1686
|
+
* based methods in AIM supported libraries(i.e.- openai, AWS bedrock, langchain)
|
|
1687
|
+
*/
|
|
1688
|
+
streaming: {
|
|
1689
|
+
enabled: {
|
|
1690
|
+
formatter: boolean,
|
|
1691
|
+
default: true
|
|
1692
|
+
}
|
|
1691
1693
|
}
|
|
1692
|
-
}
|
|
1693
|
-
},
|
|
1694
|
-
/**
|
|
1695
|
-
* Stanza that contains all keys to disable core & 3rd party package instrumentation(i.e. dns, http, mongodb, pg, redis, etc)
|
|
1696
|
-
* **Note**: Disabling a given library may affect the instrumentation of libraries used after
|
|
1697
|
-
* the disabled library. Use at your own risk.
|
|
1698
|
-
*/
|
|
1699
|
-
instrumentation: pkgInstrumentation,
|
|
1700
|
-
|
|
1701
|
-
/**
|
|
1702
|
-
* Governs the various OpenTelemetry based features provided by the
|
|
1703
|
-
* agent.
|
|
1704
|
-
*
|
|
1705
|
-
* NOTICE: this configuration is subject to change while the OTEL
|
|
1706
|
-
* feature set is in development.
|
|
1707
|
-
*/
|
|
1708
|
-
opentelemetry_bridge: {
|
|
1694
|
+
},
|
|
1709
1695
|
/**
|
|
1710
|
-
*
|
|
1711
|
-
*
|
|
1712
|
-
*
|
|
1696
|
+
* Stanza that contains all keys to disable core & 3rd party package instrumentation(i.e. dns, http, mongodb, pg, redis, etc)
|
|
1697
|
+
* **Note**: Disabling a given library may affect the instrumentation of libraries used after
|
|
1698
|
+
* the disabled library. Use at your own risk.
|
|
1713
1699
|
*/
|
|
1714
|
-
|
|
1700
|
+
instrumentation: pkgInstrumentation,
|
|
1715
1701
|
|
|
1716
1702
|
/**
|
|
1717
|
-
*
|
|
1718
|
-
* enables bridging OpenTelemetry instrumentations into the New Relic
|
|
1703
|
+
* Governs the various OpenTelemetry based features provided by the
|
|
1719
1704
|
* agent.
|
|
1720
|
-
*/
|
|
1721
|
-
traces: {
|
|
1722
|
-
enabled: { default: false, formatter: boolean }
|
|
1723
|
-
},
|
|
1724
|
-
|
|
1725
|
-
/**
|
|
1726
|
-
* `logs` governs automatic configuration of the OpenTelemetry logs API.
|
|
1727
|
-
* When true, the agent will automatically configure the logs API to send
|
|
1728
|
-
* logs emitted through the OTEL specific API to New Relic.
|
|
1729
1705
|
*
|
|
1730
|
-
*
|
|
1731
|
-
*
|
|
1706
|
+
* NOTICE: this configuration is subject to change while the OTEL
|
|
1707
|
+
* feature set is in development.
|
|
1732
1708
|
*/
|
|
1733
|
-
|
|
1734
|
-
enabled: { default: false, formatter: boolean }
|
|
1735
|
-
},
|
|
1736
|
-
|
|
1709
|
+
opentelemetry_bridge: {
|
|
1737
1710
|
/**
|
|
1738
|
-
*
|
|
1739
|
-
*
|
|
1740
|
-
*
|
|
1741
|
-
* application entity that is instrumented by the New Relic agent.
|
|
1711
|
+
* Global switch for the whole OpenTelemetry feature. If it is set to
|
|
1712
|
+
* `false`, any other sub-feature, e.g. `traces`, will not be enabled
|
|
1713
|
+
* regardless of that specific sub-feature setting.
|
|
1742
1714
|
*/
|
|
1743
|
-
metrics: {
|
|
1744
1715
|
enabled: { default: false, formatter: boolean },
|
|
1745
1716
|
|
|
1746
1717
|
/**
|
|
1747
|
-
* `
|
|
1748
|
-
*
|
|
1749
|
-
*
|
|
1718
|
+
* `traces` are instrumentations, e.g. `@fastify/otel`. Enabling `traces`
|
|
1719
|
+
* enables bridging OpenTelemetry instrumentations into the New Relic
|
|
1720
|
+
* agent.
|
|
1721
|
+
*/
|
|
1722
|
+
traces: {
|
|
1723
|
+
enabled: { default: false, formatter: boolean }
|
|
1724
|
+
},
|
|
1725
|
+
|
|
1726
|
+
/**
|
|
1727
|
+
* `logs` governs automatic configuration of the OpenTelemetry logs API.
|
|
1728
|
+
* When true, the agent will automatically configure the logs API to send
|
|
1729
|
+
* logs emitted through the OTEL specific API to New Relic.
|
|
1730
|
+
*
|
|
1731
|
+
* This feature is dependent on application logs forwarding. Thus,
|
|
1732
|
+
* application logs forwarding must be enabled as well.
|
|
1750
1733
|
*/
|
|
1751
|
-
|
|
1752
|
-
default:
|
|
1753
|
-
formatter: int
|
|
1734
|
+
logs: {
|
|
1735
|
+
enabled: { default: false, formatter: boolean }
|
|
1754
1736
|
},
|
|
1755
1737
|
|
|
1756
1738
|
/**
|
|
1757
|
-
* `
|
|
1758
|
-
*
|
|
1759
|
-
*
|
|
1760
|
-
*
|
|
1739
|
+
* `metrics` governs automatic configuration of the OpenTelemetry
|
|
1740
|
+
* metrics API. When `true`, the agent will automatically configure the
|
|
1741
|
+
* metrics API to send metrics to New Relic and attach them to the
|
|
1742
|
+
* application entity that is instrumented by the New Relic agent.
|
|
1761
1743
|
*/
|
|
1762
|
-
|
|
1763
|
-
default:
|
|
1764
|
-
|
|
1744
|
+
metrics: {
|
|
1745
|
+
enabled: { default: false, formatter: boolean },
|
|
1746
|
+
|
|
1747
|
+
/**
|
|
1748
|
+
* `exportInterval` defines the number of milliseconds between each
|
|
1749
|
+
* attempt to ship metrics to New Relic. This value must be equal to
|
|
1750
|
+
* or greater than the value of `exportTimeout`.
|
|
1751
|
+
*/
|
|
1752
|
+
exportInterval: {
|
|
1753
|
+
default: 60_000,
|
|
1754
|
+
formatter: int
|
|
1755
|
+
},
|
|
1756
|
+
|
|
1757
|
+
/**
|
|
1758
|
+
* `exportTimeout` defines the number of milliseconds an export operation
|
|
1759
|
+
* is allowed in order to successfully complete. If the timeout is
|
|
1760
|
+
* exceeded, it will be reported via the OpenTelemetry diagnostics
|
|
1761
|
+
* API.
|
|
1762
|
+
*/
|
|
1763
|
+
exportTimeout: {
|
|
1764
|
+
default: 30_000,
|
|
1765
|
+
formatter: int
|
|
1766
|
+
}
|
|
1765
1767
|
}
|
|
1766
1768
|
}
|
|
1767
1769
|
}
|
|
1768
|
-
}
|
|
1770
|
+
}
|
|
1769
1771
|
|
|
1770
1772
|
/**
|
|
1771
1773
|
* Creates a new default config
|