newrelic_rpm 9.11.0 → 9.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +74 -0
- data/README.md +1 -1
- data/lib/new_relic/agent/agent_logger.rb +1 -0
- data/lib/new_relic/agent/configuration/default_source.rb +106 -3
- data/lib/new_relic/agent/database/obfuscator.rb +1 -0
- data/lib/new_relic/agent/instrumentation/bunny/instrumentation.rb +14 -0
- data/lib/new_relic/agent/instrumentation/elasticsearch/instrumentation.rb +1 -1
- data/lib/new_relic/agent/instrumentation/logstasher/chain.rb +21 -0
- data/lib/new_relic/agent/instrumentation/logstasher/instrumentation.rb +24 -0
- data/lib/new_relic/agent/instrumentation/logstasher/prepend.rb +13 -0
- data/lib/new_relic/agent/instrumentation/logstasher.rb +27 -0
- data/lib/new_relic/agent/instrumentation/rack/instrumentation.rb +3 -0
- data/lib/new_relic/agent/instrumentation/rails_notifications/action_controller.rb +9 -5
- data/lib/new_relic/agent/instrumentation/redis/cluster_middleware.rb +26 -0
- data/lib/new_relic/agent/instrumentation/redis/instrumentation.rb +14 -11
- data/lib/new_relic/agent/instrumentation/redis/middleware.rb +3 -0
- data/lib/new_relic/agent/instrumentation/redis.rb +5 -0
- data/lib/new_relic/agent/local_log_decorator.rb +8 -1
- data/lib/new_relic/agent/log_event_aggregator.rb +91 -26
- data/lib/new_relic/control/instance_methods.rb +1 -0
- data/lib/new_relic/control/private_instance_methods.rb +4 -0
- data/lib/new_relic/control/security_interface.rb +57 -0
- data/lib/new_relic/control.rb +1 -1
- data/lib/new_relic/rack/browser_monitoring.rb +11 -7
- data/lib/new_relic/version.rb +1 -1
- data/lib/tasks/config.rake +5 -2
- data/lib/tasks/helpers/config.html.erb +1 -1
- data/lib/tasks/helpers/format.rb +1 -1
- data/lib/tasks/helpers/newrelicyml.rb +3 -2
- data/lib/tasks/instrumentation_generator/instrumentation.thor +1 -0
- data/newrelic.yml +200 -137
- data/test/agent_helper.rb +9 -0
- metadata +8 -2
data/newrelic.yml
CHANGED
@@ -26,16 +26,16 @@ common: &default_settings
|
|
26
26
|
# All of the following configuration options are optional. Review them, and
|
27
27
|
# uncomment or edit them if they appear relevant to your application needs.
|
28
28
|
|
29
|
-
# An array of ActiveSupport custom event names to subscribe to and instrument.
|
30
|
-
# example,
|
29
|
+
# An array of ActiveSupport custom event names to subscribe to and instrument.
|
30
|
+
# For example,
|
31
31
|
# - one.custom.event
|
32
32
|
# - another.event
|
33
33
|
# - a.third.event
|
34
34
|
# active_support_custom_events_names: []
|
35
35
|
|
36
|
-
# If false, all LLM instrumentation (OpenAI only for now) will be disabled and
|
37
|
-
# metrics, events, or spans will be sent. AI Monitoring is automatically
|
38
|
-
# if high_security mode is enabled.
|
36
|
+
# If false, all LLM instrumentation (OpenAI only for now) will be disabled and
|
37
|
+
# no metrics, events, or spans will be sent. AI Monitoring is automatically
|
38
|
+
# disabled if high_security mode is enabled.
|
39
39
|
# ai_monitoring.enabled: false
|
40
40
|
|
41
41
|
# If false, LLM instrumentation (OpenAI only for now) will not capture input and
|
@@ -43,23 +43,23 @@ common: &default_settings
|
|
43
43
|
# The excluded attributes include:
|
44
44
|
# * content from LlmChatCompletionMessage events
|
45
45
|
# * input from LlmEmbedding events
|
46
|
-
# This is an optional security setting to prevent recording sensitive data sent
|
47
|
-
# and received from your LLMs.
|
46
|
+
# This is an optional security setting to prevent recording sensitive data sent
|
47
|
+
# to and received from your LLMs.
|
48
48
|
# ai_monitoring.record_content.enabled: true
|
49
49
|
|
50
50
|
# If true, enables capture of all HTTP request headers for all destinations.
|
51
51
|
# allow_all_headers: false
|
52
52
|
|
53
|
-
# Your New Relic userKey. Required when using the New Relic REST API v2 to
|
54
|
-
# deployments using the newrelic deployments command.
|
53
|
+
# Your New Relic userKey. Required when using the New Relic REST API v2 to
|
54
|
+
# record deployments using the newrelic deployments command.
|
55
55
|
# api_key: ""
|
56
56
|
|
57
57
|
# If true, enables log decoration and the collection of log events and metrics.
|
58
58
|
# application_logging.enabled: true
|
59
59
|
|
60
60
|
# A hash with key/value pairs to add as custom attributes to all log events
|
61
|
-
# forwarded to New Relic. If sending using an environment variable, the value
|
62
|
-
# be formatted like: "key1=value1,key2=value2"
|
61
|
+
# forwarded to New Relic. If sending using an environment variable, the value
|
62
|
+
# must be formatted like: "key1=value1,key2=value2"
|
63
63
|
# application_logging.forwarding.custom_attributes: {}
|
64
64
|
|
65
65
|
# If true, the agent captures log records emitted by your application.
|
@@ -126,16 +126,16 @@ common: &default_settings
|
|
126
126
|
# instrument. For example, "assets:precompile,db:migrate".
|
127
127
|
# autostart.denylisted_rake_tasks: about,assets:clean,assets:clobber,assets:environment,assets:precompile,assets:precompile:all,db:create,db:drop,db:fixtures:load,db:migrate,db:migrate:status,db:rollback,db:schema:cache:clear,db:schema:cache:dump,db:schema:dump,db:schema:load,db:seed,db:setup,db:structure:dump,db:version,doc:app,log:clear,middleware,notes,notes:custom,rails:template,rails:update,routes,secret,spec,spec:features,spec:requests,spec:controllers,spec:helpers,spec:models,spec:views,spec:routing,spec:rcov,stats,test,test:all,test:all:db,test:recent,test:single,test:uncommitted,time:zones:all,tmp:clear,tmp:create,webpacker:compile
|
128
128
|
|
129
|
-
# Backports the faster ActiveRecord connection lookup introduced in Rails 6,
|
130
|
-
# improves agent performance when instrumenting ActiveRecord. Note that
|
131
|
-
# setting may not be compatible with other gems that patch ActiveRecord.
|
129
|
+
# Backports the faster ActiveRecord connection lookup introduced in Rails 6,
|
130
|
+
# which improves agent performance when instrumenting ActiveRecord. Note that
|
131
|
+
# this setting may not be compatible with other gems that patch ActiveRecord.
|
132
132
|
# backport_fast_active_record_connection_lookup: false
|
133
133
|
|
134
134
|
# If true, the agent captures attributes from browser monitoring.
|
135
135
|
# browser_monitoring.attributes.enabled: false
|
136
136
|
|
137
|
-
# Prefix of attributes to exclude from browser monitoring. Allows * as wildcard
|
138
|
-
# end.
|
137
|
+
# Prefix of attributes to exclude from browser monitoring. Allows * as wildcard
|
138
|
+
# at end.
|
139
139
|
# browser_monitoring.attributes.exclude: []
|
140
140
|
|
141
141
|
# Prefix of attributes to include in browser monitoring. Allows * as wildcard at
|
@@ -160,17 +160,17 @@ common: &default_settings
|
|
160
160
|
|
161
161
|
# When true, the agent captures HTTP request parameters and attaches them to
|
162
162
|
# transaction traces, traced errors, and TransactionError events.
|
163
|
-
# When using the capture_params setting, the Ruby agent will not attempt to
|
164
|
-
# secret information. Recommendation: To filter secret information from
|
165
|
-
# parameters, use the attributes.include setting instead. For more
|
166
|
-
# see the Ruby attribute examples.
|
163
|
+
# When using the capture_params setting, the Ruby agent will not attempt to
|
164
|
+
# filter secret information. Recommendation: To filter secret information from
|
165
|
+
# request parameters, use the attributes.include setting instead. For more
|
166
|
+
# information, see the Ruby attribute examples.
|
167
167
|
# capture_params: false
|
168
168
|
|
169
169
|
# If true, the agent will clear Tracer::State in Agent.drop_buffered_data.
|
170
170
|
# clear_transaction_state_after_fork: false
|
171
171
|
|
172
172
|
# If true, the agent will report source code level metrics for traced methods.
|
173
|
-
#
|
173
|
+
# See:
|
174
174
|
# https://docs.newrelic.com/docs/apm/agents/ruby-agent/features/ruby-codestream-integration/
|
175
175
|
# code_level_metrics.enabled: true
|
176
176
|
|
@@ -188,17 +188,17 @@ common: &default_settings
|
|
188
188
|
# If true, the agent captures custom events.
|
189
189
|
# custom_insights_events.enabled: true
|
190
190
|
|
191
|
-
# * Specify a maximum number of custom events to buffer in memory at a time.
|
191
|
+
# * Specify a maximum number of custom events to buffer in memory at a time.
|
192
192
|
# * When configuring the agent for AI monitoring, set to max value 100000. This
|
193
193
|
# ensures the agent captures the maximum amount of LLM events.
|
194
194
|
# custom_insights_events.max_samples_stored: 3000
|
195
195
|
|
196
|
-
# If false, the agent will not add database_name parameter to transaction or
|
197
|
-
# sql traces.
|
196
|
+
# If false, the agent will not add database_name parameter to transaction or
|
197
|
+
# slow sql traces.
|
198
198
|
# datastore_tracer.database_name_reporting.enabled: true
|
199
199
|
|
200
|
-
# If false, the agent will not report datastore instance metrics, nor add host
|
201
|
-
# port_path_or_id parameters to transaction or slow SQL traces.
|
200
|
+
# If false, the agent will not report datastore instance metrics, nor add host
|
201
|
+
# or port_path_or_id parameters to transaction or slow SQL traces.
|
202
202
|
# datastore_tracer.instance_reporting.enabled: true
|
203
203
|
|
204
204
|
# If true, disables Action Cable instrumentation.
|
@@ -244,16 +244,16 @@ common: &default_settings
|
|
244
244
|
# If true, the agent won't wrap third-party middlewares in instrumentation
|
245
245
|
# (regardless of whether they are installed via Rack::Builder or Rails).
|
246
246
|
# When middleware instrumentation is disabled, if an application is using
|
247
|
-
# middleware that could alter the response code, the HTTP status code reported
|
248
|
-
# the transaction may not reflect the altered value.
|
247
|
+
# middleware that could alter the response code, the HTTP status code reported
|
248
|
+
# on the transaction may not reflect the altered value.
|
249
249
|
# disable_middleware_instrumentation: false
|
250
250
|
|
251
|
-
# If true, disables agent middleware for Roda. This middleware is responsible
|
252
|
-
# advanced feature support such as page load timing and error collection.
|
251
|
+
# If true, disables agent middleware for Roda. This middleware is responsible
|
252
|
+
# for advanced feature support such as page load timing and error collection.
|
253
253
|
# disable_roda_auto_middleware: false
|
254
254
|
|
255
|
-
# If true, disables the collection of sampler metrics. Sampler metrics are
|
256
|
-
# that are not event-based (such as CPU time or memory usage).
|
255
|
+
# If true, disables the collection of sampler metrics. Sampler metrics are
|
256
|
+
# metrics that are not event-based (such as CPU time or memory usage).
|
257
257
|
# disable_samplers: false
|
258
258
|
|
259
259
|
# If true, disables Sequel instrumentation.
|
@@ -287,8 +287,8 @@ common: &default_settings
|
|
287
287
|
|
288
288
|
# Distributed tracing lets you see the path that a request takes through your
|
289
289
|
# distributed system. Enabling distributed tracing changes the behavior of some
|
290
|
-
# New Relic features, so carefully consult the transition guide before you
|
291
|
-
# this feature.
|
290
|
+
# New Relic features, so carefully consult the transition guide before you
|
291
|
+
# enable this feature.
|
292
292
|
# distributed_tracing.enabled: true
|
293
293
|
|
294
294
|
# If true, the agent captures Elasticsearch queries in transaction traces.
|
@@ -319,8 +319,8 @@ common: &default_settings
|
|
319
319
|
# error_collector.expected_classes: []
|
320
320
|
|
321
321
|
# A map of error classes to a list of messages. When an error of one of the
|
322
|
-
# classes specified here occurs, if its error message contains one of the
|
323
|
-
# corresponding to it here, that error will be treated as expected.
|
322
|
+
# classes specified here occurs, if its error message contains one of the
|
323
|
+
# strings corresponding to it here, that error will be treated as expected.
|
324
324
|
# This option can't be set via environment variable.
|
325
325
|
# error_collector.expected_messages: {}
|
326
326
|
|
@@ -334,8 +334,8 @@ common: &default_settings
|
|
334
334
|
# error_collector.ignore_classes: ["ActionController::RoutingError", "Sinatra::NotFound"]
|
335
335
|
|
336
336
|
# A map of error classes to a list of messages. When an error of one of the
|
337
|
-
# classes specified here occurs, if its error message contains one of the
|
338
|
-
# corresponding to it here, that error will be ignored.
|
337
|
+
# classes specified here occurs, if its error message contains one of the
|
338
|
+
# strings corresponding to it here, that error will be ignored.
|
339
339
|
# This option can't be set via environment variable.
|
340
340
|
# error_collector.ignore_messages: {}
|
341
341
|
|
@@ -343,9 +343,9 @@ common: &default_settings
|
|
343
343
|
# associated with these status codes, where applicable, will be ignored.
|
344
344
|
# error_collector.ignore_status_codes: ""
|
345
345
|
|
346
|
-
# Defines the maximum number of frames in an error backtrace. Backtraces over
|
347
|
-
# amount are truncated in the middle, preserving the beginning and the end
|
348
|
-
# stack trace.
|
346
|
+
# Defines the maximum number of frames in an error backtrace. Backtraces over
|
347
|
+
# this amount are truncated in the middle, preserving the beginning and the end
|
348
|
+
# of the stack trace.
|
349
349
|
# error_collector.max_backtrace_frames: 50
|
350
350
|
|
351
351
|
# Defines the maximum number of TransactionError events reported per harvest
|
@@ -357,18 +357,19 @@ common: &default_settings
|
|
357
357
|
# exclude_newrelic_header: false
|
358
358
|
|
359
359
|
# The exit handler that sends all cached data to the collector before shutting
|
360
|
-
# down is forcibly installed. This is true even when it detects scenarios where
|
361
|
-
# generally should not be. The known use case for this option is when Sinatra
|
362
|
-
# as an embedded service within another framework. The agent detects the
|
363
|
-
# app and skips the at_exit handler as a result. Sinatra classically
|
364
|
-
# entire application in an at_exit block and would otherwise misbehave
|
365
|
-
# agent's at_exit handler was also installed in those circumstances.
|
366
|
-
# send_data_on_exit should also be set to true in tandem with this
|
360
|
+
# down is forcibly installed. This is true even when it detects scenarios where
|
361
|
+
# it generally should not be. The known use case for this option is when Sinatra
|
362
|
+
# runs as an embedded service within another framework. The agent detects the
|
363
|
+
# Sinatra app and skips the at_exit handler as a result. Sinatra classically
|
364
|
+
# runs the entire application in an at_exit block and would otherwise misbehave
|
365
|
+
# if the agent's at_exit handler was also installed in those circumstances.
|
366
|
+
# Note: send_data_on_exit should also be set to true in tandem with this
|
367
|
+
# setting.
|
367
368
|
# force_install_exit_handler: false
|
368
369
|
|
369
|
-
# Ordinarily the agent reports dyno names with a trailing dot and process ID
|
370
|
-
# example, worker.3). You can remove this trailing data by specifying the
|
371
|
-
# you want to report without trailing data (for example, worker).
|
370
|
+
# Ordinarily the agent reports dyno names with a trailing dot and process ID
|
371
|
+
# (for example, worker.3). You can remove this trailing data by specifying the
|
372
|
+
# prefixes you want to report without trailing data (for example, worker).
|
372
373
|
# heroku.dyno_name_prefixes_to_shorten: ["scheduler", "run"]
|
373
374
|
|
374
375
|
# If true, the agent uses Heroku dyno names as the hostname.
|
@@ -395,8 +396,8 @@ common: &default_settings
|
|
395
396
|
# Configures the TCP/IP port for the trace observer Host
|
396
397
|
# infinite_tracing.trace_observer.port: 443
|
397
398
|
|
398
|
-
# Controls auto-instrumentation of ActiveSupport::BroadcastLogger at start up.
|
399
|
-
# be one of: auto, prepend, chain, disabled. Used in Rails versions >= 7.1.
|
399
|
+
# Controls auto-instrumentation of ActiveSupport::BroadcastLogger at start up.
|
400
|
+
# May be one of: auto, prepend, chain, disabled. Used in Rails versions >= 7.1.
|
400
401
|
# instrumentation.active_support_broadcast_logger: auto
|
401
402
|
|
402
403
|
# Controls auto-instrumentation of ActiveSupport::Logger at start up. May be one
|
@@ -407,20 +408,20 @@ common: &default_settings
|
|
407
408
|
# prepend, chain, disabled.
|
408
409
|
# instrumentation.async_http: auto
|
409
410
|
|
410
|
-
# Controls auto-instrumentation of the aws-sdk-sqs library at start-up. May be
|
411
|
-
# of: auto, prepend, chain, disabled.
|
411
|
+
# Controls auto-instrumentation of the aws-sdk-sqs library at start-up. May be
|
412
|
+
# one of: auto, prepend, chain, disabled.
|
412
413
|
# instrumentation.aws_sqs: auto
|
413
414
|
|
414
415
|
# Controls auto-instrumentation of bunny at start-up. May be one of: auto,
|
415
416
|
# prepend, chain, disabled.
|
416
417
|
# instrumentation.bunny: auto
|
417
418
|
|
418
|
-
# Controls auto-instrumentation of the concurrent-ruby library at start-up. May
|
419
|
-
# one of: auto, prepend, chain, disabled.
|
419
|
+
# Controls auto-instrumentation of the concurrent-ruby library at start-up. May
|
420
|
+
# be one of: auto, prepend, chain, disabled.
|
420
421
|
# instrumentation.concurrent_ruby: auto
|
421
422
|
|
422
|
-
# Controls auto-instrumentation of Curb at start-up. May be one of: auto,
|
423
|
-
# chain, disabled.
|
423
|
+
# Controls auto-instrumentation of Curb at start-up. May be one of: auto,
|
424
|
+
# prepend, chain, disabled.
|
424
425
|
# instrumentation.curb: auto
|
425
426
|
|
426
427
|
# Controls auto-instrumentation of Delayed Job at start-up. May be one of: auto,
|
@@ -435,8 +436,8 @@ common: &default_settings
|
|
435
436
|
# one of: auto, prepend, chain, disabled.
|
436
437
|
# instrumentation.elasticsearch: auto
|
437
438
|
|
438
|
-
# Controls auto-instrumentation of ethon at start up. May be one of auto,
|
439
|
-
# chain, disabled
|
439
|
+
# Controls auto-instrumentation of ethon at start up. May be one of auto,
|
440
|
+
# prepend, chain, disabled
|
440
441
|
# instrumentation.ethon: auto
|
441
442
|
|
442
443
|
# Controls auto-instrumentation of Excon at start-up. May be one of: enabled,
|
@@ -454,18 +455,18 @@ common: &default_settings
|
|
454
455
|
# Specifies a list of hostname patterns separated by commas that will match gRPC
|
455
456
|
# hostnames that traffic is to be ignored by New Relic for. New Relic's gRPC
|
456
457
|
# client instrumentation will ignore traffic streamed to a host matching any of
|
457
|
-
# these patterns, and New Relic's gRPC server instrumentation will ignore
|
458
|
-
# for a server running on a host whose hostname matches any of these
|
459
|
-
# default, no traffic is ignored when gRPC instrumentation is
|
460
|
-
# example, "private.com$,exception.*"
|
458
|
+
# these patterns, and New Relic's gRPC server instrumentation will ignore
|
459
|
+
# traffic for a server running on a host whose hostname matches any of these
|
460
|
+
# patterns. By default, no traffic is ignored when gRPC instrumentation is
|
461
|
+
# itself enabled. For example, "private.com$,exception.*"
|
461
462
|
# instrumentation.grpc.host_denylist: []
|
462
463
|
|
463
|
-
# Controls auto-instrumentation of gRPC clients at start-up. May be one of:
|
464
|
-
# prepend, chain, disabled.
|
464
|
+
# Controls auto-instrumentation of gRPC clients at start-up. May be one of:
|
465
|
+
# auto, prepend, chain, disabled.
|
465
466
|
# instrumentation.grpc_client: auto
|
466
467
|
|
467
|
-
# Controls auto-instrumentation of gRPC servers at start-up. May be one of:
|
468
|
-
# prepend, chain, disabled.
|
468
|
+
# Controls auto-instrumentation of gRPC servers at start-up. May be one of:
|
469
|
+
# auto, prepend, chain, disabled.
|
469
470
|
# instrumentation.grpc_server: auto
|
470
471
|
|
471
472
|
# Controls auto-instrumentation of HTTPClient at start-up. May be one of: auto,
|
@@ -476,24 +477,28 @@ common: &default_settings
|
|
476
477
|
# prepend, chain, disabled.
|
477
478
|
# instrumentation.httprb: auto
|
478
479
|
|
479
|
-
# Controls auto-instrumentation of httpx at start up. May be one of auto,
|
480
|
-
# chain, disabled
|
480
|
+
# Controls auto-instrumentation of httpx at start up. May be one of auto,
|
481
|
+
# prepend, chain, disabled
|
481
482
|
# instrumentation.httpx: auto
|
482
483
|
|
483
484
|
# Controls auto-instrumentation of Ruby standard library Logger at start-up. May
|
484
485
|
# be one of: auto, prepend, chain, disabled.
|
485
486
|
# instrumentation.logger: auto
|
486
487
|
|
487
|
-
# Controls auto-instrumentation of
|
488
|
-
# of: auto, prepend, chain, disabled.
|
488
|
+
# Controls auto-instrumentation of the LogStasher library at start-up. May be
|
489
|
+
# one of: auto, prepend, chain, disabled.
|
490
|
+
# instrumentation.logstasher: auto
|
491
|
+
|
492
|
+
# Controls auto-instrumentation of dalli gem for Memcache at start-up. May be
|
493
|
+
# one of: auto, prepend, chain, disabled.
|
489
494
|
# instrumentation.memcache: auto
|
490
495
|
|
491
496
|
# Controls auto-instrumentation of memcache-client gem for Memcache at start-up.
|
492
497
|
# May be one of: auto, prepend, chain, disabled.
|
493
498
|
# instrumentation.memcache_client: auto
|
494
499
|
|
495
|
-
# Controls auto-instrumentation of memcached gem for Memcache at start-up. May
|
496
|
-
# one of: auto, prepend, chain, disabled.
|
500
|
+
# Controls auto-instrumentation of memcached gem for Memcache at start-up. May
|
501
|
+
# be one of: auto, prepend, chain, disabled.
|
497
502
|
# instrumentation.memcached: auto
|
498
503
|
|
499
504
|
# Controls auto-instrumentation of Mongo at start-up. May be one of: enabled,
|
@@ -504,13 +509,13 @@ common: &default_settings
|
|
504
509
|
# prepend, chain, disabled.
|
505
510
|
# instrumentation.net_http: auto
|
506
511
|
|
507
|
-
# Controls auto-instrumentation of Puma::Rack. When enabled, the agent hooks
|
508
|
-
# the to_app method in Puma::Rack::Builder to find gems to instrument
|
509
|
-
# application startup. May be one of: auto, prepend, chain, disabled.
|
512
|
+
# Controls auto-instrumentation of Puma::Rack. When enabled, the agent hooks
|
513
|
+
# into the to_app method in Puma::Rack::Builder to find gems to instrument
|
514
|
+
# during application startup. May be one of: auto, prepend, chain, disabled.
|
510
515
|
# instrumentation.puma_rack: auto
|
511
516
|
|
512
|
-
# Controls auto-instrumentation of Puma::Rack::URLMap at start-up. May be one
|
513
|
-
# auto, prepend, chain, disabled.
|
517
|
+
# Controls auto-instrumentation of Puma::Rack::URLMap at start-up. May be one
|
518
|
+
# of: auto, prepend, chain, disabled.
|
514
519
|
# instrumentation.puma_rack_urlmap: auto
|
515
520
|
|
516
521
|
# Controls auto-instrumentation of Rack. When enabled, the agent hooks into the
|
@@ -518,12 +523,12 @@ common: &default_settings
|
|
518
523
|
# startup. May be one of: auto, prepend, chain, disabled.
|
519
524
|
# instrumentation.rack: auto
|
520
525
|
|
521
|
-
# Controls auto-instrumentation of Rack::URLMap at start-up. May be one of:
|
522
|
-
# prepend, chain, disabled.
|
526
|
+
# Controls auto-instrumentation of Rack::URLMap at start-up. May be one of:
|
527
|
+
# auto, prepend, chain, disabled.
|
523
528
|
# instrumentation.rack_urlmap: auto
|
524
529
|
|
525
|
-
# Controls auto-instrumentation of rake at start-up. May be one of: auto,
|
526
|
-
# chain, disabled.
|
530
|
+
# Controls auto-instrumentation of rake at start-up. May be one of: auto,
|
531
|
+
# prepend, chain, disabled.
|
527
532
|
# instrumentation.rake: auto
|
528
533
|
|
529
534
|
# Controls auto-instrumentation of Redis at start-up. May be one of: auto,
|
@@ -534,12 +539,13 @@ common: &default_settings
|
|
534
539
|
# prepend, chain, disabled.
|
535
540
|
# instrumentation.resque: auto
|
536
541
|
|
537
|
-
# Controls auto-instrumentation of Roda at start-up. May be one of: auto,
|
538
|
-
# chain, disabled.
|
542
|
+
# Controls auto-instrumentation of Roda at start-up. May be one of: auto,
|
543
|
+
# prepend, chain, disabled.
|
539
544
|
# instrumentation.roda: auto
|
540
545
|
|
541
|
-
# Controls auto-instrumentation of the ruby-openai gem at start-up. May be one
|
542
|
-
# auto, prepend, chain, disabled. Defaults to disabled in high security
|
546
|
+
# Controls auto-instrumentation of the ruby-openai gem at start-up. May be one
|
547
|
+
# of: auto, prepend, chain, disabled. Defaults to disabled in high security
|
548
|
+
# mode.
|
543
549
|
# instrumentation.ruby_openai: auto
|
544
550
|
|
545
551
|
# Controls auto-instrumentation of Sinatra at start-up. May be one of: auto,
|
@@ -550,10 +556,11 @@ common: &default_settings
|
|
550
556
|
# disabled.
|
551
557
|
# instrumentation.stripe: enabled
|
552
558
|
|
553
|
-
# Controls auto-instrumentation of the Thread class at start-up to allow the
|
554
|
-
# to correctly nest spans inside of an asynchronous transaction. This does
|
555
|
-
# enable the agent to automatically trace all threads created (see
|
556
|
-
# instrumentation.thread.tracing). May be one of: auto, prepend, chain,
|
559
|
+
# Controls auto-instrumentation of the Thread class at start-up to allow the
|
560
|
+
# agent to correctly nest spans inside of an asynchronous transaction. This does
|
561
|
+
# not enable the agent to automatically trace all threads created (see
|
562
|
+
# instrumentation.thread.tracing). May be one of: auto, prepend, chain,
|
563
|
+
# disabled.
|
557
564
|
# instrumentation.thread: auto
|
558
565
|
|
559
566
|
# Controls auto-instrumentation of the Thread class at start-up to automatically
|
@@ -568,8 +575,8 @@ common: &default_settings
|
|
568
575
|
# prepend, chain, disabled.
|
569
576
|
# instrumentation.typhoeus: auto
|
570
577
|
|
571
|
-
# Controls auto-instrumentation of ViewComponent at startup. May be one of:
|
572
|
-
# prepend, chain, disabled.
|
578
|
+
# Controls auto-instrumentation of ViewComponent at startup. May be one of:
|
579
|
+
# auto, prepend, chain, disabled.
|
573
580
|
# instrumentation.view_component: auto
|
574
581
|
|
575
582
|
# A dictionary of label names and values that will be applied to the data sent
|
@@ -628,8 +635,8 @@ common: &default_settings
|
|
628
635
|
|
629
636
|
# Specify an Array of Rake tasks to automatically instrument. This configuration
|
630
637
|
# option converts the Array to a RegEx list. If you'd like to allow all tasks by
|
631
|
-
# default, use rake.tasks: [.+]. No rake tasks will be instrumented unless
|
632
|
-
# added to this list. For more information, visit the New Relic Rake
|
638
|
+
# default, use rake.tasks: [.+]. No rake tasks will be instrumented unless
|
639
|
+
# they're added to this list. For more information, visit the New Relic Rake
|
633
640
|
# Instrumentation docs.
|
634
641
|
# rake.tasks: []
|
635
642
|
|
@@ -638,6 +645,60 @@ common: &default_settings
|
|
638
645
|
# ignoring specific transactions.
|
639
646
|
# rules.ignore_url_regexes: []
|
640
647
|
|
648
|
+
# BEGIN security agent
|
649
|
+
#
|
650
|
+
# NOTE: At this time, the security agent is intended for use only within
|
651
|
+
# a dedicated security testing environment with data that can tolerate
|
652
|
+
# modification or deletion. The security agent is available as a
|
653
|
+
# separate Ruby gem, newrelic_security. It is recommended that this
|
654
|
+
# separate gem only be introduced to a security testing environment
|
655
|
+
# by leveraging Bundler grouping like so:
|
656
|
+
#
|
657
|
+
# # Gemfile
|
658
|
+
# gem 'newrelic_rpm' # New Relic APM observability agent
|
659
|
+
# gem 'newrelic-infinite_tracing' # New Relic Infinite Tracing
|
660
|
+
#
|
661
|
+
# group :security do
|
662
|
+
# gem 'newrelic_security', require: false # New Relic security agent
|
663
|
+
# end
|
664
|
+
#
|
665
|
+
# NOTE: All "security.*" configuration parameters are related only to the
|
666
|
+
# security agent, and all other configuration parameters that may
|
667
|
+
# have "security" in the name some where are related to the APM agent.
|
668
|
+
#
|
669
|
+
|
670
|
+
# If true, the security agent is loaded (a Ruby 'require' is performed)
|
671
|
+
# security.agent.enabled: false
|
672
|
+
|
673
|
+
# The port the application is listening on. This setting is mandatory for
|
674
|
+
# Passenger servers. Other servers should be detected by default.
|
675
|
+
# security.application_info.port: nil
|
676
|
+
|
677
|
+
# If true, enables deserialization detection
|
678
|
+
# security.detection.deserialization.enabled: true
|
679
|
+
|
680
|
+
# If true, enables RCI (remote code injection) detection
|
681
|
+
# security.detection.rci.enabled: true
|
682
|
+
|
683
|
+
# If true, enables RXSS (reflected cross-site scripting) detection
|
684
|
+
# security.detection.rxss.enabled: true
|
685
|
+
|
686
|
+
# If true, the security agent is started (the agent runs in its event loop)
|
687
|
+
# security.enabled: false
|
688
|
+
|
689
|
+
# Defines the mode for the security agent to operate in. Currently only IAST is
|
690
|
+
# supported
|
691
|
+
# security.mode: IAST
|
692
|
+
|
693
|
+
# Defines the request body limit to process in security events (in KB). The
|
694
|
+
# default value is 300, for 300KB.
|
695
|
+
# security.request.body_limit: 300
|
696
|
+
|
697
|
+
# Defines the endpoint URL for posting security-related data
|
698
|
+
# security.validator_service_url: wss://csec.nr-data.net
|
699
|
+
|
700
|
+
# END security agent
|
701
|
+
|
641
702
|
# Applies Language Agent Security Policy settings.
|
642
703
|
# security_policies_token: ""
|
643
704
|
|
@@ -646,29 +707,29 @@ common: &default_settings
|
|
646
707
|
# send_data_on_exit: true
|
647
708
|
|
648
709
|
# If true, the agent will operate in a streamlined mode suitable for use with
|
649
|
-
# short-lived serverless functions. NOTE: Only AWS Lambda functions are
|
650
|
-
# currently and this option is not intended for use without New
|
651
|
-
# Lambda layer offering.
|
710
|
+
# short-lived serverless functions. NOTE: Only AWS Lambda functions are
|
711
|
+
# supported currently and this option is not intended for use without New
|
712
|
+
# Relic's Ruby Lambda layer offering.
|
652
713
|
# serverless_mode.enabled: false
|
653
714
|
|
654
715
|
# An array of strings that will collectively serve as a denylist for filtering
|
655
716
|
# which Sidekiq job arguments get reported to New Relic. To capture any Sidekiq
|
656
717
|
# arguments, 'job.sidekiq.args.*' must be added to the separate
|
657
718
|
# :'attributes.include' configuration option. Each string in this array will be
|
658
|
-
# turned into a regular expression via Regexp.new to permit advanced matching.
|
659
|
-
# job argument hashes, if either a key or value matches the pair will be
|
660
|
-
# All matching job argument array elements and job argument scalars
|
661
|
-
# excluded.
|
719
|
+
# turned into a regular expression via Regexp.new to permit advanced matching.
|
720
|
+
# For job argument hashes, if either a key or value matches the pair will be
|
721
|
+
# excluded. All matching job argument array elements and job argument scalars
|
722
|
+
# will be excluded.
|
662
723
|
# sidekiq.args.exclude: []
|
663
724
|
|
664
725
|
# An array of strings that will collectively serve as an allowlist for filtering
|
665
726
|
# which Sidekiq job arguments get reported to New Relic. To capture any Sidekiq
|
666
727
|
# arguments, 'job.sidekiq.args.*' must be added to the separate
|
667
728
|
# :'attributes.include' configuration option. Each string in this array will be
|
668
|
-
# turned into a regular expression via Regexp.new to permit advanced matching.
|
669
|
-
# job argument hashes, if either a key or value matches the pair will be
|
670
|
-
# All matching job argument array elements and job argument scalars
|
671
|
-
# included.
|
729
|
+
# turned into a regular expression via Regexp.new to permit advanced matching.
|
730
|
+
# For job argument hashes, if either a key or value matches the pair will be
|
731
|
+
# included. All matching job argument array elements and job argument scalars
|
732
|
+
# will be included.
|
672
733
|
# sidekiq.args.include: []
|
673
734
|
|
674
735
|
# If true, the agent collects slow SQL queries.
|
@@ -679,16 +740,16 @@ common: &default_settings
|
|
679
740
|
# the default setting for explain plans in slow SQL as well.
|
680
741
|
# slow_sql.explain_enabled: true
|
681
742
|
|
682
|
-
# Specify a threshold in seconds. The agent collects slow SQL queries and
|
683
|
-
# plans that exceed this threshold.
|
743
|
+
# Specify a threshold in seconds. The agent collects slow SQL queries and
|
744
|
+
# explain plans that exceed this threshold.
|
684
745
|
# slow_sql.explain_threshold: 0.5
|
685
746
|
|
686
|
-
# Defines an obfuscation level for slow SQL queries. Valid options are
|
687
|
-
# raw, or none.
|
747
|
+
# Defines an obfuscation level for slow SQL queries. Valid options are
|
748
|
+
# obfuscated, raw, or none.
|
688
749
|
# slow_sql.record_sql: obfuscated
|
689
750
|
|
690
|
-
# Generate a longer sql_id for slow SQL traces. sql_id is used for aggregation
|
691
|
-
# similar queries.
|
751
|
+
# Generate a longer sql_id for slow SQL traces. sql_id is used for aggregation
|
752
|
+
# of similar queries.
|
692
753
|
# slow_sql.use_longer_sql_id: false
|
693
754
|
|
694
755
|
# If true, the agent captures attributes on span events.
|
@@ -703,8 +764,8 @@ common: &default_settings
|
|
703
764
|
# If true, enables span event sampling.
|
704
765
|
# span_events.enabled: true
|
705
766
|
|
706
|
-
# * Defines the maximum number of span events reported from a single harvest.
|
707
|
-
# Integer between 1 and 10000 is valid.'
|
767
|
+
# * Defines the maximum number of span events reported from a single harvest.
|
768
|
+
# Any Integer between 1 and 10000 is valid.'
|
708
769
|
# * When configuring the agent for AI monitoring, set to max value 10000.This
|
709
770
|
# ensures the agent captures the maximum amount of distributed traces.
|
710
771
|
# span_events.max_samples_stored: 2000
|
@@ -714,30 +775,31 @@ common: &default_settings
|
|
714
775
|
# span_events.queue_size: 10000
|
715
776
|
|
716
777
|
# Specify a list of exceptions you do not want the agent to strip when
|
717
|
-
# strip_exception_messages is true. Separate exceptions with a comma. For
|
718
|
-
# "ImportantException,PreserveMessageException".
|
778
|
+
# strip_exception_messages is true. Separate exceptions with a comma. For
|
779
|
+
# example, "ImportantException,PreserveMessageException".
|
719
780
|
# strip_exception_messages.allowed_classes: ""
|
720
781
|
|
721
782
|
# If true, the agent strips messages from all exceptions except those in the
|
722
783
|
# allowlist. Enabled automatically in high security mode.
|
723
784
|
# strip_exception_messages.enabled: false
|
724
785
|
|
725
|
-
# An array of strings to specify which keys and/or values inside a Stripe
|
726
|
-
# user_data hash should
|
786
|
+
# An array of strings to specify which keys and/or values inside a Stripe
|
787
|
+
# event's user_data hash should
|
727
788
|
# not be reported to New Relic. Each string in this array will be turned into a
|
728
789
|
# regular expression via
|
729
|
-
# Regexp.new to permit advanced matching. For each hash pair, if either the key
|
730
|
-
# value is matched the
|
731
|
-
# pair will not be reported. By default, no user_data is reported, so this
|
732
|
-
# should only be used if
|
790
|
+
# Regexp.new to permit advanced matching. For each hash pair, if either the key
|
791
|
+
# or value is matched the
|
792
|
+
# pair will not be reported. By default, no user_data is reported, so this
|
793
|
+
# option should only be used if
|
733
794
|
# the stripe.user_data.include option is being used.
|
734
795
|
# stripe.user_data.exclude: []
|
735
796
|
|
736
|
-
# An array of strings to specify which keys inside a Stripe event's user_data
|
737
|
-
# should be reported
|
738
|
-
# to New Relic. Each string in this array will be turned into a regular
|
739
|
-
# via Regexp.new to
|
740
|
-
# permit advanced matching. Setting the value to ["."] will report all
|
797
|
+
# An array of strings to specify which keys inside a Stripe event's user_data
|
798
|
+
# hash should be reported
|
799
|
+
# to New Relic. Each string in this array will be turned into a regular
|
800
|
+
# expression via Regexp.new to
|
801
|
+
# permit advanced matching. Setting the value to ["."] will report all
|
802
|
+
# user_data.
|
741
803
|
# stripe.user_data.include: []
|
742
804
|
|
743
805
|
# When set to true, forces a synchronous connection to the New Relic collector
|
@@ -758,8 +820,8 @@ common: &default_settings
|
|
758
820
|
# If true, the agent captures attributes from transaction events.
|
759
821
|
# transaction_events.attributes.enabled: true
|
760
822
|
|
761
|
-
# Prefix of attributes to exclude from transaction events. Allows * as wildcard
|
762
|
-
# end.
|
823
|
+
# Prefix of attributes to exclude from transaction events. Allows * as wildcard
|
824
|
+
# at end.
|
763
825
|
# transaction_events.attributes.exclude: []
|
764
826
|
|
765
827
|
# Prefix of attributes to include in transaction events. Allows * as wildcard at
|
@@ -769,25 +831,26 @@ common: &default_settings
|
|
769
831
|
# If true, enables transaction event sampling.
|
770
832
|
# transaction_events.enabled: true
|
771
833
|
|
772
|
-
# Defines the maximum number of transaction events reported from a single
|
834
|
+
# Defines the maximum number of transaction events reported from a single
|
835
|
+
# harvest.
|
773
836
|
# transaction_events.max_samples_stored: 1200
|
774
837
|
|
775
838
|
# If true, the agent captures attributes on transaction segments.
|
776
839
|
# transaction_segments.attributes.enabled: true
|
777
840
|
|
778
|
-
# Prefix of attributes to exclude from transaction segments. Allows * as
|
779
|
-
# at end.
|
841
|
+
# Prefix of attributes to exclude from transaction segments. Allows * as
|
842
|
+
# wildcard at end.
|
780
843
|
# transaction_segments.attributes.exclude: []
|
781
844
|
|
782
|
-
# Prefix of attributes to include on transaction segments. Allows * as wildcard
|
783
|
-
# end.
|
845
|
+
# Prefix of attributes to include on transaction segments. Allows * as wildcard
|
846
|
+
# at end.
|
784
847
|
# transaction_segments.attributes.include: []
|
785
848
|
|
786
849
|
# If true, the agent captures attributes from transaction traces.
|
787
850
|
# transaction_tracer.attributes.enabled: true
|
788
851
|
|
789
|
-
# Prefix of attributes to exclude from transaction traces. Allows * as wildcard
|
790
|
-
# end.
|
852
|
+
# Prefix of attributes to exclude from transaction traces. Allows * as wildcard
|
853
|
+
# at end.
|
791
854
|
# transaction_tracer.attributes.exclude: []
|
792
855
|
|
793
856
|
# Prefix of attributes to include in transaction traces. Allows * as wildcard at
|
data/test/agent_helper.rb
CHANGED
@@ -1043,3 +1043,12 @@ end
|
|
1043
1043
|
def ruby_version_float
|
1044
1044
|
RUBY_VERSION.split('.')[0..1].join('.').to_f
|
1045
1045
|
end
|
1046
|
+
|
1047
|
+
def rails_version
|
1048
|
+
@rails_version ||= Gem::Version.new(Rails::VERSION::STRING)
|
1049
|
+
end
|
1050
|
+
|
1051
|
+
def rails_version_at_least?(version_string)
|
1052
|
+
version_string += '.0' until version_string.count('.') >= 2 # '7' => '7.0.0'
|
1053
|
+
rails_version >= Gem::Version.new(version_string)
|
1054
|
+
end
|