newrelic_rpm 9.9.0 → 9.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (219) hide show
  1. checksums.yaml +4 -4
  2. data/.build_ignore +1 -0
  3. data/CHANGELOG.md +463 -1
  4. data/CONTRIBUTING.md +2 -2
  5. data/README.md +16 -17
  6. data/Rakefile +1 -1
  7. data/lib/boot/strap.rb +102 -0
  8. data/lib/new_relic/agent/agent.rb +6 -0
  9. data/lib/new_relic/agent/agent_helpers/connect.rb +3 -0
  10. data/lib/new_relic/agent/agent_helpers/harvest.rb +3 -0
  11. data/lib/new_relic/agent/agent_helpers/shutdown.rb +3 -0
  12. data/lib/new_relic/agent/agent_helpers/start_worker_thread.rb +1 -0
  13. data/lib/new_relic/agent/agent_helpers/startup.rb +7 -0
  14. data/lib/new_relic/agent/agent_logger.rb +1 -0
  15. data/lib/new_relic/agent/aws.rb +68 -0
  16. data/lib/new_relic/agent/configuration/default_source.rb +603 -105
  17. data/lib/new_relic/agent/configuration/environment_source.rb +5 -1
  18. data/lib/new_relic/agent/configuration/manager.rb +28 -2
  19. data/lib/new_relic/agent/configuration/yaml_source.rb +7 -2
  20. data/lib/new_relic/agent/database/obfuscation_helpers.rb +11 -11
  21. data/lib/new_relic/agent/database/obfuscator.rb +1 -0
  22. data/lib/new_relic/agent/database.rb +41 -1
  23. data/lib/new_relic/agent/database_adapter.rb +1 -1
  24. data/lib/new_relic/agent/datastores/redis.rb +1 -1
  25. data/lib/new_relic/agent/distributed_tracing/cross_app_tracing.rb +1 -1
  26. data/lib/new_relic/agent/distributed_tracing.rb +4 -2
  27. data/lib/new_relic/agent/error_collector.rb +37 -10
  28. data/lib/new_relic/agent/external.rb +2 -0
  29. data/lib/new_relic/agent/health_check.rb +136 -0
  30. data/lib/new_relic/agent/http_clients/uri_util.rb +1 -1
  31. data/lib/new_relic/agent/instrumentation/action_dispatch.rb +1 -1
  32. data/lib/new_relic/agent/instrumentation/action_dispatch_subscriber.rb +1 -1
  33. data/lib/new_relic/agent/instrumentation/action_mailbox.rb +1 -1
  34. data/lib/new_relic/agent/instrumentation/action_mailer.rb +1 -1
  35. data/lib/new_relic/agent/instrumentation/active_job.rb +1 -1
  36. data/lib/new_relic/agent/instrumentation/active_job_subscriber.rb +6 -2
  37. data/lib/new_relic/agent/instrumentation/active_merchant.rb +0 -13
  38. data/lib/new_relic/agent/instrumentation/active_record.rb +7 -12
  39. data/lib/new_relic/agent/instrumentation/active_record_helper.rb +7 -3
  40. data/lib/new_relic/agent/instrumentation/active_record_notifications.rb +11 -9
  41. data/lib/new_relic/agent/instrumentation/active_record_prepend.rb +2 -2
  42. data/lib/new_relic/agent/instrumentation/active_record_subscriber.rb +9 -16
  43. data/lib/new_relic/agent/instrumentation/active_support_broadcast_logger.rb +0 -2
  44. data/lib/new_relic/agent/instrumentation/active_support_logger.rb +0 -2
  45. data/lib/new_relic/agent/instrumentation/async_http.rb +2 -3
  46. data/lib/new_relic/agent/instrumentation/aws_sdk_firehose/chain.rb +21 -0
  47. data/lib/new_relic/agent/instrumentation/aws_sdk_firehose/instrumentation.rb +66 -0
  48. data/lib/new_relic/agent/instrumentation/aws_sdk_firehose/prepend.rb +15 -0
  49. data/lib/new_relic/agent/instrumentation/aws_sdk_firehose.rb +22 -0
  50. data/lib/new_relic/agent/instrumentation/aws_sdk_kinesis/chain.rb +21 -0
  51. data/lib/new_relic/agent/instrumentation/aws_sdk_kinesis/instrumentation.rb +91 -0
  52. data/lib/new_relic/agent/instrumentation/aws_sdk_kinesis/prepend.rb +15 -0
  53. data/lib/new_relic/agent/instrumentation/aws_sdk_kinesis.rb +22 -0
  54. data/lib/new_relic/agent/instrumentation/aws_sdk_lambda/chain.rb +33 -0
  55. data/lib/new_relic/agent/instrumentation/aws_sdk_lambda/instrumentation.rb +93 -0
  56. data/lib/new_relic/agent/instrumentation/aws_sdk_lambda/prepend.rb +23 -0
  57. data/lib/new_relic/agent/instrumentation/aws_sdk_lambda.rb +23 -0
  58. data/lib/new_relic/agent/instrumentation/aws_sqs/chain.rb +37 -0
  59. data/lib/new_relic/agent/instrumentation/aws_sqs/instrumentation.rb +67 -0
  60. data/lib/new_relic/agent/instrumentation/aws_sqs/prepend.rb +21 -0
  61. data/lib/new_relic/agent/instrumentation/aws_sqs.rb +23 -0
  62. data/lib/new_relic/agent/instrumentation/bunny/instrumentation.rb +14 -0
  63. data/lib/new_relic/agent/instrumentation/bunny.rb +3 -4
  64. data/lib/new_relic/agent/instrumentation/concurrent_ruby.rb +1 -3
  65. data/lib/new_relic/agent/instrumentation/controller_instrumentation.rb +4 -0
  66. data/lib/new_relic/agent/instrumentation/curb.rb +4 -5
  67. data/lib/new_relic/agent/instrumentation/delayed_job_instrumentation.rb +0 -23
  68. data/lib/new_relic/agent/instrumentation/dynamodb/chain.rb +27 -0
  69. data/lib/new_relic/agent/instrumentation/dynamodb/instrumentation.rb +64 -0
  70. data/lib/new_relic/agent/instrumentation/dynamodb/prepend.rb +19 -0
  71. data/lib/new_relic/agent/instrumentation/dynamodb.rb +23 -0
  72. data/lib/new_relic/agent/instrumentation/elasticsearch/chain.rb +1 -2
  73. data/lib/new_relic/agent/instrumentation/elasticsearch/instrumentation.rb +53 -7
  74. data/lib/new_relic/agent/instrumentation/elasticsearch.rb +1 -3
  75. data/lib/new_relic/agent/instrumentation/ethon.rb +1 -5
  76. data/lib/new_relic/agent/instrumentation/excon.rb +1 -17
  77. data/lib/new_relic/agent/instrumentation/fiber/chain.rb +1 -1
  78. data/lib/new_relic/agent/instrumentation/fiber/prepend.rb +1 -1
  79. data/lib/new_relic/agent/instrumentation/fiber.rb +0 -2
  80. data/lib/new_relic/agent/instrumentation/grape/instrumentation.rb +0 -3
  81. data/lib/new_relic/agent/instrumentation/grape.rb +1 -1
  82. data/lib/new_relic/agent/instrumentation/grpc/client/instrumentation.rb +0 -1
  83. data/lib/new_relic/agent/instrumentation/httpclient.rb +1 -5
  84. data/lib/new_relic/agent/instrumentation/httprb.rb +0 -1
  85. data/lib/new_relic/agent/instrumentation/httpx/instrumentation.rb +1 -1
  86. data/lib/new_relic/agent/instrumentation/httpx.rb +1 -5
  87. data/lib/new_relic/agent/instrumentation/logger.rb +1 -3
  88. data/lib/new_relic/agent/instrumentation/logstasher/chain.rb +21 -0
  89. data/lib/new_relic/agent/instrumentation/logstasher/instrumentation.rb +24 -0
  90. data/lib/new_relic/agent/instrumentation/logstasher/prepend.rb +13 -0
  91. data/lib/new_relic/agent/instrumentation/logstasher.rb +25 -0
  92. data/lib/new_relic/agent/instrumentation/memcache/dalli.rb +1 -1
  93. data/lib/new_relic/agent/instrumentation/memcache/helper.rb +2 -2
  94. data/lib/new_relic/agent/instrumentation/memcache/instrumentation.rb +1 -1
  95. data/lib/new_relic/agent/instrumentation/memcache/prepend.rb +1 -1
  96. data/lib/new_relic/agent/instrumentation/memcache.rb +0 -1
  97. data/lib/new_relic/agent/instrumentation/mongodb_command_subscriber.rb +1 -1
  98. data/lib/new_relic/agent/instrumentation/net_http/instrumentation.rb +3 -3
  99. data/lib/new_relic/agent/instrumentation/net_http.rb +2 -1
  100. data/lib/new_relic/agent/instrumentation/notifications_subscriber.rb +0 -2
  101. data/lib/new_relic/agent/instrumentation/opensearch/chain.rb +21 -0
  102. data/lib/new_relic/agent/instrumentation/opensearch/instrumentation.rb +66 -0
  103. data/lib/{tasks/instrumentation_generator/templates/instrumentation.tt → new_relic/agent/instrumentation/opensearch/prepend.rb} +4 -4
  104. data/lib/new_relic/agent/instrumentation/opensearch.rb +23 -0
  105. data/lib/new_relic/agent/instrumentation/padrino.rb +3 -3
  106. data/lib/new_relic/agent/instrumentation/rack/instrumentation.rb +3 -0
  107. data/lib/new_relic/agent/instrumentation/rails_notifications/action_controller.rb +9 -5
  108. data/lib/new_relic/agent/instrumentation/rake.rb +1 -2
  109. data/lib/new_relic/agent/instrumentation/rdkafka/chain.rb +72 -0
  110. data/lib/new_relic/agent/instrumentation/rdkafka/instrumentation.rb +70 -0
  111. data/lib/new_relic/agent/instrumentation/rdkafka/prepend.rb +67 -0
  112. data/lib/new_relic/agent/instrumentation/rdkafka.rb +25 -0
  113. data/lib/new_relic/agent/instrumentation/redis/cluster_middleware.rb +26 -0
  114. data/lib/new_relic/agent/instrumentation/redis/constants.rb +2 -2
  115. data/lib/new_relic/agent/instrumentation/redis/instrumentation.rb +14 -11
  116. data/lib/new_relic/agent/instrumentation/redis/middleware.rb +3 -0
  117. data/lib/new_relic/agent/instrumentation/redis.rb +11 -5
  118. data/lib/new_relic/agent/instrumentation/resque.rb +8 -6
  119. data/lib/new_relic/agent/instrumentation/roda.rb +5 -5
  120. data/lib/new_relic/agent/instrumentation/ruby_kafka/chain.rb +55 -0
  121. data/lib/new_relic/agent/instrumentation/ruby_kafka/instrumentation.rb +67 -0
  122. data/lib/new_relic/agent/instrumentation/ruby_kafka/prepend.rb +60 -0
  123. data/lib/new_relic/agent/instrumentation/ruby_kafka.rb +25 -0
  124. data/lib/new_relic/agent/instrumentation/ruby_openai.rb +2 -2
  125. data/lib/new_relic/agent/instrumentation/sidekiq/extensions/delay_extensions.rb +24 -0
  126. data/lib/new_relic/agent/instrumentation/sidekiq/extensions/delayed_class.rb +2 -2
  127. data/lib/new_relic/agent/instrumentation/sidekiq.rb +9 -15
  128. data/lib/new_relic/agent/instrumentation/sinatra.rb +3 -19
  129. data/lib/new_relic/agent/instrumentation/stripe.rb +1 -1
  130. data/lib/new_relic/agent/instrumentation/stripe_subscriber.rb +22 -1
  131. data/lib/new_relic/agent/instrumentation/thread.rb +0 -2
  132. data/lib/new_relic/agent/instrumentation/tilt.rb +0 -4
  133. data/lib/new_relic/agent/instrumentation/typhoeus/instrumentation.rb +2 -2
  134. data/lib/new_relic/agent/instrumentation/typhoeus.rb +0 -1
  135. data/lib/new_relic/agent/instrumentation/view_component/instrumentation.rb +11 -5
  136. data/lib/new_relic/agent/instrumentation/view_component.rb +0 -2
  137. data/lib/new_relic/agent/javascript_instrumentor.rb +2 -3
  138. data/lib/new_relic/agent/llm/chat_completion_summary.rb +1 -1
  139. data/lib/new_relic/agent/llm/embedding.rb +1 -1
  140. data/lib/new_relic/agent/local_log_decorator.rb +20 -3
  141. data/lib/new_relic/agent/log_event_aggregator.rb +119 -28
  142. data/lib/new_relic/agent/logging.rb +1 -1
  143. data/lib/new_relic/agent/messaging.rb +16 -5
  144. data/lib/new_relic/agent/method_tracer.rb +3 -0
  145. data/lib/new_relic/agent/monitors/inbound_request_monitor.rb +1 -1
  146. data/lib/new_relic/agent/monitors/synthetics_monitor.rb +1 -1
  147. data/lib/new_relic/agent/new_relic_service/json_marshaller.rb +2 -2
  148. data/lib/new_relic/agent/new_relic_service.rb +8 -2
  149. data/lib/new_relic/agent/opentelemetry/context/propagation/trace_propagator.rb +66 -0
  150. data/lib/new_relic/agent/opentelemetry/context/propagation.rb +15 -0
  151. data/lib/{tasks/instrumentation_generator/templates/Envfile.tt → new_relic/agent/opentelemetry/context.rb} +9 -5
  152. data/lib/new_relic/agent/opentelemetry/trace/span.rb +31 -0
  153. data/lib/new_relic/agent/opentelemetry/trace/tracer.rb +129 -0
  154. data/lib/new_relic/agent/opentelemetry/trace/tracer_provider.rb +18 -0
  155. data/lib/new_relic/agent/opentelemetry/trace.rb +15 -0
  156. data/lib/new_relic/agent/opentelemetry/transaction_patch.rb +69 -0
  157. data/lib/new_relic/agent/opentelemetry_bridge.rb +32 -0
  158. data/lib/new_relic/agent/parameter_filtering.rb +1 -1
  159. data/lib/new_relic/agent/samplers/cpu_sampler.rb +1 -1
  160. data/lib/new_relic/agent/samplers/memory_sampler.rb +1 -1
  161. data/lib/new_relic/agent/serverless_handler.rb +247 -12
  162. data/lib/new_relic/agent/serverless_handler_event_sources.json +155 -0
  163. data/lib/new_relic/agent/serverless_handler_event_sources.rb +49 -0
  164. data/lib/new_relic/agent/span_event_primitive.rb +16 -11
  165. data/lib/new_relic/agent/system_info.rb +14 -0
  166. data/lib/new_relic/agent/threading/backtrace_node.rb +10 -1
  167. data/lib/new_relic/agent/tracer.rb +1 -1
  168. data/lib/new_relic/agent/transaction/abstract_segment.rb +2 -1
  169. data/lib/new_relic/agent/transaction/datastore_segment.rb +1 -1
  170. data/lib/new_relic/agent/transaction/distributed_tracer.rb +3 -3
  171. data/lib/new_relic/agent/transaction/external_request_segment.rb +0 -10
  172. data/lib/new_relic/agent/transaction/message_broker_segment.rb +4 -1
  173. data/lib/new_relic/agent/transaction/request_attributes.rb +14 -7
  174. data/lib/new_relic/agent/transaction/trace_context.rb +34 -5
  175. data/lib/new_relic/agent/transaction/tracing.rb +3 -3
  176. data/lib/new_relic/agent/transaction.rb +4 -7
  177. data/lib/new_relic/agent/transaction_time_aggregator.rb +1 -1
  178. data/lib/new_relic/agent/utilization/ecs.rb +22 -0
  179. data/lib/new_relic/agent/utilization/ecs_v4.rb +22 -0
  180. data/lib/new_relic/agent/utilization_data.rb +40 -5
  181. data/lib/new_relic/agent/vm/c_ruby_vm.rb +3 -3
  182. data/lib/new_relic/agent.rb +124 -2
  183. data/lib/new_relic/constants.rb +1 -0
  184. data/lib/new_relic/control/frameworks/grape.rb +14 -0
  185. data/lib/new_relic/control/frameworks/padrino.rb +14 -0
  186. data/lib/new_relic/control/frameworks/rails4.rb +1 -3
  187. data/lib/new_relic/control/instance_methods.rb +6 -0
  188. data/lib/new_relic/control/instrumentation.rb +1 -1
  189. data/lib/new_relic/control/private_instance_methods.rb +4 -0
  190. data/lib/new_relic/control/security_interface.rb +57 -0
  191. data/lib/new_relic/control.rb +1 -1
  192. data/lib/new_relic/dependency_detection.rb +11 -14
  193. data/lib/new_relic/environment_report.rb +2 -2
  194. data/lib/new_relic/helper.rb +22 -0
  195. data/lib/new_relic/language_support.rb +3 -1
  196. data/lib/new_relic/local_environment.rb +1 -4
  197. data/lib/new_relic/rack/browser_monitoring.rb +20 -8
  198. data/lib/new_relic/version.rb +1 -1
  199. data/lib/sequel/extensions/new_relic_instrumentation.rb +3 -2
  200. data/lib/tasks/config.rake +7 -3
  201. data/lib/tasks/gha.rake +31 -0
  202. data/lib/tasks/helpers/config.html.erb +3 -2
  203. data/lib/tasks/helpers/format.rb +1 -1
  204. data/lib/tasks/helpers/newrelicyml.rb +80 -13
  205. data/newrelic.yml +425 -162
  206. data/newrelic_rpm.gemspec +3 -1
  207. data/test/agent_helper.rb +24 -2
  208. metadata +91 -22
  209. data/lib/tasks/instrumentation_generator/README.md +0 -63
  210. data/lib/tasks/instrumentation_generator/TODO.md +0 -33
  211. data/lib/tasks/instrumentation_generator/instrumentation.thor +0 -121
  212. data/lib/tasks/instrumentation_generator/templates/chain.tt +0 -21
  213. data/lib/tasks/instrumentation_generator/templates/chain_method.tt +0 -7
  214. data/lib/tasks/instrumentation_generator/templates/dependency_detection.tt +0 -29
  215. data/lib/tasks/instrumentation_generator/templates/instrumentation_method.tt +0 -3
  216. data/lib/tasks/instrumentation_generator/templates/newrelic.yml.tt +0 -19
  217. data/lib/tasks/instrumentation_generator/templates/prepend.tt +0 -13
  218. data/lib/tasks/instrumentation_generator/templates/prepend_method.tt +0 -3
  219. data/lib/tasks/instrumentation_generator/templates/test.tt +0 -15
data/newrelic.yml CHANGED
@@ -26,58 +26,72 @@ 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. For
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 no
37
- # metrics, events, or spans will be sent. AI Monitoring is automatically disabled
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
42
42
  # output content on specific LLM events.
43
+ #
43
44
  # The excluded attributes include:
44
- # * content from LlmChatCompletionMessage events
45
- # * input from LlmEmbedding events
45
+ # - content from LlmChatCompletionMessage events
46
+ # - input from LlmEmbedding events
47
+ #
48
+ # This is an optional security setting to prevent recording sensitive data sent
49
+ # to and received from your LLMs.
46
50
  # ai_monitoring.record_content.enabled: true
47
51
 
48
52
  # If true, enables capture of all HTTP request headers for all destinations.
49
53
  # allow_all_headers: false
50
54
 
51
- # Your New Relic userKey. Required when using the New Relic REST API v2 to record
52
- # deployments using the newrelic deployments command.
55
+ # Your New Relic userKey. Required when using the New Relic REST API v2 to
56
+ # record deployments using the newrelic deployments command.
53
57
  # api_key: ""
54
58
 
55
59
  # If true, enables log decoration and the collection of log events and metrics.
56
60
  # application_logging.enabled: true
57
61
 
58
62
  # A hash with key/value pairs to add as custom attributes to all log events
59
- # forwarded to New Relic. If sending using an environment variable, the value must
60
- # be formatted like: "key1=value1,key2=value2"
63
+ # forwarded to New Relic. If sending using an environment variable, the value
64
+ # must be formatted like: "key1=value1,key2=value2"
61
65
  # application_logging.forwarding.custom_attributes: {}
62
66
 
63
67
  # If true, the agent captures log records emitted by your application.
64
68
  # application_logging.forwarding.enabled: true
65
69
 
70
+ # If true, the agent attaches labels to log records.
71
+ # application_logging.forwarding.labels.enabled: false
72
+
73
+ # A case-insensitive array or comma-delimited string containing the labels to
74
+ # exclude from log records.
75
+ # application_logging.forwarding.labels.exclude: []
76
+
66
77
  # Sets the minimum level a log event must have to be forwarded to New Relic.
67
- # This is based on the integer values of Ruby's Logger::Severity constants:
68
- # https://github.com/ruby/ruby/blob/master/lib/logger/severity.rb
78
+ #
79
+ # This is based on the integer values of Ruby's Logger::Severity constants.
80
+ #
69
81
  # The intention is to forward logs with the level given to the configuration, as
70
82
  # well as any logs with a higher level of severity.
83
+ #
71
84
  # For example, setting this value to "debug" will forward all log events to New
72
85
  # Relic. Setting this value to "error" will only forward log events with the
73
86
  # levels "error", "fatal", and "unknown".
87
+ #
74
88
  # Valid values (ordered lowest to highest):
75
- # * "debug"
76
- # * "info"
77
- # * "warn"
78
- # * "error"
79
- # * "fatal"
80
- # * "unknown"
89
+ # - "debug"
90
+ # - "info"
91
+ # - "warn"
92
+ # - "error"
93
+ # - "fatal"
94
+ # - "unknown"
81
95
  # application_logging.forwarding.log_level: debug
82
96
 
83
97
  # Defines the maximum number of log records to buffer in memory at a time.
@@ -111,10 +125,62 @@ common: &default_settings
111
125
  # Specifies a path to the audit log file (including the filename).
112
126
  # audit_log.path: log/newrelic_audit.log
113
127
 
128
+ # An array of CLASS#METHOD (for instance methods) and/or CLASS.METHOD (for class
129
+ # methods) strings representing Ruby methods that the agent can automatically
130
+ # add custom instrumentation to. This doesn't require any modifications of the
131
+ # source code that defines the methods.
132
+ #
133
+ # Use fully qualified class names (using the :: delimiter) that include any
134
+ # module or class namespacing.
135
+ #
136
+ # Here is some Ruby source code that defines a render_png instance method for an
137
+ # Image class and a notify class method for a User class, both within a
138
+ # MyCompany module namespace:
139
+ #
140
+ # module MyCompany
141
+ # class Image
142
+ # def render_png
143
+ # # code to render a PNG
144
+ # end
145
+ # end
146
+ #
147
+ # class User
148
+ # def self.notify
149
+ # # code to notify users
150
+ # end
151
+ # end
152
+ # end
153
+ #
154
+ #
155
+ # Given that source code, the newrelic.yml config file might request
156
+ # instrumentation for both of these methods like so:
157
+ #
158
+ # automatic_custom_instrumentation_method_list:
159
+ # - MyCompany::Image#render_png
160
+ # - MyCompany::User.notify
161
+ #
162
+ #
163
+ # That configuration example uses YAML array syntax to specify both methods.
164
+ # Alternatively, you can use a comma-delimited string:
165
+ #
166
+ # automatic_custom_instrumentation_method_list: 'MyCompany::Image#render_png,
167
+ # MyCompany::User.notify'
168
+ #
169
+ #
170
+ # Whitespace around the comma(s) in the list is optional. When configuring the
171
+ # agent with a list of methods via the
172
+ # NEW_RELIC_AUTOMATIC_CUSTOM_INSTRUMENTATION_METHOD_LIST environment variable,
173
+ # use this comma-delimited string format:
174
+ #
175
+ # export
176
+ # NEW_RELIC_AUTOMATIC_CUSTOM_INSTRUMENTATION_METHOD_LIST='MyCompany::Image#render_png,
177
+ # MyCompany::User.notify'
178
+ # automatic_custom_instrumentation_method_list: []
179
+
114
180
  # Specify a list of constants that should prevent the agent from starting
115
181
  # automatically. Separate individual constants with a comma ,. For example,
116
182
  # "Rails::Console,UninstrumentedBackgroundJob".
117
- # autostart.denylisted_constants: Rails::Command::ConsoleCommand,Rails::Command::CredentialsCommand,Rails::Command::Db::System::ChangeCommand,Rails::Command::DbConsoleCommand,Rails::Command::DestroyCommand,Rails::Command::DevCommand,Rails::Command::EncryptedCommand,Rails::Command::GenerateCommand,Rails::Command::InitializersCommand,Rails::Command::NotesCommand,Rails::Command::RoutesCommand,Rails::Command::SecretsCommand,Rails::Console,Rails::DBConsole
183
+ # autostart.denylisted_constants: Rails::Command::ConsoleCommand,Rails::Command::CredentialsCommand,Rails::Command::Db::System::ChangeCommand,Rails::Command::DbConsoleCommand,Rails::Command::DestroyCommand,Rails::Command::DevCommand,Rails::Command::EncryptedCommand,Rails::Command::GenerateCommand,Rails::Command::InitializersCommand,Rails::Command::NotesCommand,Rails::Command::RoutesCommand,Rails::Command::RunnerCommand,Rails::Command::SecretsCommand,Rails::Console,Rails::DBConsole
118
184
 
119
185
  # Defines a comma-delimited list of executables that the agent should not
120
186
  # instrument. For example, "rake,my_ruby_script.rb".
@@ -124,16 +190,16 @@ common: &default_settings
124
190
  # instrument. For example, "assets:precompile,db:migrate".
125
191
  # 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
126
192
 
127
- # Backports the faster ActiveRecord connection lookup introduced in Rails 6, which
128
- # improves agent performance when instrumenting ActiveRecord. Note that this
129
- # setting may not be compatible with other gems that patch ActiveRecord.
193
+ # Backports the faster ActiveRecord connection lookup introduced in Rails 6,
194
+ # which improves agent performance when instrumenting ActiveRecord. Note that
195
+ # this setting may not be compatible with other gems that patch ActiveRecord.
130
196
  # backport_fast_active_record_connection_lookup: false
131
197
 
132
198
  # If true, the agent captures attributes from browser monitoring.
133
199
  # browser_monitoring.attributes.enabled: false
134
200
 
135
- # Prefix of attributes to exclude from browser monitoring. Allows * as wildcard at
136
- # end.
201
+ # Prefix of attributes to exclude from browser monitoring. Allows * as wildcard
202
+ # at end.
137
203
  # browser_monitoring.attributes.exclude: []
138
204
 
139
205
  # Prefix of attributes to include in browser monitoring. Allows * as wildcard at
@@ -144,9 +210,12 @@ common: &default_settings
144
210
  # (sometimes referred to as real user monitoring or RUM).
145
211
  # browser_monitoring.auto_instrument: true
146
212
 
147
- # Manual override for the path to your local CA bundle. This CA bundle will be
148
- # used to validate the SSL certificate presented by New Relic's data collection
149
- # service.
213
+ # If true, enables auto-injection of Content Security Policy Nonce in browser
214
+ # monitoring scripts. For now, auto-injection only works with Rails 5.2+.
215
+ # browser_monitoring.content_security_policy_nonce: true
216
+
217
+ # Manual override for the path to your local CA bundle. This CA bundle validates
218
+ # the SSL certificate presented by New Relic's data collection service.
150
219
  # ca_bundle_path: nil
151
220
 
152
221
  # Enable or disable the capture of memcache keys from transaction traces.
@@ -154,26 +223,30 @@ common: &default_settings
154
223
 
155
224
  # When true, the agent captures HTTP request parameters and attaches them to
156
225
  # transaction traces, traced errors, and TransactionError events.
157
- # When using the capture_params setting, the Ruby agent will not attempt to filter
158
- # secret information. Recommendation: To filter secret information from request
159
- # parameters, use the attributes.include setting instead. For more information,
160
- # see the Ruby attribute examples.
226
+ #
227
+ # When using the capture_params setting, the Ruby agent will not attempt to
228
+ # filter secret information. Recommendation: To filter secret information from
229
+ # request parameters, use the attributes.include setting instead. For more
230
+ # information, see the Ruby attribute examples.
161
231
  # capture_params: false
162
232
 
163
233
  # If true, the agent will clear Tracer::State in Agent.drop_buffered_data.
164
234
  # clear_transaction_state_after_fork: false
165
235
 
236
+ # The AWS account ID for the AWS account associated with this app
237
+ # cloud.aws.account_id: nil
238
+
166
239
  # If true, the agent will report source code level metrics for traced methods.
167
- # see:
240
+ # See:
168
241
  # https://docs.newrelic.com/docs/apm/agents/ruby-agent/features/ruby-codestream-integration/
169
242
  # code_level_metrics.enabled: true
170
243
 
171
244
  # Path to newrelic.yml. If undefined, the agent checks the following directories
172
245
  # (in order):
173
- # * config/newrelic.yml
174
- # * newrelic.yml
175
- # * $HOME/.newrelic/newrelic.yml
176
- # * $HOME/newrelic.yml
246
+ # - config/newrelic.yml
247
+ # - newrelic.yml
248
+ # - $HOME/.newrelic/newrelic.yml
249
+ # - $HOME/newrelic.yml
177
250
  # config_path: newrelic.yml
178
251
 
179
252
  # If false, custom attributes will not be sent on events.
@@ -182,15 +255,17 @@ common: &default_settings
182
255
  # If true, the agent captures custom events.
183
256
  # custom_insights_events.enabled: true
184
257
 
185
- # Specify a maximum number of custom events to buffer in memory at a time.
258
+ # - Specify a maximum number of custom events to buffer in memory at a time.
259
+ # - When configuring the agent for AI monitoring, set to max value 100000.
260
+ # This ensures the agent captures the maximum amount of LLM events.
186
261
  # custom_insights_events.max_samples_stored: 3000
187
262
 
188
- # If false, the agent will not add database_name parameter to transaction or slow
189
- # sql traces.
263
+ # If false, the agent will not add database_name parameter to transaction or
264
+ # slow sql traces.
190
265
  # datastore_tracer.database_name_reporting.enabled: true
191
266
 
192
- # If false, the agent will not report datastore instance metrics, nor add host or
193
- # port_path_or_id parameters to transaction or slow SQL traces.
267
+ # If false, the agent will not report datastore instance metrics, nor add host
268
+ # or port_path_or_id parameters to transaction or slow SQL traces.
194
269
  # datastore_tracer.instance_reporting.enabled: true
195
270
 
196
271
  # If true, disables Action Cable instrumentation.
@@ -235,17 +310,18 @@ common: &default_settings
235
310
 
236
311
  # If true, the agent won't wrap third-party middlewares in instrumentation
237
312
  # (regardless of whether they are installed via Rack::Builder or Rails).
313
+ #
238
314
  # When middleware instrumentation is disabled, if an application is using
239
- # middleware that could alter the response code, the HTTP status code reported on
240
- # the transaction may not reflect the altered value.
315
+ # middleware that could alter the response code, the HTTP status code reported
316
+ # on the transaction may not reflect the altered value.
241
317
  # disable_middleware_instrumentation: false
242
318
 
243
- # If true, disables agent middleware for Roda. This middleware is responsible for
244
- # advanced feature support such as page load timing and error collection.
319
+ # If true, disables agent middleware for Roda. This middleware is responsible
320
+ # for advanced feature support such as page load timing and error collection.
245
321
  # disable_roda_auto_middleware: false
246
322
 
247
- # If true, disables the collection of sampler metrics. Sampler metrics are metrics
248
- # that are not event-based (such as CPU time or memory usage).
323
+ # If true, disables the collection of sampler metrics. Sampler metrics are
324
+ # metrics that are not event-based (such as CPU time or memory usage).
249
325
  # disable_samplers: false
250
326
 
251
327
  # If true, disables Sequel instrumentation.
@@ -257,18 +333,18 @@ common: &default_settings
257
333
  # If true, disables agent middleware for Sinatra. This middleware is responsible
258
334
  # for advanced feature support such as cross application tracing, page load
259
335
  # timing, and error collection.
336
+ #
260
337
  # Cross application tracing is deprecated in favor of distributed tracing.
261
338
  # Distributed tracing is on by default for Ruby agent versions 8.0.0 and above.
262
339
  # Middlewares are not required to support distributed tracing.
340
+ #
263
341
  # To continue using cross application tracing, update the following options in
264
342
  # your newrelic.yml configuration file:
265
- # ``yaml
266
- # # newrelic.yml
343
+ #
267
344
  # cross_application_tracer:
268
345
  # enabled: true
269
346
  # distributed_tracing:
270
347
  # enabled: false
271
- # ``
272
348
  # disable_sinatra_auto_middleware: false
273
349
 
274
350
  # If true, disables view instrumentation.
@@ -279,10 +355,24 @@ common: &default_settings
279
355
 
280
356
  # Distributed tracing lets you see the path that a request takes through your
281
357
  # distributed system. Enabling distributed tracing changes the behavior of some
282
- # New Relic features, so carefully consult the transition guide before you enable
283
- # this feature.
358
+ # New Relic features, so carefully consult the transition guide before you
359
+ # enable this feature.
284
360
  # distributed_tracing.enabled: true
285
361
 
362
+ # This setting controls the behavior of transaction sampling when a remote
363
+ # parent is not sampled and the trace flag is not set in the traceparent.
364
+ # Available values are default, always_on, and always_off.
365
+ # distributed_tracing.sampler.remote_parent_not_sampled: default
366
+
367
+ # This setting controls the behavior of transaction sampling when a remote
368
+ # parent is sampled and the trace flag is set in the traceparent. Available
369
+ # values are default, always_on, and always_off.
370
+ # distributed_tracing.sampler.remote_parent_sampled: default
371
+
372
+ # If true, the agent captures the Elasticsearch cluster name in transaction
373
+ # traces.
374
+ # elasticsearch.capture_cluster_name: true
375
+
286
376
  # If true, the agent captures Elasticsearch queries in transaction traces.
287
377
  # elasticsearch.capture_queries: true
288
378
 
@@ -311,8 +401,8 @@ common: &default_settings
311
401
  # error_collector.expected_classes: []
312
402
 
313
403
  # A map of error classes to a list of messages. When an error of one of the
314
- # classes specified here occurs, if its error message contains one of the strings
315
- # corresponding to it here, that error will be treated as expected.
404
+ # classes specified here occurs, if its error message contains one of the
405
+ # strings corresponding to it here, that error will be treated as expected.
316
406
  # This option can't be set via environment variable.
317
407
  # error_collector.expected_messages: {}
318
408
 
@@ -326,18 +416,18 @@ common: &default_settings
326
416
  # error_collector.ignore_classes: ["ActionController::RoutingError", "Sinatra::NotFound"]
327
417
 
328
418
  # A map of error classes to a list of messages. When an error of one of the
329
- # classes specified here occurs, if its error message contains one of the strings
330
- # corresponding to it here, that error will be ignored.
419
+ # classes specified here occurs, if its error message contains one of the
420
+ # strings corresponding to it here, that error will be ignored.
331
421
  # This option can't be set via environment variable.
332
- # error_collector.ignore_messages: {}
422
+ # error_collector.ignore_messages: {ThreadError: ["queue empty"]}
333
423
 
334
424
  # A comma separated list of status codes, possibly including ranges. Errors
335
425
  # associated with these status codes, where applicable, will be ignored.
336
426
  # error_collector.ignore_status_codes: ""
337
427
 
338
- # Defines the maximum number of frames in an error backtrace. Backtraces over this
339
- # amount are truncated in the middle, preserving the beginning and the end of the
340
- # stack trace.
428
+ # Defines the maximum number of frames in an error backtrace. Backtraces over
429
+ # this amount are truncated in the middle, preserving the beginning and the end
430
+ # of the stack trace.
341
431
  # error_collector.max_backtrace_frames: 50
342
432
 
343
433
  # Defines the maximum number of TransactionError events reported per harvest
@@ -348,19 +438,20 @@ common: &default_settings
348
438
  # requests.
349
439
  # exclude_newrelic_header: false
350
440
 
351
- # Forces the exit handler that sends all cached data to collector before shutting
352
- # down to be installed regardless of detecting scenarios where it generally should
353
- # not be. Known use-case for this option is where Sinatra is running as an
354
- # embedded service within another framework and the agent is detecting the Sinatra
355
- # app and skipping the at_exit handler as a result. Sinatra classically runs the
356
- # entire application in an at_exit block and would otherwise misbehave if the
357
- # agent's at_exit handler was also installed in those circumstances. Note:
358
- # send_data_on_exit should also be set to true in tandem with this setting.
441
+ # The exit handler that sends all cached data to the collector before shutting
442
+ # down is forcibly installed. This is true even when it detects scenarios where
443
+ # it generally should not be. The known use case for this option is when Sinatra
444
+ # runs as an embedded service within another framework. The agent detects the
445
+ # Sinatra app and skips the at_exit handler as a result. Sinatra classically
446
+ # runs the entire application in an at_exit block and would otherwise misbehave
447
+ # if the agent's at_exit handler was also installed in those circumstances.
448
+ # Note: send_data_on_exit should also be set to true in tandem with this
449
+ # setting.
359
450
  # force_install_exit_handler: false
360
451
 
361
- # Ordinarily the agent reports dyno names with a trailing dot and process ID (for
362
- # example, worker.3). You can remove this trailing data by specifying the prefixes
363
- # you want to report without trailing data (for example, worker).
452
+ # Ordinarily the agent reports dyno names with a trailing dot and process ID
453
+ # (for example, worker.3). You can remove this trailing data by specifying the
454
+ # prefixes you want to report without trailing data (for example, worker).
364
455
  # heroku.dyno_name_prefixes_to_shorten: ["scheduler", "run"]
365
456
 
366
457
  # If true, the agent uses Heroku dyno names as the hostname.
@@ -374,9 +465,9 @@ common: &default_settings
374
465
  # sending each span individually.
375
466
  # infinite_tracing.batching: true
376
467
 
377
- # Configure the compression level for data sent to the trace observer.
378
- # May be one of: :none, :low, :medium, :high.
379
- # Set the level to :none to disable compression.
468
+ # Configure the compression level for data sent to the trace observer. May be
469
+ # one of: :none, :low, :medium, :high. Set the level to :none to disable
470
+ # compression.
380
471
  # infinite_tracing.compression_level: high
381
472
 
382
473
  # Configures the hostname for the trace observer Host. When configured, enables
@@ -387,8 +478,8 @@ common: &default_settings
387
478
  # Configures the TCP/IP port for the trace observer Host
388
479
  # infinite_tracing.trace_observer.port: 443
389
480
 
390
- # Controls auto-instrumentation of ActiveSupport::BroadcastLogger at start up. May
391
- # be one of: auto, prepend, chain, disabled. Used in Rails versions >= 7.1.
481
+ # Controls auto-instrumentation of ActiveSupport::BroadcastLogger at start up.
482
+ # May be one of: auto, prepend, chain, disabled. Used in Rails versions >= 7.1.
392
483
  # instrumentation.active_support_broadcast_logger: auto
393
484
 
394
485
  # Controls auto-instrumentation of ActiveSupport::Logger at start up. May be one
@@ -399,28 +490,48 @@ common: &default_settings
399
490
  # prepend, chain, disabled.
400
491
  # instrumentation.async_http: auto
401
492
 
493
+ # Controls auto-instrumentation of the aws-sdk-firehose library at start-up. May
494
+ # be one of auto, prepend, chain, disabled.
495
+ # instrumentation.aws_sdk_firehose: auto
496
+
497
+ # Controls auto-instrumentation of the aws-sdk-kinesis library at start-up. May
498
+ # be one of auto, prepend, chain, disabled.
499
+ # instrumentation.aws_sdk_kinesis: auto
500
+
501
+ # Controls auto-instrumentation of the aws_sdk_lambda library at start-up. May
502
+ # be one of auto, prepend, chain, disabled.
503
+ # instrumentation.aws_sdk_lambda: auto
504
+
505
+ # Controls auto-instrumentation of the aws-sdk-sqs library at start-up. May be
506
+ # one of: auto, prepend, chain, disabled.
507
+ # instrumentation.aws_sqs: auto
508
+
402
509
  # Controls auto-instrumentation of bunny at start-up. May be one of: auto,
403
510
  # prepend, chain, disabled.
404
511
  # instrumentation.bunny: auto
405
512
 
406
- # Controls auto-instrumentation of the concurrent-ruby library at start-up. May be
407
- # one of: auto, prepend, chain, disabled.
513
+ # Controls auto-instrumentation of the concurrent-ruby library at start-up. May
514
+ # be one of: auto, prepend, chain, disabled.
408
515
  # instrumentation.concurrent_ruby: auto
409
516
 
410
- # Controls auto-instrumentation of Curb at start-up. May be one of: auto, prepend,
411
- # chain, disabled.
517
+ # Controls auto-instrumentation of Curb at start-up. May be one of: auto,
518
+ # prepend, chain, disabled.
412
519
  # instrumentation.curb: auto
413
520
 
414
521
  # Controls auto-instrumentation of Delayed Job at start-up. May be one of: auto,
415
522
  # prepend, chain, disabled.
416
523
  # instrumentation.delayed_job: auto
417
524
 
525
+ # Controls auto-instrumentation of the aws-sdk-dynamodb library at start-up. May
526
+ # be one of auto, prepend, chain, disabled.
527
+ # instrumentation.dynamodb: auto
528
+
418
529
  # Controls auto-instrumentation of the elasticsearch library at start-up. May be
419
530
  # one of: auto, prepend, chain, disabled.
420
531
  # instrumentation.elasticsearch: auto
421
532
 
422
- # Controls auto-instrumentation of ethon at start up. May be one of
423
- # [auto|prepend|chain|disabled]
533
+ # Controls auto-instrumentation of ethon at start up. May be one of auto,
534
+ # prepend, chain, disabled
424
535
  # instrumentation.ethon: auto
425
536
 
426
537
  # Controls auto-instrumentation of Excon at start-up. May be one of: enabled,
@@ -438,18 +549,18 @@ common: &default_settings
438
549
  # Specifies a list of hostname patterns separated by commas that will match gRPC
439
550
  # hostnames that traffic is to be ignored by New Relic for. New Relic's gRPC
440
551
  # client instrumentation will ignore traffic streamed to a host matching any of
441
- # these patterns, and New Relic's gRPC server instrumentation will ignore traffic
442
- # for a server running on a host whose hostname matches any of these patterns. By
443
- # default, no traffic is ignored when gRPC instrumentation is itself enabled. For
444
- # example, "private.com$,exception.*"
552
+ # these patterns, and New Relic's gRPC server instrumentation will ignore
553
+ # traffic for a server running on a host whose hostname matches any of these
554
+ # patterns. By default, no traffic is ignored when gRPC instrumentation is
555
+ # itself enabled. For example, "private.com$,exception.*"
445
556
  # instrumentation.grpc.host_denylist: []
446
557
 
447
- # Controls auto-instrumentation of gRPC clients at start-up. May be one of: auto,
448
- # prepend, chain, disabled.
558
+ # Controls auto-instrumentation of gRPC clients at start-up. May be one of:
559
+ # auto, prepend, chain, disabled.
449
560
  # instrumentation.grpc_client: auto
450
561
 
451
- # Controls auto-instrumentation of gRPC servers at start-up. May be one of: auto,
452
- # prepend, chain, disabled.
562
+ # Controls auto-instrumentation of gRPC servers at start-up. May be one of:
563
+ # auto, prepend, chain, disabled.
453
564
  # instrumentation.grpc_server: auto
454
565
 
455
566
  # Controls auto-instrumentation of HTTPClient at start-up. May be one of: auto,
@@ -460,24 +571,28 @@ common: &default_settings
460
571
  # prepend, chain, disabled.
461
572
  # instrumentation.httprb: auto
462
573
 
463
- # Controls auto-instrumentation of httpx at start up. May be one of
464
- # [auto|prepend|chain|disabled]
574
+ # Controls auto-instrumentation of httpx at start up. May be one of auto,
575
+ # prepend, chain, disabled
465
576
  # instrumentation.httpx: auto
466
577
 
467
578
  # Controls auto-instrumentation of Ruby standard library Logger at start-up. May
468
579
  # be one of: auto, prepend, chain, disabled.
469
580
  # instrumentation.logger: auto
470
581
 
471
- # Controls auto-instrumentation of dalli gem for Memcache at start-up. May be one
472
- # of: auto, prepend, chain, disabled.
582
+ # Controls auto-instrumentation of the LogStasher library at start-up. May be
583
+ # one of: auto, prepend, chain, disabled.
584
+ # instrumentation.logstasher: auto
585
+
586
+ # Controls auto-instrumentation of dalli gem for Memcache at start-up. May be
587
+ # one of: auto, prepend, chain, disabled.
473
588
  # instrumentation.memcache: auto
474
589
 
475
590
  # Controls auto-instrumentation of memcache-client gem for Memcache at start-up.
476
591
  # May be one of: auto, prepend, chain, disabled.
477
592
  # instrumentation.memcache_client: auto
478
593
 
479
- # Controls auto-instrumentation of memcached gem for Memcache at start-up. May be
480
- # one of: auto, prepend, chain, disabled.
594
+ # Controls auto-instrumentation of memcached gem for Memcache at start-up. May
595
+ # be one of: auto, prepend, chain, disabled.
481
596
  # instrumentation.memcached: auto
482
597
 
483
598
  # Controls auto-instrumentation of Mongo at start-up. May be one of: enabled,
@@ -488,13 +603,17 @@ common: &default_settings
488
603
  # prepend, chain, disabled.
489
604
  # instrumentation.net_http: auto
490
605
 
491
- # Controls auto-instrumentation of Puma::Rack. When enabled, the agent hooks into
492
- # the to_app method in Puma::Rack::Builder to find gems to instrument during
493
- # application startup. May be one of: auto, prepend, chain, disabled.
606
+ # Controls auto-instrumentation of the opensearch-ruby library at start-up. May
607
+ # be one of auto, prepend, chain, disabled.
608
+ # instrumentation.opensearch: auto
609
+
610
+ # Controls auto-instrumentation of Puma::Rack. When enabled, the agent hooks
611
+ # into the to_app method in Puma::Rack::Builder to find gems to instrument
612
+ # during application startup. May be one of: auto, prepend, chain, disabled.
494
613
  # instrumentation.puma_rack: auto
495
614
 
496
- # Controls auto-instrumentation of Puma::Rack::URLMap at start-up. May be one of:
497
- # auto, prepend, chain, disabled.
615
+ # Controls auto-instrumentation of Puma::Rack::URLMap at start-up. May be one
616
+ # of: auto, prepend, chain, disabled.
498
617
  # instrumentation.puma_rack_urlmap: auto
499
618
 
500
619
  # Controls auto-instrumentation of Rack. When enabled, the agent hooks into the
@@ -502,14 +621,18 @@ common: &default_settings
502
621
  # startup. May be one of: auto, prepend, chain, disabled.
503
622
  # instrumentation.rack: auto
504
623
 
505
- # Controls auto-instrumentation of Rack::URLMap at start-up. May be one of: auto,
506
- # prepend, chain, disabled.
624
+ # Controls auto-instrumentation of Rack::URLMap at start-up. May be one of:
625
+ # auto, prepend, chain, disabled.
507
626
  # instrumentation.rack_urlmap: auto
508
627
 
509
- # Controls auto-instrumentation of rake at start-up. May be one of: auto, prepend,
510
- # chain, disabled.
628
+ # Controls auto-instrumentation of rake at start-up. May be one of: auto,
629
+ # prepend, chain, disabled.
511
630
  # instrumentation.rake: auto
512
631
 
632
+ # Controls auto-instrumentation of the rdkafka library at start-up. May be one
633
+ # of auto, prepend, chain, disabled.
634
+ # instrumentation.rdkafka: auto
635
+
513
636
  # Controls auto-instrumentation of Redis at start-up. May be one of: auto,
514
637
  # prepend, chain, disabled.
515
638
  # instrumentation.redis: auto
@@ -518,12 +641,17 @@ common: &default_settings
518
641
  # prepend, chain, disabled.
519
642
  # instrumentation.resque: auto
520
643
 
521
- # Controls auto-instrumentation of Roda at start-up. May be one of: auto, prepend,
522
- # chain, disabled.
644
+ # Controls auto-instrumentation of Roda at start-up. May be one of: auto,
645
+ # prepend, chain, disabled.
523
646
  # instrumentation.roda: auto
524
647
 
525
- # Controls auto-instrumentation of the ruby-openai gem at start-up. May be one of:
526
- # auto, prepend, chain, disabled.
648
+ # Controls auto-instrumentation of the ruby-kafka library at start-up. May be
649
+ # one of auto, prepend, chain, disabled.
650
+ # instrumentation.ruby_kafka: auto
651
+
652
+ # Controls auto-instrumentation of the ruby-openai gem at start-up. May be one
653
+ # of: auto, prepend, chain, disabled. Defaults to disabled in high security
654
+ # mode.
527
655
  # instrumentation.ruby_openai: auto
528
656
 
529
657
  # Controls auto-instrumentation of Sinatra at start-up. May be one of: auto,
@@ -534,10 +662,11 @@ common: &default_settings
534
662
  # disabled.
535
663
  # instrumentation.stripe: enabled
536
664
 
537
- # Controls auto-instrumentation of the Thread class at start-up to allow the agent
538
- # to correctly nest spans inside of an asynchronous transaction. This does not
539
- # enable the agent to automatically trace all threads created (see
540
- # instrumentation.thread.tracing). May be one of: auto, prepend, chain, disabled.
665
+ # Controls auto-instrumentation of the Thread class at start-up to allow the
666
+ # agent to correctly nest spans inside of an asynchronous transaction. This does
667
+ # not enable the agent to automatically trace all threads created (see
668
+ # instrumentation.thread.tracing). May be one of: auto, prepend, chain,
669
+ # disabled.
541
670
  # instrumentation.thread: auto
542
671
 
543
672
  # Controls auto-instrumentation of the Thread class at start-up to automatically
@@ -552,8 +681,8 @@ common: &default_settings
552
681
  # prepend, chain, disabled.
553
682
  # instrumentation.typhoeus: auto
554
683
 
555
- # Controls auto-instrumentation of ViewComponent at startup. May be one of: auto,
556
- # prepend, chain, disabled.
684
+ # Controls auto-instrumentation of ViewComponent at startup. May be one of:
685
+ # auto, prepend, chain, disabled.
557
686
  # instrumentation.view_component: auto
558
687
 
559
688
  # A dictionary of label names and values that will be applied to the data sent
@@ -584,6 +713,12 @@ common: &default_settings
584
713
  # When true, the agent transmits data about your app to the New Relic collector.
585
714
  # monitor_mode: true
586
715
 
716
+ # If true, the agent captures OpenSearch queries in transaction traces.
717
+ # opensearch.capture_queries: true
718
+
719
+ # If true, the agent obfuscates OpenSearch queries in transaction traces.
720
+ # opensearch.obfuscate_queries: true
721
+
587
722
  # If true, uses Module#prepend rather than alias_method for ActiveRecord
588
723
  # instrumentation.
589
724
  # prepend_active_record_instrumentation: false
@@ -612,8 +747,8 @@ common: &default_settings
612
747
 
613
748
  # Specify an Array of Rake tasks to automatically instrument. This configuration
614
749
  # option converts the Array to a RegEx list. If you'd like to allow all tasks by
615
- # default, use rake.tasks: [.+]. No rake tasks will be instrumented unless they're
616
- # added to this list. For more information, visit the New Relic Rake
750
+ # default, use rake.tasks: [.+]. No rake tasks will be instrumented unless
751
+ # they're added to this list. For more information, visit the New Relic Rake
617
752
  # Instrumentation docs.
618
753
  # rake.tasks: []
619
754
 
@@ -630,29 +765,29 @@ common: &default_settings
630
765
  # send_data_on_exit: true
631
766
 
632
767
  # If true, the agent will operate in a streamlined mode suitable for use with
633
- # short-lived serverless functions. NOTE: Only AWS Lambda functions are supported
634
- # currently and this option is not intended for use without New Relic's Ruby
635
- # Lambda layer offering.
768
+ # short-lived serverless functions. NOTE: Only AWS Lambda functions are
769
+ # supported currently and this option isn't intended for use without New Relic's
770
+ # Ruby Lambda layer offering.
636
771
  # serverless_mode.enabled: false
637
772
 
638
773
  # An array of strings that will collectively serve as a denylist for filtering
639
774
  # which Sidekiq job arguments get reported to New Relic. To capture any Sidekiq
640
775
  # arguments, 'job.sidekiq.args.*' must be added to the separate
641
776
  # :'attributes.include' configuration option. Each string in this array will be
642
- # turned into a regular expression via Regexp.new to permit advanced matching. For
643
- # job argument hashes, if either a key or value matches the pair will be excluded.
644
- # All matching job argument array elements and job argument scalars will be
645
- # excluded.
777
+ # turned into a regular expression via Regexp.new to permit advanced matching.
778
+ # For job argument hashes, if either a key or value matches the pair will be
779
+ # excluded. All matching job argument array elements and job argument scalars
780
+ # will be excluded.
646
781
  # sidekiq.args.exclude: []
647
782
 
648
783
  # An array of strings that will collectively serve as an allowlist for filtering
649
784
  # which Sidekiq job arguments get reported to New Relic. To capture any Sidekiq
650
785
  # arguments, 'job.sidekiq.args.*' must be added to the separate
651
786
  # :'attributes.include' configuration option. Each string in this array will be
652
- # turned into a regular expression via Regexp.new to permit advanced matching. For
653
- # job argument hashes, if either a key or value matches the pair will be included.
654
- # All matching job argument array elements and job argument scalars will be
655
- # included.
787
+ # turned into a regular expression via Regexp.new to permit advanced matching.
788
+ # For job argument hashes, if either a key or value matches the pair will be
789
+ # included. All matching job argument array elements and job argument scalars
790
+ # will be included.
656
791
  # sidekiq.args.include: []
657
792
 
658
793
  # If true, the agent collects slow SQL queries.
@@ -663,16 +798,16 @@ common: &default_settings
663
798
  # the default setting for explain plans in slow SQL as well.
664
799
  # slow_sql.explain_enabled: true
665
800
 
666
- # Specify a threshold in seconds. The agent collects slow SQL queries and explain
667
- # plans that exceed this threshold.
801
+ # Specify a threshold in seconds. The agent collects slow SQL queries and
802
+ # explain plans that exceed this threshold.
668
803
  # slow_sql.explain_threshold: 0.5
669
804
 
670
- # Defines an obfuscation level for slow SQL queries. Valid options are obfuscated,
671
- # raw, or none.
805
+ # Defines an obfuscation level for slow SQL queries. Valid options are
806
+ # obfuscated, raw, or none.
672
807
  # slow_sql.record_sql: obfuscated
673
808
 
674
- # Generate a longer sql_id for slow SQL traces. sql_id is used for aggregation of
675
- # similar queries.
809
+ # Generate a longer sql_id for slow SQL traces. sql_id is used for aggregation
810
+ # of similar queries.
676
811
  # slow_sql.use_longer_sql_id: false
677
812
 
678
813
  # If true, the agent captures attributes on span events.
@@ -687,8 +822,10 @@ common: &default_settings
687
822
  # If true, enables span event sampling.
688
823
  # span_events.enabled: true
689
824
 
690
- # Defines the maximum number of span events reported from a single harvest. Any
691
- # Integer between 1 and 10000 is valid.
825
+ # - Defines the maximum number of span events reported from a single harvest.
826
+ # Any Integer between 1 and 10000 is valid.'
827
+ # - When configuring the agent for AI monitoring, set to max value 10000.This
828
+ # ensures the agent captures the maximum amount of distributed traces.
692
829
  # span_events.max_samples_stored: 2000
693
830
 
694
831
  # Sets the maximum number of span events to buffer when streaming to the trace
@@ -696,30 +833,31 @@ common: &default_settings
696
833
  # span_events.queue_size: 10000
697
834
 
698
835
  # Specify a list of exceptions you do not want the agent to strip when
699
- # strip_exception_messages is true. Separate exceptions with a comma. For example,
700
- # "ImportantException,PreserveMessageException".
836
+ # strip_exception_messages is true. Separate exceptions with a comma. For
837
+ # example, "ImportantException,PreserveMessageException".
701
838
  # strip_exception_messages.allowed_classes: ""
702
839
 
703
840
  # If true, the agent strips messages from all exceptions except those in the
704
- # allowlist. Enabled automatically in high security mode.
841
+ # allowed classes list. Enabled automatically in high security mode.
705
842
  # strip_exception_messages.enabled: false
706
843
 
707
- # An array of strings to specify which keys and/or values inside a Stripe event's
708
- # user_data hash should
844
+ # An array of strings to specify which keys and/or values inside a Stripe
845
+ # event's user_data hash should
709
846
  # not be reported to New Relic. Each string in this array will be turned into a
710
847
  # regular expression via
711
- # Regexp.new to permit advanced matching. For each hash pair, if either the key or
712
- # value is matched the
713
- # pair will not be reported. By default, no user_data is reported, so this option
714
- # should only be used if
715
- # the stripe.user_data.include option is being used.
848
+ # Regexp.new to permit advanced matching. For each hash pair, if either the key
849
+ # or value is matched the pair
850
+ # isn't reported. By default, no user_data is reported. Use this option only if
851
+ # the
852
+ # stripe.user_data.include option is also used.
716
853
  # stripe.user_data.exclude: []
717
854
 
718
- # An array of strings to specify which keys inside a Stripe event's user_data hash
719
- # should be reported
720
- # to New Relic. Each string in this array will be turned into a regular expression
721
- # via Regexp.new to
722
- # permit advanced matching. Setting the value to ["."] will report all user_data.
855
+ # An array of strings to specify which keys inside a Stripe event's user_data
856
+ # hash should be reported
857
+ # to New Relic. Each string in this array will be turned into a regular
858
+ # expression via Regexp.new to
859
+ # enable advanced matching. Setting the value to ["."] will report all
860
+ # user_data.
723
861
  # stripe.user_data.include: []
724
862
 
725
863
  # When set to true, forces a synchronous connection to the New Relic collector
@@ -740,8 +878,8 @@ common: &default_settings
740
878
  # If true, the agent captures attributes from transaction events.
741
879
  # transaction_events.attributes.enabled: true
742
880
 
743
- # Prefix of attributes to exclude from transaction events. Allows * as wildcard at
744
- # end.
881
+ # Prefix of attributes to exclude from transaction events. Allows * as wildcard
882
+ # at end.
745
883
  # transaction_events.attributes.exclude: []
746
884
 
747
885
  # Prefix of attributes to include in transaction events. Allows * as wildcard at
@@ -751,25 +889,26 @@ common: &default_settings
751
889
  # If true, enables transaction event sampling.
752
890
  # transaction_events.enabled: true
753
891
 
754
- # Defines the maximum number of transaction events reported from a single harvest.
892
+ # Defines the maximum number of transaction events reported from a single
893
+ # harvest.
755
894
  # transaction_events.max_samples_stored: 1200
756
895
 
757
896
  # If true, the agent captures attributes on transaction segments.
758
897
  # transaction_segments.attributes.enabled: true
759
898
 
760
- # Prefix of attributes to exclude from transaction segments. Allows * as wildcard
761
- # at end.
899
+ # Prefix of attributes to exclude from transaction segments. Allows * as
900
+ # wildcard at end.
762
901
  # transaction_segments.attributes.exclude: []
763
902
 
764
- # Prefix of attributes to include on transaction segments. Allows * as wildcard at
765
- # end.
903
+ # Prefix of attributes to include on transaction segments. Allows * as wildcard
904
+ # at end.
766
905
  # transaction_segments.attributes.include: []
767
906
 
768
907
  # If true, the agent captures attributes from transaction traces.
769
908
  # transaction_tracer.attributes.enabled: true
770
909
 
771
- # Prefix of attributes to exclude from transaction traces. Allows * as wildcard at
772
- # end.
910
+ # Prefix of attributes to exclude from transaction traces. Allows * as wildcard
911
+ # at end.
773
912
  # transaction_tracer.attributes.exclude: []
774
913
 
775
914
  # Prefix of attributes to include in transaction traces. Allows * as wildcard at
@@ -781,7 +920,7 @@ common: &default_settings
781
920
 
782
921
  # If true, enables the collection of explain plans in transaction traces. This
783
922
  # setting will also apply to explain plans in slow SQL traces if
784
- # slow_sql.explain_enabled is not set separately.
923
+ # slow_sql.explain_enabled isn't set separately.
785
924
  # transaction_tracer.explain_enabled: true
786
925
 
787
926
  # Threshold (in seconds) above which the agent will collect explain plans.
@@ -835,6 +974,130 @@ common: &default_settings
835
974
  # Foundry environment.
836
975
  # utilization.detect_pcf: true
837
976
 
977
+ # BEGIN security agent
978
+ #
979
+ # NOTE: At this time, the security agent is intended for use only within
980
+ # a dedicated security testing environment with data that can tolerate
981
+ # modification or deletion. The security agent is available as a
982
+ # separate Ruby gem, newrelic_security. It is recommended that this
983
+ # separate gem only be introduced to a security testing environment
984
+ # by leveraging Bundler grouping like so:
985
+ #
986
+ # # Gemfile
987
+ # gem 'newrelic_rpm' # New Relic APM observability agent
988
+ # gem 'newrelic-infinite_tracing' # New Relic Infinite Tracing
989
+ #
990
+ # group :security do
991
+ # gem 'newrelic_security', require: false # New Relic security agent
992
+ # end
993
+ #
994
+ # NOTE: All "security.*" configuration parameters are related only to the
995
+ # security agent, and all other configuration parameters that may
996
+ # have "security" in the name somewhere are related to the APM agent.
997
+
998
+ # If true, the security agent is loaded (a Ruby 'require' is performed)
999
+ # security.agent.enabled: false
1000
+
1001
+ # The port the application is listening on. This setting is mandatory for
1002
+ # Passenger servers. The agent detects other servers by default.
1003
+ # security.application_info.port: nil
1004
+
1005
+ # If true, the security agent is started (the agent runs in its event loop)
1006
+ # security.enabled: false
1007
+
1008
+ # Defines API paths the security agent should ignore in IAST scans. Accepts an
1009
+ # array of regex patterns matching the URI to ignore. The regex pattern should
1010
+ # find a complete match for the URL without the endpoint. For example,
1011
+ # [".*account.*"], [".*/\api\/v1\/.*?\/login"]
1012
+ # security.exclude_from_iast_scan.api: []
1013
+
1014
+ # An array of HTTP request body keys the security agent should ignore in IAST
1015
+ # scans.
1016
+ # security.exclude_from_iast_scan.http_request_parameters.body: []
1017
+
1018
+ # An array of HTTP request headers the security agent should ignore in IAST
1019
+ # scans. The array should specify a list of patterns matching the headers to
1020
+ # ignore.
1021
+ # security.exclude_from_iast_scan.http_request_parameters.header: []
1022
+
1023
+ # An array of HTTP request query parameters the security agent should ignore in
1024
+ # IAST scans. The array should specify a list of patterns matching the HTTP
1025
+ # request query parameters to ignore.
1026
+ # security.exclude_from_iast_scan.http_request_parameters.query: []
1027
+
1028
+ # If true, disables system command injection detection in IAST scans.
1029
+ # security.exclude_from_iast_scan.iast_detection_category.command_injection: false
1030
+
1031
+ # If true, disables the detection of low-severity insecure settings. For
1032
+ # example, hash, crypto, cookie, random generators, trust boundary).
1033
+ # security.exclude_from_iast_scan.iast_detection_category.insecure_settings: false
1034
+
1035
+ # If true, disables file operation-related IAST detections (File Access &
1036
+ # Application integrity violation)
1037
+ # security.exclude_from_iast_scan.iast_detection_category.invalid_file_access: false
1038
+
1039
+ # If true, disables Javascript injection detection in IAST scans.
1040
+ # security.exclude_from_iast_scan.iast_detection_category.javascript_injection: false
1041
+
1042
+ # If true, disables LDAP injection detection in IAST scans.
1043
+ # security.exclude_from_iast_scan.iast_detection_category.ldap_injection: false
1044
+
1045
+ # If true, disables NOSQL injection detection in IAST scans.
1046
+ # security.exclude_from_iast_scan.iast_detection_category.nosql_injection: false
1047
+
1048
+ # If true, disables Reflected Cross-Site Scripting (RXSS) detection in IAST
1049
+ # scans.
1050
+ # security.exclude_from_iast_scan.iast_detection_category.rxss: false
1051
+
1052
+ # If true, disables SQL injection detection in IAST scans.
1053
+ # security.exclude_from_iast_scan.iast_detection_category.sql_injection: false
1054
+
1055
+ # If true, disables Sever-Side Request Forgery (SSRF) detection in IAST scans.
1056
+ # security.exclude_from_iast_scan.iast_detection_category.ssrf: false
1057
+
1058
+ # If true, disables XPATH injection detection in IAST scans.
1059
+ # security.exclude_from_iast_scan.iast_detection_category.xpath_injection: false
1060
+
1061
+ # A unique test identifier when runnning IAST in a CI/CD environment to
1062
+ # differentiate between different test runs. For example, a build number.
1063
+ # security.iast_test_identifier: nil
1064
+
1065
+ # Defines the mode for the security agent to operate in. Currently only IAST is
1066
+ # supported
1067
+ # security.mode: IAST
1068
+
1069
+ # Sets the maximum number of HTTP requests allowed for the IAST scan per minute.
1070
+ # Any Integer between 12 and 3600 is valid. The default value is 3600.
1071
+ # security.scan_controllers.iast_scan_request_rate_limit: 3600
1072
+
1073
+ # If true, enables the sending of HTTP responses bodies. Disabling this also
1074
+ # disables Reflected Cross-Site Scripting (RXSS) vulnerability detection.
1075
+ # security.scan_controllers.report_http_response_body: true
1076
+
1077
+ # The number of application instances for a specific entity to perform IAST
1078
+ # analysis on.
1079
+ # security.scan_controllers.scan_instance_count: 0
1080
+
1081
+ # If true, allows IAST to continuously gather trace data in the background. The
1082
+ # security agent uses collected data to perform an IAST scan at the scheduled
1083
+ # time.
1084
+ # security.scan_schedule.always_sample_traces: false
1085
+
1086
+ # Specifies the delay time (in minutes) before the IAST scan begins after the
1087
+ # application starts.
1088
+ # security.scan_schedule.delay: 0
1089
+
1090
+ # Indicates the duration (in minutes) for which the IAST scan will be performed.
1091
+ # security.scan_schedule.duration: 0
1092
+
1093
+ # Specifies a cron expression that sets when the IAST scan should run.
1094
+ # security.scan_schedule.schedule: ""
1095
+
1096
+ # Defines the endpoint URL for posting security-related data
1097
+ # security.validator_service_url: wss://csec.nr-data.net
1098
+
1099
+ # END security agent
1100
+
838
1101
  # Environment-specific settings are in this section.
839
1102
  # RAILS_ENV or RACK_ENV (as appropriate) is used to determine the environment.
840
1103
  # If your application has other named environments, configure them here.