newrelic_rpm 8.15.0 → 9.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (342) hide show
  1. checksums.yaml +4 -4
  2. data/.build_ignore +26 -0
  3. data/CHANGELOG.md +538 -44
  4. data/CONTRIBUTING.md +1 -1
  5. data/Gemfile +1 -1
  6. data/README.md +11 -6
  7. data/Rakefile +9 -9
  8. data/Thorfile +1 -1
  9. data/bin/newrelic +1 -0
  10. data/bin/newrelic_cmd +1 -0
  11. data/bin/nrdebug +36 -36
  12. data/init.rb +1 -1
  13. data/lib/new_relic/agent/agent.rb +3 -16
  14. data/lib/new_relic/agent/agent_helpers/connect.rb +5 -10
  15. data/lib/new_relic/agent/agent_helpers/harvest.rb +4 -4
  16. data/lib/new_relic/agent/agent_helpers/shutdown.rb +5 -5
  17. data/lib/new_relic/agent/agent_helpers/special_startup.rb +3 -4
  18. data/lib/new_relic/agent/agent_helpers/start_worker_thread.rb +47 -39
  19. data/lib/new_relic/agent/agent_helpers/startup.rb +13 -13
  20. data/lib/new_relic/agent/agent_helpers/transmit.rb +6 -6
  21. data/lib/new_relic/agent/agent_logger.rb +9 -9
  22. data/lib/new_relic/agent/attribute_filter.rb +2 -4
  23. data/lib/new_relic/agent/attribute_pre_filtering.rb +109 -0
  24. data/lib/new_relic/agent/attribute_processing.rb +2 -2
  25. data/lib/new_relic/agent/audit_logger.rb +5 -5
  26. data/lib/new_relic/agent/autostart.rb +1 -1
  27. data/lib/new_relic/agent/commands/agent_command.rb +2 -2
  28. data/lib/new_relic/agent/commands/agent_command_router.rb +5 -4
  29. data/lib/new_relic/agent/commands/thread_profiler_session.rb +8 -8
  30. data/lib/new_relic/agent/configuration/default_source.rb +428 -586
  31. data/lib/new_relic/agent/configuration/environment_source.rb +2 -2
  32. data/lib/new_relic/agent/configuration/high_security_source.rb +3 -5
  33. data/lib/new_relic/agent/configuration/manager.rb +16 -2
  34. data/lib/new_relic/agent/configuration/security_policy_source.rb +10 -26
  35. data/lib/new_relic/agent/configuration/server_source.rb +24 -24
  36. data/lib/new_relic/agent/configuration/yaml_source.rb +17 -4
  37. data/lib/new_relic/agent/connect/request_builder.rb +1 -1
  38. data/lib/new_relic/agent/connect/response_handler.rb +1 -1
  39. data/lib/new_relic/agent/custom_event_aggregator.rb +4 -4
  40. data/lib/new_relic/agent/database/explain_plan_helpers.rb +1 -1
  41. data/lib/new_relic/agent/database/obfuscation_helpers.rb +2 -2
  42. data/lib/new_relic/agent/database/obfuscator.rb +2 -2
  43. data/lib/new_relic/agent/database.rb +4 -18
  44. data/lib/new_relic/agent/datastores/metric_helper.rb +5 -5
  45. data/lib/new_relic/agent/datastores/mongo/metric_translator.rb +11 -11
  46. data/lib/new_relic/agent/datastores/redis.rb +6 -6
  47. data/lib/new_relic/agent/distributed_tracing/cross_app_tracing.rb +8 -10
  48. data/lib/new_relic/agent/distributed_tracing/distributed_trace_attributes.rb +10 -10
  49. data/lib/new_relic/agent/distributed_tracing/distributed_trace_metrics.rb +7 -7
  50. data/lib/new_relic/agent/distributed_tracing/distributed_trace_payload.rb +1 -1
  51. data/lib/new_relic/agent/distributed_tracing/distributed_trace_transport_type.rb +6 -6
  52. data/lib/new_relic/agent/distributed_tracing/trace_context.rb +7 -7
  53. data/lib/new_relic/agent/distributed_tracing/trace_context_payload.rb +4 -4
  54. data/lib/new_relic/agent/distributed_tracing.rb +6 -6
  55. data/lib/new_relic/agent/error_collector.rb +36 -8
  56. data/lib/new_relic/agent/error_filter.rb +5 -5
  57. data/lib/new_relic/agent/error_trace_aggregator.rb +5 -4
  58. data/lib/new_relic/agent/event_loop.rb +3 -3
  59. data/lib/new_relic/agent/external.rb +1 -1
  60. data/lib/new_relic/agent/harvester.rb +1 -3
  61. data/lib/new_relic/agent/heap.rb +2 -1
  62. data/lib/new_relic/agent/hostname.rb +1 -1
  63. data/lib/new_relic/agent/http_clients/abstract.rb +9 -21
  64. data/lib/new_relic/agent/http_clients/async_http_wrappers.rb +83 -0
  65. data/lib/new_relic/agent/http_clients/curb_wrappers.rb +7 -3
  66. data/lib/new_relic/agent/http_clients/ethon_wrappers.rb +111 -0
  67. data/lib/new_relic/agent/http_clients/excon_wrappers.rb +7 -5
  68. data/lib/new_relic/agent/http_clients/http_rb_wrappers.rb +4 -0
  69. data/lib/new_relic/agent/http_clients/httpclient_wrappers.rb +6 -2
  70. data/lib/new_relic/agent/http_clients/httpx_wrappers.rb +93 -0
  71. data/lib/new_relic/agent/http_clients/net_http_wrappers.rb +5 -1
  72. data/lib/new_relic/agent/http_clients/typhoeus_wrappers.rb +8 -5
  73. data/lib/new_relic/agent/http_clients/uri_util.rb +2 -2
  74. data/lib/new_relic/agent/instrumentation/action_cable_subscriber.rb +6 -19
  75. data/lib/new_relic/agent/instrumentation/action_controller_other_subscriber.rb +42 -0
  76. data/lib/new_relic/agent/instrumentation/action_controller_subscriber.rb +3 -2
  77. data/lib/new_relic/agent/instrumentation/action_dispatch.rb +31 -0
  78. data/lib/new_relic/agent/instrumentation/action_dispatch_subscriber.rb +64 -0
  79. data/lib/new_relic/agent/instrumentation/action_mailbox.rb +30 -0
  80. data/lib/new_relic/agent/instrumentation/action_mailbox_subscriber.rb +33 -0
  81. data/lib/new_relic/agent/instrumentation/action_mailer.rb +30 -0
  82. data/lib/new_relic/agent/instrumentation/action_mailer_subscriber.rb +85 -0
  83. data/lib/new_relic/agent/instrumentation/action_view_subscriber.rb +10 -10
  84. data/lib/new_relic/agent/instrumentation/active_job.rb +16 -3
  85. data/lib/new_relic/agent/instrumentation/active_job_subscriber.rb +41 -0
  86. data/lib/new_relic/agent/instrumentation/active_merchant.rb +3 -3
  87. data/lib/new_relic/agent/instrumentation/active_record.rb +4 -3
  88. data/lib/new_relic/agent/instrumentation/active_record_helper.rb +38 -36
  89. data/lib/new_relic/agent/instrumentation/active_record_notifications.rb +5 -4
  90. data/lib/new_relic/agent/instrumentation/active_record_prepend.rb +2 -2
  91. data/lib/new_relic/agent/instrumentation/active_record_subscriber.rb +3 -2
  92. data/lib/new_relic/agent/instrumentation/active_storage.rb +4 -0
  93. data/lib/new_relic/agent/instrumentation/active_storage_subscriber.rb +2 -30
  94. data/lib/new_relic/agent/instrumentation/active_support.rb +21 -6
  95. data/lib/new_relic/agent/instrumentation/active_support_broadcast_logger/chain.rb +69 -0
  96. data/lib/new_relic/agent/instrumentation/active_support_broadcast_logger/instrumentation.rb +13 -0
  97. data/lib/new_relic/agent/instrumentation/active_support_broadcast_logger/prepend.rb +37 -0
  98. data/lib/new_relic/agent/instrumentation/active_support_broadcast_logger.rb +23 -0
  99. data/lib/new_relic/agent/instrumentation/active_support_logger/instrumentation.rb +4 -0
  100. data/lib/new_relic/agent/instrumentation/active_support_logger.rb +3 -1
  101. data/lib/new_relic/agent/instrumentation/active_support_subscriber.rb +41 -0
  102. data/lib/new_relic/agent/instrumentation/async_http/chain.rb +23 -0
  103. data/lib/new_relic/agent/instrumentation/async_http/instrumentation.rb +37 -0
  104. data/lib/new_relic/agent/instrumentation/async_http/prepend.rb +15 -0
  105. data/lib/new_relic/agent/instrumentation/async_http.rb +26 -0
  106. data/lib/new_relic/agent/instrumentation/bunny/chain.rb +1 -1
  107. data/lib/new_relic/agent/instrumentation/bunny/instrumentation.rb +12 -3
  108. data/lib/new_relic/agent/instrumentation/bunny.rb +1 -1
  109. data/lib/new_relic/agent/instrumentation/concurrent_ruby/chain.rb +1 -1
  110. data/lib/new_relic/agent/instrumentation/concurrent_ruby/instrumentation.rb +3 -4
  111. data/lib/new_relic/agent/instrumentation/concurrent_ruby/prepend.rb +1 -1
  112. data/lib/new_relic/agent/instrumentation/controller_instrumentation.rb +7 -6
  113. data/lib/new_relic/agent/instrumentation/curb/chain.rb +1 -1
  114. data/lib/new_relic/agent/instrumentation/curb/instrumentation.rb +9 -5
  115. data/lib/new_relic/agent/instrumentation/curb.rb +1 -1
  116. data/lib/new_relic/agent/instrumentation/custom_events.rb +12 -0
  117. data/lib/new_relic/agent/instrumentation/custom_events_subscriber.rb +2 -1
  118. data/lib/new_relic/agent/instrumentation/delayed_job/chain.rb +1 -0
  119. data/lib/new_relic/agent/instrumentation/delayed_job/instrumentation.rb +4 -1
  120. data/lib/new_relic/agent/instrumentation/delayed_job_instrumentation.rb +2 -1
  121. data/lib/new_relic/agent/instrumentation/elasticsearch/chain.rb +2 -2
  122. data/lib/new_relic/agent/instrumentation/elasticsearch/instrumentation.rb +8 -4
  123. data/lib/new_relic/agent/instrumentation/elasticsearch.rb +2 -2
  124. data/lib/new_relic/agent/instrumentation/ethon/chain.rb +39 -0
  125. data/lib/new_relic/agent/instrumentation/ethon/instrumentation.rb +105 -0
  126. data/lib/new_relic/agent/instrumentation/ethon/prepend.rb +35 -0
  127. data/lib/new_relic/agent/instrumentation/ethon.rb +39 -0
  128. data/lib/new_relic/agent/instrumentation/excon/middleware.rb +5 -1
  129. data/lib/new_relic/agent/instrumentation/excon.rb +3 -3
  130. data/lib/new_relic/agent/instrumentation/fiber/chain.rb +27 -0
  131. data/lib/new_relic/agent/instrumentation/fiber/instrumentation.rb +23 -0
  132. data/lib/new_relic/agent/instrumentation/fiber/prepend.rb +25 -0
  133. data/lib/new_relic/agent/instrumentation/fiber.rb +25 -0
  134. data/lib/new_relic/agent/instrumentation/grape/instrumentation.rb +8 -4
  135. data/lib/new_relic/agent/instrumentation/grape.rb +4 -4
  136. data/lib/new_relic/agent/instrumentation/grpc/client/chain.rb +1 -1
  137. data/lib/new_relic/agent/instrumentation/grpc/client/instrumentation.rb +7 -2
  138. data/lib/new_relic/agent/instrumentation/grpc/client/prepend.rb +1 -1
  139. data/lib/new_relic/agent/instrumentation/grpc/client/request_wrapper.rb +1 -1
  140. data/lib/new_relic/agent/instrumentation/grpc/server/instrumentation.rb +8 -4
  141. data/lib/new_relic/agent/instrumentation/grpc_client.rb +2 -2
  142. data/lib/new_relic/agent/instrumentation/grpc_server.rb +2 -2
  143. data/lib/new_relic/agent/instrumentation/httpclient/instrumentation.rb +4 -0
  144. data/lib/new_relic/agent/instrumentation/httprb/instrumentation.rb +4 -0
  145. data/lib/new_relic/agent/instrumentation/httprb.rb +1 -1
  146. data/lib/new_relic/agent/instrumentation/httpx/chain.rb +20 -0
  147. data/lib/new_relic/agent/instrumentation/httpx/instrumentation.rb +51 -0
  148. data/lib/new_relic/agent/instrumentation/httpx/prepend.rb +15 -0
  149. data/lib/new_relic/agent/instrumentation/httpx.rb +27 -0
  150. data/lib/new_relic/agent/instrumentation/ignore_actions.rb +1 -1
  151. data/lib/new_relic/agent/instrumentation/logger/instrumentation.rb +3 -0
  152. data/lib/new_relic/agent/instrumentation/logger.rb +1 -1
  153. data/lib/new_relic/agent/instrumentation/memcache/dalli.rb +3 -1
  154. data/lib/new_relic/agent/instrumentation/memcache/instrumentation.rb +14 -5
  155. data/lib/new_relic/agent/instrumentation/memcache/prepend.rb +3 -1
  156. data/lib/new_relic/agent/instrumentation/memcache.rb +12 -12
  157. data/lib/new_relic/agent/instrumentation/middleware_proxy.rb +3 -3
  158. data/lib/new_relic/agent/instrumentation/middleware_tracing.rb +1 -1
  159. data/lib/new_relic/agent/instrumentation/mongodb_command_subscriber.rb +6 -8
  160. data/lib/new_relic/agent/instrumentation/net_http/instrumentation.rb +5 -1
  161. data/lib/new_relic/agent/instrumentation/net_http.rb +2 -2
  162. data/lib/new_relic/agent/instrumentation/notifications_subscriber.rb +46 -1
  163. data/lib/new_relic/agent/instrumentation/padrino/instrumentation.rb +7 -3
  164. data/lib/new_relic/agent/instrumentation/passenger_instrumentation.rb +2 -2
  165. data/lib/new_relic/agent/instrumentation/queue_time.rb +1 -1
  166. data/lib/new_relic/agent/instrumentation/rack/instrumentation.rb +7 -1
  167. data/lib/new_relic/agent/instrumentation/rails3/action_controller.rb +7 -2
  168. data/lib/new_relic/agent/instrumentation/rails_middleware.rb +1 -1
  169. data/lib/new_relic/agent/instrumentation/rails_notifications/action_cable.rb +4 -4
  170. data/lib/new_relic/agent/instrumentation/rails_notifications/action_controller.rb +14 -1
  171. data/lib/new_relic/agent/instrumentation/rake/instrumentation.rb +12 -15
  172. data/lib/new_relic/agent/instrumentation/rake.rb +3 -3
  173. data/lib/new_relic/agent/instrumentation/redis/constants.rb +1 -1
  174. data/lib/new_relic/agent/instrumentation/redis/instrumentation.rb +6 -1
  175. data/lib/new_relic/agent/instrumentation/redis.rb +1 -1
  176. data/lib/new_relic/agent/instrumentation/resque/helper.rb +1 -1
  177. data/lib/new_relic/agent/instrumentation/resque/instrumentation.rb +4 -0
  178. data/lib/new_relic/agent/instrumentation/resque.rb +1 -1
  179. data/lib/new_relic/agent/instrumentation/roda/chain.rb +43 -0
  180. data/lib/new_relic/agent/instrumentation/roda/ignorer.rb +45 -0
  181. data/lib/new_relic/agent/instrumentation/roda/instrumentation.rb +68 -0
  182. data/lib/new_relic/agent/instrumentation/roda/prepend.rb +24 -0
  183. data/lib/new_relic/agent/instrumentation/roda/roda_transaction_namer.rb +29 -0
  184. data/lib/new_relic/agent/instrumentation/roda.rb +36 -0
  185. data/lib/new_relic/agent/instrumentation/sequel.rb +8 -9
  186. data/lib/new_relic/agent/instrumentation/sequel_helper.rb +10 -10
  187. data/lib/new_relic/agent/instrumentation/sidekiq/client.rb +4 -0
  188. data/lib/new_relic/agent/instrumentation/sidekiq/extensions/delayed_class.rb +1 -1
  189. data/lib/new_relic/agent/instrumentation/sidekiq/server.rb +26 -3
  190. data/lib/new_relic/agent/instrumentation/sidekiq.rb +6 -3
  191. data/lib/new_relic/agent/instrumentation/sinatra/ignorer.rb +1 -1
  192. data/lib/new_relic/agent/instrumentation/sinatra/instrumentation.rb +10 -5
  193. data/lib/new_relic/agent/instrumentation/sinatra/transaction_namer.rb +2 -4
  194. data/lib/new_relic/agent/instrumentation/stripe.rb +28 -0
  195. data/lib/new_relic/agent/instrumentation/stripe_subscriber.rb +77 -0
  196. data/lib/new_relic/agent/instrumentation/thread/chain.rb +1 -1
  197. data/lib/new_relic/agent/instrumentation/thread/instrumentation.rb +3 -8
  198. data/lib/new_relic/agent/instrumentation/thread/prepend.rb +1 -1
  199. data/lib/new_relic/agent/instrumentation/tilt/instrumentation.rb +6 -1
  200. data/lib/new_relic/agent/instrumentation/typhoeus/instrumentation.rb +10 -6
  201. data/lib/new_relic/agent/javascript_instrumentor.rb +29 -24
  202. data/lib/new_relic/agent/linking_metadata.rb +2 -2
  203. data/lib/new_relic/agent/log_event_aggregator.rb +64 -17
  204. data/lib/new_relic/agent/log_event_attributes.rb +115 -0
  205. data/lib/new_relic/agent/logging.rb +77 -37
  206. data/lib/new_relic/agent/messaging.rb +9 -7
  207. data/lib/new_relic/agent/method_tracer.rb +7 -7
  208. data/lib/new_relic/agent/method_tracer_helpers.rb +27 -6
  209. data/lib/new_relic/agent/monitors/cross_app_monitor.rb +4 -5
  210. data/lib/new_relic/agent/monitors/distributed_tracing_monitor.rb +1 -1
  211. data/lib/new_relic/agent/monitors/synthetics_monitor.rb +12 -1
  212. data/lib/new_relic/agent/new_relic_service/encoders.rb +1 -1
  213. data/lib/new_relic/agent/new_relic_service/json_marshaller.rb +2 -2
  214. data/lib/new_relic/agent/new_relic_service/security_policy_settings.rb +0 -1
  215. data/lib/new_relic/agent/new_relic_service.rb +47 -32
  216. data/lib/new_relic/agent/obfuscator.rb +1 -1
  217. data/lib/new_relic/agent/parameter_filtering.rb +6 -6
  218. data/lib/new_relic/agent/pipe_channel_manager.rb +7 -6
  219. data/lib/new_relic/agent/pipe_service.rb +5 -3
  220. data/lib/new_relic/agent/priority_sampled_buffer.rb +1 -1
  221. data/lib/new_relic/agent/rules_engine/segment_terms_rule.rb +0 -1
  222. data/lib/new_relic/agent/rules_engine.rb +1 -1
  223. data/lib/new_relic/agent/sampler.rb +2 -1
  224. data/lib/new_relic/agent/sampler_collection.rb +1 -1
  225. data/lib/new_relic/agent/samplers/cpu_sampler.rb +5 -5
  226. data/lib/new_relic/agent/samplers/delayed_job_sampler.rb +9 -9
  227. data/lib/new_relic/agent/samplers/memory_sampler.rb +9 -9
  228. data/lib/new_relic/agent/samplers/object_sampler.rb +1 -1
  229. data/lib/new_relic/agent/span_event_aggregator.rb +4 -4
  230. data/lib/new_relic/agent/span_event_primitive.rb +18 -6
  231. data/lib/new_relic/agent/sql_sampler.rb +2 -2
  232. data/lib/new_relic/agent/stats.rb +1 -1
  233. data/lib/new_relic/agent/synthetics_event_aggregator.rb +1 -1
  234. data/lib/new_relic/agent/system_info.rb +36 -10
  235. data/lib/new_relic/agent/threading/agent_thread.rb +1 -1
  236. data/lib/new_relic/agent/threading/backtrace_node.rb +3 -3
  237. data/lib/new_relic/agent/threading/backtrace_service.rb +3 -7
  238. data/lib/new_relic/agent/threading/thread_profile.rb +5 -5
  239. data/lib/new_relic/agent/timestamp_sampled_buffer.rb +1 -1
  240. data/lib/new_relic/agent/tracer.rb +25 -16
  241. data/lib/new_relic/agent/transaction/abstract_segment.rb +109 -48
  242. data/lib/new_relic/agent/transaction/datastore_segment.rb +1 -1
  243. data/lib/new_relic/agent/transaction/distributed_tracer.rb +7 -6
  244. data/lib/new_relic/agent/transaction/distributed_tracing.rb +13 -14
  245. data/lib/new_relic/agent/transaction/external_request_segment.rb +16 -13
  246. data/lib/new_relic/agent/transaction/message_broker_segment.rb +2 -3
  247. data/lib/new_relic/agent/transaction/request_attributes.rb +47 -11
  248. data/lib/new_relic/agent/transaction/segment.rb +1 -1
  249. data/lib/new_relic/agent/transaction/synthetics_sample_buffer.rb +1 -1
  250. data/lib/new_relic/agent/transaction/trace.rb +1 -1
  251. data/lib/new_relic/agent/transaction/trace_context.rb +4 -4
  252. data/lib/new_relic/agent/transaction/trace_node.rb +8 -7
  253. data/lib/new_relic/agent/transaction/tracing.rb +10 -4
  254. data/lib/new_relic/agent/transaction/transaction_sample_buffer.rb +1 -1
  255. data/lib/new_relic/agent/transaction.rb +90 -58
  256. data/lib/new_relic/agent/transaction_error_primitive.rb +21 -5
  257. data/lib/new_relic/agent/transaction_event_aggregator.rb +4 -4
  258. data/lib/new_relic/agent/transaction_event_primitive.rb +22 -3
  259. data/lib/new_relic/agent/transaction_sampler.rb +3 -3
  260. data/lib/new_relic/agent/transaction_time_aggregator.rb +7 -3
  261. data/lib/new_relic/agent/utilization/aws.rb +1 -1
  262. data/lib/new_relic/agent/utilization/azure.rb +3 -3
  263. data/lib/new_relic/agent/utilization/gcp.rb +4 -6
  264. data/lib/new_relic/agent/utilization/pcf.rb +1 -1
  265. data/lib/new_relic/agent/utilization/vendor.rb +6 -8
  266. data/lib/new_relic/agent/vm/monotonic_gc_profiler.rb +1 -1
  267. data/lib/new_relic/agent/vm/mri_vm.rb +9 -8
  268. data/lib/new_relic/agent/worker_loop.rb +1 -1
  269. data/lib/new_relic/agent.rb +133 -36
  270. data/lib/new_relic/cli/command.rb +4 -3
  271. data/lib/new_relic/cli/commands/deployments.rb +26 -25
  272. data/lib/new_relic/cli/commands/install.rb +23 -23
  273. data/lib/new_relic/collection_helper.rb +2 -2
  274. data/lib/new_relic/constants.rb +10 -8
  275. data/lib/new_relic/control/class_methods.rb +4 -10
  276. data/lib/new_relic/control/frameworks/rails.rb +44 -20
  277. data/lib/new_relic/control/frameworks/roda.rb +20 -0
  278. data/lib/new_relic/control/instance_methods.rb +6 -6
  279. data/lib/new_relic/control/instrumentation.rb +1 -15
  280. data/lib/new_relic/control/private_instance_methods.rb +1 -1
  281. data/lib/new_relic/dependency_detection.rb +20 -18
  282. data/lib/new_relic/environment_report.rb +4 -4
  283. data/lib/new_relic/helper.rb +2 -1
  284. data/lib/new_relic/language_support.rb +10 -1
  285. data/lib/new_relic/latest_changes.rb +6 -6
  286. data/lib/new_relic/local_environment.rb +0 -10
  287. data/lib/new_relic/noticed_error.rb +25 -20
  288. data/lib/new_relic/rack/agent_hooks.rb +1 -1
  289. data/lib/new_relic/rack/agent_middleware.rb +0 -16
  290. data/lib/new_relic/rack/browser_monitoring.rb +21 -17
  291. data/lib/new_relic/recipes/capistrano3.rb +1 -1
  292. data/lib/new_relic/recipes/capistrano_legacy.rb +6 -6
  293. data/lib/new_relic/recipes/helpers/send_deployment.rb +5 -5
  294. data/lib/new_relic/supportability_helper.rb +4 -1
  295. data/lib/new_relic/traced_thread.rb +2 -3
  296. data/lib/new_relic/version.rb +2 -2
  297. data/lib/newrelic_rpm.rb +4 -4
  298. data/lib/sequel/extensions/{newrelic_instrumentation.rb → new_relic_instrumentation.rb} +6 -6
  299. data/lib/sequel/plugins/{newrelic_instrumentation.rb → new_relic_instrumentation.rb} +4 -4
  300. data/lib/tasks/bump_version.rake +21 -0
  301. data/lib/tasks/config.rake +13 -12
  302. data/lib/tasks/coverage_report.rake +4 -4
  303. data/lib/tasks/helpers/config.html.erb +93 -0
  304. data/lib/tasks/helpers/format.rb +19 -15
  305. data/lib/tasks/helpers/newrelicyml.rb +144 -0
  306. data/lib/tasks/helpers/version_bump.rb +62 -0
  307. data/lib/tasks/install.rake +4 -4
  308. data/lib/tasks/instrumentation_generator/instrumentation.thor +16 -19
  309. data/lib/tasks/instrumentation_generator/templates/Envfile.tt +1 -1
  310. data/lib/tasks/instrumentation_generator/templates/chain.tt +1 -1
  311. data/lib/tasks/instrumentation_generator/templates/dependency_detection.tt +1 -1
  312. data/lib/tasks/newrelic.rb +1 -0
  313. data/lib/tasks/newrelicyml.rake +13 -0
  314. data/lib/tasks/tests.rake +77 -6
  315. data/newrelic.yml +393 -274
  316. data/newrelic_rpm.gemspec +41 -30
  317. data/test/agent_helper.rb +25 -24
  318. metadata +172 -35
  319. data/.gitignore +0 -42
  320. data/.project +0 -23
  321. data/.rubocop.yml +0 -1946
  322. data/.rubocop_todo.yml +0 -62
  323. data/.simplecov +0 -15
  324. data/.snyk +0 -11
  325. data/.yardopts +0 -27
  326. data/Brewfile +0 -12
  327. data/DOCKER.md +0 -167
  328. data/Dockerfile +0 -10
  329. data/Guardfile +0 -26
  330. data/config/database.yml +0 -5
  331. data/config.dot +0 -278
  332. data/docker-compose.yml +0 -107
  333. data/lefthook.yml +0 -9
  334. data/lib/new_relic/agent/instrumentation/acts_as_solr.rb +0 -83
  335. data/lib/new_relic/agent/instrumentation/authlogic.rb +0 -33
  336. data/lib/new_relic/agent/instrumentation/data_mapper.rb +0 -215
  337. data/lib/new_relic/agent/instrumentation/rainbows_instrumentation.rb +0 -36
  338. data/lib/new_relic/agent/instrumentation/sunspot.rb +0 -41
  339. data/lib/new_relic/agent/range_extensions.rb +0 -27
  340. data/lib/tasks/helpers/removers.rb +0 -33
  341. data/lib/tasks/multiverse.rake +0 -6
  342. data/lib/tasks/multiverse.rb +0 -77
@@ -3,6 +3,7 @@
3
3
  # frozen_string_literal: true
4
4
 
5
5
  require 'forwardable'
6
+ require_relative '../../constants'
6
7
 
7
8
  module NewRelic
8
9
  module Agent
@@ -14,30 +15,6 @@ module NewRelic
14
15
  end
15
16
  end
16
17
 
17
- # Combines potentially two properties into one.
18
- # Given the example:
19
- # :disable_net_http and :prepend_net_instrumentation
20
- # if :disable_net_http is true, then returned value is "disabled"
21
- # if :prepend_net_instrumentation is false, then returned value is "chain"
22
- # otherwise, "auto" is returned.
23
- #
24
- # Intent is:
25
- # - if user sets disable_xxx property, then don't instrument
26
- # - if user set prepend to `false` then we use method_alias chaining
27
- # - auto, when returned means, try to use prepend unless conflicting gems discovered
28
- #
29
- def self.instrumentation_value_of(disable_key, prepend_key = nil)
30
- proc do
31
- if NewRelic::Agent.config[disable_key]
32
- "disabled"
33
- elsif prepend_key && !NewRelic::Agent.config[prepend_key]
34
- "chain"
35
- else
36
- "auto"
37
- end
38
- end
39
- end
40
-
41
18
  def self.instrumentation_value_from_boolean(key)
42
19
  proc do
43
20
  NewRelic::Agent.config[key] ? 'auto' : 'disabled'
@@ -47,8 +24,8 @@ module NewRelic
47
24
  # Marks the config option as deprecated in the documentation once generated.
48
25
  # Does not appear in logs.
49
26
  def self.deprecated_description(new_setting, description)
50
- link_ref = new_setting.to_s.tr(".", "-")
51
- %{Please see: [#{new_setting}](docs/agents/ruby-agent/configuration/ruby-agent-configuration##{link_ref}). \n\n#{description}}
27
+ link_ref = new_setting.to_s.tr('.', '-')
28
+ %{Please see: [#{new_setting}](##{link_ref}). \n\n#{description}}
52
29
  end
53
30
 
54
31
  class Boolean
@@ -80,34 +57,35 @@ module NewRelic
80
57
  default_settings[:transform] if default_settings
81
58
  end
82
59
 
83
- def self.config_search_paths
60
+ def self.config_search_paths # rubocop:disable Metrics/AbcSize
84
61
  proc {
85
- paths = [
86
- File.join("config", "newrelic.yml"),
87
- File.join("newrelic.yml"),
88
- File.join("config", "newrelic.yml.erb"),
89
- File.join("newrelic.yml.erb")
90
- ]
62
+ yaml = 'newrelic.yml'
63
+ config_yaml = File.join('config', yaml)
64
+ erb = 'newrelic.yml.erb'
65
+ config_erb = File.join('config', erb)
66
+
67
+ paths = [config_yaml, yaml, config_erb, erb]
91
68
 
92
69
  if NewRelic::Control.instance.root
93
- paths << File.join(NewRelic::Control.instance.root, "config", "newrelic.yml")
94
- paths << File.join(NewRelic::Control.instance.root, "newrelic.yml")
95
- paths << File.join(NewRelic::Control.instance.root, "config", "newrelic.yml.erb")
96
- paths << File.join(NewRelic::Control.instance.root, "newrelic.yml.erb")
70
+ paths << File.join(NewRelic::Control.instance.root, config_yaml)
71
+ paths << File.join(NewRelic::Control.instance.root, yaml)
72
+ paths << File.join(NewRelic::Control.instance.root, config_erb)
73
+ paths << File.join(NewRelic::Control.instance.root, erb)
97
74
  end
98
75
 
99
76
  if ENV['HOME']
100
- paths << File.join(ENV['HOME'], ".newrelic", "newrelic.yml")
101
- paths << File.join(ENV['HOME'], "newrelic.yml")
102
- paths << File.join(ENV['HOME'], ".newrelic", "newrelic.yml.erb")
103
- paths << File.join(ENV['HOME'], "newrelic.yml.erb")
77
+ paths << File.join(ENV['HOME'], '.newrelic', yaml)
78
+ paths << File.join(ENV['HOME'], yaml)
79
+ paths << File.join(ENV['HOME'], '.newrelic', erb)
80
+ paths << File.join(ENV['HOME'], erb)
104
81
  end
105
82
 
106
83
  # If we're packaged for warbler, we can tell from GEM_HOME
107
- if ENV["GEM_HOME"] && ENV["GEM_HOME"].end_with?(".jar!")
108
- app_name = File.basename(ENV["GEM_HOME"], ".jar!")
109
- paths << File.join(ENV["GEM_HOME"], app_name, "config", "newrelic.yml")
110
- paths << File.join(ENV["GEM_HOME"], app_name, "config", "newrelic.yml.erb")
84
+ # the following line needs else branch coverage
85
+ if ENV['GEM_HOME'] && ENV['GEM_HOME'].end_with?('.jar!') # rubocop:disable Style/SafeNavigation
86
+ app_name = File.basename(ENV['GEM_HOME'], '.jar!')
87
+ paths << File.join(ENV['GEM_HOME'], app_name, config_yaml)
88
+ paths << File.join(ENV['GEM_HOME'], app_name, config_erb)
111
89
  end
112
90
 
113
91
  paths
@@ -138,6 +116,7 @@ module NewRelic
138
116
  :rails_notifications
139
117
  end
140
118
  when defined?(::Sinatra) && defined?(::Sinatra::Base) then :sinatra
119
+ when defined?(::Roda) then :roda
141
120
  when defined?(::NewRelic::IA) then :external
142
121
  else :ruby
143
122
  end
@@ -176,13 +155,6 @@ module NewRelic
176
155
  proc { NewRelic::Agent::Threading::BacktraceService.is_supported? }
177
156
  end
178
157
 
179
- # This check supports the js_errors_beta key we've asked clients to
180
- # set. Once JS errors are GA, browser_monitoring.loader can stop
181
- # being dynamic.
182
- def self.browser_monitoring_loader
183
- proc { NewRelic::Agent.config[:js_errors_beta] ? "full" : "rum" }
184
- end
185
-
186
158
  def self.transaction_tracer_transaction_threshold
187
159
  proc { NewRelic::Agent.config[:apdex_t] * 4 }
188
160
  end
@@ -213,11 +185,11 @@ module NewRelic
213
185
  # only used for deployment task
214
186
  proc do
215
187
  api_version = if NewRelic::Agent.config[:api_key].nil? || NewRelic::Agent.config[:api_key].empty?
216
- "rpm"
188
+ 'rpm'
217
189
  else
218
- "api"
190
+ 'api'
219
191
  end
220
- api_region = "eu." if String(NewRelic::Agent.config[:license_key]).start_with?('eu')
192
+ api_region = 'eu.' if String(NewRelic::Agent.config[:license_key]).start_with?('eu')
221
193
 
222
194
  "#{api_version}.#{api_region}newrelic.com"
223
195
  end
@@ -241,6 +213,22 @@ module NewRelic
241
213
  end
242
214
  end
243
215
 
216
+ def self.convert_to_hash(value)
217
+ return value if value.is_a?(Hash)
218
+
219
+ if value.is_a?(String)
220
+ return value.split(',').each_with_object({}) do |item, hash|
221
+ key, value = item.split('=')
222
+ hash[key] = value
223
+ end
224
+ end
225
+
226
+ raise ArgumentError.new(
227
+ "Config value '#{value}' of " \
228
+ "class #{value.class} couldn't be turned into a Hash."
229
+ )
230
+ end
231
+
244
232
  SEMICOLON = ';'.freeze
245
233
  def self.convert_to_list_on_semicolon(value)
246
234
  case value
@@ -348,7 +336,7 @@ module NewRelic
348
336
  :public => true,
349
337
  :type => String,
350
338
  :allowed_from_server => false,
351
- :description => 'Your New Relic [license key](/docs/apis/intro-apis/new-relic-api-keys/#ingest-license-key).'
339
+ :description => 'Your New Relic <InlinePopover type="licenseKey" />.'
352
340
  },
353
341
  :log_level => {
354
342
  :default => 'info',
@@ -363,20 +351,19 @@ module NewRelic
363
351
  :public => true,
364
352
  :type => Array,
365
353
  :allowed_from_server => false,
366
- :description => <<-DESCRIPTION
367
- An array of ActiveSupport custom events names to subscribe to and provide
368
- instrumentation for. For example,
369
- - my.custom.event
370
- - another.event
371
- - a.third.event
354
+ :description => <<~DESCRIPTION
355
+ An array of ActiveSupport custom event names to subscribe to and instrument. For example,
356
+ - one.custom.event
357
+ - another.event
358
+ - a.third.event
372
359
  DESCRIPTION
373
360
  },
361
+ # this is only set via server side config
374
362
  :apdex_t => {
375
363
  :default => 0.5,
376
- :public => true,
364
+ :public => false,
377
365
  :type => Float,
378
366
  :allowed_from_server => true,
379
- :deprecated => true,
380
367
  :description => 'For agent versions 3.5.0 or higher, [set your Apdex T via the New Relic UI](/docs/apm/new-relic-apm/apdex/changing-your-apdex-settings).'
381
368
  },
382
369
  :api_key => {
@@ -384,7 +371,7 @@ instrumentation for. For example,
384
371
  :public => true,
385
372
  :type => String,
386
373
  :allowed_from_server => false,
387
- :description => 'Your New Relic [user key](/docs/apis/intro-apis/new-relic-api-keys/#overview-keys). Required when using the New Relic REST API v2 to record deployments using the `newrelic deployments` command.'
374
+ :description => 'Your New Relic <InlinePopover type="userKey" />. Required when using the New Relic REST API v2 to record deployments using the `newrelic deployments` command.'
388
375
  },
389
376
  :backport_fast_active_record_connection_lookup => {
390
377
  :default => false,
@@ -413,12 +400,12 @@ instrumentation for. For example,
413
400
  :public => true,
414
401
  :type => Boolean,
415
402
  :allowed_from_server => false,
416
- :description => <<-DESCRIPTION
417
- When `true`, the agent captures HTTP request parameters and attaches them to transaction traces, traced errors, and [`TransactionError` events](/attribute-dictionary?attribute_name=&events_tids%5B%5D=8241).
403
+ :description => <<~DESCRIPTION
404
+ When `true`, the agent captures HTTP request parameters and attaches them to transaction traces, traced errors, and [`TransactionError` events](/attribute-dictionary?attribute_name=&events_tids%5B%5D=8241).
418
405
 
419
- <Callout variant="caution">
420
- When using the `capture_params` setting, the Ruby agent will not attempt to filter secret information. <b>Recommendation:</b> To filter secret information from request parameters, use the [`attributes.include` setting](/docs/agents/ruby-agent/attributes/enable-disable-attributes-ruby) instead. For more information, see the <a href="/docs/agents/ruby-agent/attributes/ruby-attribute-examples#ex_req_params">Ruby attribute examples</a>.
421
- </Callout>
406
+ <Callout variant="caution">
407
+ When using the `capture_params` setting, the Ruby agent will not attempt to filter secret information. `Recommendation:` To filter secret information from request parameters, use the [`attributes.include` setting](/docs/agents/ruby-agent/attributes/enable-disable-attributes-ruby) instead. For more information, see the <a href="/docs/agents/ruby-agent/attributes/ruby-attribute-examples#ex_req_params">Ruby attribute examples</a>.
408
+ </Callout>
422
409
  DESCRIPTION
423
410
  },
424
411
  :'clear_transaction_state_after_fork' => {
@@ -433,14 +420,20 @@ When `true`, the agent captures HTTP request parameters and attaches them to tra
433
420
  :public => true,
434
421
  :type => String,
435
422
  :allowed_from_server => false,
436
- :description => 'Path to <b>newrelic.yml</b>. If undefined, the agent checks the following directories (in order): <b>config/newrelic.yml</b>, <b>newrelic.yml</b>, <b>$HOME/.newrelic/newrelic.yml</b> and <b>$HOME/newrelic.yml</b>.'
423
+ :description => <<~DESC
424
+ Path to `newrelic.yml`. If undefined, the agent checks the following directories (in order):
425
+ * `config/newrelic.yml`
426
+ * `newrelic.yml`
427
+ * `$HOME/.newrelic/newrelic.yml`
428
+ * `$HOME/newrelic.yml`
429
+ DESC
437
430
  },
438
431
  :'exclude_newrelic_header' => {
439
432
  :default => false,
440
433
  :public => true,
441
434
  :type => Boolean,
442
435
  :allowed_from_server => true,
443
- :description => "Allows newrelic distributed tracing headers to be suppressed on outbound requests."
436
+ :description => 'Allows newrelic distributed tracing headers to be suppressed on outbound requests.'
444
437
  },
445
438
  :force_install_exit_handler => {
446
439
  :default => false,
@@ -452,7 +445,7 @@ When `true`, the agent captures HTTP request parameters and attaches them to tra
452
445
  'Known use-case for this option is where Sinatra is running as an embedded service within another framework ' \
453
446
  'and the agent is detecting the Sinatra app and skipping the `at_exit` handler as a result. Sinatra classically ' \
454
447
  'runs the entire application in an `at_exit` block and would otherwise misbehave if the Agent\'s `at_exit` handler ' \
455
- 'was also installed in those circumstances. Note: `send_data_on_exit` should also be set to `true` in tandem with this setting.'
448
+ 'was also installed in those circumstances. Note: `send_data_on_exit` should also be set to `true` in tandem with this setting.'
456
449
  },
457
450
  :high_security => {
458
451
  :default => false,
@@ -466,7 +459,7 @@ When `true`, the agent captures HTTP request parameters and attaches them to tra
466
459
  :public => true,
467
460
  :type => String,
468
461
  :allowed_from_server => false,
469
- :description => 'A dictionary of [label names](/docs/data-analysis/user-interface-functions/labels-categories-organize-your-apps-servers) and values that will be applied to the data sent from this agent. May also be expressed as a semicolon-delimited `;` string of colon-separated `:` pairs. For example, `<var>Server</var>:<var>One</var>;<var>Data Center</var>:<var>Primary</var>`.'
462
+ :description => 'A dictionary of [label names](/docs/data-analysis/user-interface-functions/labels-categories-organize-your-apps-servers) and values that will be applied to the data sent from this agent. May also be expressed as a semicolon-delimited `;` string of colon-separated `:` pairs. For example, `Server:One;Data Center:Primary`.'
470
463
  },
471
464
  :log_file_name => {
472
465
  :default => 'newrelic_agent.log',
@@ -567,14 +560,6 @@ When `true`, the agent captures HTTP request parameters and attaches them to tra
567
560
  :description => 'Defines the maximum number of seconds the agent should spend attempting to connect to the collector.'
568
561
  },
569
562
  # Transaction tracer
570
- :'transaction_tracer.capture_attributes' => {
571
- :default => true,
572
- :public => true,
573
- :type => Boolean,
574
- :deprecated => true,
575
- :allowed_from_server => false,
576
- :description => 'Use [`transaction_tracer.attributes.enabled`](#transaction_tracer-attributes-enabled) instead.'
577
- },
578
563
  :'transaction_tracer.enabled' => {
579
564
  :default => true,
580
565
  :public => true,
@@ -621,8 +606,7 @@ When `true`, the agent captures HTTP request parameters and attaches them to tra
621
606
 
622
607
  - If you do not want the agent to capture query information, set this to `none`.
623
608
  - If you want the agent to capture all query information in its original form, set this to `raw`.
624
- - When you enable [high security mode](/docs/agents/manage-apm-agents/configuration/high-security-mode), this is automatically set to `obfuscated`.
625
- '
609
+ - When you enable [high security mode](/docs/agents/manage-apm-agents/configuration/high-security-mode), this is automatically set to `obfuscated`.'
626
610
  },
627
611
 
628
612
  :'transaction_tracer.stack_trace_threshold' => {
@@ -640,26 +624,18 @@ When `true`, the agent captures HTTP request parameters and attaches them to tra
640
624
  :description => 'Specify a threshold in seconds. Transactions with a duration longer than this threshold are eligible for transaction traces. Specify a float value or the string `apdex_f`.'
641
625
  },
642
626
  # Error collector
643
- :'error_collector.capture_attributes' => {
644
- :default => true,
645
- :public => true,
646
- :type => Boolean,
647
- :deprecated => true,
648
- :allowed_from_server => false,
649
- :description => 'Use [`error_collector.attributes.enabled`](#error_collector-attributes-enabled) instead.'
650
- },
651
627
  :'error_collector.ignore_classes' => {
652
- :default => [],
628
+ :default => ['ActionController::RoutingError', 'Sinatra::NotFound'],
653
629
  :public => true,
654
630
  :type => Array,
655
631
  :allowed_from_server => true,
656
632
  :dynamic_name => true,
657
- :description => <<-DESCRIPTION
658
- A list of error classes that the agent should ignore.
633
+ :description => <<~DESCRIPTION
634
+ A list of error classes that the agent should ignore.
659
635
 
660
- <Callout variant="caution">
661
- This option can't be set via environment variable.
662
- </Callout>
636
+ <Callout variant="caution">
637
+ This option can't be set via environment variable.
638
+ </Callout>
663
639
  DESCRIPTION
664
640
  },
665
641
  :'error_collector.capture_events' => {
@@ -669,7 +645,7 @@ A list of error classes that the agent should ignore.
669
645
  :type => Boolean,
670
646
  :allowed_from_server => true,
671
647
  :dynamic_name => true,
672
- :description => 'If `true`, the agent collects [TransactionError events](/docs/insights/new-relic-insights/decorating-events/error-event-default-attributes-insights).'
648
+ :description => 'If `true`, the agent collects [`TransactionError` events](/docs/insights/new-relic-insights/decorating-events/error-event-default-attributes-insights).'
673
649
  },
674
650
  :'error_collector.enabled' => {
675
651
  :default => true,
@@ -684,12 +660,12 @@ A list of error classes that the agent should ignore.
684
660
  :type => Array,
685
661
  :allowed_from_server => true,
686
662
  :dynamic_name => true,
687
- :description => <<-DESCRIPTION
688
- A list of error classes that the agent should treat as expected.
663
+ :description => <<~DESCRIPTION
664
+ A list of error classes that the agent should treat as expected.
689
665
 
690
- <Callout variant="caution">
691
- This option can't be set via environment variable.
692
- </Callout>
666
+ <Callout variant="caution">
667
+ This option can't be set via environment variable.
668
+ </Callout>
693
669
  DESCRIPTION
694
670
  },
695
671
  :'error_collector.expected_messages' => {
@@ -698,12 +674,12 @@ A list of error classes that the agent should treat as expected.
698
674
  :type => Hash,
699
675
  :allowed_from_server => true,
700
676
  :dynamic_name => true,
701
- :description => <<-DESCRIPTION
702
- A map of error classes to a list of messages. When an error of one of the classes specified here occurs, if its error message contains one of the strings corresponding to it here, that error will be treated as expected.
677
+ :description => <<~DESCRIPTION
678
+ A map of error classes to a list of messages. When an error of one of the classes specified here occurs, if its error message contains one of the strings corresponding to it here, that error will be treated as expected.
703
679
 
704
- <Callout variant="caution">
705
- This option can't be set via environment variable.
706
- </Callout>
680
+ <Callout variant="caution">
681
+ This option can't be set via environment variable.
682
+ </Callout>
707
683
  DESCRIPTION
708
684
  },
709
685
  :'error_collector.expected_status_codes' => {
@@ -714,33 +690,19 @@ A map of error classes to a list of messages. When an error of one of the classe
714
690
  :dynamic_name => true,
715
691
  :description => 'A comma separated list of status codes, possibly including ranges. Errors associated with these status codes, where applicable, will be treated as expected.'
716
692
  },
717
- :'error_collector.ignore_errors' => {
718
- :default => 'ActionController::RoutingError,Sinatra::NotFound',
719
- :public => true,
720
- :type => String,
721
- :deprecated => true,
722
- :allowed_from_server => true,
723
- :dynamic_name => true,
724
- :description => <<-DESCRIPTION
725
- Use `error_collector.ignore_classes` instead. Specify a comma-delimited list of error classes that the agent should ignore.
726
693
 
727
- <Callout variant="caution">
728
- Server side configuration takes precedence for this setting over all environment configurations. This differs from all other configuration settings where environment variable take precedence over server side configuration.
729
- </Callout>
730
- DESCRIPTION
731
- },
732
694
  :'error_collector.ignore_messages' => {
733
695
  :default => {},
734
696
  :public => true,
735
697
  :type => Hash,
736
698
  :allowed_from_server => true,
737
699
  :dynamic_name => true,
738
- :description => <<-DESCRIPTION
739
- A map of error classes to a list of messages. When an error of one of the classes specified here occurs, if its error message contains one of the strings corresponding to it here, that error will be ignored.
700
+ :description => <<~DESCRIPTION
701
+ A map of error classes to a list of messages. When an error of one of the classes specified here occurs, if its error message contains one of the strings corresponding to it here, that error will be ignored.
740
702
 
741
- <Callout variant="caution">
742
- This option can't be set via environment variable.
743
- </Callout>
703
+ <Callout variant="caution">
704
+ This option can't be set via environment variable.
705
+ </Callout>
744
706
  DESCRIPTION
745
707
  },
746
708
  :'error_collector.ignore_status_codes' => {
@@ -763,7 +725,7 @@ A map of error classes to a list of messages. When an error of one of the classe
763
725
  :public => true,
764
726
  :type => Integer,
765
727
  :allowed_from_server => true,
766
- :description => 'Defines the maximum number of [TransactionError events](/docs/insights/new-relic-insights/decorating-events/error-event-default-attributes-insights) reported per harvest cycle.'
728
+ :description => 'Defines the maximum number of [`TransactionError` events](/docs/insights/new-relic-insights/decorating-events/error-event-default-attributes-insights) reported per harvest cycle.'
767
729
  },
768
730
  # Browser monitoring
769
731
  :'browser_monitoring.auto_instrument' => {
@@ -774,51 +736,16 @@ A map of error classes to a list of messages. When an error of one of the classe
774
736
  :allowed_from_server => true,
775
737
  :description => 'If `true`, enables [auto-injection](/docs/browser/new-relic-browser/installation-configuration/adding-apps-new-relic-browser#select-apm-app) of the JavaScript header for page load timing (sometimes referred to as real user monitoring or RUM).'
776
738
  },
777
- :'browser_monitoring.capture_attributes' => {
778
- :default => false,
779
- :public => true,
780
- :type => Boolean,
781
- :deprecated => true,
782
- :allowed_from_server => false,
783
- :description => 'Use [`browser_monitoring.attributes.enabled`](#browser_monitoring-attributes-enabled) instead.'
784
- },
785
- # Analytics events
786
- :'analytics_events.capture_attributes' => {
787
- :default => true,
788
- :public => true,
789
- :type => Boolean,
790
- :deprecated => true,
791
- :allowed_from_server => false,
792
- :description => 'Use [`transaction_events.attributes.enabled`](#transaction_events-attributes-enabled) instead.'
793
- },
794
- :'analytics_events.enabled' => {
795
- :default => true,
796
- :public => true,
797
- :type => Boolean,
798
- :deprecated => true,
799
- :allowed_from_server => true,
800
- :description => deprecated_description(:'transaction_events.enabled', 'If `true`, enables analytics event sampling.')
801
- },
802
- :'analytics_events.max_samples_stored' => {
803
- :default => 1200,
804
- :public => true,
805
- :type => Integer,
806
- :deprecated => true,
807
- :allowed_from_server => true,
808
- :description => deprecated_description(:'transaction_events.max_samples_stored', 'Defines the maximum number of request events reported from a single harvest.')
809
- },
810
739
  # Transaction events
811
740
  :'transaction_events.enabled' => {
812
- :default => value_of(:'analytics_events.enabled'),
813
- :documentation_default => true,
741
+ :default => true,
814
742
  :public => true,
815
743
  :type => Boolean,
816
744
  :allowed_from_server => true,
817
745
  :description => 'If `true`, enables transaction event sampling.'
818
746
  },
819
747
  :'transaction_events.max_samples_stored' => {
820
- :default => value_of(:'analytics_events.max_samples_stored'),
821
- :documentation_default => 1200,
748
+ :default => 1200,
822
749
  :public => true,
823
750
  :type => Integer,
824
751
  :allowed_from_server => true,
@@ -839,6 +766,37 @@ A map of error classes to a list of messages. When an error of one of the classe
839
766
  :allowed_from_server => false,
840
767
  :description => 'If `true`, the agent captures log records emitted by your application.'
841
768
  },
769
+ :'application_logging.forwarding.log_level' => {
770
+ :default => 'debug',
771
+ :public => true,
772
+ :type => String,
773
+ :allowed_from_server => false,
774
+ :description => <<~DESCRIPTION
775
+ Sets the minimum level a log event must have to be forwarded to New Relic.
776
+
777
+ This is based on the integer values of Ruby's `Logger::Severity` constants: https://github.com/ruby/ruby/blob/master/lib/logger/severity.rb
778
+
779
+ The intention is to forward logs with the level given to the configuration, as well as any logs with a higher level of severity.
780
+
781
+ For example, setting this value to "debug" will forward all log events to New Relic. Setting this value to "error" will only forward log events with the levels "error", "fatal", and "unknown".
782
+
783
+ Valid values (ordered lowest to highest):
784
+ * "debug"
785
+ * "info"
786
+ * "warn"
787
+ * "error"
788
+ * "fatal"
789
+ * "unknown"
790
+ DESCRIPTION
791
+ },
792
+ :'application_logging.forwarding.custom_attributes' => {
793
+ :default => {},
794
+ :public => true,
795
+ :type => Hash,
796
+ :transform => DefaultSource.method(:convert_to_hash),
797
+ :allowed_from_server => false,
798
+ :description => 'A hash with key/value pairs to add as custom attributes to all log events forwarded to New Relic. If sending using an environment variable, the value must be formatted like: "key1=value1,key2=value2"'
799
+ },
842
800
  :'application_logging.forwarding.max_samples_stored' => {
843
801
  :default => 10000,
844
802
  :public => true,
@@ -862,6 +820,13 @@ A map of error classes to a list of messages. When an error of one of the classe
862
820
  :description => 'If `true`, the agent captures metrics related to logging for your application.'
863
821
  },
864
822
  # Attributes
823
+ :'allow_all_headers' => {
824
+ :default => false,
825
+ :public => true,
826
+ :type => Boolean,
827
+ :allowed_from_server => false,
828
+ :description => 'If `true`, enables capture of all HTTP request headers for all destinations.'
829
+ },
865
830
  :'attributes.enabled' => {
866
831
  :default => true,
867
832
  :public => true,
@@ -886,8 +851,7 @@ A map of error classes to a list of messages. When an error of one of the classe
886
851
  :description => 'Prefix of attributes to include in all destinations. Allows `*` as wildcard at end.'
887
852
  },
888
853
  :'browser_monitoring.attributes.enabled' => {
889
- :default => value_of(:'browser_monitoring.capture_attributes'),
890
- :documentation_default => false,
854
+ :default => false,
891
855
  :public => true,
892
856
  :type => Boolean,
893
857
  :allowed_from_server => false,
@@ -910,8 +874,7 @@ A map of error classes to a list of messages. When an error of one of the classe
910
874
  :description => 'Prefix of attributes to include in browser monitoring. Allows `*` as wildcard at end.'
911
875
  },
912
876
  :'error_collector.attributes.enabled' => {
913
- :default => value_of(:'error_collector.capture_attributes'),
914
- :documentation_default => true,
877
+ :default => true,
915
878
  :public => true,
916
879
  :type => Boolean,
917
880
  :allowed_from_server => false,
@@ -957,8 +920,7 @@ A map of error classes to a list of messages. When an error of one of the classe
957
920
  :description => 'Prefix of attributes to include on span events. Allows `*` as wildcard at end.'
958
921
  },
959
922
  :'transaction_events.attributes.enabled' => {
960
- :default => value_of(:'analytics_events.capture_attributes'),
961
- :documentation_default => true,
923
+ :default => true,
962
924
  :public => true,
963
925
  :type => Boolean,
964
926
  :allowed_from_server => false,
@@ -1004,8 +966,7 @@ A map of error classes to a list of messages. When an error of one of the classe
1004
966
  :description => 'Prefix of attributes to include on transaction segments. Allows `*` as wildcard at end.'
1005
967
  },
1006
968
  :'transaction_tracer.attributes.enabled' => {
1007
- :default => value_of(:'transaction_tracer.capture_attributes'),
1008
- :documentation_default => true,
969
+ :default => true,
1009
970
  :public => true,
1010
971
  :type => Boolean,
1011
972
  :allowed_from_server => false,
@@ -1036,16 +997,16 @@ A map of error classes to a list of messages. When an error of one of the classe
1036
997
  :description => 'If `true`, enables an audit log which logs communications with the New Relic [collector](/docs/using-new-relic/welcome-new-relic/get-started/glossary/#collector).'
1037
998
  },
1038
999
  :'audit_log.endpoints' => {
1039
- :default => [".*"],
1000
+ :default => ['.*'],
1040
1001
  :public => true,
1041
1002
  :type => Array,
1042
1003
  :allowed_from_server => false,
1043
1004
  :transform => DefaultSource.method(:convert_to_regexp_list),
1044
- :description => 'List of allowed endpoints to include in audit log'
1005
+ :description => 'List of allowed endpoints to include in audit log.'
1045
1006
  },
1046
1007
  :'audit_log.path' => {
1047
1008
  :default => DefaultSource.audit_log_path,
1048
- :documentation_default => 'config/newrelic_audit.log',
1009
+ :documentation_default => 'log/newrelic_audit.log',
1049
1010
  :public => true,
1050
1011
  :type => String,
1051
1012
  :allowed_from_server => false,
@@ -1053,25 +1014,38 @@ A map of error classes to a list of messages. When an error of one of the classe
1053
1014
  },
1054
1015
  # Autostart
1055
1016
  :'autostart.denylisted_constants' => {
1056
- :default => 'Rails::Console',
1017
+ :default => %w[Rails::Command::ConsoleCommand
1018
+ Rails::Command::CredentialsCommand
1019
+ Rails::Command::Db::System::ChangeCommand
1020
+ Rails::Command::DbConsoleCommand
1021
+ Rails::Command::DestroyCommand
1022
+ Rails::Command::DevCommand
1023
+ Rails::Command::EncryptedCommand
1024
+ Rails::Command::GenerateCommand
1025
+ Rails::Command::InitializersCommand
1026
+ Rails::Command::NotesCommand
1027
+ Rails::Command::RoutesCommand
1028
+ Rails::Command::SecretsCommand
1029
+ Rails::Console
1030
+ Rails::DBConsole].join(','),
1057
1031
  :public => true,
1058
1032
  :type => String,
1059
1033
  :allowed_from_server => false,
1060
- :description => 'Specify a list of constants that should prevent the agent from starting automatically. Separate individual constants with a comma `,`. For example, `Rails::Console,UninstrumentedBackgroundJob`.'
1034
+ :description => 'Specify a list of constants that should prevent the agent from starting automatically. Separate individual constants with a comma `,`. For example, `"Rails::Console,UninstrumentedBackgroundJob"`.'
1061
1035
  },
1062
1036
  :'autostart.denylisted_executables' => {
1063
1037
  :default => 'irb,rspec',
1064
1038
  :public => true,
1065
1039
  :type => String,
1066
1040
  :allowed_from_server => false,
1067
- :description => 'Defines a comma-delimited list of executables that the agent should not instrument. For example, `rake,my_ruby_script.rb`.'
1041
+ :description => 'Defines a comma-delimited list of executables that the agent should not instrument. For example, `"rake,my_ruby_script.rb"`.'
1068
1042
  },
1069
1043
  :'autostart.denylisted_rake_tasks' => {
1070
1044
  :default => AUTOSTART_DENYLISTED_RAKE_TASKS,
1071
1045
  :public => true,
1072
1046
  :type => String,
1073
1047
  :allowed_from_server => false,
1074
- :description => 'Defines a comma-delimited list of Rake tasks that the agent should not instrument. For example, `assets:precompile,db:migrate`.'
1048
+ :description => 'Defines a comma-delimited list of Rake tasks that the agent should not instrument. For example, `"assets:precompile,db:migrate"`.'
1075
1049
  },
1076
1050
  # Code level metrics
1077
1051
  :'code_level_metrics.enabled' => {
@@ -1090,7 +1064,7 @@ A map of error classes to a list of messages. When an error of one of the classe
1090
1064
  :allowed_from_server => true,
1091
1065
  :deprecated => true,
1092
1066
  :description => deprecated_description(
1093
- :'distributed_tracing-enabled',
1067
+ :'distributed_tracing.enabled',
1094
1068
  'If `true`, enables [cross-application tracing](/docs/agents/ruby-agent/features/cross-application-tracing-ruby/) when `distributed_tracing.enabled` is set to `false`.'
1095
1069
  )
1096
1070
  },
@@ -1138,194 +1112,106 @@ A map of error classes to a list of messages. When an error of one of the classe
1138
1112
  :default => false,
1139
1113
  :public => true,
1140
1114
  :type => Boolean,
1141
- :dynamic_name => true,
1142
1115
  :allowed_from_server => false,
1143
1116
  :description => 'If `true`, disables Action Cable instrumentation.'
1144
1117
  },
1145
- :disable_activejob => {
1146
- :default => false,
1147
- :public => true,
1148
- :type => Boolean,
1149
- :dynamic_name => true,
1150
- :allowed_from_server => false,
1151
- :description => 'If `true`, disables ActiveJob instrumentation.'
1152
- },
1153
- :disable_active_storage => {
1154
- :default => false,
1155
- :public => true,
1156
- :type => Boolean,
1157
- :dynamic_name => true,
1158
- :allowed_from_server => false,
1159
- :description => 'If `true`, disables ActiveStorage instrumentation.'
1160
- },
1161
- :disable_activerecord_instrumentation => {
1162
- :default => value_of(:skip_ar_instrumentation),
1163
- :documentation_default => false,
1164
- :public => true,
1118
+ # TODO: by subscribing to process_middleware.action_dispatch events,
1119
+ # we duplicate the efforts already performed by non-notifications
1120
+ # based instrumentation. In future, we ought to determine the
1121
+ # extent of the overlap and duplication and end up with only this
1122
+ # notifications based approach existing and the monkey patching
1123
+ # approach removed entirely. NOTE that we will likely not want to
1124
+ # do so until we are okay with dropping support for Rails < v6,
1125
+ # given that these events are available only for v6+.
1126
+ :disable_action_dispatch => {
1127
+ :default => true,
1128
+ :public => false,
1165
1129
  :type => Boolean,
1166
1130
  :allowed_from_server => false,
1167
- :description => 'If `true`, disables active record instrumentation.'
1131
+ :description => 'If `true`, disables Action Dispatch instrumentation.'
1168
1132
  },
1169
- :disable_active_record_notifications => {
1133
+ :disable_action_controller => {
1170
1134
  :default => false,
1171
1135
  :public => true,
1172
1136
  :type => Boolean,
1173
- :dynamic_name => true,
1174
1137
  :allowed_from_server => false,
1175
- :description => 'If `true`, disables instrumentation for ActiveRecord 4, 5, and 6.'
1138
+ :description => 'If `true`, disables Action Controller instrumentation.'
1176
1139
  },
1177
- :disable_bunny => {
1140
+ :disable_action_mailbox => {
1178
1141
  :default => false,
1179
1142
  :public => true,
1180
1143
  :type => Boolean,
1181
- :deprecated => true,
1182
- :dynamic_name => true,
1183
1144
  :allowed_from_server => false,
1184
- :description => deprecated_description(:'instrumentation.bunny', 'If `true`, disables instrumentation for the bunny gem.')
1145
+ :description => 'If `true`, disables Action Mailbox instrumentation.'
1185
1146
  },
1186
- :disable_cpu_sampler => {
1147
+ :disable_action_mailer => {
1187
1148
  :default => false,
1188
1149
  :public => true,
1189
1150
  :type => Boolean,
1190
- :dynamic_name => true,
1191
1151
  :allowed_from_server => false,
1192
- :description => 'If `true`, the agent won\'t sample the CPU usage of the host process.'
1152
+ :description => 'If `true`, disables Action Mailer instrumentation.'
1193
1153
  },
1194
- :disable_curb => {
1154
+ :disable_activejob => {
1195
1155
  :default => false,
1196
1156
  :public => true,
1197
1157
  :type => Boolean,
1198
- :deprecated => true,
1199
- :dynamic_name => true,
1200
1158
  :allowed_from_server => false,
1201
- :description => deprecated_description(:'instrumentation.curb', 'If `true`, disables instrumentation for the curb gem.')
1159
+ :description => 'If `true`, disables Active Job instrumentation.'
1202
1160
  },
1203
- :disable_database_instrumentation => {
1161
+ :disable_active_storage => {
1204
1162
  :default => false,
1205
1163
  :public => true,
1206
1164
  :type => Boolean,
1207
1165
  :allowed_from_server => false,
1208
- :deprecated => true,
1209
- :description => 'Use [`disable_sequel_instrumentation`](#disable_sequel_instrumentation) instead.'
1166
+ :description => 'If `true`, disables Active Storage instrumentation.'
1210
1167
  },
1211
- :disable_data_mapper => {
1168
+ :disable_active_support => {
1212
1169
  :default => false,
1213
1170
  :public => true,
1214
1171
  :type => Boolean,
1215
1172
  :allowed_from_server => false,
1216
- :description => 'If `true`, disables DataMapper instrumentation.'
1173
+ :description => 'If `true`, disables Active Support instrumentation.'
1217
1174
  },
1218
- :disable_dalli => {
1219
- :default => value_of(:disable_memcache_instrumentation),
1220
- :documentation_default => false,
1221
- :public => true,
1222
- :type => Boolean,
1223
- :deprecated => true,
1224
- :allowed_from_server => false,
1225
- :description => deprecated_description(:'instrumentation.memcache', 'If `true`, disables instrumentation for the dalli gem.')
1226
- },
1227
- :disable_dalli_cas_client => {
1228
- :default => value_of(:disable_memcache_instrumentation),
1175
+ :disable_active_record_instrumentation => {
1176
+ :default => value_of(:skip_ar_instrumentation),
1229
1177
  :documentation_default => false,
1230
1178
  :public => true,
1231
1179
  :type => Boolean,
1232
- :deprecated => true,
1180
+ :aliases => %i[disable_activerecord_instrumentation],
1233
1181
  :allowed_from_server => false,
1234
- :description => deprecated_description(:'instrumentation.memcache', "If `true`, disables instrumentation for the dalli gem's additional CAS client support.")
1182
+ :description => 'If `true`, disables Active Record instrumentation.'
1235
1183
  },
1236
- :disable_delayed_job_sampler => {
1184
+ :disable_active_record_notifications => {
1237
1185
  :default => false,
1238
1186
  :public => true,
1239
1187
  :type => Boolean,
1240
1188
  :dynamic_name => true,
1189
+ :aliases => %i[disable_activerecord_notifications],
1241
1190
  :allowed_from_server => false,
1242
- :description => 'If `true`, the agent won\'t measure the depth of Delayed Job queues.'
1243
- },
1244
- :disable_dj => {
1245
- :default => false,
1246
- :public => true,
1247
- :deprecated => true,
1248
- :type => Boolean,
1249
- :allowed_from_server => false,
1250
- :description => deprecated_description(:'instrumentation.delayed_job', 'If `true`, disables [Delayed::Job instrumentation](/docs/agents/ruby-agent/background-jobs/delayedjob).')
1191
+ :description => 'If `true`, disables instrumentation for Active Record 4+'
1251
1192
  },
1252
- :disable_excon => {
1253
- :default => false,
1254
- :public => true,
1255
- :type => Boolean,
1256
- :dynamic_name => true,
1257
- :deprecated => true,
1258
- :allowed_from_server => false,
1259
- :description => deprecated_description(:'instrumentation.excon', 'If `true`, disables instrumentation for the excon gem.')
1260
- },
1261
- :disable_memcached => {
1262
- :default => value_of(:disable_memcache_instrumentation),
1263
- :documentation_default => false,
1264
- :public => true,
1265
- :type => Boolean,
1266
- :deprecated => true,
1267
- :allowed_from_server => false,
1268
- :description => deprecated_description(:'instrumentation.memcached', 'If `true`, disables instrumentation for the memcached gem.')
1269
- },
1270
- :disable_memcache_client => {
1271
- :default => value_of(:disable_memcache_instrumentation),
1272
- :documentation_default => false,
1273
- :public => true,
1274
- :type => Boolean,
1275
- :deprecated => true,
1276
- :allowed_from_server => false,
1277
- :description => deprecated_description(:'instrumentation.memcache-client', 'If `true`, disables instrumentation for the memcache-client gem.')
1278
- },
1279
- :disable_memcache_instrumentation => {
1280
- :default => false,
1281
- :public => true,
1282
- :type => Boolean,
1283
- :deprecated => true,
1284
- :allowed_from_server => false,
1285
- :description => deprecated_description(:'instrumentation.memcache', 'If `true`, disables memcache instrumentation.')
1286
- },
1287
- :disable_gc_profiler => {
1288
- :default => false,
1289
- :public => true,
1290
- :type => Boolean,
1291
- :allowed_from_server => false,
1292
- :description => 'If `true`, disables the use of GC::Profiler to measure time spent in garbage collection'
1293
- },
1294
- :disable_grape => {
1295
- :default => false,
1296
- :public => true,
1297
- :type => Boolean,
1298
- :allowed_from_server => false,
1299
- :deprecated => true,
1300
- :description => deprecated_description(:'instrumentation.grape',
1301
- 'If `true`, the agent won\'t install Grape instrumentation.')
1302
- },
1303
- :disable_httpclient => {
1193
+ :disable_cpu_sampler => {
1304
1194
  :default => false,
1305
1195
  :public => true,
1306
1196
  :type => Boolean,
1307
1197
  :dynamic_name => true,
1308
- :deprecated => true,
1309
1198
  :allowed_from_server => false,
1310
- :description => deprecated_description(:'instrumentation.httpclient', 'If `true`, disables instrumentation for the httpclient gem.')
1199
+ :description => 'If `true`, the agent won\'t sample the CPU usage of the host process.'
1311
1200
  },
1312
- :disable_httprb => {
1201
+ :disable_delayed_job_sampler => {
1313
1202
  :default => false,
1314
1203
  :public => true,
1315
1204
  :type => Boolean,
1316
1205
  :dynamic_name => true,
1317
- :deprecated => true,
1318
1206
  :allowed_from_server => false,
1319
- :description => deprecated_description(:'instrumentation.httprb', 'If `true`, the agent won\'t install instrumentation for the http.rb gem.')
1207
+ :description => 'If `true`, the agent won\'t measure the depth of Delayed Job queues.'
1320
1208
  },
1321
- :disable_mongo => {
1209
+ :disable_gc_profiler => {
1322
1210
  :default => false,
1323
1211
  :public => true,
1324
1212
  :type => Boolean,
1325
1213
  :allowed_from_server => false,
1326
- :dynamic_name => true,
1327
- :deprecated => true,
1328
- :description => deprecated_description(:'instrumentation.mongo', 'If `true`, the agent won\'t install [instrumentation for the Mongo gem](/docs/agents/ruby-agent/frameworks/mongo-instrumentation).')
1214
+ :description => 'If `true`, disables the use of `GC::Profiler` to measure time spent in garbage collection'
1329
1215
  },
1330
1216
  :disable_memory_sampler => {
1331
1217
  :default => false,
@@ -1340,79 +1226,13 @@ A map of error classes to a list of messages. When an error of one of the classe
1340
1226
  :public => true,
1341
1227
  :type => Boolean,
1342
1228
  :allowed_from_server => false,
1343
- :description => 'If `true`, the agent won\'t wrap third-party middlewares in instrumentation (regardless of whether they are installed via Rack::Builder or Rails).'
1344
- },
1345
- :disable_net_http => {
1346
- :default => false,
1347
- :public => true,
1348
- :type => Boolean,
1349
- :dynamic_name => true,
1350
- :allowed_from_server => false,
1351
- :deprecated => true,
1352
- :description => deprecated_description(:'instrumentation.net_http',
1353
- 'If `true`, disables instrumentation for Net::HTTP.')
1354
- },
1355
- :disable_puma_rack => {
1356
- :default => value_of(:disable_rack),
1357
- :documentation_default => false,
1358
- :public => true,
1359
- :type => Boolean,
1360
- :dynamic_name => true,
1361
- :allowed_from_server => false,
1362
- :deprecated => true,
1363
- :description => deprecated_description(:'instrumentation.puma_rack', 'If `true`, prevents the agent from hooking into the `to_app` method in Puma::Rack::Builder to find gems to instrument during application startup.')
1364
- },
1365
- :disable_puma_rack_urlmap => {
1366
- :default => value_of(:disable_rack_urlmap),
1367
- :documentation_default => false,
1368
- :public => true,
1369
- :type => Boolean,
1370
- :dynamic_name => true,
1371
- :allowed_from_server => false,
1372
- :deprecated => true,
1373
- :description => deprecated_description(:'instrumentation.puma_rack_urlmap', 'If `true`, prevents the agent from hooking into Puma::Rack::URLMap to install middleware tracing.')
1374
- },
1375
- :disable_rack => {
1376
- :default => false,
1377
- :public => true,
1378
- :type => Boolean,
1379
- :dynamic_name => true,
1380
- :allowed_from_server => false,
1381
- :deprecated => true,
1382
- :description => deprecated_description(:'instrumentation.rack', 'If `true`, prevents the agent from hooking into the `to_app` method in Rack::Builder to find gems to instrument during application startup.')
1383
- },
1384
- :disable_rack_urlmap => {
1385
- :default => false,
1386
- :public => true,
1387
- :type => Boolean,
1388
- :dynamic_name => true,
1389
- :allowed_from_server => false,
1390
- :deprecated => true,
1391
- :description => deprecated_description(:'instrumentation.rack_urlmap', 'If `true`, prevents the agent from hooking into Rack::URLMap to install middleware tracing.')
1392
- },
1393
- :disable_rake => {
1394
- :default => false,
1395
- :public => true,
1396
- :type => Boolean,
1397
- :allowed_from_server => false,
1398
- :deprecated => true,
1399
- :description => deprecated_description(:'instrumentation.rake', 'If `true`, disables Rake instrumentation.')
1400
- },
1401
- :disable_redis => {
1402
- :default => false,
1403
- :public => true,
1404
- :type => Boolean,
1405
- :deprecated => true,
1406
- :allowed_from_server => false,
1407
- :description => deprecated_description(:'instrumentation.redis', 'If `true`, the agent won\'t install [instrumentation for Redis](/docs/agents/ruby-agent/frameworks/redis-instrumentation).')
1408
- },
1409
- :disable_resque => {
1410
- :default => false,
1411
- :public => true,
1412
- :type => Boolean,
1413
- :deprecated => true,
1414
- :allowed_from_server => false,
1415
- :description => deprecated_description(:'instrumentation.resque', 'If `true`, disables [Resque instrumentation](/docs/agents/ruby-agent/background-jobs/resque-instrumentation).')
1229
+ :description => <<~DESCRIPTION
1230
+ If `true`, the agent won't wrap third-party middlewares in instrumentation (regardless of whether they are installed via `Rack::Builder` or Rails).
1231
+
1232
+ <Callout variant="important">
1233
+ When middleware instrumentation is disabled, if an application is using middleware that could alter the response code, the HTTP status code reported on the transaction may not reflect the altered value.
1234
+ </Callout>
1235
+ DESCRIPTION
1416
1236
  },
1417
1237
  :disable_samplers => {
1418
1238
  :default => false,
@@ -1435,47 +1255,37 @@ A map of error classes to a list of messages. When an error of one of the classe
1435
1255
  :allowed_from_server => false,
1436
1256
  :description => 'If `true`, disables [Sidekiq instrumentation](/docs/agents/ruby-agent/background-jobs/sidekiq-instrumentation).'
1437
1257
  },
1438
- :disable_sinatra => {
1258
+ :disable_roda_auto_middleware => {
1439
1259
  :default => false,
1440
1260
  :public => true,
1441
1261
  :type => Boolean,
1442
- :deprecated => true,
1443
1262
  :allowed_from_server => false,
1444
- :description => deprecated_description(:'instrumentation.sinatra', 'If `true` , disables [Sinatra instrumentation](/docs/agents/ruby-agent/frameworks/sinatra-support).')
1263
+ :description => 'If `true`, disables agent middleware for Roda. This middleware is responsible for advanced feature support such as [page load timing](/docs/browser/new-relic-browser/getting-started/new-relic-browser) and [error collection](/docs/apm/applications-menu/events/view-apm-error-analytics).'
1445
1264
  },
1446
1265
  :disable_sinatra_auto_middleware => {
1447
1266
  :default => false,
1448
1267
  :public => true,
1449
1268
  :type => Boolean,
1450
1269
  :allowed_from_server => false,
1451
- :description => <<-DESCRIPTION
1452
- If `true`, disables agent middleware for Sinatra. This middleware is responsible for advanced feature support such as [cross application tracing](/docs/apm/transactions/cross-application-traces/cross-application-tracing), [page load timing](/docs/browser/new-relic-browser/getting-started/new-relic-browser), and [error collection](/docs/apm/applications-menu/events/view-apm-error-analytics).
1270
+ :description => <<~DESCRIPTION
1271
+ If `true`, disables agent middleware for Sinatra. This middleware is responsible for advanced feature support such as [cross application tracing](/docs/apm/transactions/cross-application-traces/cross-application-tracing), [page load timing](/docs/browser/new-relic-browser/getting-started/new-relic-browser), and [error collection](/docs/apm/applications-menu/events/view-apm-error-analytics).
1453
1272
 
1454
- <Callout variant="important">
1455
- Cross application tracing is deprecated in favor of [distributed tracing](/docs/apm/distributed-tracing/getting-started/introduction-distributed-tracing). Distributed tracing is on by default for Ruby agent versions 8.0.0 and above. Middlewares are not required to support distributed tracing.
1273
+ <Callout variant="important">
1274
+ Cross application tracing is deprecated in favor of [distributed tracing](/docs/apm/distributed-tracing/getting-started/introduction-distributed-tracing). Distributed tracing is on by default for Ruby agent versions 8.0.0 and above. Middlewares are not required to support distributed tracing.
1456
1275
 
1457
- To continue using cross application tracing, update the following options in your `newrelic.yml` configuration file:
1276
+ To continue using cross application tracing, update the following options in your `newrelic.yml` configuration file:
1458
1277
 
1459
- ```
1460
- # newrelic.yml
1278
+ ```yaml
1279
+ # newrelic.yml
1461
1280
 
1462
- cross_application_tracer:
1463
- enabled: true
1464
- distributed_tracing:
1465
- enabled: false
1466
- ```
1467
- </Callout>
1281
+ cross_application_tracer:
1282
+ enabled: true
1283
+ distributed_tracing:
1284
+ enabled: false
1285
+ ```
1286
+ </Callout>
1468
1287
  DESCRIPTION
1469
1288
  },
1470
- :disable_typhoeus => {
1471
- :default => false,
1472
- :public => true,
1473
- :type => Boolean,
1474
- :dynamic_name => true,
1475
- :deprecated => true,
1476
- :allowed_from_server => false,
1477
- :description => deprecated_description(:'instrumentation.typhoeus', 'If `true`, the agent won\'t install instrumentation for the typhoeus gem.')
1478
- },
1479
1289
  :disable_view_instrumentation => {
1480
1290
  :default => false,
1481
1291
  :public => true,
@@ -1528,7 +1338,7 @@ If `true`, disables agent middleware for Sinatra. This middleware is responsible
1528
1338
  :type => Array,
1529
1339
  :allowed_from_server => false,
1530
1340
  :transform => DefaultSource.method(:convert_to_list),
1531
- :description => 'Ordinarily the agent reports dyno names with a trailing dot and process ID (for example, <b>worker.3</b>). You can remove this trailing data by specifying the prefixes you want to report without trailing data (for example, <b>worker</b>).'
1341
+ :description => 'Ordinarily the agent reports dyno names with a trailing dot and process ID (for example, `worker.3`). You can remove this trailing data by specifying the prefixes you want to report without trailing data (for example, `worker`).'
1532
1342
  },
1533
1343
  # Infinite tracing
1534
1344
  :'infinite_tracing.trace_observer.host' => {
@@ -1537,10 +1347,10 @@ If `true`, disables agent middleware for Sinatra. This middleware is responsible
1537
1347
  :type => String,
1538
1348
  :allowed_from_server => false,
1539
1349
  :external => :infinite_tracing,
1540
- :description => "Configures the hostname for the Trace Observer Host. " \
1541
- "When configured, enables tail-based sampling by sending all recorded spans " \
1542
- "to a Trace Observer for further sampling decisions, irrespective of any usual " \
1543
- "agent sampling decision."
1350
+ :description => 'Configures the hostname for the trace observer Host. ' \
1351
+ 'When configured, enables tail-based sampling by sending all recorded spans ' \
1352
+ 'to a trace observer for further sampling decisions, irrespective of any usual ' \
1353
+ 'agent sampling decision.'
1544
1354
  },
1545
1355
  :'infinite_tracing.trace_observer.port' => {
1546
1356
  :default => 443,
@@ -1548,9 +1358,18 @@ If `true`, disables agent middleware for Sinatra. This middleware is responsible
1548
1358
  :type => Integer,
1549
1359
  :allowed_from_server => false,
1550
1360
  :external => :infinite_tracing,
1551
- :description => "Configures the TCP/IP port for the Trace Observer Host"
1361
+ :description => 'Configures the TCP/IP port for the trace observer Host'
1552
1362
  },
1553
1363
  # Instrumentation
1364
+ :'instrumentation.active_support_broadcast_logger' => {
1365
+ :default => instrumentation_value_from_boolean(:'application_logging.enabled'),
1366
+ :documentation_default => 'auto',
1367
+ :dynamic_name => true,
1368
+ :public => true,
1369
+ :type => String,
1370
+ :allowed_from_server => false,
1371
+ :description => 'Controls auto-instrumentation of `ActiveSupport::BroadcastLogger` at start up. May be one of: `auto`, `prepend`, `chain`, `disabled`. Used in Rails versions >= 7.1.'
1372
+ },
1554
1373
  :'instrumentation.active_support_logger' => {
1555
1374
  :default => instrumentation_value_from_boolean(:'application_logging.enabled'),
1556
1375
  :documentation_default => 'auto',
@@ -1558,16 +1377,31 @@ If `true`, disables agent middleware for Sinatra. This middleware is responsible
1558
1377
  :public => true,
1559
1378
  :type => String,
1560
1379
  :allowed_from_server => false,
1561
- :description => 'Controls auto-instrumentation of ActiveSupport::Logger at start up. May be one of [auto|prepend|chain|disabled].'
1380
+ :description => 'Controls auto-instrumentation of `ActiveSupport::Logger` at start up. May be one of: `auto`, `prepend`, `chain`, `disabled`. Used in Rails versions below 7.1.'
1381
+ },
1382
+ :'instrumentation.async_http' => {
1383
+ :default => 'auto',
1384
+ :public => true,
1385
+ :type => String,
1386
+ :dynamic_name => true,
1387
+ :allowed_from_server => false,
1388
+ :description => 'Controls auto-instrumentation of Async::HTTP at start up. May be one of: `auto`, `prepend`, `chain`, `disabled`.'
1562
1389
  },
1563
1390
  :'instrumentation.bunny' => {
1564
- :default => instrumentation_value_of(:disable_bunny),
1565
- :documentation_default => 'auto',
1391
+ :default => 'auto',
1566
1392
  :public => true,
1567
1393
  :type => String,
1568
1394
  :dynamic_name => true,
1569
1395
  :allowed_from_server => false,
1570
- :description => 'Controls auto-instrumentation of bunny at start up. May be one of [auto|prepend|chain|disabled].'
1396
+ :description => 'Controls auto-instrumentation of bunny at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.'
1397
+ },
1398
+ :'instrumentation.fiber' => {
1399
+ :default => 'auto',
1400
+ :public => true,
1401
+ :type => String,
1402
+ :dynamic_name => true,
1403
+ :allowed_from_server => false,
1404
+ :description => 'Controls auto-instrumentation of the Fiber class at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.'
1571
1405
  },
1572
1406
  :'instrumentation.concurrent_ruby' => {
1573
1407
  :default => 'auto',
@@ -1575,25 +1409,25 @@ If `true`, disables agent middleware for Sinatra. This middleware is responsible
1575
1409
  :type => String,
1576
1410
  :dynamic_name => true,
1577
1411
  :allowed_from_server => false,
1578
- :description => 'Controls auto-instrumentation of the concurrent-ruby library at start up. May be one of [auto|prepend|chain|disabled].'
1412
+ :description => 'Controls auto-instrumentation of the concurrent-ruby library at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.'
1579
1413
  },
1580
1414
  :'instrumentation.curb' => {
1581
- :default => instrumentation_value_of(:disable_curb),
1415
+ :default => 'auto',
1582
1416
  :documentation_default => 'auto',
1583
1417
  :public => true,
1584
1418
  :type => String,
1585
1419
  :dynamic_name => true,
1586
1420
  :allowed_from_server => false,
1587
- :description => 'Controls auto-instrumentation of Curb at start up. May be one of [auto|prepend|chain|disabled].'
1421
+ :description => 'Controls auto-instrumentation of Curb at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.'
1588
1422
  },
1589
1423
  :'instrumentation.delayed_job' => {
1590
- :default => instrumentation_value_of(:disable_dj),
1424
+ :default => 'auto',
1591
1425
  :documentation_default => 'auto',
1592
1426
  :public => true,
1593
1427
  :type => String,
1594
1428
  :dynamic_name => true,
1595
1429
  :allowed_from_server => false,
1596
- :description => 'Controls auto-instrumentation of Delayed Job at start up. May be one of [auto|prepend|chain|disabled].'
1430
+ :description => 'Controls auto-instrumentation of Delayed Job at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.'
1597
1431
  },
1598
1432
  :'instrumentation.elasticsearch' => {
1599
1433
  :default => 'auto',
@@ -1601,34 +1435,41 @@ If `true`, disables agent middleware for Sinatra. This middleware is responsible
1601
1435
  :type => String,
1602
1436
  :dynamic_name => true,
1603
1437
  :allowed_from_server => false,
1604
- :description => 'Controls auto-instrumentation of the elasticsearch library at start up. May be one of [auto|prepend|chain|disabled].'
1438
+ :description => 'Controls auto-instrumentation of the elasticsearch library at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.'
1439
+ },
1440
+ :'instrumentation.ethon' => {
1441
+ :default => 'auto',
1442
+ :public => true,
1443
+ :type => String,
1444
+ :dynamic_name => true,
1445
+ :allowed_from_server => false,
1446
+ :description => 'Controls auto-instrumentation of ethon at start up. May be one of [auto|prepend|chain|disabled]'
1605
1447
  },
1606
1448
  :'instrumentation.excon' => {
1607
- :default => instrumentation_value_of(:disable_excon),
1449
+ :default => 'enabled',
1608
1450
  :documentation_default => 'enabled',
1609
- :public => :true,
1451
+ :public => true,
1610
1452
  :type => String,
1611
1453
  :dynamic_name => true,
1612
1454
  :allowed_from_server => false,
1613
- :description => "Controls auto-instrumentation of Excon at start up. May be one of [enabled|disabled]."
1455
+ :description => 'Controls auto-instrumentation of Excon at start-up. May be one of: `enabled`, `disabled`.'
1614
1456
  },
1615
1457
  :'instrumentation.grape' => {
1616
- :default => instrumentation_value_of(:disable_grape_instrumentation),
1617
- :documentation_default => 'auto',
1618
- :public => :true,
1458
+ :default => 'auto',
1459
+ :public => true,
1619
1460
  :type => String,
1620
1461
  :dynamic_name => true,
1621
1462
  :allowed_from_server => false,
1622
- :description => "Controls auto-instrumentation of Grape at start up. May be one of [auto|prepend|chain|disabled]."
1463
+ :description => 'Controls auto-instrumentation of Grape at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.'
1623
1464
  },
1624
1465
  :'instrumentation.grpc_client' => {
1625
- :default => instrumentation_value_of(:disable_grpc_client),
1466
+ :default => 'auto',
1626
1467
  :documentation_default => 'auto',
1627
1468
  :public => true,
1628
1469
  :type => String,
1629
1470
  :dynamic_name => true,
1630
1471
  :allowed_from_server => false,
1631
- :description => 'Controls auto-instrumentation of gRPC clients at start up. May be one of [auto|prepend|chain|disabled].'
1472
+ :description => 'Controls auto-instrumentation of gRPC clients at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.'
1632
1473
  },
1633
1474
  :'instrumentation.grpc.host_denylist' => {
1634
1475
  :default => [],
@@ -1636,34 +1477,43 @@ If `true`, disables agent middleware for Sinatra. This middleware is responsible
1636
1477
  :type => Array,
1637
1478
  :allowed_from_server => false,
1638
1479
  :transform => DefaultSource.method(:convert_to_regexp_list),
1639
- :description => %Q(Specifies a list of hostname patterns separated by commas that will match gRPC hostnames that traffic is to be ignored by New Relic for. New Relic's gRPC client instrumentation will ignore traffic streamed to a host matching any of these patterns, and New Relic's gRPC server instrumentation will ignore traffic for a server running on a host whose hostname matches any of these patterns. By default, no traffic is ignored when gRPC instrumentation is itself enabled. For example, "private.com$,exception.*")
1480
+ :description => %Q(Specifies a list of hostname patterns separated by commas that will match gRPC hostnames that traffic is to be ignored by New Relic for. New Relic's gRPC client instrumentation will ignore traffic streamed to a host matching any of these patterns, and New Relic's gRPC server instrumentation will ignore traffic for a server running on a host whose hostname matches any of these patterns. By default, no traffic is ignored when gRPC instrumentation is itself enabled. For example, `"private.com$,exception.*"`)
1640
1481
  },
1641
1482
  :'instrumentation.grpc_server' => {
1642
- :default => instrumentation_value_of(:disable_grpc_server),
1483
+ :default => 'auto',
1643
1484
  :documentation_default => 'auto',
1644
1485
  :public => true,
1645
1486
  :type => String,
1646
1487
  :dynamic_name => true,
1647
1488
  :allowed_from_server => false,
1648
- :description => 'Controls auto-instrumentation of gRPC servers at start up. May be one of [auto|prepend|chain|disabled].'
1489
+ :description => 'Controls auto-instrumentation of gRPC servers at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.'
1649
1490
  },
1650
1491
  :'instrumentation.httpclient' => {
1651
- :default => instrumentation_value_of(:disable_httpclient),
1492
+ :default => 'auto',
1652
1493
  :documentation_default => 'auto',
1653
1494
  :public => true,
1654
1495
  :type => String,
1655
1496
  :dynamic_name => true,
1656
1497
  :allowed_from_server => false,
1657
- :description => "Controls auto-instrumentation of HTTPClient at start up. May be one of [auto|prepend|chain|disabled]."
1498
+ :description => 'Controls auto-instrumentation of HTTPClient at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.'
1658
1499
  },
1659
1500
  :'instrumentation.httprb' => {
1660
- :default => instrumentation_value_of(:disable_httprb),
1501
+ :default => 'auto',
1661
1502
  :documentation_default => 'auto',
1662
1503
  :public => true,
1663
1504
  :type => String,
1664
1505
  :dynamic_name => true,
1665
1506
  :allowed_from_server => false,
1666
- :description => 'Controls auto-instrumentation of http.rb gem at start up. May be one of [auto|prepend|chain|disabled].'
1507
+ :description => 'Controls auto-instrumentation of http.rb gem at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.'
1508
+ },
1509
+ :'instrumentation.httpx' => {
1510
+ :default => 'auto',
1511
+ :documentation_default => 'auto',
1512
+ :public => true,
1513
+ :type => String,
1514
+ :dynamic_name => true,
1515
+ :allowed_from_server => false,
1516
+ :description => 'Controls auto-instrumentation of httpx at start up. May be one of [auto|prepend|chain|disabled]'
1667
1517
  },
1668
1518
  :'instrumentation.logger' => {
1669
1519
  :default => instrumentation_value_from_boolean(:'application_logging.enabled'),
@@ -1672,128 +1522,167 @@ If `true`, disables agent middleware for Sinatra. This middleware is responsible
1672
1522
  :type => String,
1673
1523
  :dynamic_name => true,
1674
1524
  :allowed_from_server => false,
1675
- :description => 'Controls auto-instrumentation of Ruby standard library Logger at start up. May be one of [auto|prepend|chain|disabled].'
1525
+ :description => 'Controls auto-instrumentation of Ruby standard library Logger at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.'
1676
1526
  },
1677
1527
  :'instrumentation.memcache' => {
1678
- :default => instrumentation_value_of(:disable_dalli),
1679
- :documentation_default => 'auto',
1528
+ :default => 'auto',
1680
1529
  :public => true,
1681
1530
  :type => String,
1682
1531
  :dynamic_name => true,
1683
1532
  :allowed_from_server => false,
1684
- :description => 'Controls auto-instrumentation of dalli gem for Memcache at start up. May be one of [auto|prepend|chain|disabled].'
1533
+ :description => 'Controls auto-instrumentation of dalli gem for Memcache at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.'
1685
1534
  },
1686
1535
  :'instrumentation.memcached' => {
1687
- :default => instrumentation_value_of(:disable_memcached),
1536
+ :default => 'auto',
1688
1537
  :documentation_default => 'auto',
1689
1538
  :public => true,
1690
1539
  :type => String,
1691
1540
  :dynamic_name => true,
1692
1541
  :allowed_from_server => false,
1693
- :description => 'Controls auto-instrumentation of memcached gem for Memcache at start up. May be one of [auto|prepend|chain|disabled].'
1542
+ :description => 'Controls auto-instrumentation of memcached gem for Memcache at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.'
1694
1543
  },
1695
1544
  :'instrumentation.memcache_client' => {
1696
- :default => instrumentation_value_of(:disable_memcache_client),
1545
+ :default => 'auto',
1697
1546
  :documentation_default => 'auto',
1698
1547
  :public => true,
1699
1548
  :type => String,
1700
1549
  :dynamic_name => true,
1701
1550
  :allowed_from_server => false,
1702
- :description => 'Controls auto-instrumentation of memcache-client gem for Memcache at start up. May be one of [auto|prepend|chain|disabled].'
1551
+ :description => 'Controls auto-instrumentation of memcache-client gem for Memcache at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.'
1703
1552
  },
1704
1553
  :'instrumentation.mongo' => {
1705
- :default => instrumentation_value_of(:disable_mongo),
1554
+ :default => 'enabled',
1706
1555
  :documentation_default => 'enabled',
1707
- :public => :true,
1556
+ :public => true,
1708
1557
  :type => String,
1709
1558
  :dynamic_name => true,
1710
1559
  :allowed_from_server => false,
1711
- :description => "Controls auto-instrumentation of Mongo at start up. May be one of [enabled|disabled]."
1560
+ :description => 'Controls auto-instrumentation of Mongo at start-up. May be one of: `enabled`, `disabled`.'
1712
1561
  },
1713
1562
  :'instrumentation.net_http' => {
1714
- :default => instrumentation_value_of(:disable_net_http, :prepend_net_instrumentation),
1563
+ :default => 'auto',
1715
1564
  :documentation_default => 'auto',
1716
1565
  :public => true,
1717
1566
  :type => String,
1718
1567
  :dynamic_name => true,
1719
1568
  :allowed_from_server => false,
1720
- :description => "Controls auto-instrumentation of Net::HTTP at start up. May be one of [auto|prepend|chain|disabled]."
1569
+ :description => 'Controls auto-instrumentation of `Net::HTTP` at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.'
1721
1570
  },
1722
1571
  :'instrumentation.puma_rack' => {
1723
- :default => instrumentation_value_of(:disable_puma_rack), # TODO: MAJOR VERSION - change to value_of(:'instrumentation.rack') when we remove :disable_puma_rack in 8.0)
1572
+ :default => value_of(:'instrumentation.rack'),
1724
1573
  :documentation_default => 'auto',
1725
1574
  :public => true,
1726
1575
  :type => String,
1727
1576
  :dynamic_name => true,
1728
1577
  :allowed_from_server => false,
1729
- :description => "Controls auto-instrumentation of Puma::Rack. When enabled, the agent hooks into the " \
1730
- "`to_app` method in Puma::Rack::Builder to find gems to instrument during " \
1731
- "application startup. May be one of [auto|prepend|chain|disabled]."
1578
+ :description => 'Controls auto-instrumentation of `Puma::Rack`. When enabled, the agent hooks into the ' \
1579
+ '`to_app` method in `Puma::Rack::Builder` to find gems to instrument during ' \
1580
+ 'application startup. May be one of: `auto`, `prepend`, `chain`, `disabled`.'
1732
1581
  },
1733
1582
  :'instrumentation.puma_rack_urlmap' => {
1734
- :default => instrumentation_value_of(:disable_puma_rack_urlmap), # TODO: MAJOR VERSION - change to value_of(:'instrumentation.rack_urlmap') when we remove :disable_puma_rack_urlmap in 8.0)
1583
+ :default => value_of(:'instrumentation.rack_urlmap'),
1735
1584
  :documentation_default => 'auto',
1736
1585
  :public => true,
1737
1586
  :type => String,
1738
1587
  :dynamic_name => true,
1739
1588
  :allowed_from_server => false,
1740
- :description => 'Controls auto-instrumentation of Puma::Rack::URLMap at start up. May be one of [auto|prepend|chain|disabled].'
1589
+ :description => 'Controls auto-instrumentation of `Puma::Rack::URLMap` at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.'
1741
1590
  },
1742
1591
  :'instrumentation.rack' => {
1743
- :default => instrumentation_value_of(:disable_rack),
1592
+ :default => 'auto',
1744
1593
  :documentation_default => 'auto',
1745
1594
  :public => true,
1746
1595
  :type => String,
1747
1596
  :dynamic_name => true,
1748
1597
  :allowed_from_server => false,
1749
- :description => "Controls auto-instrumentation of Rack. When enabled, the agent hooks into the " \
1750
- "`to_app` method in Rack::Builder to find gems to instrument during " \
1751
- "application startup. May be one of [auto|prepend|chain|disabled]."
1598
+ :description => 'Controls auto-instrumentation of Rack. When enabled, the agent hooks into the ' \
1599
+ '`to_app` method in `Rack::Builder` to find gems to instrument during ' \
1600
+ 'application startup. May be one of: `auto`, `prepend`, `chain`, `disabled`.'
1752
1601
  },
1753
1602
  :'instrumentation.rack_urlmap' => {
1754
- :default => instrumentation_value_of(:disable_rack_urlmap),
1603
+ :default => 'auto',
1755
1604
  :documentation_default => 'auto',
1756
1605
  :public => true,
1757
1606
  :type => String,
1758
1607
  :dynamic_name => true,
1759
1608
  :allowed_from_server => false,
1760
- :description => 'Controls auto-instrumentation of Rack::URLMap at start up. May be one of [auto|prepend|chain|disabled].'
1609
+ :description => 'Controls auto-instrumentation of `Rack::URLMap` at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.'
1761
1610
  },
1762
1611
  :'instrumentation.rake' => {
1763
- :default => instrumentation_value_of(:disable_rake),
1764
- :documentation_default => 'auto',
1765
- :public => :true,
1612
+ :default => 'auto',
1613
+ :public => true,
1766
1614
  :type => String,
1767
1615
  :dynamic_name => true,
1768
1616
  :allowed_from_server => false,
1769
- :description => "Controls auto-instrumentation of rake at start up. May be one of [auto|prepend|chain|disabled]."
1617
+ :description => 'Controls auto-instrumentation of rake at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.'
1770
1618
  },
1771
1619
  :'instrumentation.redis' => {
1772
- :default => instrumentation_value_of(:disable_redis),
1773
- :documentation_default => 'auto',
1620
+ :default => 'auto',
1774
1621
  :public => true,
1775
1622
  :type => String,
1776
1623
  :dynamic_name => true,
1777
1624
  :allowed_from_server => false,
1778
- :description => "Controls auto-instrumentation of Redis at start up. May be one of [auto|prepend|chain|disabled]."
1625
+ :description => 'Controls auto-instrumentation of Redis at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.'
1779
1626
  },
1780
1627
  :'instrumentation.resque' => {
1781
- :default => instrumentation_value_of(:disable_resque),
1628
+ :default => 'auto',
1782
1629
  :documentation_default => 'auto',
1783
1630
  :public => true,
1784
1631
  :type => String,
1785
1632
  :dynamic_name => true,
1786
1633
  :allowed_from_server => false,
1787
- :description => "Controls auto-instrumentation of resque at start up. May be one of [auto|prepend|chain|disabled]."
1634
+ :description => 'Controls auto-instrumentation of resque at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.'
1635
+ },
1636
+ :'instrumentation.roda' => {
1637
+ :default => 'auto',
1638
+ :public => true,
1639
+ :type => String,
1640
+ :dynamic_name => true,
1641
+ :allowed_from_server => false,
1642
+ :description => 'Controls auto-instrumentation of Roda at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.'
1788
1643
  },
1789
1644
  :'instrumentation.sinatra' => {
1790
- :default => instrumentation_value_of(:disable_sinatra),
1791
- :documentation_default => 'auto',
1792
- :public => :true,
1645
+ :default => 'auto',
1646
+ :public => true,
1793
1647
  :type => String,
1794
1648
  :dynamic_name => true,
1795
1649
  :allowed_from_server => false,
1796
- :description => "Controls auto-instrumentation of Sinatra at start up. May be one of [auto|prepend|chain|disabled]."
1650
+ :description => 'Controls auto-instrumentation of Sinatra at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.'
1651
+ },
1652
+ :'instrumentation.stripe' => {
1653
+ :default => 'enabled',
1654
+ :public => true,
1655
+ :type => String,
1656
+ :allowed_from_server => false,
1657
+ :description => 'Controls auto-instrumentation of Stripe at startup. May be one of: `enabled`, `disabled`.'
1658
+ },
1659
+ :'stripe.user_data.include' => {
1660
+ default: NewRelic::EMPTY_ARRAY,
1661
+ public: true,
1662
+ type: Array,
1663
+ dynamic_name: true,
1664
+ allowed_from_server: false,
1665
+ :transform => DefaultSource.method(:convert_to_list),
1666
+ :description => <<~DESCRIPTION
1667
+ An array of strings to specify which keys inside a Stripe event's `user_data` hash should be reported
1668
+ to New Relic. Each string in this array will be turned into a regular expression via `Regexp.new` to
1669
+ permit advanced matching. Setting the value to `["."]` will report all `user_data`.
1670
+ DESCRIPTION
1671
+ },
1672
+ :'stripe.user_data.exclude' => {
1673
+ default: NewRelic::EMPTY_ARRAY,
1674
+ public: true,
1675
+ type: Array,
1676
+ dynamic_name: true,
1677
+ allowed_from_server: false,
1678
+ :transform => DefaultSource.method(:convert_to_list),
1679
+ :description => <<~DESCRIPTION
1680
+ An array of strings to specify which keys and/or values inside a Stripe event's `user_data` hash should
1681
+ not be reported to New Relic. Each string in this array will be turned into a regular expression via
1682
+ `Regexp.new` to permit advanced matching. For each hash pair, if either the key or value is matched the
1683
+ pair will not be reported. By default, no `user_data` is reported, so this option should only be used if
1684
+ the `stripe.user_data.include` option is being used.
1685
+ DESCRIPTION
1797
1686
  },
1798
1687
  :'instrumentation.thread' => {
1799
1688
  :default => 'auto',
@@ -1801,38 +1690,38 @@ If `true`, disables agent middleware for Sinatra. This middleware is responsible
1801
1690
  :type => String,
1802
1691
  :dynamic_name => true,
1803
1692
  :allowed_from_server => false,
1804
- :description => "Controls auto-instrumentation of the Thread class at start up to allow the agent to correctly nest spans inside of an asynchronous transaction. This does not enable the agent to automatically trace all threads created (see `instrumentation.thread.tracing`). May be one of [auto|prepend|chain|disabled]."
1693
+ :description => 'Controls auto-instrumentation of the Thread class at start-up to allow the agent to correctly nest spans inside of an asynchronous transaction. This does not enable the agent to automatically trace all threads created (see `instrumentation.thread.tracing`). May be one of: `auto`, `prepend`, `chain`, `disabled`.'
1805
1694
  },
1806
1695
  :'instrumentation.thread.tracing' => {
1807
- :default => false,
1696
+ :default => true,
1808
1697
  :public => true,
1809
1698
  :type => Boolean,
1810
1699
  :allowed_from_server => false,
1811
- :description => "Controls auto-instrumentation of the Thread class at start up to automatically add tracing to all Threads created in the application."
1700
+ :description => 'Controls auto-instrumentation of the Thread class at start-up to automatically add tracing to all Threads created in the application.'
1812
1701
  },
1813
1702
  :'thread_ids_enabled' => {
1814
1703
  :default => false,
1815
1704
  :public => false,
1816
1705
  :type => Boolean,
1817
1706
  :allowed_from_server => false,
1818
- :description => "If enabled, will append the current Thread and Fiber object ids onto the segment names of segments created in Threads and concurrent-ruby"
1707
+ :description => 'If enabled, will append the current Thread and Fiber object ids onto the segment names of segments created in Threads and concurrent-ruby'
1819
1708
  },
1820
1709
  :'instrumentation.tilt' => {
1821
- :default => "auto",
1710
+ :default => 'auto',
1822
1711
  :public => true,
1823
1712
  :type => String,
1824
1713
  :dynamic_name => true,
1825
1714
  :allowed_from_server => false,
1826
- :description => 'Controls auto-instrumentation of the Tilt template rendering library at start up. May be one of [auto|prepend|chain|disabled].'
1715
+ :description => 'Controls auto-instrumentation of the Tilt template rendering library at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.'
1827
1716
  },
1828
1717
  :'instrumentation.typhoeus' => {
1829
- :default => instrumentation_value_of(:disable_typhoeus),
1718
+ :default => 'auto',
1830
1719
  :documentation_default => 'auto',
1831
1720
  :public => true,
1832
1721
  :type => String,
1833
1722
  :dynamic_name => true,
1834
1723
  :allowed_from_server => false,
1835
- :description => "Controls auto-instrumentation of Typhoeus at start up. May be one of [auto|prepend|chain|disabled]."
1724
+ :description => 'Controls auto-instrumentation of Typhoeus at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.'
1836
1725
  },
1837
1726
  # Message tracer
1838
1727
  :'message_tracer.segment_parameters.enabled' => {
@@ -1868,12 +1757,17 @@ If `true`, disables agent middleware for Sinatra. This middleware is responsible
1868
1757
  # Rails
1869
1758
  :'defer_rails_initialization' => {
1870
1759
  :default => false,
1871
- :public => false,
1760
+ :public => true,
1872
1761
  :type => Boolean,
1762
+ :external => true, # this config is used directly from the ENV variables
1873
1763
  :allowed_from_server => false,
1874
- :description => 'This configuration option is currently unreachable. Please do not use. ' \
1875
- 'If `true`, when the agent is in an application using Ruby on Rails, it will start after ' \
1876
- 'config/initializers have run.'
1764
+ :description => <<-DESCRIPTION
1765
+ If `true`, when the agent is in an application using Ruby on Rails, it will start after `config/initializers` run.
1766
+
1767
+ <Callout variant="caution">
1768
+ This option may only be set by environment variable.
1769
+ </Callout>
1770
+ DESCRIPTION
1877
1771
  },
1878
1772
  # Rake
1879
1773
  :'rake.tasks' => {
@@ -1886,7 +1780,7 @@ If `true`, disables agent middleware for Sinatra. This middleware is responsible
1886
1780
  'This configuration option converts the Array to a RegEx list. If you\'d like ' \
1887
1781
  'to allow all tasks by default, use `rake.tasks: [.+]`. No rake tasks will be ' \
1888
1782
  'instrumented unless they\'re added to this list. For more information, ' \
1889
- 'visit the (New Relic Rake Instrumentation docs)[/docs/apm/agents/ruby-agent/background-jobs/rake-instrumentation].'
1783
+ 'visit the [New Relic Rake Instrumentation docs](/docs/apm/agents/ruby-agent/background-jobs/rake-instrumentation).'
1890
1784
  },
1891
1785
  :'rake.connect_timeout' => {
1892
1786
  :default => 10,
@@ -1895,16 +1789,6 @@ If `true`, disables agent middleware for Sinatra. This middleware is responsible
1895
1789
  :allowed_from_server => false,
1896
1790
  :description => 'Timeout for waiting on connect to complete before a rake task'
1897
1791
  },
1898
- # Resque
1899
- :'resque.capture_params' => {
1900
- :default => false,
1901
- :public => true,
1902
- :type => Boolean,
1903
- :allowed_from_server => false,
1904
- :dynamic_name => true,
1905
- :deprecated => true,
1906
- :description => 'If `true`, enables the capture of job arguments for transaction traces and traced errors in Resque.'
1907
- },
1908
1792
  # Rules
1909
1793
  :'rules.ignore_url_regexes' => {
1910
1794
  :default => [],
@@ -1915,14 +1799,35 @@ If `true`, disables agent middleware for Sinatra. This middleware is responsible
1915
1799
  :description => 'Define transactions you want the agent to ignore, by specifying a list of patterns matching the URI you want to ignore. For more detail, see [the docs on ignoring specific transactions](/docs/agents/ruby-agent/api-guides/ignoring-specific-transactions/#config-ignoring).'
1916
1800
  },
1917
1801
  # Sidekiq
1918
- :'sidekiq.capture_params' => {
1919
- :default => false,
1920
- :public => true,
1921
- :type => Boolean,
1922
- :allowed_from_server => false,
1923
- :dynamic_name => true,
1924
- :deprecated => true,
1925
- :description => 'If `true`, enables the capture of job arguments for transaction traces and traced errors in Sidekiq.'
1802
+ :'sidekiq.args.include' => {
1803
+ default: NewRelic::EMPTY_ARRAY,
1804
+ public: true,
1805
+ type: Array,
1806
+ dynamic_name: true,
1807
+ allowed_from_server: false,
1808
+ description: <<~SIDEKIQ_ARGS_INCLUDE.chomp.tr("\n", ' ')
1809
+ An array of strings that will collectively serve as an allowlist for filtering which Sidekiq
1810
+ job arguments get reported to New Relic. To capture any Sidekiq arguments,
1811
+ 'job.sidekiq.args.*' must be added to the separate `:'attributes.include'` configuration option. Each
1812
+ string in this array will be turned into a regular expression via `Regexp.new` to permit advanced
1813
+ matching. For job argument hashes, if either a key or value matches the pair will be included. All
1814
+ matching job argument array elements and job argument scalars will be included.
1815
+ SIDEKIQ_ARGS_INCLUDE
1816
+ },
1817
+ :'sidekiq.args.exclude' => {
1818
+ default: NewRelic::EMPTY_ARRAY,
1819
+ public: true,
1820
+ type: Array,
1821
+ dynamic_name: true,
1822
+ allowed_from_server: false,
1823
+ description: <<~SIDEKIQ_ARGS_EXCLUDE.chomp.tr("\n", ' ')
1824
+ An array of strings that will collectively serve as a denylist for filtering which Sidekiq
1825
+ job arguments get reported to New Relic. To capture any Sidekiq arguments,
1826
+ 'job.sidekiq.args.*' must be added to the separate `:'attributes.include'` configuration option. Each string
1827
+ in this array will be turned into a regular expression via `Regexp.new` to permit advanced matching.
1828
+ For job argument hashes, if either a key or value matches the pair will be excluded. All matching job
1829
+ argument array elements and job argument scalars will be excluded.
1830
+ SIDEKIQ_ARGS_EXCLUDE
1926
1831
  },
1927
1832
  # Slow SQL
1928
1833
  :'slow_sql.enabled' => {
@@ -1955,14 +1860,14 @@ If `true`, disables agent middleware for Sinatra. This middleware is responsible
1955
1860
  :public => true,
1956
1861
  :type => String,
1957
1862
  :allowed_from_server => true,
1958
- :description => 'Defines an obfuscation level for slow SQL queries. Valid options are `obfuscated`, `raw`, or `none`).'
1863
+ :description => 'Defines an obfuscation level for slow SQL queries. Valid options are `obfuscated`, `raw`, or `none`.'
1959
1864
  },
1960
1865
  :'slow_sql.use_longer_sql_id' => {
1961
1866
  :default => false,
1962
1867
  :public => true,
1963
1868
  :type => Boolean,
1964
1869
  :allowed_from_server => true,
1965
- :description => 'Generate a longer sql_id for slow SQL traces. sql_id is used for aggregation of similar queries.'
1870
+ :description => 'Generate a longer `sql_id` for slow SQL traces. `sql_id` is used for aggregation of similar queries.'
1966
1871
  },
1967
1872
  # Span events
1968
1873
  :'span_events.enabled' => {
@@ -1978,14 +1883,14 @@ If `true`, disables agent middleware for Sinatra. This middleware is responsible
1978
1883
  :type => Integer,
1979
1884
  :allowed_from_server => false,
1980
1885
  :external => :infinite_tracing,
1981
- :description => "Sets the maximum number of span events to buffer when streaming to the trace observer."
1886
+ :description => 'Sets the maximum number of span events to buffer when streaming to the trace observer.'
1982
1887
  },
1983
1888
  :'span_events.max_samples_stored' => {
1984
1889
  :default => 2000,
1985
1890
  :public => true,
1986
1891
  :type => Integer,
1987
1892
  :allowed_from_server => true,
1988
- :description => 'Defines the maximum number of span events reported from a single harvest. Any Integer between 1 and 10000 is valid.'
1893
+ :description => 'Defines the maximum number of span events reported from a single harvest. Any Integer between `1` and `10000` is valid.'
1989
1894
  },
1990
1895
  # Strip exception messages
1991
1896
  :'strip_exception_messages.enabled' => {
@@ -2112,7 +2017,7 @@ If `true`, disables agent middleware for Sinatra. This middleware is responsible
2112
2017
  :description => 'Real user monitoring license key for the browser timing header.'
2113
2018
  },
2114
2019
  :'browser_monitoring.loader' => {
2115
- :default => DefaultSource.browser_monitoring_loader,
2020
+ :default => 'rum',
2116
2021
  :public => false,
2117
2022
  :type => String,
2118
2023
  :allowed_from_server => true,
@@ -2168,15 +2073,6 @@ If `true`, disables agent middleware for Sinatra. This middleware is responsible
2168
2073
  :allowed_from_server => true,
2169
2074
  :description => 'Number of seconds betwixt connections to the New Relic data collection service.'
2170
2075
  },
2171
- :disable_grape_instrumentation => {
2172
- :default => false,
2173
- :public => false,
2174
- :type => Boolean,
2175
- :allowed_from_server => false,
2176
- :deprecated => true,
2177
- :description => deprecated_description(:'instrumentation.grape',
2178
- 'If `true`, the agent won\'t install Grape instrumentation.')
2179
- },
2180
2076
  :dispatcher => {
2181
2077
  :default => DefaultSource.dispatcher,
2182
2078
  :public => false,
@@ -2198,31 +2094,6 @@ If `true`, disables agent middleware for Sinatra. This middleware is responsible
2198
2094
  :allowed_from_server => false,
2199
2095
  :description => 'Internal name for controlling Rails 3+ middleware instrumentation'
2200
2096
  },
2201
- :disable_rake_instrumentation => {
2202
- :default => false,
2203
- :public => false,
2204
- :type => Boolean,
2205
- :allowed_from_server => false,
2206
- :deprecated => true,
2207
- :description => deprecated_description(:'instrumentation.rake', 'Enable or disable Rake instrumentation. Preferred key is `disable_rake`')
2208
- },
2209
- :disable_redis_instrumentation => {
2210
- :default => false,
2211
- :public => false,
2212
- :type => Boolean,
2213
- :deprecated => true,
2214
- :allowed_from_server => false,
2215
- :description => deprecated_description(:'instrumentation.redis', 'Disables installation of Redis instrumentation. Standard key to use is disable_redis.')
2216
- },
2217
- :cross_application_tracing => {
2218
- :default => nil,
2219
- :allow_nil => true,
2220
- :public => false,
2221
- :type => Boolean,
2222
- :allowed_from_server => false,
2223
- :deprecated => true,
2224
- :description => 'Deprecated in favor of distributed_tracing.enabled'
2225
- },
2226
2097
  :enabled => {
2227
2098
  :default => true,
2228
2099
  :public => false,
@@ -2260,17 +2131,8 @@ If `true`, disables agent middleware for Sinatra. This middleware is responsible
2260
2131
  :allowed_from_server => true,
2261
2132
  :description => 'Number of seconds betwixt connections to the New Relic event collection services.'
2262
2133
  },
2263
- :'event_report_period.analytic_event_data' => {
2264
- :default => 60,
2265
- :public => false,
2266
- :type => Integer,
2267
- :dynamic_name => true,
2268
- :deprecated => true,
2269
- :allowed_from_server => true,
2270
- :description => deprecated_description(:'event_report_period.transaction_event_data', 'Number of seconds betwixt connections to the New Relic transaction event collection services.')
2271
- },
2272
2134
  :'event_report_period.transaction_event_data' => {
2273
- :default => value_of(:'event_report_period.analytic_event_data'),
2135
+ :default => 60,
2274
2136
  :public => false,
2275
2137
  :type => Integer,
2276
2138
  :dynamic_name => true,
@@ -2328,7 +2190,7 @@ If `true`, disables agent middleware for Sinatra. This middleware is responsible
2328
2190
  :public => false,
2329
2191
  :type => String,
2330
2192
  :allowed_from_server => false,
2331
- :description => "URI for the New Relic data collection service."
2193
+ :description => 'URI for the New Relic data collection service.'
2332
2194
  },
2333
2195
  :'infinite_tracing.batching' => {
2334
2196
  :default => true,
@@ -2336,8 +2198,8 @@ If `true`, disables agent middleware for Sinatra. This middleware is responsible
2336
2198
  :type => Boolean,
2337
2199
  :allowed_from_server => false,
2338
2200
  :external => :infinite_tracing,
2339
- :description => "If true (the default), data sent to the Trace Observer will be batched\ninstead of each " \
2340
- "span being sent individually"
2201
+ :description => 'If `true` (the default), data sent to the trace observer is batched instead of ' \
2202
+ 'sending each span individually.'
2341
2203
  },
2342
2204
  :'infinite_tracing.compression_level' => {
2343
2205
  :default => :high,
@@ -2345,8 +2207,13 @@ If `true`, disables agent middleware for Sinatra. This middleware is responsible
2345
2207
  :type => Symbol,
2346
2208
  :allowed_from_server => false,
2347
2209
  :external => :infinite_tracing,
2348
- :description => "Configure the compression level for data sent to the Trace Observer\nMay be one of " \
2349
- "[none|low|medium|high]\n'high' is the default. Set the level to 'none' to disable compression"
2210
+ :description => <<~DESC
2211
+ Configure the compression level for data sent to the trace observer.
2212
+
2213
+ May be one of: `:none`, `:low`, `:medium`, `:high`.
2214
+
2215
+ Set the level to `:none` to disable compression.
2216
+ DESC
2350
2217
  },
2351
2218
  :js_agent_file => {
2352
2219
  :default => '',
@@ -2362,14 +2229,6 @@ If `true`, disables agent middleware for Sinatra. This middleware is responsible
2362
2229
  :allowed_from_server => true,
2363
2230
  :description => 'JavaScript agent loader content.'
2364
2231
  },
2365
- :js_errors_beta => {
2366
- :default => false,
2367
- :public => false,
2368
- :type => Boolean,
2369
- :allowed_from_server => false,
2370
- :deprecated => true,
2371
- :description => 'Enable or disable beta JavaScript error reporting.'
2372
- },
2373
2232
  :keep_alive_timeout => {
2374
2233
  :default => 60,
2375
2234
  :public => false,
@@ -2377,14 +2236,6 @@ If `true`, disables agent middleware for Sinatra. This middleware is responsible
2377
2236
  :allowed_from_server => true,
2378
2237
  :description => 'Timeout for keep alive on TCP connection to collector if supported by Ruby version. Only used in conjunction when aggressive_keepalive is enabled.'
2379
2238
  },
2380
- :keep_retrying => {
2381
- :default => true,
2382
- :public => false,
2383
- :type => Boolean,
2384
- :deprecated => true,
2385
- :allowed_from_server => false,
2386
- :description => 'Enable or disable retrying failed connections to the New Relic data collection service.'
2387
- },
2388
2239
  :max_payload_size_in_bytes => {
2389
2240
  :default => 1000000,
2390
2241
  :public => false,
@@ -2406,15 +2257,6 @@ If `true`, disables agent middleware for Sinatra. This middleware is responsible
2406
2257
  :allowed_from_server => false,
2407
2258
  :description => 'Port for the New Relic data collection service.'
2408
2259
  },
2409
- :prepend_net_instrumentation => {
2410
- :default => true,
2411
- :public => false,
2412
- :type => Boolean,
2413
- :allowed_from_server => false,
2414
- :deprecated => true,
2415
- :description => deprecated_description(:'instrumentation.net_http',
2416
- 'If `true`, uses `Module#prepend` rather than alias_method for Net::HTTP instrumentation.')
2417
- },
2418
2260
  :primary_application_id => {
2419
2261
  :default => nil,
2420
2262
  :allow_nil => true,
@@ -2512,7 +2354,7 @@ If `true`, disables agent middleware for Sinatra. This middleware is responsible
2512
2354
  :public => false,
2513
2355
  :type => Boolean,
2514
2356
  :allowed_from_server => false,
2515
- :description => 'Used in tests for the agent to start up, but not connect to the collector. Formerly used `developer_mode` in test config for this purpose.'
2357
+ :description => 'Used in tests for the agent to start-up, but not connect to the collector. Formerly used `developer_mode` in test config for this purpose.'
2516
2358
  },
2517
2359
  :'thread_profiler.max_profile_overhead' => {
2518
2360
  :default => 0.05,