newrelic_rpm 9.12.0 → 9.14.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +120 -0
  3. data/README.md +16 -20
  4. data/lib/new_relic/agent/configuration/default_source.rb +112 -3
  5. data/lib/new_relic/agent/configuration/environment_source.rb +5 -1
  6. data/lib/new_relic/agent/configuration/manager.rb +23 -0
  7. data/lib/new_relic/agent/database/obfuscation_helpers.rb +11 -11
  8. data/lib/new_relic/agent/instrumentation/active_merchant.rb +0 -13
  9. data/lib/new_relic/agent/instrumentation/delayed_job_instrumentation.rb +0 -19
  10. data/lib/new_relic/agent/instrumentation/dynamodb/instrumentation.rb +3 -2
  11. data/lib/new_relic/agent/instrumentation/excon.rb +0 -16
  12. data/lib/new_relic/agent/instrumentation/grape.rb +3 -1
  13. data/lib/new_relic/agent/instrumentation/opensearch/chain.rb +21 -0
  14. data/lib/new_relic/agent/instrumentation/opensearch/instrumentation.rb +66 -0
  15. data/lib/new_relic/agent/instrumentation/opensearch/prepend.rb +13 -0
  16. data/lib/new_relic/agent/instrumentation/opensearch.rb +25 -0
  17. data/lib/new_relic/agent/instrumentation/rdkafka/chain.rb +71 -0
  18. data/lib/new_relic/agent/instrumentation/rdkafka/instrumentation.rb +70 -0
  19. data/lib/new_relic/agent/instrumentation/rdkafka/prepend.rb +66 -0
  20. data/lib/new_relic/agent/instrumentation/rdkafka.rb +27 -0
  21. data/lib/new_relic/agent/instrumentation/redis.rb +7 -5
  22. data/lib/new_relic/agent/instrumentation/ruby_kafka/chain.rb +55 -0
  23. data/lib/new_relic/agent/instrumentation/ruby_kafka/instrumentation.rb +67 -0
  24. data/lib/new_relic/agent/instrumentation/ruby_kafka/prepend.rb +50 -0
  25. data/lib/new_relic/agent/instrumentation/ruby_kafka.rb +27 -0
  26. data/lib/new_relic/agent/instrumentation/sidekiq.rb +0 -14
  27. data/lib/new_relic/agent/instrumentation/sinatra.rb +0 -13
  28. data/lib/new_relic/agent/instrumentation/view_component/instrumentation.rb +4 -1
  29. data/lib/new_relic/agent/javascript_instrumentor.rb +2 -3
  30. data/lib/new_relic/agent/messaging.rb +11 -5
  31. data/lib/new_relic/agent/serverless_handler.rb +241 -12
  32. data/lib/new_relic/agent/serverless_handler_event_sources.json +155 -0
  33. data/lib/new_relic/agent/serverless_handler_event_sources.rb +49 -0
  34. data/lib/new_relic/agent/system_info.rb +14 -0
  35. data/lib/new_relic/agent/transaction/request_attributes.rb +13 -1
  36. data/lib/new_relic/agent/transaction/trace_context.rb +1 -1
  37. data/lib/new_relic/agent.rb +93 -0
  38. data/lib/new_relic/control/frameworks/grape.rb +14 -0
  39. data/lib/new_relic/control/frameworks/padrino.rb +14 -0
  40. data/lib/new_relic/control/frameworks/rails4.rb +4 -2
  41. data/lib/new_relic/environment_report.rb +6 -2
  42. data/lib/new_relic/language_support.rb +7 -1
  43. data/lib/new_relic/local_environment.rb +1 -4
  44. data/lib/new_relic/version.rb +1 -1
  45. data/lib/tasks/helpers/newrelicyml.rb +73 -11
  46. data/lib/tasks/instrumentation_generator/instrumentation.thor +1 -1
  47. data/lib/tasks/instrumentation_generator/templates/dependency_detection.tt +3 -3
  48. data/newrelic.yml +118 -54
  49. metadata +19 -3
@@ -85,6 +85,10 @@ module NewRelic
85
85
  # An exception that forces an agent to stop reporting until its mongrel is restarted.
86
86
  class ForceDisconnectException < StandardError; end
87
87
 
88
+ # Error handling for the automated custom instrumentation tracer logic
89
+ class AutomaticTracerParseException < StandardError; end
90
+ class AutomaticTracerTraceException < StandardError; end
91
+
88
92
  # An exception that forces an agent to restart.
89
93
  class ForceRestartException < StandardError
90
94
  def message
@@ -109,6 +113,9 @@ module NewRelic
109
113
  # placeholder name used when we cannot determine a transaction's name
110
114
  UNKNOWN_METRIC = '(unknown)'.freeze
111
115
  LLM_FEEDBACK_MESSAGE = 'LlmFeedbackMessage'
116
+ # give the observed app time to load the code that automatic tracers have
117
+ # been configured for
118
+ AUTOMATIC_TRACER_MAX_ATTEMPTS = 60 # 60 = try about twice a second for 30 seconds
112
119
 
113
120
  attr_reader :error_group_callback
114
121
  attr_reader :llm_token_count_callback
@@ -163,6 +170,92 @@ module NewRelic
163
170
  end
164
171
  end
165
172
 
173
+ # @api private
174
+ def self.add_automatic_method_tracers(arr)
175
+ return unless arr
176
+ return arr if arr.respond_to?(:empty?) && arr.empty?
177
+
178
+ arr = arr.split(/\s*,\s*/) if arr.is_a?(String)
179
+
180
+ add_tracers_once_methods_are_defined(arr.dup)
181
+
182
+ arr
183
+ end
184
+
185
+ # spawn a thread that will attempt to establish a tracer for each of the
186
+ # configured methods. the thread will continue to keep trying with each
187
+ # tracer until one of the following happens:
188
+ # - the tracer is successfully established
189
+ # - the configured method string couldn't be parsed
190
+ # - establishing a tracer for a successfully parsed string failed
191
+ # - the maximum number of attempts has been reached
192
+ # the thread will only be spawned once per agent initialization, to account
193
+ # for configuration reloading scenarios.
194
+ #
195
+ # @api private
196
+ def self.add_tracers_once_methods_are_defined(notations)
197
+ # this class method can be invoked multiple times at agent startup, so
198
+ # we return asap here instead of using a traditional memoization of
199
+ # waiting for the method's body to finish being executed
200
+ if defined?(@add_tracers_once_methods_are_defined)
201
+ return
202
+ else
203
+ @add_tracers_once_methods_are_defined = true
204
+ end
205
+
206
+ Thread.new do
207
+ AUTOMATIC_TRACER_MAX_ATTEMPTS.times do
208
+ notations.delete_if { |notation| prep_tracer_for(notation) }
209
+
210
+ break if notations.empty?
211
+
212
+ sleep 0.5
213
+ end
214
+ end
215
+ end
216
+
217
+ # returns `true` if the notation string has either been successfully
218
+ # processed or raised an error during processing. returns `false` if the
219
+ # string seems good but the (customer) code to be traced has not yet been
220
+ # loaded into the Ruby VM
221
+ #
222
+ # @api private
223
+ def self.prep_tracer_for(fully_qualified_method_notation)
224
+ delimiters = fully_qualified_method_notation.scan(/\.|#/)
225
+ raise AutomaticTracerParseException.new("Expected exactly one '.' or '#' delimiter.") unless delimiters.size == 1
226
+
227
+ delimiter = delimiters.first
228
+ namespace, method_name = fully_qualified_method_notation.split(delimiter)
229
+ unless namespace && !namespace.empty?
230
+ raise AutomaticTracerParseException.new("Nothing found to the left of the #{delimiter} delimiter.")
231
+ end
232
+ unless method_name && !method_name.empty?
233
+ raise AutomaticTracerParseException.new("Nothing found to the right of the #{delimiter} delimiter.")
234
+ end
235
+
236
+ begin
237
+ klass = ::NewRelic::LanguageSupport.constantize(namespace)
238
+ return false unless klass
239
+
240
+ klass_to_trace = delimiter.eql?('.') ? klass.singleton_class : klass
241
+ add_or_defer_method_tracer(klass_to_trace, method_name, nil, {})
242
+ rescue StandardError => e
243
+ raise AutomaticTracerTraceException.new("#{e.class} - #{e.message}")
244
+ end
245
+
246
+ true
247
+ rescue AutomaticTracerParseException => e
248
+ NewRelic::Agent.logger.error('Unable to parse out a usable method name to trace. Expected a valid, fully ' \
249
+ "qualified method notation. Got: '#{fully_qualified_method_notation}'. " \
250
+ "Error: #{e.message}")
251
+ true
252
+ rescue AutomaticTracerTraceException => e
253
+ NewRelic::Agent.logger.error('Unable to automatically apply a tracer to method ' \
254
+ "'#{fully_qualified_method_notation}'. Error: #{e.message}")
255
+ true
256
+ end
257
+
258
+ # @api private
166
259
  def add_deferred_method_tracers_now
167
260
  @tracer_lock.synchronize do
168
261
  @tracer_queue.each do |receiver, method_name, metric_name, options|
@@ -0,0 +1,14 @@
1
+ # This file is distributed under New Relic's license terms.
2
+ # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details.
3
+ # frozen_string_literal: true
4
+
5
+ require 'new_relic/control/frameworks/ruby'
6
+ module NewRelic
7
+ class Control
8
+ module Frameworks
9
+ # Contains basic control logic for Grape
10
+ class Grape < NewRelic::Control::Frameworks::Ruby
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ # This file is distributed under New Relic's license terms.
2
+ # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details.
3
+ # frozen_string_literal: true
4
+
5
+ require 'new_relic/control/frameworks/sinatra'
6
+ module NewRelic
7
+ class Control
8
+ module Frameworks
9
+ # Contains basic control logic for Padrino
10
+ class Padrino < NewRelic::Control::Frameworks::Sinatra
11
+ end
12
+ end
13
+ end
14
+ end
@@ -9,8 +9,10 @@ module NewRelic
9
9
  module Frameworks
10
10
  class Rails4 < NewRelic::Control::Frameworks::Rails3
11
11
  def rails_gem_list
12
- Bundler.rubygems.all_specs.map do |gem|
13
- "#{gem.name} (#{gem.version})"
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})" }
14
16
  end
15
17
  end
16
18
 
@@ -44,7 +44,11 @@ module NewRelic
44
44
  ####################################
45
45
  report_on('Gems') do
46
46
  begin
47
- Bundler.rubygems.all_specs.map { |gem| "#{gem.name}(#{gem.version})" }
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
48
52
  rescue
49
53
  # There are certain rubygem, bundler, rails combinations (e.g. gem
50
54
  # 1.6.2, rails 2.3, bundler 1.2.3) where the code above throws an error
@@ -67,7 +71,7 @@ module NewRelic
67
71
  report_on('Physical Cores') { ::NewRelic::Agent::SystemInfo.num_physical_cores }
68
72
  report_on('Arch') { ::NewRelic::Agent::SystemInfo.processor_arch }
69
73
  report_on('OS version') { ::NewRelic::Agent::SystemInfo.os_version }
70
- report_on('OS') { ::NewRelic::Agent::SystemInfo.ruby_os_identifier }
74
+ report_on('OS') { ::NewRelic::Agent::SystemInfo.os_distribution }
71
75
  report_on('Database adapter') { ::NewRelic::Agent::DatabaseAdapter.value }
72
76
  report_on('Framework') { Agent.config[:framework].to_s }
73
77
  report_on('Dispatcher') { Agent.config[:dispatcher].to_s }
@@ -88,7 +88,13 @@ module NewRelic
88
88
  end
89
89
 
90
90
  def bundled_gem?(gem_name)
91
- defined?(Bundler) && Bundler.rubygems.all_specs.map(&:name).include?(gem_name)
91
+ return false unless defined?(Bundler)
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
92
98
  rescue => e
93
99
  ::NewRelic::Agent.logger.info("Could not determine if third party #{gem_name} gem is installed", e)
94
100
  false
@@ -142,10 +142,7 @@ module NewRelic
142
142
  end
143
143
 
144
144
  def check_for_falcon
145
- return unless defined?(::Falcon::Server) &&
146
- NewRelic::LanguageSupport.object_space_usable?
147
-
148
- @discovered_dispatcher = :falcon if find_class_in_object_space(::Falcon::Server)
145
+ @discovered_dispatcher = :falcon if defined?(::Falcon::Server) && File.basename($PROGRAM_NAME) == 'falcon'
149
146
  end
150
147
 
151
148
  def check_for_delayed_job
@@ -6,7 +6,7 @@
6
6
  module NewRelic
7
7
  module VERSION # :nodoc:
8
8
  MAJOR = 9
9
- MINOR = 12
9
+ MINOR = 14
10
10
  TINY = 0
11
11
 
12
12
  STRING = "#{MAJOR}.#{MINOR}.#{TINY}"
@@ -45,6 +45,34 @@ module NewRelicYML
45
45
 
46
46
  HEADER
47
47
 
48
+ SECURITY_BEGIN = <<-SECURITY
49
+ # BEGIN security agent
50
+ #
51
+ # NOTE: At this time, the security agent is intended for use only within
52
+ # a dedicated security testing environment with data that can tolerate
53
+ # modification or deletion. The security agent is available as a
54
+ # separate Ruby gem, newrelic_security. It is recommended that this
55
+ # separate gem only be introduced to a security testing environment
56
+ # by leveraging Bundler grouping like so:
57
+ #
58
+ # # Gemfile
59
+ # gem 'newrelic_rpm' # New Relic APM observability agent
60
+ # gem 'newrelic-infinite_tracing' # New Relic Infinite Tracing
61
+ #
62
+ # group :security do
63
+ # gem 'newrelic_security', require: false # New Relic security agent
64
+ # end
65
+ #
66
+ # NOTE: All "security.*" configuration parameters are related only to the
67
+ # security agent, and all other configuration parameters that may
68
+ # have "security" in the name somewhere are related to the APM agent.
69
+
70
+ SECURITY
71
+
72
+ SECURITY_END = <<-SECURITY
73
+ # END security agent
74
+ SECURITY
75
+
48
76
  FOOTER = <<~FOOTER
49
77
  # Environment-specific settings are in this section.
50
78
  # RAILS_ENV or RACK_ENV (as appropriate) is used to determine the environment.
@@ -67,16 +95,35 @@ module NewRelicYML
67
95
  FOOTER
68
96
 
69
97
  def self.get_configs(defaults)
70
- defaults.sort.each_with_object({}) do |(key, value), final_configs|
98
+ agent_configs = {}
99
+ security_configs = {}
100
+
101
+ defaults.sort.each do |key, value|
71
102
  next if CRITICAL.include?(key) || SKIP.include?(key)
72
103
 
73
104
  next unless public_config?(value) && !deprecated?(value)
74
105
 
75
- sanitized_description = sanitize_description(value[:description])
76
- description = format_description(sanitized_description)
77
- default = default_value(key, value)
78
- final_configs[key] = {description: description, default: default}
106
+ # TODO: OLD RUBIES < 2.6
107
+ # Remove `to_s`. `start_with?` doesn't accept symbols in Ruby <2.6
108
+ if key.to_s.start_with?('security.')
109
+ description, default = build_config(key, value)
110
+ security_configs[key] = {description: description, default: default}
111
+ next
112
+ end
113
+
114
+ description, default = build_config(key, value)
115
+ agent_configs[key] = {description: description, default: default}
79
116
  end
117
+
118
+ [agent_configs, security_configs]
119
+ end
120
+
121
+ def self.build_config(key, value)
122
+ sanitized_description = sanitize_description(value[:description])
123
+ description = format_description(sanitized_description)
124
+ default = default_value(key, value)
125
+
126
+ [description, default]
80
127
  end
81
128
 
82
129
  def self.public_config?(value)
@@ -126,15 +173,30 @@ module NewRelicYML
126
173
  end
127
174
  end
128
175
 
129
- def self.build_string(defaults)
130
- configs = get_configs(defaults)
131
- yml_string = ''
176
+ def self.agent_configs_yml(agent_configs)
177
+ agent_yml = ''
178
+ agent_configs.each do |key, value|
179
+ agent_yml += "#{value[:description]}\n # #{key}: #{value[:default]}\n\n"
180
+ end
181
+
182
+ agent_yml
183
+ end
132
184
 
133
- configs.each do |key, value|
134
- yml_string += "#{value[:description]}\n # #{key}: #{value[:default]}\n\n"
185
+ def self.security_configs_yml(security_configs)
186
+ security_yml = ''
187
+ security_configs.each do |key, value|
188
+ security_yml += "#{value[:description]}\n # #{key}: #{value[:default]}\n\n"
135
189
  end
136
190
 
137
- yml_string
191
+ security_yml
192
+ end
193
+
194
+ def self.build_string(defaults)
195
+ agent_configs, security_configs = get_configs(defaults)
196
+ agent_string = agent_configs_yml(agent_configs)
197
+ security_string = security_configs_yml(security_configs)
198
+
199
+ agent_string + SECURITY_BEGIN + security_string + SECURITY_END + "\n"
138
200
  end
139
201
 
140
202
  # :nocov:
@@ -103,7 +103,7 @@ class Instrumentation < Thor
103
103
  <<-CONFIG
104
104
  :'instrumentation.#{snake_name}' => {
105
105
  :default => 'auto',
106
- :documentation_default => 'auto'
106
+ :documentation_default => 'auto',
107
107
  :public => true,
108
108
  :type => String,
109
109
  :dynamic_name => true,
@@ -12,16 +12,16 @@ DependencyDetection.defer do
12
12
  depends_on do
13
13
  # The class that needs to be defined to prepend/chain onto. This can be used
14
14
  # to determine whether the library is installed.
15
- defined?(::<%= @class_name %>)
15
+ defined?(<%= @class_name %>)
16
16
  # Add any additional requirements to verify whether this instrumentation
17
17
  # should be installed
18
18
  end
19
19
 
20
20
  executes do
21
- ::NewRelic::Agent.logger.info('Installing <%= @name.downcase %> instrumentation')
21
+ NewRelic::Agent.logger.info('Installing <%= @name.downcase %> instrumentation')
22
22
 
23
23
  if use_prepend?
24
- prepend_instrument ::<%= @class_name %>, NewRelic::Agent::Instrumentation::<%= @class_name %>::Prepend
24
+ prepend_instrument <%= @class_name %>, NewRelic::Agent::Instrumentation::<%= @class_name %>::Prepend
25
25
  else
26
26
  chain_instrument NewRelic::Agent::Instrumentation::<%= @class_name %>::Chain
27
27
  end
data/newrelic.yml CHANGED
@@ -113,6 +113,53 @@ common: &default_settings
113
113
  # Specifies a path to the audit log file (including the filename).
114
114
  # audit_log.path: log/newrelic_audit.log
115
115
 
116
+ # 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
+ #
121
+ # Use fully qualified class names (using the :: delimiter) that include any
122
+ # module or class namespacing.
123
+ #
124
+ # Here is some Ruby source code that defines a render_png instance method for an
125
+ # Image class and a notify class method for a User class, both within a
126
+ # MyCompany module namespace:
127
+ #
128
+ # module MyCompany
129
+ # class Image
130
+ # def render_png
131
+ # # code to render a PNG
132
+ # end
133
+ # end
134
+ #
135
+ # class User
136
+ # def self.notify
137
+ # # code to notify users
138
+ # end
139
+ # end
140
+ # end
141
+ #
142
+ # Given that source code, the newrelic.yml config file might request
143
+ # instrumentation for both of these methods like so:
144
+ #
145
+ # automatic_custom_instrumentation_method_list:
146
+ # - MyCompany::Image#render_png
147
+ # - MyCompany::User.notify
148
+ #
149
+ # 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
+ #
154
+ # Whitespace around the comma(s) in the list is optional. When configuring the
155
+ # agent with a list of methods via the
156
+ # 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
+ #
161
+ # automatic_custom_instrumentation_method_list: []
162
+
116
163
  # Specify a list of constants that should prevent the agent from starting
117
164
  # automatically. Separate individual constants with a comma ,. For example,
118
165
  # "Rails::Console,UninstrumentedBackgroundJob".
@@ -509,6 +556,10 @@ common: &default_settings
509
556
  # prepend, chain, disabled.
510
557
  # instrumentation.net_http: auto
511
558
 
559
+ # Controls auto-instrumentation of the opensearch-ruby library at start-up. May
560
+ # be one of auto, prepend, chain, disabled.
561
+ # instrumentation.opensearch: auto
562
+
512
563
  # Controls auto-instrumentation of Puma::Rack. When enabled, the agent hooks
513
564
  # into the to_app method in Puma::Rack::Builder to find gems to instrument
514
565
  # during application startup. May be one of: auto, prepend, chain, disabled.
@@ -531,6 +582,10 @@ common: &default_settings
531
582
  # prepend, chain, disabled.
532
583
  # instrumentation.rake: auto
533
584
 
585
+ # Controls auto-instrumentation of the rdkafka library at start-up. May be one
586
+ # of auto, prepend, chain, disabled.
587
+ # instrumentation.rdkafka: auto
588
+
534
589
  # Controls auto-instrumentation of Redis at start-up. May be one of: auto,
535
590
  # prepend, chain, disabled.
536
591
  # instrumentation.redis: auto
@@ -543,6 +598,10 @@ common: &default_settings
543
598
  # prepend, chain, disabled.
544
599
  # instrumentation.roda: auto
545
600
 
601
+ # Controls auto-instrumentation of the ruby-kafka library at start-up. May be
602
+ # one of auto, prepend, chain, disabled.
603
+ # instrumentation.ruby_kafka: auto
604
+
546
605
  # Controls auto-instrumentation of the ruby-openai gem at start-up. May be one
547
606
  # of: auto, prepend, chain, disabled. Defaults to disabled in high security
548
607
  # mode.
@@ -607,6 +666,12 @@ common: &default_settings
607
666
  # When true, the agent transmits data about your app to the New Relic collector.
608
667
  # monitor_mode: true
609
668
 
669
+ # If true, the agent captures OpenSearch queries in transaction traces.
670
+ # opensearch.capture_queries: true
671
+
672
+ # If true, the agent obfuscates OpenSearch queries in transaction traces.
673
+ # opensearch.obfuscate_queries: true
674
+
610
675
  # If true, uses Module#prepend rather than alias_method for ActiveRecord
611
676
  # instrumentation.
612
677
  # prepend_active_record_instrumentation: false
@@ -645,60 +710,6 @@ common: &default_settings
645
710
  # ignoring specific transactions.
646
711
  # rules.ignore_url_regexes: []
647
712
 
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
-
702
713
  # Applies Language Agent Security Policy settings.
703
714
  # security_policies_token: ""
704
715
 
@@ -916,6 +927,59 @@ common: &default_settings
916
927
  # Foundry environment.
917
928
  # utilization.detect_pcf: true
918
929
 
930
+ # BEGIN security agent
931
+ #
932
+ # NOTE: At this time, the security agent is intended for use only within
933
+ # a dedicated security testing environment with data that can tolerate
934
+ # modification or deletion. The security agent is available as a
935
+ # separate Ruby gem, newrelic_security. It is recommended that this
936
+ # separate gem only be introduced to a security testing environment
937
+ # by leveraging Bundler grouping like so:
938
+ #
939
+ # # Gemfile
940
+ # gem 'newrelic_rpm' # New Relic APM observability agent
941
+ # gem 'newrelic-infinite_tracing' # New Relic Infinite Tracing
942
+ #
943
+ # group :security do
944
+ # gem 'newrelic_security', require: false # New Relic security agent
945
+ # end
946
+ #
947
+ # NOTE: All "security.*" configuration parameters are related only to the
948
+ # security agent, and all other configuration parameters that may
949
+ # have "security" in the name somewhere are related to the APM agent.
950
+
951
+ # If true, the security agent is loaded (a Ruby 'require' is performed)
952
+ # security.agent.enabled: false
953
+
954
+ # The port the application is listening on. This setting is mandatory for
955
+ # Passenger servers. Other servers should be detected by default.
956
+ # security.application_info.port: nil
957
+
958
+ # If true, enables deserialization detection
959
+ # security.detection.deserialization.enabled: true
960
+
961
+ # If true, enables RCI (remote code injection) detection
962
+ # security.detection.rci.enabled: true
963
+
964
+ # If true, enables RXSS (reflected cross-site scripting) detection
965
+ # security.detection.rxss.enabled: true
966
+
967
+ # If true, the security agent is started (the agent runs in its event loop)
968
+ # security.enabled: false
969
+
970
+ # Defines the mode for the security agent to operate in. Currently only IAST is
971
+ # supported
972
+ # security.mode: IAST
973
+
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
977
+
978
+ # Defines the endpoint URL for posting security-related data
979
+ # security.validator_service_url: wss://csec.nr-data.net
980
+
981
+ # END security agent
982
+
919
983
  # Environment-specific settings are in this section.
920
984
  # RAILS_ENV or RACK_ENV (as appropriate) is used to determine the environment.
921
985
  # If your application has other named environments, configure them here.
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.12.0
4
+ version: 9.14.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-07-24 00:00:00.000000000 Z
14
+ date: 2024-09-30 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: bundler
@@ -484,6 +484,10 @@ files:
484
484
  - lib/new_relic/agent/instrumentation/net_http/instrumentation.rb
485
485
  - lib/new_relic/agent/instrumentation/net_http/prepend.rb
486
486
  - lib/new_relic/agent/instrumentation/notifications_subscriber.rb
487
+ - lib/new_relic/agent/instrumentation/opensearch.rb
488
+ - lib/new_relic/agent/instrumentation/opensearch/chain.rb
489
+ - lib/new_relic/agent/instrumentation/opensearch/instrumentation.rb
490
+ - lib/new_relic/agent/instrumentation/opensearch/prepend.rb
487
491
  - lib/new_relic/agent/instrumentation/padrino.rb
488
492
  - lib/new_relic/agent/instrumentation/padrino/chain.rb
489
493
  - lib/new_relic/agent/instrumentation/padrino/instrumentation.rb
@@ -505,6 +509,10 @@ files:
505
509
  - lib/new_relic/agent/instrumentation/rake/chain.rb
506
510
  - lib/new_relic/agent/instrumentation/rake/instrumentation.rb
507
511
  - lib/new_relic/agent/instrumentation/rake/prepend.rb
512
+ - lib/new_relic/agent/instrumentation/rdkafka.rb
513
+ - lib/new_relic/agent/instrumentation/rdkafka/chain.rb
514
+ - lib/new_relic/agent/instrumentation/rdkafka/instrumentation.rb
515
+ - lib/new_relic/agent/instrumentation/rdkafka/prepend.rb
508
516
  - lib/new_relic/agent/instrumentation/redis.rb
509
517
  - lib/new_relic/agent/instrumentation/redis/chain.rb
510
518
  - lib/new_relic/agent/instrumentation/redis/cluster_middleware.rb
@@ -523,6 +531,10 @@ files:
523
531
  - lib/new_relic/agent/instrumentation/roda/instrumentation.rb
524
532
  - lib/new_relic/agent/instrumentation/roda/prepend.rb
525
533
  - lib/new_relic/agent/instrumentation/roda/roda_transaction_namer.rb
534
+ - lib/new_relic/agent/instrumentation/ruby_kafka.rb
535
+ - lib/new_relic/agent/instrumentation/ruby_kafka/chain.rb
536
+ - lib/new_relic/agent/instrumentation/ruby_kafka/instrumentation.rb
537
+ - lib/new_relic/agent/instrumentation/ruby_kafka/prepend.rb
526
538
  - lib/new_relic/agent/instrumentation/ruby_openai.rb
527
539
  - lib/new_relic/agent/instrumentation/ruby_openai/chain.rb
528
540
  - lib/new_relic/agent/instrumentation/ruby_openai/instrumentation.rb
@@ -606,6 +618,8 @@ files:
606
618
  - lib/new_relic/agent/samplers/object_sampler.rb
607
619
  - lib/new_relic/agent/samplers/vm_sampler.rb
608
620
  - lib/new_relic/agent/serverless_handler.rb
621
+ - lib/new_relic/agent/serverless_handler_event_sources.json
622
+ - lib/new_relic/agent/serverless_handler_event_sources.rb
609
623
  - lib/new_relic/agent/span_event_aggregator.rb
610
624
  - lib/new_relic/agent/span_event_primitive.rb
611
625
  - lib/new_relic/agent/sql_sampler.rb
@@ -668,6 +682,8 @@ files:
668
682
  - lib/new_relic/control/class_methods.rb
669
683
  - lib/new_relic/control/frameworks.rb
670
684
  - lib/new_relic/control/frameworks/external.rb
685
+ - lib/new_relic/control/frameworks/grape.rb
686
+ - lib/new_relic/control/frameworks/padrino.rb
671
687
  - lib/new_relic/control/frameworks/rails.rb
672
688
  - lib/new_relic/control/frameworks/rails3.rb
673
689
  - lib/new_relic/control/frameworks/rails4.rb
@@ -762,7 +778,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
762
778
  - !ruby/object:Gem::Version
763
779
  version: 1.3.1
764
780
  requirements: []
765
- rubygems_version: 3.5.11
781
+ rubygems_version: 3.5.16
766
782
  signing_key:
767
783
  specification_version: 4
768
784
  summary: New Relic Ruby Agent