newrelic_rpm 9.14.0 → 9.16.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/.build_ignore +1 -0
  3. data/CHANGELOG.md +52 -4
  4. data/lib/new_relic/agent/aws.rb +3 -48
  5. data/lib/new_relic/agent/configuration/default_source.rb +211 -29
  6. data/lib/new_relic/agent/configuration/manager.rb +1 -1
  7. data/lib/new_relic/agent/database.rb +36 -0
  8. data/lib/new_relic/agent/instrumentation/active_record.rb +1 -8
  9. data/lib/new_relic/agent/instrumentation/active_record_subscriber.rb +1 -12
  10. data/lib/new_relic/agent/instrumentation/active_support_broadcast_logger.rb +0 -2
  11. data/lib/new_relic/agent/instrumentation/active_support_logger.rb +0 -2
  12. data/lib/new_relic/agent/instrumentation/async_http.rb +1 -2
  13. data/lib/new_relic/agent/instrumentation/aws_sdk_lambda/chain.rb +33 -0
  14. data/lib/new_relic/agent/instrumentation/aws_sdk_lambda/instrumentation.rb +94 -0
  15. data/lib/new_relic/agent/instrumentation/aws_sdk_lambda/prepend.rb +23 -0
  16. data/lib/new_relic/agent/instrumentation/aws_sdk_lambda.rb +23 -0
  17. data/lib/new_relic/agent/instrumentation/aws_sqs.rb +0 -2
  18. data/lib/new_relic/agent/instrumentation/bunny.rb +3 -4
  19. data/lib/new_relic/agent/instrumentation/concurrent_ruby.rb +0 -2
  20. data/lib/new_relic/agent/instrumentation/curb.rb +3 -4
  21. data/lib/new_relic/agent/instrumentation/delayed_job_instrumentation.rb +0 -4
  22. data/lib/new_relic/agent/instrumentation/dynamodb/instrumentation.rb +4 -11
  23. data/lib/new_relic/agent/instrumentation/dynamodb.rb +0 -2
  24. data/lib/new_relic/agent/instrumentation/elasticsearch.rb +0 -2
  25. data/lib/new_relic/agent/instrumentation/ethon.rb +0 -4
  26. data/lib/new_relic/agent/instrumentation/fiber.rb +0 -2
  27. data/lib/new_relic/agent/instrumentation/grape.rb +1 -3
  28. data/lib/new_relic/agent/instrumentation/httpclient.rb +0 -1
  29. data/lib/new_relic/agent/instrumentation/httprb.rb +0 -1
  30. data/lib/new_relic/agent/instrumentation/httpx.rb +0 -4
  31. data/lib/new_relic/agent/instrumentation/logger.rb +1 -3
  32. data/lib/new_relic/agent/instrumentation/logstasher.rb +0 -2
  33. data/lib/new_relic/agent/instrumentation/memcache.rb +0 -1
  34. data/lib/new_relic/agent/instrumentation/opensearch.rb +0 -2
  35. data/lib/new_relic/agent/instrumentation/padrino.rb +3 -3
  36. data/lib/new_relic/agent/instrumentation/rake.rb +0 -1
  37. data/lib/new_relic/agent/instrumentation/rdkafka/chain.rb +2 -1
  38. data/lib/new_relic/agent/instrumentation/rdkafka/prepend.rb +2 -1
  39. data/lib/new_relic/agent/instrumentation/rdkafka.rb +0 -2
  40. data/lib/new_relic/agent/instrumentation/redis.rb +0 -1
  41. data/lib/new_relic/agent/instrumentation/resque.rb +0 -4
  42. data/lib/new_relic/agent/instrumentation/roda.rb +4 -4
  43. data/lib/new_relic/agent/instrumentation/ruby_kafka/prepend.rb +14 -4
  44. data/lib/new_relic/agent/instrumentation/ruby_kafka.rb +0 -2
  45. data/lib/new_relic/agent/instrumentation/sinatra.rb +3 -6
  46. data/lib/new_relic/agent/instrumentation/thread.rb +0 -2
  47. data/lib/new_relic/agent/instrumentation/tilt.rb +0 -4
  48. data/lib/new_relic/agent/instrumentation/typhoeus.rb +0 -1
  49. data/lib/new_relic/agent/instrumentation/view_component/instrumentation.rb +11 -8
  50. data/lib/new_relic/agent/instrumentation/view_component.rb +0 -2
  51. data/lib/new_relic/agent/log_event_aggregator.rb +28 -2
  52. data/lib/new_relic/agent/span_event_primitive.rb +4 -2
  53. data/lib/new_relic/control/frameworks/rails4.rb +1 -5
  54. data/lib/new_relic/dependency_detection.rb +10 -5
  55. data/lib/new_relic/environment_report.rb +1 -5
  56. data/lib/new_relic/helper.rb +15 -0
  57. data/lib/new_relic/language_support.rb +1 -5
  58. data/lib/new_relic/version.rb +1 -1
  59. data/lib/sequel/extensions/new_relic_instrumentation.rb +1 -1
  60. data/lib/tasks/instrumentation_generator/templates/dependency_detection.tt +9 -6
  61. data/newrelic.yml +116 -41
  62. data/test/agent_helper.rb +1 -1
  63. metadata +7 -3
@@ -25,6 +25,7 @@ module NewRelic
25
25
  METRICS_SUPPORTABILITY_FORMAT = 'Supportability/Logging/Metrics/Ruby/%s'.freeze
26
26
  FORWARDING_SUPPORTABILITY_FORMAT = 'Supportability/Logging/Forwarding/Ruby/%s'.freeze
27
27
  DECORATING_SUPPORTABILITY_FORMAT = 'Supportability/Logging/LocalDecorating/Ruby/%s'.freeze
28
+ LABELS_SUPPORTABILITY_FORMAT = 'Supportability/Logging/Labels/Ruby/%s'.freeze
28
29
  MAX_BYTES = 32768 # 32 * 1024 bytes (32 kibibytes)
29
30
 
30
31
  named :LogEventAggregator
@@ -38,6 +39,7 @@ module NewRelic
38
39
  METRICS_ENABLED_KEY = :'application_logging.metrics.enabled'
39
40
  FORWARDING_ENABLED_KEY = :'application_logging.forwarding.enabled'
40
41
  DECORATING_ENABLED_KEY = :'application_logging.local_decorating.enabled'
42
+ LABELS_ENABLED_KEY = :'application_logging.forwarding.labels.enabled'
41
43
  LOG_LEVEL_KEY = :'application_logging.forwarding.log_level'
42
44
  CUSTOM_ATTRIBUTES_KEY = :'application_logging.forwarding.custom_attributes'
43
45
 
@@ -51,6 +53,7 @@ module NewRelic
51
53
  @high_security = NewRelic::Agent.config[:high_security]
52
54
  @instrumentation_logger_enabled = NewRelic::Agent::Instrumentation::Logger.enabled?
53
55
  @attributes = NewRelic::Agent::LogEventAttributes.new
56
+
54
57
  register_for_done_configuring(events)
55
58
  end
56
59
 
@@ -186,6 +189,10 @@ module NewRelic
186
189
  attributes.add_custom_attributes(custom_attributes)
187
190
  end
188
191
 
192
+ def labels
193
+ @labels ||= create_labels
194
+ end
195
+
189
196
  # Because our transmission format (MELT) is different than historical
190
197
  # agent payloads, extract the munging here to keep the service focused
191
198
  # on the general harvest + transmit instead of the format.
@@ -201,8 +208,9 @@ module NewRelic
201
208
  # To save on unnecessary data transmission, trim the entity.type
202
209
  # sent by classic logs-in-context
203
210
  common_attributes.delete(ENTITY_TYPE_KEY)
204
-
205
- common_attributes.merge!(NewRelic::Agent.agent.log_event_aggregator.attributes.custom_attributes)
211
+ aggregator = NewRelic::Agent.agent.log_event_aggregator
212
+ common_attributes.merge!(aggregator.attributes.custom_attributes)
213
+ common_attributes.merge!(aggregator.labels)
206
214
 
207
215
  _, items = data
208
216
  payload = [{
@@ -247,6 +255,7 @@ module NewRelic
247
255
  record_configuration_metric(METRICS_SUPPORTABILITY_FORMAT, METRICS_ENABLED_KEY)
248
256
  record_configuration_metric(FORWARDING_SUPPORTABILITY_FORMAT, FORWARDING_ENABLED_KEY)
249
257
  record_configuration_metric(DECORATING_SUPPORTABILITY_FORMAT, DECORATING_ENABLED_KEY)
258
+ record_configuration_metric(LABELS_SUPPORTABILITY_FORMAT, LABELS_ENABLED_KEY)
250
259
 
251
260
  add_custom_attributes(NewRelic::Agent.config[CUSTOM_ATTRIBUTES_KEY])
252
261
  end
@@ -327,6 +336,23 @@ module NewRelic
327
336
 
328
337
  Logger::Severity.const_get(severity_constant) < Logger::Severity.const_get(configured_log_level_constant)
329
338
  end
339
+
340
+ def create_labels
341
+ return NewRelic::EMPTY_HASH unless NewRelic::Agent.config[LABELS_ENABLED_KEY]
342
+
343
+ downcased_exclusions = NewRelic::Agent.config[:'application_logging.forwarding.labels.exclude'].map(&:downcase)
344
+ log_labels = {}
345
+
346
+ NewRelic::Agent.config.parsed_labels.each do |parsed_label|
347
+ next if downcased_exclusions.include?(parsed_label['label_type'].downcase)
348
+
349
+ # labels are referred to as tags in the UI, so prefix the
350
+ # label-related attributes with 'tags.*'
351
+ log_labels["tags.#{parsed_label['label_type']}"] = parsed_label['label_value']
352
+ end
353
+
354
+ log_labels
355
+ end
330
356
  end
331
357
  end
332
358
  end
@@ -52,6 +52,8 @@ module NewRelic
52
52
  DATASTORE_CATEGORY = 'datastore'
53
53
  CLIENT = 'client'
54
54
 
55
+ DB_STATEMENT_MAX_BYTES = 4096
56
+
55
57
  # Builds a Hash of error attributes as well as the Span ID when
56
58
  # an error is present. Otherwise, returns nil when no error present.
57
59
  def error_attributes(segment)
@@ -114,9 +116,9 @@ module NewRelic
114
116
  agent_attributes[DB_SYSTEM_KEY] = segment.product if allowed?(DB_SYSTEM_KEY)
115
117
 
116
118
  if segment.sql_statement && allowed?(DB_STATEMENT_KEY)
117
- agent_attributes[DB_STATEMENT_KEY] = truncate(segment.sql_statement.safe_sql, 2000)
119
+ agent_attributes[DB_STATEMENT_KEY] = truncate(segment.sql_statement.safe_sql, DB_STATEMENT_MAX_BYTES)
118
120
  elsif segment.nosql_statement && allowed?(DB_STATEMENT_KEY)
119
- agent_attributes[DB_STATEMENT_KEY] = truncate(segment.nosql_statement, 2000)
121
+ agent_attributes[DB_STATEMENT_KEY] = truncate(segment.nosql_statement, DB_STATEMENT_MAX_BYTES)
120
122
  end
121
123
 
122
124
  [intrinsics, custom_attributes(segment), agent_attributes.merge(agent_attributes(segment))]
@@ -9,11 +9,7 @@ module NewRelic
9
9
  module Frameworks
10
10
  class Rails4 < NewRelic::Control::Frameworks::Rails3
11
11
  def rails_gem_list
12
- if Bundler.rubygems.respond_to?(:installed_specs)
13
- Bundler.rubygems.installed_specs.map { |gem| "#{gem.name} (#{gem.version})" }
14
- else
15
- Bundler.rubygems.all_specs.map { |gem| "#{gem.name} (#{gem.version})" }
16
- end
12
+ NewRelic::Helper.rubygems_specs.map { |gem| "#{gem.name} (#{gem.version})" }
17
13
  end
18
14
 
19
15
  def append_plugin_list
@@ -25,11 +25,9 @@ module DependencyDetection
25
25
 
26
26
  def detect!
27
27
  @items.each do |item|
28
- if item.dependencies_satisfied?
29
- item.execute
30
- else
31
- item.configure_as_unsatisfied unless item.disabled_configured?
32
- end
28
+ next if item.executed || item.disabled_configured?
29
+
30
+ item.dependencies_satisfied? ? item.execute : item.configure_as_unsatisfied
33
31
  end
34
32
  end
35
33
 
@@ -65,6 +63,13 @@ module DependencyDetection
65
63
  end
66
64
 
67
65
  def configure_as_unsatisfied
66
+ # TODO: currently using :unsatisfied for Padrino will clobber the value
67
+ # already set for Sinatra, so skip Padrino and circle back with a
68
+ # new Padrino specific solution in the future.
69
+ #
70
+ # https://github.com/newrelic/newrelic-ruby-agent/issues/2912
71
+ return if name == :padrino
72
+
68
73
  NewRelic::Agent.config.instance_variable_get(:@cache)[config_key] = :unsatisfied
69
74
  end
70
75
 
@@ -44,11 +44,7 @@ module NewRelic
44
44
  ####################################
45
45
  report_on('Gems') do
46
46
  begin
47
- if Bundler.rubygems.respond_to?(:installed_specs)
48
- Bundler.rubygems.installed_specs.map { |gem| "#{gem.name}(#{gem.version})" }
49
- else
50
- Bundler.rubygems.all_specs.map { |gem| "#{gem.name}(#{gem.version})" }
51
- end
47
+ NewRelic::Helper.rubygems_specs.map { |gem| "#{gem.name}(#{gem.version})" }
52
48
  rescue
53
49
  # There are certain rubygem, bundler, rails combinations (e.g. gem
54
50
  # 1.6.2, rails 2.3, bundler 1.2.3) where the code above throws an error
@@ -82,5 +82,20 @@ module NewRelic
82
82
  File.exist?(executable_path) && File.file?(executable_path) && File.executable?(executable_path)
83
83
  end
84
84
  end
85
+
86
+ # Bundler version 2.5.12 deprecated all_specs and added installed_specs.
87
+ # To support newer Bundler versions, try to use installed_specs first,
88
+ # then fall back to all_specs.
89
+ # All callers expect this to be an array, so return an array if Bundler isn't defined
90
+ # @api private
91
+ def rubygems_specs
92
+ return [] unless defined?(Bundler)
93
+
94
+ if Bundler.rubygems.respond_to?(:installed_specs)
95
+ Bundler.rubygems.installed_specs
96
+ else
97
+ Bundler.rubygems.all_specs
98
+ end
99
+ end
85
100
  end
86
101
  end
@@ -90,11 +90,7 @@ module NewRelic
90
90
  def bundled_gem?(gem_name)
91
91
  return false unless defined?(Bundler)
92
92
 
93
- if Bundler.rubygems.respond_to?(:installed_specs)
94
- Bundler.rubygems.installed_specs.map(&:name).include?(gem_name)
95
- else
96
- Bundler.rubygems.all_specs.map(&:name).include?(gem_name)
97
- end
93
+ NewRelic::Helper.rubygems_specs.map(&:name).include?(gem_name)
98
94
  rescue => e
99
95
  ::NewRelic::Agent.logger.info("Could not determine if third party #{gem_name} gem is installed", e)
100
96
  false
@@ -6,7 +6,7 @@
6
6
  module NewRelic
7
7
  module VERSION # :nodoc:
8
8
  MAJOR = 9
9
- MINOR = 14
9
+ MINOR = 16
10
10
  TINY = 0
11
11
 
12
12
  STRING = "#{MAJOR}.#{MINOR}.#{TINY}"
@@ -79,7 +79,7 @@ module Sequel
79
79
 
80
80
  THREAD_SAFE_CONNECTION_POOL_CLASSES = [
81
81
  (defined?(::Sequel::ThreadedConnectionPool) && ::Sequel::ThreadedConnectionPool),
82
- (defined?(::Sequel::TimedQueueConnectionPool) && RUBY_VERSION >= '3.4' && ::Sequel::TimedQueueConnectionPool)
82
+ (defined?(::Sequel::TimedQueueConnectionPool) && RUBY_VERSION >= '3.2' && ::Sequel::TimedQueueConnectionPool)
83
83
  ].compact.freeze
84
84
 
85
85
  def explainer_for(sql)
@@ -2,12 +2,8 @@
2
2
  # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details.
3
3
  # frozen_string_literal: true
4
4
 
5
- require_relative '<%= @snake_name.downcase %>/instrumentation'
6
- require_relative '<%= @snake_name.downcase %>/chain'
7
- require_relative '<%= @snake_name.downcase %>/prepend'
8
-
9
5
  DependencyDetection.defer do
10
- named :<%= @name.match?(/\-|\_/) ? "'#{@snake_name}'" : @name.downcase %>
6
+ named :<%= @snake_name %>
11
7
 
12
8
  depends_on do
13
9
  # The class that needs to be defined to prepend/chain onto. This can be used
@@ -18,11 +14,18 @@ DependencyDetection.defer do
18
14
  end
19
15
 
20
16
  executes do
21
- NewRelic::Agent.logger.info('Installing <%= @name.downcase %> instrumentation')
17
+ require_relative '<%= @snake_name.downcase %>/instrumentation'
22
18
 
19
+ # prepend_instrument and chain_instrument call extract_supportability_name
20
+ # to get the library name for supportability metrics and info-level logging.
21
+ # This is done by spliting on the 2nd to last spot of the instrumented
22
+ # module. If this isn't how we want the name to appear, pass in the desired
23
+ # name as a third argument.
23
24
  if use_prepend?
25
+ require_relative '<%= @snake_name.downcase %>/prepend'
24
26
  prepend_instrument <%= @class_name %>, NewRelic::Agent::Instrumentation::<%= @class_name %>::Prepend
25
27
  else
28
+ require_relative '<%= @snake_name.downcase %>/chain'
26
29
  chain_instrument NewRelic::Agent::Instrumentation::<%= @class_name %>::Chain
27
30
  end
28
31
  end
data/newrelic.yml CHANGED
@@ -65,6 +65,13 @@ common: &default_settings
65
65
  # If true, the agent captures log records emitted by your application.
66
66
  # application_logging.forwarding.enabled: true
67
67
 
68
+ # If true, the agent attaches labels to log records.
69
+ # application_logging.forwarding.labels.enabled: false
70
+
71
+ # A case-insensitive array or comma-delimited string containing the labels to
72
+ # exclude from log records.
73
+ # application_logging.forwarding.labels.exclude: []
74
+
68
75
  # Sets the minimum level a log event must have to be forwarded to New Relic.
69
76
  # This is based on the integer values of Ruby's Logger::Severity constants:
70
77
  # https://github.com/ruby/ruby/blob/master/lib/logger/severity.rb
@@ -114,17 +121,15 @@ common: &default_settings
114
121
  # audit_log.path: log/newrelic_audit.log
115
122
 
116
123
  # An array of CLASS#METHOD (for instance methods) and/or CLASS.METHOD (for class
117
- # methods) strings representing Ruby methods for the agent to automatically add
118
- # custom instrumentation to without the need for altering any of the source code
119
- # that defines the methods.
120
- #
124
+ # methods) strings representing Ruby methods that the agent can automatically
125
+ # add custom instrumentation to. This doesn't require any modifications of the
126
+ # source code that defines the methods.
121
127
  # Use fully qualified class names (using the :: delimiter) that include any
122
128
  # module or class namespacing.
123
- #
124
129
  # Here is some Ruby source code that defines a render_png instance method for an
125
130
  # Image class and a notify class method for a User class, both within a
126
131
  # MyCompany module namespace:
127
- #
132
+ #
128
133
  # module MyCompany
129
134
  # class Image
130
135
  # def render_png
@@ -138,26 +143,29 @@ common: &default_settings
138
143
  # end
139
144
  # end
140
145
  # end
141
- #
146
+ #
142
147
  # Given that source code, the newrelic.yml config file might request
143
148
  # instrumentation for both of these methods like so:
144
- #
149
+ #
145
150
  # automatic_custom_instrumentation_method_list:
146
151
  # - MyCompany::Image#render_png
147
152
  # - MyCompany::User.notify
148
153
  #
149
154
  # That configuration example uses YAML array syntax to specify both methods.
150
- # Alternatively, a comma-delimited string can be used instead:
151
- #
152
- # automatic_custom_instrumentation_method_list: 'MyCompany::Image#render_png, MyCompany::User.notify'
153
- #
155
+ # Alternatively, you can use a comma-delimited string:
156
+ #
157
+ # automatic_custom_instrumentation_method_list: 'MyCompany::Image#render_png,
158
+ # MyCompany::User.notify'
159
+ #
154
160
  # Whitespace around the comma(s) in the list is optional. When configuring the
155
161
  # agent with a list of methods via the
156
162
  # NEW_RELIC_AUTOMATIC_CUSTOM_INSTRUMENTATION_METHOD_LIST environment variable,
157
- # this comma-delimited string format should be used:
158
- #
159
- # export NEW_RELIC_AUTOMATIC_CUSTOM_INSTRUMENTATION_METHOD_LIST='MyCompany::Image#render_png, MyCompany::User.notify'
160
- #
163
+ # use this comma-delimited string format:
164
+ #
165
+ # export
166
+ # NEW_RELIC_AUTOMATIC_CUSTOM_INSTRUMENTATION_METHOD_LIST='MyCompany::Image#render_png,
167
+ # MyCompany::User.notify'
168
+ #
161
169
  # automatic_custom_instrumentation_method_list: []
162
170
 
163
171
  # Specify a list of constants that should prevent the agent from starting
@@ -216,6 +224,9 @@ common: &default_settings
216
224
  # If true, the agent will clear Tracer::State in Agent.drop_buffered_data.
217
225
  # clear_transaction_state_after_fork: false
218
226
 
227
+ # The AWS account ID for the AWS account associated with this app
228
+ # cloud.aws.account_id: nil
229
+
219
230
  # If true, the agent will report source code level metrics for traced methods.
220
231
  # See:
221
232
  # https://docs.newrelic.com/docs/apm/agents/ruby-agent/features/ruby-codestream-integration/
@@ -312,18 +323,7 @@ common: &default_settings
312
323
  # If true, disables agent middleware for Sinatra. This middleware is responsible
313
324
  # for advanced feature support such as cross application tracing, page load
314
325
  # timing, and error collection.
315
- # Cross application tracing is deprecated in favor of distributed tracing.
316
- # Distributed tracing is on by default for Ruby agent versions 8.0.0 and above.
317
- # Middlewares are not required to support distributed tracing.
318
- # To continue using cross application tracing, update the following options in
319
- # your newrelic.yml configuration file:
320
- # ``yaml
321
- # # newrelic.yml
322
- # cross_application_tracer:
323
- # enabled: true
324
- # distributed_tracing:
325
- # enabled: false
326
- # ``
326
+ #
327
327
  # disable_sinatra_auto_middleware: false
328
328
 
329
329
  # If true, disables view instrumentation.
@@ -455,6 +455,10 @@ common: &default_settings
455
455
  # prepend, chain, disabled.
456
456
  # instrumentation.async_http: auto
457
457
 
458
+ # Controls auto-instrumentation of the aws_sdk_lambda library at start-up. May
459
+ # be one of auto, prepend, chain, disabled.
460
+ # instrumentation.aws_sdk_lambda: auto
461
+
458
462
  # Controls auto-instrumentation of the aws-sdk-sqs library at start-up. May be
459
463
  # one of: auto, prepend, chain, disabled.
460
464
  # instrumentation.aws_sqs: auto
@@ -947,33 +951,104 @@ common: &default_settings
947
951
  # NOTE: All "security.*" configuration parameters are related only to the
948
952
  # security agent, and all other configuration parameters that may
949
953
  # have "security" in the name somewhere are related to the APM agent.
950
-
954
+
951
955
  # If true, the security agent is loaded (a Ruby 'require' is performed)
952
956
  # security.agent.enabled: false
953
957
 
954
958
  # The port the application is listening on. This setting is mandatory for
955
- # Passenger servers. Other servers should be detected by default.
959
+ # Passenger servers. Other servers are detected by default.
956
960
  # security.application_info.port: nil
957
961
 
958
- # If true, enables deserialization detection
959
- # security.detection.deserialization.enabled: true
962
+ # If true, the security agent is started (the agent runs in its event loop)
963
+ # security.enabled: false
960
964
 
961
- # If true, enables RCI (remote code injection) detection
962
- # security.detection.rci.enabled: true
965
+ # Defines API paths the security agent should ignore in IAST scans. Accepts an
966
+ # array of regex patterns matching the URI to ignore. The regex pattern should
967
+ # provide a complete match for the URL without the endpoint. For example,
968
+ # [".*account.*"], [".*/\api\/v1\/.*?\/login"]
969
+ # security.exclude_from_iast_scan.api: []
963
970
 
964
- # If true, enables RXSS (reflected cross-site scripting) detection
965
- # security.detection.rxss.enabled: true
971
+ # An array of HTTP request body keys the security agent should ignore in IAST
972
+ # scans.
973
+ # security.exclude_from_iast_scan.http_request_parameters.body: []
966
974
 
967
- # If true, the security agent is started (the agent runs in its event loop)
968
- # security.enabled: false
975
+ # An array of HTTP request headers the security agent should ignore in IAST
976
+ # scans. The array should specify a list of patterns matching the headers to
977
+ # ignore.
978
+ # security.exclude_from_iast_scan.http_request_parameters.header: []
979
+
980
+ # An array of HTTP request query parameters the security agent should ignore in
981
+ # IAST scans. The array should specify a list of patterns matching the HTTP
982
+ # request query parameters to ignore.
983
+ # security.exclude_from_iast_scan.http_request_parameters.query: []
984
+
985
+ # If true, disables system command injection detection in IAST scans.
986
+ # security.exclude_from_iast_scan.iast_detection_category.command_injection: false
987
+
988
+ # If true, disables the detection of low-severity insecure settings (e.g., hash,
989
+ # crypto, cookie, random generators, trust boundary).
990
+ # security.exclude_from_iast_scan.iast_detection_category.insecure_settings: false
991
+
992
+ # If true, disables file operation-related IAST detections (File Access &
993
+ # Application integrity violation)
994
+ # security.exclude_from_iast_scan.iast_detection_category.invalid_file_access: false
995
+
996
+ # If true, disables Javascript injection detection in IAST scans.
997
+ # security.exclude_from_iast_scan.iast_detection_category.javascript_injection: false
998
+
999
+ # If true, disables LDAP injection detection in IAST scans.
1000
+ # security.exclude_from_iast_scan.iast_detection_category.ldap_injection: false
1001
+
1002
+ # If true, disables NOSQL injection detection in IAST scans.
1003
+ # security.exclude_from_iast_scan.iast_detection_category.nosql_injection: false
1004
+
1005
+ # If true, disables Reflected Cross-Site Scripting (RXSS) detection in IAST
1006
+ # scans.
1007
+ # security.exclude_from_iast_scan.iast_detection_category.rxss: false
1008
+
1009
+ # If true, disables SQL injection detection in IAST scans.
1010
+ # security.exclude_from_iast_scan.iast_detection_category.sql_injection: false
1011
+
1012
+ # If true, disables Sever-Side Request Forgery (SSRF) detection in IAST scans.
1013
+ # security.exclude_from_iast_scan.iast_detection_category.ssrf: false
1014
+
1015
+ # If true, disables XPATH injection detection in IAST scans.
1016
+ # security.exclude_from_iast_scan.iast_detection_category.xpath_injection: false
1017
+
1018
+ # Unique test identifier when runnning IAST in CI/CD environment to
1019
+ # differentiate between different test runs, e.g., a build number.
1020
+ # security.iast_test_identifier: nil
969
1021
 
970
1022
  # Defines the mode for the security agent to operate in. Currently only IAST is
971
1023
  # supported
972
1024
  # security.mode: IAST
973
1025
 
974
- # Defines the request body limit to process in security events (in KB). The
975
- # default value is 300, for 300KB.
976
- # security.request.body_limit: 300
1026
+ # Sets the maximum number of HTTP requests allowed for the IAST scan per minute.
1027
+ # Any Integer between 12 and 3600 is valid. The default value is 3600.
1028
+ # security.scan_controllers.iast_scan_request_rate_limit: 3600
1029
+
1030
+ # If true, enables the sending of HTTP responses bodies. Disabling this also
1031
+ # disables Reflected Cross-Site Scripting (RXSS) vulnerability detection.
1032
+ # security.scan_controllers.report_http_response_body: true
1033
+
1034
+ # The number of application instances for a specific entity on which IAST
1035
+ # analysis is performed.
1036
+ # security.scan_controllers.scan_instance_count: 0
1037
+
1038
+ # If true, allows IAST to continuously gather trace data in the background.
1039
+ # Collected data will be used by the security agent to perform an IAST scan at
1040
+ # the scheduled time.
1041
+ # security.scan_schedule.always_sample_traces: false
1042
+
1043
+ # Specifies the delay time (in minutes) before the IAST scan begins after the
1044
+ # application starts.
1045
+ # security.scan_schedule.delay: 0
1046
+
1047
+ # Specifies the length of time (in minutes) that the IAST scan will run.
1048
+ # security.scan_schedule.duration: 0
1049
+
1050
+ # Specifies a cron expression that sets when the IAST scan should run.
1051
+ # security.scan_schedule.schedule: ""
977
1052
 
978
1053
  # Defines the endpoint URL for posting security-related data
979
1054
  # security.validator_service_url: wss://csec.nr-data.net
data/test/agent_helper.rb CHANGED
@@ -112,7 +112,7 @@ def assert_log_contains(log, message)
112
112
  lines = log.array
113
113
 
114
114
  assert (lines.any? { |line| line.match(message) }),
115
- "Could not find message. Log contained: #{lines.join("\n")}"
115
+ "Could not find message: '#{message.inspect}'. Log contained: #{lines.join("\n")}"
116
116
  end
117
117
 
118
118
  def assert_audit_log_contains(audit_log_contents, needle)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: newrelic_rpm
3
3
  version: !ruby/object:Gem::Version
4
- version: 9.14.0
4
+ version: 9.16.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tanna McClure
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2024-09-30 00:00:00.000000000 Z
14
+ date: 2024-11-19 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: bundler
@@ -392,6 +392,10 @@ files:
392
392
  - lib/new_relic/agent/instrumentation/async_http/chain.rb
393
393
  - lib/new_relic/agent/instrumentation/async_http/instrumentation.rb
394
394
  - lib/new_relic/agent/instrumentation/async_http/prepend.rb
395
+ - lib/new_relic/agent/instrumentation/aws_sdk_lambda.rb
396
+ - lib/new_relic/agent/instrumentation/aws_sdk_lambda/chain.rb
397
+ - lib/new_relic/agent/instrumentation/aws_sdk_lambda/instrumentation.rb
398
+ - lib/new_relic/agent/instrumentation/aws_sdk_lambda/prepend.rb
395
399
  - lib/new_relic/agent/instrumentation/aws_sqs.rb
396
400
  - lib/new_relic/agent/instrumentation/aws_sqs/chain.rb
397
401
  - lib/new_relic/agent/instrumentation/aws_sqs/instrumentation.rb
@@ -778,7 +782,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
778
782
  - !ruby/object:Gem::Version
779
783
  version: 1.3.1
780
784
  requirements: []
781
- rubygems_version: 3.5.16
785
+ rubygems_version: 3.5.22
782
786
  signing_key:
783
787
  specification_version: 4
784
788
  summary: New Relic Ruby Agent