newrelic_rpm 6.15.0 → 9.7.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (485) hide show
  1. checksums.yaml +4 -4
  2. data/.build_ignore +26 -0
  3. data/CHANGELOG.md +4176 -2789
  4. data/CONTRIBUTING.md +32 -13
  5. data/Gemfile +1 -2
  6. data/LICENSE +0 -6
  7. data/README.md +29 -22
  8. data/Rakefile +33 -35
  9. data/THIRD_PARTY_NOTICES.md +14 -199
  10. data/Thorfile +5 -0
  11. data/bin/newrelic +4 -9
  12. data/bin/newrelic_rpm +15 -0
  13. data/bin/nrdebug +85 -62
  14. data/init.rb +6 -8
  15. data/install.rb +2 -2
  16. data/lib/new_relic/agent/adaptive_sampler.rb +13 -9
  17. data/lib/new_relic/agent/agent.rb +99 -941
  18. data/lib/new_relic/agent/agent_helpers/connect.rb +222 -0
  19. data/lib/new_relic/agent/agent_helpers/harvest.rb +153 -0
  20. data/lib/new_relic/agent/agent_helpers/shutdown.rb +72 -0
  21. data/lib/new_relic/agent/agent_helpers/special_startup.rb +74 -0
  22. data/lib/new_relic/agent/agent_helpers/start_worker_thread.rb +175 -0
  23. data/lib/new_relic/agent/agent_helpers/startup.rb +202 -0
  24. data/lib/new_relic/agent/agent_helpers/transmit.rb +76 -0
  25. data/lib/new_relic/agent/agent_logger.rb +27 -23
  26. data/lib/new_relic/agent/attribute_filter.rb +67 -50
  27. data/lib/new_relic/agent/attribute_pre_filtering.rb +109 -0
  28. data/lib/new_relic/agent/attribute_processing.rb +9 -9
  29. data/lib/new_relic/agent/attributes.rb +5 -4
  30. data/lib/new_relic/agent/audit_logger.rb +13 -8
  31. data/lib/new_relic/agent/autostart.rb +21 -20
  32. data/lib/new_relic/agent/chained_call.rb +1 -1
  33. data/lib/new_relic/agent/commands/agent_command.rb +4 -4
  34. data/lib/new_relic/agent/commands/agent_command_router.rb +15 -13
  35. data/lib/new_relic/agent/commands/thread_profiler_session.rb +16 -14
  36. data/lib/new_relic/agent/configuration/default_source.rb +1608 -1182
  37. data/lib/new_relic/agent/configuration/dotted_hash.rb +6 -5
  38. data/lib/new_relic/agent/configuration/environment_source.rb +13 -11
  39. data/lib/new_relic/agent/configuration/event_harvest_config.rb +40 -17
  40. data/lib/new_relic/agent/configuration/high_security_source.rb +11 -12
  41. data/lib/new_relic/agent/configuration/manager.rb +103 -75
  42. data/lib/new_relic/agent/configuration/manual_source.rb +1 -1
  43. data/lib/new_relic/agent/configuration/mask_defaults.rb +3 -3
  44. data/lib/new_relic/agent/configuration/security_policy_source.rb +92 -95
  45. data/lib/new_relic/agent/configuration/server_source.rb +43 -41
  46. data/lib/new_relic/agent/configuration/yaml_source.rb +47 -10
  47. data/lib/new_relic/agent/configuration.rb +1 -1
  48. data/lib/new_relic/agent/connect/request_builder.rb +18 -18
  49. data/lib/new_relic/agent/connect/response_handler.rb +5 -8
  50. data/lib/new_relic/agent/custom_event_aggregator.rb +42 -16
  51. data/lib/new_relic/agent/database/explain_plan_helpers.rb +5 -6
  52. data/lib/new_relic/agent/database/obfuscation_helpers.rb +16 -15
  53. data/lib/new_relic/agent/database/obfuscator.rb +4 -4
  54. data/lib/new_relic/agent/database/postgres_explain_obfuscator.rb +3 -3
  55. data/lib/new_relic/agent/database.rb +45 -53
  56. data/lib/new_relic/agent/database_adapter.rb +3 -1
  57. data/lib/new_relic/agent/datastores/metric_helper.rb +21 -22
  58. data/lib/new_relic/agent/datastores/mongo/event_formatter.rb +7 -6
  59. data/lib/new_relic/agent/datastores/mongo/metric_translator.rb +17 -21
  60. data/lib/new_relic/agent/datastores/mongo.rb +6 -11
  61. data/lib/new_relic/agent/datastores/nosql_obfuscator.rb +41 -0
  62. data/lib/new_relic/agent/datastores/redis.rb +9 -15
  63. data/lib/new_relic/agent/datastores.rb +13 -15
  64. data/lib/new_relic/agent/deprecator.rb +1 -1
  65. data/lib/new_relic/agent/distributed_tracing/cross_app_payload.rb +10 -10
  66. data/lib/new_relic/agent/distributed_tracing/cross_app_tracing.rb +45 -40
  67. data/lib/new_relic/agent/distributed_tracing/distributed_trace_attributes.rb +22 -22
  68. data/lib/new_relic/agent/distributed_tracing/distributed_trace_metrics.rb +23 -23
  69. data/lib/new_relic/agent/distributed_tracing/distributed_trace_payload.rb +52 -54
  70. data/lib/new_relic/agent/distributed_tracing/distributed_trace_transport_type.rb +10 -11
  71. data/lib/new_relic/agent/distributed_tracing/trace_context.rb +82 -83
  72. data/lib/new_relic/agent/distributed_tracing/trace_context_payload.rb +42 -41
  73. data/lib/new_relic/agent/distributed_tracing.rb +33 -101
  74. data/lib/new_relic/agent/encoding_normalizer.rb +4 -2
  75. data/lib/new_relic/agent/error_collector.rb +105 -58
  76. data/lib/new_relic/agent/error_event_aggregator.rb +4 -5
  77. data/lib/new_relic/agent/error_filter.rb +174 -0
  78. data/lib/new_relic/agent/error_trace_aggregator.rb +9 -7
  79. data/lib/new_relic/agent/event_aggregator.rb +22 -21
  80. data/lib/new_relic/agent/event_buffer.rb +7 -8
  81. data/lib/new_relic/agent/event_listener.rb +1 -2
  82. data/lib/new_relic/agent/event_loop.rb +27 -25
  83. data/lib/new_relic/agent/external.rb +11 -44
  84. data/lib/new_relic/agent/guid_generator.rb +13 -11
  85. data/lib/new_relic/agent/harvester.rb +5 -8
  86. data/lib/new_relic/agent/heap.rb +8 -9
  87. data/lib/new_relic/agent/hostname.rb +21 -14
  88. data/lib/new_relic/agent/http_clients/abstract.rb +22 -31
  89. data/lib/new_relic/agent/http_clients/async_http_wrappers.rb +80 -0
  90. data/lib/new_relic/agent/http_clients/curb_wrappers.rb +14 -17
  91. data/lib/new_relic/agent/http_clients/ethon_wrappers.rb +109 -0
  92. data/lib/new_relic/agent/http_clients/excon_wrappers.rb +15 -17
  93. data/lib/new_relic/agent/http_clients/http_rb_wrappers.rb +7 -6
  94. data/lib/new_relic/agent/http_clients/httpclient_wrappers.rb +8 -9
  95. data/lib/new_relic/agent/http_clients/httpx_wrappers.rb +91 -0
  96. data/lib/new_relic/agent/http_clients/net_http_wrappers.rb +13 -8
  97. data/lib/new_relic/agent/http_clients/typhoeus_wrappers.rb +12 -13
  98. data/lib/new_relic/agent/http_clients/uri_util.rb +3 -5
  99. data/lib/new_relic/agent/instrumentation/action_cable_subscriber.rb +9 -22
  100. data/lib/new_relic/agent/instrumentation/action_controller_other_subscriber.rb +42 -0
  101. data/lib/new_relic/agent/instrumentation/action_controller_subscriber.rb +41 -33
  102. data/lib/new_relic/agent/instrumentation/action_dispatch.rb +31 -0
  103. data/lib/new_relic/agent/instrumentation/action_dispatch_subscriber.rb +64 -0
  104. data/lib/new_relic/agent/instrumentation/action_mailbox.rb +30 -0
  105. data/lib/new_relic/agent/instrumentation/action_mailbox_subscriber.rb +33 -0
  106. data/lib/new_relic/agent/instrumentation/action_mailer.rb +30 -0
  107. data/lib/new_relic/agent/instrumentation/action_mailer_subscriber.rb +85 -0
  108. data/lib/new_relic/agent/instrumentation/action_view_subscriber.rb +20 -21
  109. data/lib/new_relic/agent/instrumentation/active_job.rb +33 -13
  110. data/lib/new_relic/agent/instrumentation/active_job_subscriber.rb +41 -0
  111. data/lib/new_relic/agent/instrumentation/active_merchant.rb +20 -6
  112. data/lib/new_relic/agent/instrumentation/active_record.rb +41 -38
  113. data/lib/new_relic/agent/instrumentation/active_record_helper.rb +87 -75
  114. data/lib/new_relic/agent/instrumentation/active_record_notifications.rb +54 -66
  115. data/lib/new_relic/agent/instrumentation/active_record_prepend.rb +6 -6
  116. data/lib/new_relic/agent/instrumentation/active_record_subscriber.rb +30 -22
  117. data/lib/new_relic/agent/instrumentation/active_storage.rb +7 -3
  118. data/lib/new_relic/agent/instrumentation/active_storage_subscriber.rb +8 -33
  119. data/lib/new_relic/agent/instrumentation/active_support.rb +27 -0
  120. data/lib/new_relic/agent/instrumentation/active_support_broadcast_logger/chain.rb +69 -0
  121. data/lib/new_relic/agent/instrumentation/active_support_broadcast_logger/instrumentation.rb +13 -0
  122. data/lib/new_relic/agent/instrumentation/active_support_broadcast_logger/prepend.rb +37 -0
  123. data/lib/new_relic/agent/instrumentation/active_support_broadcast_logger.rb +23 -0
  124. data/lib/new_relic/agent/instrumentation/active_support_logger/chain.rb +23 -0
  125. data/lib/new_relic/agent/instrumentation/active_support_logger/instrumentation.rb +24 -0
  126. data/lib/new_relic/agent/instrumentation/active_support_logger/prepend.rb +12 -0
  127. data/lib/new_relic/agent/instrumentation/active_support_logger.rb +26 -0
  128. data/lib/new_relic/agent/instrumentation/active_support_subscriber.rb +41 -0
  129. data/lib/new_relic/agent/instrumentation/async_http/chain.rb +23 -0
  130. data/lib/new_relic/agent/instrumentation/async_http/instrumentation.rb +37 -0
  131. data/lib/new_relic/agent/instrumentation/async_http/prepend.rb +15 -0
  132. data/lib/new_relic/agent/instrumentation/async_http.rb +28 -0
  133. data/lib/new_relic/agent/instrumentation/bunny/chain.rb +45 -0
  134. data/lib/new_relic/agent/instrumentation/bunny/instrumentation.rb +159 -0
  135. data/lib/new_relic/agent/instrumentation/bunny/prepend.rb +35 -0
  136. data/lib/new_relic/agent/instrumentation/bunny.rb +11 -154
  137. data/lib/new_relic/agent/instrumentation/concurrent_ruby/chain.rb +36 -0
  138. data/lib/new_relic/agent/instrumentation/concurrent_ruby/instrumentation.rb +20 -0
  139. data/lib/new_relic/agent/instrumentation/concurrent_ruby/prepend.rb +27 -0
  140. data/lib/new_relic/agent/instrumentation/concurrent_ruby.rb +31 -0
  141. data/lib/new_relic/agent/instrumentation/controller_instrumentation.rb +74 -63
  142. data/lib/new_relic/agent/instrumentation/curb/chain.rb +91 -0
  143. data/lib/new_relic/agent/instrumentation/curb/instrumentation.rb +225 -0
  144. data/lib/new_relic/agent/instrumentation/curb/prepend.rb +61 -0
  145. data/lib/new_relic/agent/instrumentation/curb.rb +14 -246
  146. data/lib/new_relic/agent/instrumentation/custom_events.rb +12 -0
  147. data/lib/new_relic/agent/instrumentation/custom_events_subscriber.rb +38 -0
  148. data/lib/new_relic/agent/instrumentation/delayed_job/chain.rb +36 -0
  149. data/lib/new_relic/agent/instrumentation/delayed_job/instrumentation.rb +51 -0
  150. data/lib/new_relic/agent/instrumentation/delayed_job/prepend.rb +33 -0
  151. data/lib/new_relic/agent/instrumentation/delayed_job_instrumentation.rb +30 -53
  152. data/lib/new_relic/agent/instrumentation/elasticsearch/chain.rb +29 -0
  153. data/lib/new_relic/agent/instrumentation/elasticsearch/instrumentation.rb +70 -0
  154. data/lib/new_relic/agent/instrumentation/elasticsearch/prepend.rb +13 -0
  155. data/lib/new_relic/agent/instrumentation/elasticsearch.rb +31 -0
  156. data/lib/new_relic/agent/instrumentation/ethon/chain.rb +39 -0
  157. data/lib/new_relic/agent/instrumentation/ethon/instrumentation.rb +105 -0
  158. data/lib/new_relic/agent/instrumentation/ethon/prepend.rb +35 -0
  159. data/lib/new_relic/agent/instrumentation/ethon.rb +39 -0
  160. data/lib/new_relic/agent/instrumentation/excon/middleware.rb +11 -7
  161. data/lib/new_relic/agent/instrumentation/excon.rb +27 -29
  162. data/lib/new_relic/agent/instrumentation/fiber/chain.rb +27 -0
  163. data/lib/new_relic/agent/instrumentation/fiber/instrumentation.rb +20 -0
  164. data/lib/new_relic/agent/instrumentation/fiber/prepend.rb +25 -0
  165. data/lib/new_relic/agent/instrumentation/fiber.rb +25 -0
  166. data/lib/new_relic/agent/instrumentation/grape/chain.rb +24 -0
  167. data/lib/new_relic/agent/instrumentation/grape/instrumentation.rb +104 -0
  168. data/lib/new_relic/agent/instrumentation/grape/prepend.rb +17 -0
  169. data/lib/new_relic/agent/instrumentation/grape.rb +16 -117
  170. data/lib/new_relic/agent/instrumentation/grpc/client/chain.rb +97 -0
  171. data/lib/new_relic/agent/instrumentation/grpc/client/instrumentation.rb +94 -0
  172. data/lib/new_relic/agent/instrumentation/grpc/client/prepend.rb +111 -0
  173. data/lib/new_relic/agent/instrumentation/grpc/client/request_wrapper.rb +30 -0
  174. data/lib/new_relic/agent/instrumentation/grpc/helper.rb +32 -0
  175. data/lib/new_relic/agent/instrumentation/grpc/server/chain.rb +69 -0
  176. data/lib/new_relic/agent/instrumentation/grpc/server/instrumentation.rb +138 -0
  177. data/lib/new_relic/agent/instrumentation/grpc/server/rpc_desc_prepend.rb +35 -0
  178. data/lib/new_relic/agent/instrumentation/grpc/server/rpc_server_prepend.rb +26 -0
  179. data/lib/new_relic/agent/instrumentation/grpc_client.rb +23 -0
  180. data/lib/new_relic/agent/instrumentation/grpc_server.rb +25 -0
  181. data/lib/new_relic/agent/instrumentation/httpclient/chain.rb +24 -0
  182. data/lib/new_relic/agent/instrumentation/httpclient/instrumentation.rb +41 -0
  183. data/lib/new_relic/agent/instrumentation/httpclient/prepend.rb +15 -0
  184. data/lib/new_relic/agent/instrumentation/httpclient.rb +10 -32
  185. data/lib/new_relic/agent/instrumentation/httprb/chain.rb +22 -0
  186. data/lib/new_relic/agent/instrumentation/httprb/instrumentation.rb +34 -0
  187. data/lib/new_relic/agent/instrumentation/httprb/prepend.rb +15 -0
  188. data/lib/new_relic/agent/instrumentation/httprb.rb +29 -0
  189. data/lib/new_relic/agent/instrumentation/httpx/chain.rb +20 -0
  190. data/lib/new_relic/agent/instrumentation/httpx/instrumentation.rb +51 -0
  191. data/lib/new_relic/agent/instrumentation/httpx/prepend.rb +15 -0
  192. data/lib/new_relic/agent/instrumentation/httpx.rb +27 -0
  193. data/lib/new_relic/agent/instrumentation/ignore_actions.rb +5 -6
  194. data/lib/new_relic/agent/instrumentation/logger/chain.rb +21 -0
  195. data/lib/new_relic/agent/instrumentation/logger/instrumentation.rb +69 -0
  196. data/lib/new_relic/agent/instrumentation/logger/prepend.rb +13 -0
  197. data/lib/new_relic/agent/instrumentation/logger.rb +26 -0
  198. data/lib/new_relic/agent/instrumentation/memcache/chain.rb +15 -0
  199. data/lib/new_relic/agent/instrumentation/memcache/dalli.rb +59 -128
  200. data/lib/new_relic/agent/instrumentation/memcache/helper.rb +59 -0
  201. data/lib/new_relic/agent/instrumentation/memcache/instrumentation.rb +99 -0
  202. data/lib/new_relic/agent/instrumentation/memcache/prepend.rb +103 -0
  203. data/lib/new_relic/agent/instrumentation/memcache.rb +58 -74
  204. data/lib/new_relic/agent/instrumentation/middleware_proxy.rb +15 -14
  205. data/lib/new_relic/agent/instrumentation/middleware_tracing.rb +6 -8
  206. data/lib/new_relic/agent/instrumentation/mongo.rb +6 -137
  207. data/lib/new_relic/agent/instrumentation/mongodb_command_subscriber.rb +24 -23
  208. data/lib/new_relic/agent/instrumentation/net_http/chain.rb +24 -0
  209. data/lib/new_relic/agent/instrumentation/{net_prepend.rb → net_http/instrumentation.rb} +18 -14
  210. data/lib/new_relic/agent/instrumentation/net_http/prepend.rb +21 -0
  211. data/lib/new_relic/agent/instrumentation/net_http.rb +44 -0
  212. data/lib/new_relic/agent/instrumentation/notifications_subscriber.rb +56 -10
  213. data/lib/new_relic/agent/instrumentation/padrino/chain.rb +38 -0
  214. data/lib/new_relic/agent/instrumentation/padrino/instrumentation.rb +32 -0
  215. data/lib/new_relic/agent/instrumentation/padrino/prepend.rb +20 -0
  216. data/lib/new_relic/agent/instrumentation/padrino.rb +20 -58
  217. data/lib/new_relic/agent/instrumentation/passenger_instrumentation.rb +6 -6
  218. data/lib/new_relic/agent/instrumentation/queue_time.rb +9 -10
  219. data/lib/new_relic/agent/instrumentation/rack/chain.rb +66 -0
  220. data/lib/new_relic/agent/instrumentation/rack/helpers.rb +33 -0
  221. data/lib/new_relic/agent/instrumentation/rack/instrumentation.rb +81 -0
  222. data/lib/new_relic/agent/instrumentation/rack/prepend.rb +43 -0
  223. data/lib/new_relic/agent/instrumentation/rack.rb +32 -142
  224. data/lib/new_relic/agent/instrumentation/rails3/action_controller.rb +25 -56
  225. data/lib/new_relic/agent/instrumentation/rails_middleware.rb +4 -4
  226. data/lib/new_relic/agent/instrumentation/rails_notifications/action_cable.rb +9 -8
  227. data/lib/new_relic/agent/instrumentation/rails_notifications/action_controller.rb +18 -5
  228. data/lib/new_relic/agent/instrumentation/rails_notifications/action_view.rb +8 -5
  229. data/lib/new_relic/agent/instrumentation/rails_notifications/custom_events.rb +30 -0
  230. data/lib/new_relic/agent/instrumentation/rake/chain.rb +20 -0
  231. data/lib/new_relic/agent/instrumentation/rake/instrumentation.rb +146 -0
  232. data/lib/new_relic/agent/instrumentation/rake/prepend.rb +14 -0
  233. data/lib/new_relic/agent/instrumentation/rake.rb +17 -158
  234. data/lib/new_relic/agent/instrumentation/redis/chain.rb +45 -0
  235. data/lib/new_relic/agent/instrumentation/redis/constants.rb +17 -0
  236. data/lib/new_relic/agent/instrumentation/redis/instrumentation.rb +98 -0
  237. data/lib/new_relic/agent/instrumentation/redis/middleware.rb +16 -0
  238. data/lib/new_relic/agent/instrumentation/redis/prepend.rb +29 -0
  239. data/lib/new_relic/agent/instrumentation/redis.rb +19 -108
  240. data/lib/new_relic/agent/instrumentation/resque/chain.rb +21 -0
  241. data/lib/new_relic/agent/instrumentation/resque/helper.rb +19 -0
  242. data/lib/new_relic/agent/instrumentation/resque/instrumentation.rb +38 -0
  243. data/lib/new_relic/agent/instrumentation/resque/prepend.rb +15 -0
  244. data/lib/new_relic/agent/instrumentation/resque.rb +32 -43
  245. data/lib/new_relic/agent/instrumentation/roda/chain.rb +43 -0
  246. data/lib/new_relic/agent/instrumentation/roda/ignorer.rb +45 -0
  247. data/lib/new_relic/agent/instrumentation/roda/instrumentation.rb +68 -0
  248. data/lib/new_relic/agent/instrumentation/roda/prepend.rb +24 -0
  249. data/lib/new_relic/agent/instrumentation/roda/roda_transaction_namer.rb +29 -0
  250. data/lib/new_relic/agent/instrumentation/roda.rb +36 -0
  251. data/lib/new_relic/agent/instrumentation/sequel.rb +16 -19
  252. data/lib/new_relic/agent/instrumentation/sequel_helper.rb +12 -12
  253. data/lib/new_relic/agent/instrumentation/sidekiq/client.rb +24 -0
  254. data/lib/new_relic/agent/instrumentation/sidekiq/extensions/delayed_class.rb +30 -0
  255. data/lib/new_relic/agent/instrumentation/sidekiq/server.rb +60 -0
  256. data/lib/new_relic/agent/instrumentation/sidekiq.rb +27 -65
  257. data/lib/new_relic/agent/instrumentation/sinatra/chain.rb +55 -0
  258. data/lib/new_relic/agent/instrumentation/sinatra/ignorer.rb +30 -36
  259. data/lib/new_relic/agent/instrumentation/sinatra/instrumentation.rb +130 -0
  260. data/lib/new_relic/agent/instrumentation/sinatra/prepend.rb +33 -0
  261. data/lib/new_relic/agent/instrumentation/sinatra/transaction_namer.rb +4 -6
  262. data/lib/new_relic/agent/instrumentation/sinatra.rb +34 -163
  263. data/lib/new_relic/agent/instrumentation/stripe.rb +28 -0
  264. data/lib/new_relic/agent/instrumentation/stripe_subscriber.rb +77 -0
  265. data/lib/new_relic/agent/instrumentation/thread/chain.rb +24 -0
  266. data/lib/new_relic/agent/instrumentation/thread/instrumentation.rb +24 -0
  267. data/lib/new_relic/agent/instrumentation/thread/prepend.rb +22 -0
  268. data/lib/new_relic/agent/instrumentation/thread.rb +20 -0
  269. data/lib/new_relic/agent/instrumentation/tilt/chain.rb +24 -0
  270. data/lib/new_relic/agent/instrumentation/tilt/instrumentation.rb +46 -0
  271. data/lib/new_relic/agent/instrumentation/tilt/prepend.rb +13 -0
  272. data/lib/new_relic/agent/instrumentation/tilt.rb +25 -0
  273. data/lib/new_relic/agent/instrumentation/typhoeus/chain.rb +22 -0
  274. data/lib/new_relic/agent/instrumentation/typhoeus/instrumentation.rb +84 -0
  275. data/lib/new_relic/agent/instrumentation/typhoeus/prepend.rb +14 -0
  276. data/lib/new_relic/agent/instrumentation/typhoeus.rb +12 -91
  277. data/lib/new_relic/agent/instrumentation/view_component/chain.rb +21 -0
  278. data/lib/new_relic/agent/instrumentation/view_component/instrumentation.rb +39 -0
  279. data/lib/new_relic/agent/instrumentation/view_component/prepend.rb +13 -0
  280. data/lib/new_relic/agent/instrumentation/view_component.rb +26 -0
  281. data/lib/new_relic/agent/instrumentation.rb +1 -1
  282. data/lib/new_relic/agent/internal_agent_error.rb +2 -2
  283. data/lib/new_relic/agent/javascript_instrumentor.rb +58 -48
  284. data/lib/new_relic/agent/linking_metadata.rb +44 -0
  285. data/lib/new_relic/agent/local_log_decorator.rb +37 -0
  286. data/lib/new_relic/agent/log_event_aggregator.rb +282 -0
  287. data/lib/new_relic/agent/log_event_attributes.rb +115 -0
  288. data/lib/new_relic/agent/log_once.rb +1 -1
  289. data/lib/new_relic/agent/log_priority.rb +20 -0
  290. data/lib/new_relic/agent/logging.rb +95 -52
  291. data/lib/new_relic/agent/memory_logger.rb +2 -2
  292. data/lib/new_relic/agent/messaging.rb +72 -86
  293. data/lib/new_relic/agent/method_tracer.rb +159 -154
  294. data/lib/new_relic/agent/method_tracer_helpers.rb +109 -11
  295. data/lib/new_relic/agent/monitors/cross_app_monitor.rb +26 -19
  296. data/lib/new_relic/agent/monitors/distributed_tracing_monitor.rb +5 -4
  297. data/lib/new_relic/agent/monitors/inbound_request_monitor.rb +1 -2
  298. data/lib/new_relic/agent/monitors/synthetics_monitor.rb +17 -9
  299. data/lib/new_relic/agent/monitors.rb +6 -7
  300. data/lib/new_relic/agent/new_relic_service/encoders.rb +9 -9
  301. data/lib/new_relic/agent/new_relic_service/json_marshaller.rb +6 -6
  302. data/lib/new_relic/agent/new_relic_service/marshaller.rb +2 -2
  303. data/lib/new_relic/agent/new_relic_service/security_policy_settings.rb +4 -4
  304. data/lib/new_relic/agent/new_relic_service.rb +282 -213
  305. data/lib/new_relic/agent/{noticible_error.rb → noticeable_error.rb} +2 -5
  306. data/lib/new_relic/agent/null_logger.rb +7 -3
  307. data/lib/new_relic/agent/obfuscator.rb +7 -11
  308. data/lib/new_relic/agent/parameter_filtering.rb +29 -15
  309. data/lib/new_relic/agent/payload_metric_mapping.rb +9 -10
  310. data/lib/new_relic/agent/pipe_channel_manager.rb +34 -23
  311. data/lib/new_relic/agent/pipe_service.rb +13 -8
  312. data/lib/new_relic/agent/prepend_supportability.rb +2 -2
  313. data/lib/new_relic/agent/priority_sampled_buffer.rb +9 -12
  314. data/lib/new_relic/agent/rules_engine/replacement_rule.rb +11 -11
  315. data/lib/new_relic/agent/rules_engine/segment_terms_rule.rb +12 -14
  316. data/lib/new_relic/agent/rules_engine.rb +6 -5
  317. data/lib/new_relic/agent/sampler.rb +5 -5
  318. data/lib/new_relic/agent/sampler_collection.rb +4 -5
  319. data/lib/new_relic/agent/samplers/cpu_sampler.rb +8 -7
  320. data/lib/new_relic/agent/samplers/delayed_job_sampler.rb +20 -17
  321. data/lib/new_relic/agent/samplers/memory_sampler.rb +32 -21
  322. data/lib/new_relic/agent/samplers/object_sampler.rb +2 -2
  323. data/lib/new_relic/agent/samplers/vm_sampler.rb +21 -19
  324. data/lib/new_relic/agent/span_event_aggregator.rb +15 -15
  325. data/lib/new_relic/agent/span_event_primitive.rb +77 -59
  326. data/lib/new_relic/agent/sql_sampler.rb +20 -21
  327. data/lib/new_relic/agent/stats.rb +79 -42
  328. data/lib/new_relic/agent/stats_engine/gc_profiler.rb +9 -11
  329. data/lib/new_relic/agent/stats_engine/stats_hash.rb +12 -13
  330. data/lib/new_relic/agent/stats_engine.rb +8 -8
  331. data/lib/new_relic/agent/synthetics_event_aggregator.rb +8 -9
  332. data/lib/new_relic/agent/system_info.rb +113 -67
  333. data/lib/new_relic/agent/threading/agent_thread.rb +18 -14
  334. data/lib/new_relic/agent/threading/backtrace_node.rb +12 -13
  335. data/lib/new_relic/agent/threading/backtrace_service.rb +17 -21
  336. data/lib/new_relic/agent/threading/thread_profile.rb +24 -24
  337. data/lib/new_relic/agent/timestamp_sampled_buffer.rb +2 -2
  338. data/lib/new_relic/agent/tracer.rb +101 -96
  339. data/lib/new_relic/agent/transaction/abstract_segment.rb +176 -52
  340. data/lib/new_relic/agent/transaction/datastore_segment.rb +22 -18
  341. data/lib/new_relic/agent/transaction/distributed_tracer.rb +65 -57
  342. data/lib/new_relic/agent/transaction/distributed_tracing.rb +46 -48
  343. data/lib/new_relic/agent/transaction/external_request_segment.rb +52 -39
  344. data/lib/new_relic/agent/transaction/message_broker_segment.rb +31 -37
  345. data/lib/new_relic/agent/transaction/request_attributes.rb +78 -42
  346. data/lib/new_relic/agent/transaction/segment.rb +20 -10
  347. data/lib/new_relic/agent/transaction/slowest_sample_buffer.rb +1 -3
  348. data/lib/new_relic/agent/transaction/synthetics_sample_buffer.rb +2 -2
  349. data/lib/new_relic/agent/transaction/trace.rb +16 -12
  350. data/lib/new_relic/agent/transaction/trace_builder.rb +10 -10
  351. data/lib/new_relic/agent/transaction/trace_context.rb +35 -35
  352. data/lib/new_relic/agent/transaction/trace_node.rb +30 -28
  353. data/lib/new_relic/agent/transaction/tracing.rb +32 -13
  354. data/lib/new_relic/agent/transaction/transaction_sample_buffer.rb +6 -6
  355. data/lib/new_relic/agent/transaction.rb +229 -178
  356. data/lib/new_relic/agent/transaction_error_primitive.rb +43 -25
  357. data/lib/new_relic/agent/transaction_event_aggregator.rb +16 -16
  358. data/lib/new_relic/agent/transaction_event_primitive.rb +51 -33
  359. data/lib/new_relic/agent/transaction_event_recorder.rb +16 -15
  360. data/lib/new_relic/agent/transaction_metrics.rb +10 -9
  361. data/lib/new_relic/agent/transaction_sampler.rb +7 -8
  362. data/lib/new_relic/agent/transaction_time_aggregator.rb +32 -27
  363. data/lib/new_relic/agent/utilization/aws.rb +34 -4
  364. data/lib/new_relic/agent/utilization/azure.rb +6 -6
  365. data/lib/new_relic/agent/utilization/gcp.rb +11 -13
  366. data/lib/new_relic/agent/utilization/pcf.rb +6 -5
  367. data/lib/new_relic/agent/utilization/vendor.rb +45 -32
  368. data/lib/new_relic/agent/utilization_data.rb +7 -5
  369. data/lib/new_relic/agent/vm/c_ruby_vm.rb +99 -0
  370. data/lib/new_relic/agent/vm/jruby_vm.rb +1 -1
  371. data/lib/new_relic/agent/vm/monotonic_gc_profiler.rb +3 -3
  372. data/lib/new_relic/agent/vm/snapshot.rb +5 -5
  373. data/lib/new_relic/agent/vm.rb +3 -3
  374. data/lib/new_relic/agent/worker_loop.rb +10 -12
  375. data/lib/new_relic/agent.rb +204 -111
  376. data/lib/new_relic/base64.rb +25 -0
  377. data/lib/new_relic/cli/command.rb +26 -25
  378. data/lib/new_relic/cli/commands/deployments.rb +100 -49
  379. data/lib/new_relic/cli/commands/install.rb +31 -34
  380. data/lib/new_relic/coerce.rb +15 -13
  381. data/lib/new_relic/collection_helper.rb +50 -48
  382. data/lib/new_relic/constants.rb +13 -12
  383. data/lib/new_relic/control/class_methods.rb +6 -12
  384. data/lib/new_relic/control/frameworks/external.rb +2 -2
  385. data/lib/new_relic/control/frameworks/rails.rb +60 -30
  386. data/lib/new_relic/control/frameworks/rails3.rb +3 -4
  387. data/lib/new_relic/control/frameworks/rails4.rb +1 -1
  388. data/lib/new_relic/control/frameworks/rails_notifications.rb +1 -1
  389. data/lib/new_relic/control/frameworks/roda.rb +20 -0
  390. data/lib/new_relic/control/frameworks/ruby.rb +3 -3
  391. data/lib/new_relic/control/frameworks/sinatra.rb +7 -1
  392. data/lib/new_relic/control/frameworks.rb +1 -1
  393. data/lib/new_relic/control/instance_methods.rb +27 -45
  394. data/lib/new_relic/control/instrumentation.rb +25 -11
  395. data/lib/new_relic/control/private_instance_methods.rb +48 -0
  396. data/lib/new_relic/control/server_methods.rb +3 -4
  397. data/lib/new_relic/control.rb +1 -2
  398. data/lib/new_relic/delayed_job_injection.rb +1 -1
  399. data/lib/new_relic/dependency_detection.rb +141 -32
  400. data/lib/new_relic/environment_report.rb +41 -33
  401. data/lib/new_relic/helper.rb +49 -7
  402. data/lib/new_relic/language_support.rb +39 -6
  403. data/lib/new_relic/latest_changes.rb +10 -9
  404. data/lib/new_relic/local_environment.rb +42 -37
  405. data/lib/new_relic/metric_data.rb +31 -26
  406. data/lib/new_relic/metric_spec.rb +8 -6
  407. data/lib/new_relic/noticed_error.rb +43 -46
  408. data/lib/new_relic/rack/agent_hooks.rb +2 -2
  409. data/lib/new_relic/rack/agent_middleware.rb +3 -17
  410. data/lib/new_relic/rack/browser_monitoring.rb +135 -121
  411. data/lib/new_relic/rack.rb +1 -1
  412. data/lib/new_relic/recipes/capistrano3.rb +4 -62
  413. data/lib/new_relic/recipes/capistrano_legacy.rb +24 -27
  414. data/lib/new_relic/recipes/helpers/send_deployment.rb +70 -0
  415. data/lib/new_relic/recipes.rb +1 -1
  416. data/lib/new_relic/supportability_helper.rb +14 -12
  417. data/lib/new_relic/traced_thread.rb +38 -0
  418. data/lib/new_relic/version.rb +6 -17
  419. data/lib/newrelic_rpm.rb +20 -33
  420. data/lib/sequel/extensions/{newrelic_instrumentation.rb → new_relic_instrumentation.rb} +18 -21
  421. data/lib/sequel/plugins/{newrelic_instrumentation.rb → new_relic_instrumentation.rb} +9 -15
  422. data/lib/tasks/all.rb +3 -3
  423. data/lib/tasks/bump_version.rake +21 -0
  424. data/lib/tasks/config.rake +25 -119
  425. data/lib/tasks/coverage_report.rake +28 -0
  426. data/lib/tasks/helpers/config.html.erb +114 -0
  427. data/lib/tasks/helpers/format.rb +127 -0
  428. data/lib/tasks/helpers/matches.rb +12 -0
  429. data/lib/tasks/helpers/newrelicyml.rb +144 -0
  430. data/lib/tasks/helpers/prompt.rb +24 -0
  431. data/lib/tasks/helpers/version_bump.rb +62 -0
  432. data/lib/tasks/install.rake +8 -4
  433. data/lib/tasks/instrumentation_generator/README.md +63 -0
  434. data/lib/tasks/instrumentation_generator/TODO.md +33 -0
  435. data/lib/tasks/instrumentation_generator/instrumentation.thor +121 -0
  436. data/lib/tasks/instrumentation_generator/templates/Envfile.tt +9 -0
  437. data/lib/tasks/instrumentation_generator/templates/chain.tt +21 -0
  438. data/lib/tasks/instrumentation_generator/templates/chain_method.tt +7 -0
  439. data/lib/tasks/instrumentation_generator/templates/dependency_detection.tt +29 -0
  440. data/lib/tasks/instrumentation_generator/templates/instrumentation.tt +13 -0
  441. data/lib/tasks/instrumentation_generator/templates/instrumentation_method.tt +3 -0
  442. data/lib/tasks/instrumentation_generator/templates/newrelic.yml.tt +19 -0
  443. data/lib/tasks/instrumentation_generator/templates/prepend.tt +13 -0
  444. data/lib/tasks/instrumentation_generator/templates/prepend_method.tt +3 -0
  445. data/lib/tasks/instrumentation_generator/templates/test.tt +15 -0
  446. data/lib/tasks/newrelic.rb +2 -1
  447. data/lib/tasks/newrelicyml.rake +13 -0
  448. data/lib/tasks/tests.rake +83 -17
  449. data/newrelic.yml +790 -4
  450. data/newrelic_rpm.gemspec +52 -43
  451. data/recipes/newrelic.rb +2 -2
  452. data/test/agent_helper.rb +252 -198
  453. metadata +275 -95
  454. data/.gitignore +0 -37
  455. data/.project +0 -23
  456. data/.yardopts +0 -26
  457. data/Guardfile +0 -25
  458. data/ROADMAP.md +0 -24
  459. data/bin/mongrel_rpm +0 -33
  460. data/bin/newrelic_cmd +0 -5
  461. data/cert/cacert.pem +0 -1177
  462. data/config/database.yml +0 -5
  463. data/config.dot +0 -278
  464. data/lib/new_relic/agent/datastores/mongo/obfuscator.rb +0 -44
  465. data/lib/new_relic/agent/datastores/mongo/statement_formatter.rb +0 -53
  466. data/lib/new_relic/agent/instrumentation/acts_as_solr.rb +0 -75
  467. data/lib/new_relic/agent/instrumentation/authlogic.rb +0 -25
  468. data/lib/new_relic/agent/instrumentation/data_mapper.rb +0 -204
  469. data/lib/new_relic/agent/instrumentation/excon/connection.rb +0 -49
  470. data/lib/new_relic/agent/instrumentation/http.rb +0 -49
  471. data/lib/new_relic/agent/instrumentation/merb/controller.rb +0 -44
  472. data/lib/new_relic/agent/instrumentation/merb/errors.rb +0 -33
  473. data/lib/new_relic/agent/instrumentation/net.rb +0 -70
  474. data/lib/new_relic/agent/instrumentation/rails/action_controller.rb +0 -125
  475. data/lib/new_relic/agent/instrumentation/rails/action_web_service.rb +0 -46
  476. data/lib/new_relic/agent/instrumentation/rainbows_instrumentation.rb +0 -26
  477. data/lib/new_relic/agent/instrumentation/sunspot.rb +0 -33
  478. data/lib/new_relic/agent/range_extensions.rb +0 -47
  479. data/lib/new_relic/agent/supported_versions.rb +0 -275
  480. data/lib/new_relic/agent/vm/mri_vm.rb +0 -81
  481. data/lib/new_relic/control/frameworks/merb.rb +0 -29
  482. data/lib/tasks/config.html.erb +0 -32
  483. data/lib/tasks/multiverse.rake +0 -2
  484. data/lib/tasks/multiverse.rb +0 -104
  485. /data/lib/tasks/{config.text.erb → helpers/config.text.erb} +0 -0
@@ -1,20 +1,33 @@
1
- # encoding: utf-8
2
1
  # This file is distributed under New Relic's license terms.
3
2
  # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details.
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
9
10
  module Configuration
10
-
11
11
  # Helper since default Procs are evaluated in the context of this module
12
12
  def self.value_of(key)
13
- Proc.new do
13
+ proc do
14
14
  NewRelic::Agent.config[key]
15
15
  end
16
16
  end
17
17
 
18
+ def self.instrumentation_value_from_boolean(key)
19
+ proc do
20
+ NewRelic::Agent.config[key] ? 'auto' : 'disabled'
21
+ end
22
+ end
23
+
24
+ # Marks the config option as deprecated in the documentation once generated.
25
+ # Does not appear in logs.
26
+ def self.deprecated_description(new_setting, description)
27
+ link_ref = new_setting.to_s.tr('.', '-')
28
+ %{Please see: [#{new_setting}](##{link_ref}). \n\n#{description}}
29
+ end
30
+
18
31
  class Boolean
19
32
  def self.===(o)
20
33
  TrueClass === o or FalseClass === o
@@ -44,34 +57,35 @@ module NewRelic
44
57
  default_settings[:transform] if default_settings
45
58
  end
46
59
 
47
- def self.config_search_paths
48
- Proc.new {
49
- paths = [
50
- File.join("config","newrelic.yml"),
51
- File.join("newrelic.yml"),
52
- File.join("config","newrelic.yml.erb"),
53
- File.join("newrelic.yml.erb")
54
- ]
60
+ def self.config_search_paths # rubocop:disable Metrics/AbcSize
61
+ proc {
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]
55
68
 
56
69
  if NewRelic::Control.instance.root
57
- paths << File.join(NewRelic::Control.instance.root, "config", "newrelic.yml")
58
- paths << File.join(NewRelic::Control.instance.root, "newrelic.yml")
59
- paths << File.join(NewRelic::Control.instance.root, "config", "newrelic.yml.erb")
60
- 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)
61
74
  end
62
75
 
63
- if ENV["HOME"]
64
- paths << File.join(ENV["HOME"], ".newrelic", "newrelic.yml")
65
- paths << File.join(ENV["HOME"], "newrelic.yml")
66
- paths << File.join(ENV["HOME"], ".newrelic", "newrelic.yml.erb")
67
- paths << File.join(ENV["HOME"], "newrelic.yml.erb")
76
+ if ENV['HOME']
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)
68
81
  end
69
82
 
70
83
  # If we're packaged for warbler, we can tell from GEM_HOME
71
- if ENV["GEM_HOME"] && ENV["GEM_HOME"].end_with?(".jar!")
72
- app_name = File.basename(ENV["GEM_HOME"], ".jar!")
73
- paths << File.join(ENV["GEM_HOME"], app_name, "config", "newrelic.yml")
74
- 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)
75
89
  end
76
90
 
77
91
  paths
@@ -79,31 +93,30 @@ module NewRelic
79
93
  end
80
94
 
81
95
  def self.config_path
82
- Proc.new {
96
+ proc {
83
97
  found_path = NewRelic::Agent.config[:config_search_paths].detect do |file|
84
- File.expand_path(file) if File.exist? file
98
+ File.expand_path(file) if File.exist?(file)
85
99
  end
86
- found_path || ""
100
+ found_path || NewRelic::EMPTY_STR
87
101
  }
88
102
  end
89
103
 
90
104
  def self.framework
91
- Proc.new {
105
+ proc {
92
106
  case
93
107
  when defined?(::NewRelic::TEST) then :test
94
- when defined?(::Merb) && defined?(::Merb::Plugins) then :merb
95
108
  when defined?(::Rails::VERSION)
96
109
  case Rails::VERSION::MAJOR
97
- when 0..2
98
- :rails
99
110
  when 3
100
111
  :rails3
101
- when 4..6
112
+ when 4..7
102
113
  :rails_notifications
103
114
  else
104
- ::NewRelic::Agent.logger.error "Detected unsupported Rails version #{Rails::VERSION::STRING}"
115
+ ::NewRelic::Agent.logger.warn("Detected untested Rails version #{Rails::VERSION::STRING}")
116
+ :rails_notifications
105
117
  end
106
118
  when defined?(::Sinatra) && defined?(::Sinatra::Base) then :sinatra
119
+ when defined?(::Roda) then :roda
107
120
  when defined?(::NewRelic::IA) then :external
108
121
  else :ruby
109
122
  end
@@ -111,19 +124,19 @@ module NewRelic
111
124
  end
112
125
 
113
126
  def self.agent_enabled
114
- Proc.new {
127
+ proc {
115
128
  NewRelic::Agent.config[:enabled] &&
116
- (NewRelic::Agent.config[:test_mode] || NewRelic::Agent.config[:monitor_mode]) &&
117
- NewRelic::Agent::Autostart.agent_should_start?
129
+ (NewRelic::Agent.config[:test_mode] || NewRelic::Agent.config[:monitor_mode]) &&
130
+ NewRelic::Agent::Autostart.agent_should_start?
118
131
  }
119
132
  end
120
133
 
121
134
  DEFAULT_LOG_DIR = 'log/'.freeze
122
135
 
123
136
  def self.audit_log_path
124
- Proc.new {
137
+ proc {
125
138
  log_file_path = NewRelic::Agent.config[:log_file_path]
126
- wants_stdout = (log_file_path.upcase == 'STDOUT')
139
+ wants_stdout = (log_file_path.casecmp(NewRelic::STANDARD_OUT) == 0)
127
140
  audit_log_dir = wants_stdout ? DEFAULT_LOG_DIR : log_file_path
128
141
 
129
142
  File.join(audit_log_dir, 'newrelic_audit.log')
@@ -131,30 +144,23 @@ module NewRelic
131
144
  end
132
145
 
133
146
  def self.app_name
134
- Proc.new { NewRelic::Control.instance.env }
147
+ proc { NewRelic::Control.instance.env }
135
148
  end
136
149
 
137
150
  def self.dispatcher
138
- Proc.new { NewRelic::Control.instance.local_env.discovered_dispatcher }
151
+ proc { NewRelic::Control.instance.local_env.discovered_dispatcher }
139
152
  end
140
153
 
141
154
  def self.thread_profiler_enabled
142
- Proc.new { NewRelic::Agent::Threading::BacktraceService.is_supported? }
143
- end
144
-
145
- # This check supports the js_errors_beta key we've asked clients to
146
- # set. Once JS errors are GA, browser_monitoring.loader can stop
147
- # being dynamic.
148
- def self.browser_monitoring_loader
149
- Proc.new { NewRelic::Agent.config[:js_errors_beta] ? "full" : "rum"}
155
+ proc { NewRelic::Agent::Threading::BacktraceService.is_supported? }
150
156
  end
151
157
 
152
158
  def self.transaction_tracer_transaction_threshold
153
- Proc.new { NewRelic::Agent.config[:apdex_t] * 4 }
159
+ proc { NewRelic::Agent.config[:apdex_t] * 4 }
154
160
  end
155
161
 
156
162
  def self.profiling_available
157
- Proc.new {
163
+ proc {
158
164
  begin
159
165
  require 'ruby-prof'
160
166
  true
@@ -165,7 +171,7 @@ module NewRelic
165
171
  end
166
172
 
167
173
  def self.host
168
- Proc.new do
174
+ proc do
169
175
  regex = /\A(?<identifier>.+?)x/
170
176
  if matches = regex.match(String(NewRelic::Agent.config[:license_key]))
171
177
  "collector.#{matches['identifier']}.nr-data.net"
@@ -176,12 +182,16 @@ module NewRelic
176
182
  end
177
183
 
178
184
  def self.api_host
179
- Proc.new do
180
- if String(NewRelic::Agent.config[:license_key]).start_with? 'eu'
181
- 'rpm.eu.newrelic.com'
185
+ # only used for deployment task
186
+ proc do
187
+ api_version = if NewRelic::Agent.config[:api_key].nil? || NewRelic::Agent.config[:api_key].empty?
188
+ 'rpm'
182
189
  else
183
- 'rpm.newrelic.com'
190
+ 'api'
184
191
  end
192
+ api_region = 'eu.' if String(NewRelic::Agent.config[:license_key]).start_with?('eu')
193
+
194
+ "#{api_version}.#{api_region}newrelic.com"
185
195
  end
186
196
  end
187
197
 
@@ -203,31 +213,45 @@ module NewRelic
203
213
  end
204
214
  end
205
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
+
206
232
  SEMICOLON = ';'.freeze
207
- def self.convert_to_list_on_semicolon value
233
+ def self.convert_to_list_on_semicolon(value)
208
234
  case value
209
235
  when Array then value
210
236
  when String then value.split(SEMICOLON)
211
- else []
237
+ else NewRelic::EMPTY_ARRAY
212
238
  end
213
239
  end
214
240
 
215
241
  def self.convert_to_constant_list(raw_value)
216
- const_names = convert_to_list(raw_value)
217
- const_names.map! do |class_name|
218
- const = ::NewRelic::LanguageSupport.constantize(class_name)
219
-
220
- unless const
221
- NewRelic::Agent.logger.warn("Ignoring unrecognized constant '#{class_name}' in #{raw_value}")
222
- end
242
+ return NewRelic::EMPTY_ARRAY if raw_value.nil? || raw_value.empty?
223
243
 
244
+ constants = convert_to_list(raw_value).map! do |class_name|
245
+ const = ::NewRelic::LanguageSupport.constantize(class_name)
246
+ NewRelic::Agent.logger.warn("Ignoring invalid constant '#{class_name}' in #{raw_value}") unless const
224
247
  const
225
248
  end
226
- const_names.compact
249
+ constants.compact!
250
+ constants
227
251
  end
228
252
 
229
253
  def self.enforce_fallback(allowed_values: nil, fallback: nil)
230
- Proc.new do |configured_value|
254
+ proc do |configured_value|
231
255
  if allowed_values.any? { |v| v =~ /#{configured_value}/i }
232
256
  configured_value
233
257
  else
@@ -289,28 +313,16 @@ module NewRelic
289
313
  'webpacker:compile'
290
314
  ].join(',').freeze
291
315
 
316
+ # rubocop:disable Metrics/CollectionLiteralLength
292
317
  DEFAULTS = {
293
- :license_key => {
294
- :default => '',
295
- :public => true,
296
- :type => String,
297
- :allowed_from_server => false,
298
- :description => 'Your New Relic <a href="https://docs.newrelic.com/docs/accounts-partnerships/accounts/account-setup/license-key">license key</a>.'
299
- },
318
+ # Critical
300
319
  :agent_enabled => {
301
320
  :default => DefaultSource.agent_enabled,
321
+ :documentation_default => true,
302
322
  :public => true,
303
323
  :type => Boolean,
304
324
  :allowed_from_server => false,
305
- :description => 'If <code>true</code>, allows the Ruby agent to run.'
306
- },
307
- :enabled => {
308
- :default => true,
309
- :public => false,
310
- :type => Boolean,
311
- :aliases => [:enable],
312
- :allowed_from_server => false,
313
- :description => 'Enable or disable the agent.'
325
+ :description => 'If `true`, allows the Ruby agent to run.'
314
326
  },
315
327
  :app_name => {
316
328
  :default => DefaultSource.app_name,
@@ -318,1590 +330,1943 @@ module NewRelic
318
330
  :type => String,
319
331
  :allowed_from_server => false,
320
332
  :transform => DefaultSource.method(:convert_to_list_on_semicolon),
321
- :description => 'Specify the <a href="https://docs.newrelic.com/docs/apm/new-relic-apm/installation-configuration/name-your-application">application name</a> used to aggregate data in the New Relic UI. To report data to <a href="https://docs.newrelic.com/docs/apm/new-relic-apm/installation-configuration/using-multiple-names-app">multiple apps at the same time</a>, specify a list of names separated by a semicolon <code>;</code>. For example, <code>MyApp</code> or <code>MyStagingApp;Instance1</code>.'
333
+ :description => 'Specify the [application name](/docs/apm/new-relic-apm/installation-configuration/name-your-application) used to aggregate data in the New Relic UI. To report data to [multiple apps at the same time](/docs/apm/new-relic-apm/installation-configuration/using-multiple-names-app), specify a list of names separated by a semicolon `;`. For example, `MyApp` or `MyStagingApp;Instance1`.'
322
334
  },
323
- :entity_guid => {
324
- :default => nil,
325
- :allow_nil => true,
335
+ :license_key => {
336
+ :default => '',
326
337
  :public => true,
327
338
  :type => String,
328
- :allowed_from_server => true,
329
- :description => 'The <a href="https://docs.newrelic.com/attribute-dictionary/span/entityguid">Entity GUID</a> for the entity running this agent.'
330
- },
331
- :monitor_mode => {
332
- :default => value_of(:enabled),
333
- :public => true,
334
- :type => Boolean,
335
- :allowed_from_server => false,
336
- :description => 'When <code>true</code>, the agent transmits data about your app to the New Relic <a href="https://docs.newrelic.com/docs/apm/new-relic-apm/getting-started/glossary#collector">collector</a>.'
337
- },
338
- :test_mode => {
339
- :default => false,
340
- :public => false,
341
- :type => Boolean,
342
339
  :allowed_from_server => false,
343
- :description => 'Used in tests for agent to start up but not connect to collector. Formerly used <code>developer_mode</code> in test config for this purpose.'
340
+ :exclude_from_reported_settings => true,
341
+ :description => 'Your New Relic <InlinePopover type="licenseKey" />.'
344
342
  },
345
343
  :log_level => {
346
344
  :default => 'info',
347
345
  :public => true,
348
346
  :type => String,
349
347
  :allowed_from_server => false,
350
- :description => 'Sets the level of detail of log messages. Possible log levels, in increasing verbosity, are: <code>error</code>, <code>warn</code>, <code>info</code> or <code>debug</code>.'
348
+ :description => 'Sets the level of detail of log messages. Possible log levels, in increasing verbosity, are: `error`, `warn`, `info` or `debug`.'
351
349
  },
352
- :high_security => {
353
- :default => false,
350
+ # General
351
+ :active_support_custom_events_names => {
352
+ :default => [],
354
353
  :public => true,
355
- :type => Boolean,
354
+ :type => Array,
356
355
  :allowed_from_server => false,
357
- :description => 'If <code>true</code>, enables <a href="https://docs.newrelic.com/docs/accounts-partnerships/accounts/security/high-security">high security mode</a>. Ensure you understand the implications of high security mode before enabling this setting.'
356
+ :description => <<~DESCRIPTION
357
+ An array of ActiveSupport custom event names to subscribe to and instrument. For example,
358
+ - one.custom.event
359
+ - another.event
360
+ - a.third.event
361
+ DESCRIPTION
358
362
  },
359
- :security_policies_token => {
360
- :default => '',
361
- :public => true,
362
- :type => String,
363
- :allowed_from_server => false,
364
- :description => 'Applies Language Agent Security Policy settings.'
363
+ # this is only set via server side config
364
+ :apdex_t => {
365
+ :default => 0.5,
366
+ :public => false,
367
+ :type => Float,
368
+ :allowed_from_server => true,
369
+ :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).'
365
370
  },
366
- :proxy_host => {
367
- :default => nil,
368
- :allow_nil => true,
371
+ :api_key => {
372
+ :default => '',
369
373
  :public => true,
370
374
  :type => String,
371
375
  :allowed_from_server => false,
372
- :description => 'Defines a host for communicating with the New Relic <a href="https://docs.newrelic.com/docs/apm/new-relic-apm/getting-started/glossary#collector">collector</a> via a proxy server.'
376
+ :description => 'Your New Relic <InlinePopover type="userKey" />. Required when using the New Relic REST API v2 to record deployments using the `newrelic deployments` command.'
373
377
  },
374
- :proxy_port => {
375
- :default => 8080,
376
- :allow_nil => true,
378
+ :backport_fast_active_record_connection_lookup => {
379
+ :default => false,
377
380
  :public => true,
378
- :type => Integer,
381
+ :type => Boolean,
379
382
  :allowed_from_server => false,
380
- :description => 'Defines a port for communicating with the New Relic <a href="https://docs.newrelic.com/docs/apm/new-relic-apm/getting-started/glossary#collector">collector</a> via a proxy server.'
383
+ :description => 'Backports the faster ActiveRecord connection lookup introduced in Rails 6, which improves agent performance when instrumenting ActiveRecord. Note that this setting may not be compatible with other gems that patch ActiveRecord.'
381
384
  },
382
- :proxy_user => {
385
+ :ca_bundle_path => {
383
386
  :default => nil,
384
387
  :allow_nil => true,
385
388
  :public => true,
386
389
  :type => String,
387
390
  :allowed_from_server => false,
388
- :exclude_from_reported_settings => true,
389
- :description => 'Defines a user for communicating with the New Relic <a href="https://docs.newrelic.com/docs/apm/new-relic-apm/getting-started/glossary#collector">collector</a> via a proxy server.'
391
+ :description => "Manual override for the path to your local CA bundle. This CA bundle will be used to validate the SSL certificate presented by New Relic's data collection service."
390
392
  },
391
- :proxy_pass => {
392
- :default => nil,
393
- :allow_nil => true,
393
+ :capture_memcache_keys => {
394
+ :default => false,
394
395
  :public => true,
395
- :type => String,
396
- :allowed_from_server => false,
397
- :exclude_from_reported_settings => true,
398
- :description => 'Defines a password for communicating with the New Relic <a href="https://docs.newrelic.com/docs/apm/new-relic-apm/getting-started/glossary#collector">collector</a> via a proxy server.'
396
+ :type => Boolean,
397
+ :allowed_from_server => true,
398
+ :description => 'Enable or disable the capture of memcache keys from transaction traces.'
399
399
  },
400
400
  :capture_params => {
401
401
  :default => false,
402
402
  :public => true,
403
403
  :type => Boolean,
404
404
  :allowed_from_server => false,
405
- :description => 'When <code>true</code>, the agent captures HTTP request parameters ' \
406
- 'and attaches them to transaction traces, traced errors, and ' \
407
- '<a href="https://docs.newrelic.com/attribute-dictionary?attribute_name=&events_tids%5B%5D=8241">'\
408
- '<code>TransactionError</code> events.' \
409
- "\n" \
410
- '<div class="callout-warning">' \
411
- "\n" \
412
- '<p>When using the <code>capture_params</code> setting, the Ruby agent will not attempt ' \
413
- 'to filter secret information. <b>Recommendation:</b> To filter secret information from ' \
414
- 'request parameters, use the <a href="/docs/agents/ruby-agent/attributes/enable-disable-attributes-ruby">' \
415
- '<code>attributes.include</code> setting</a> instead. For more information, see the ' \
416
- '<a href="/docs/agents/ruby-agent/attributes/ruby-attribute-examples#ex_req_params">' \
417
- 'Ruby attribute examples</a>.' \
418
- "</p>\n" \
419
- '</div>'
405
+ :description => <<~DESCRIPTION
406
+ 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).
407
+
408
+ <Callout variant="caution">
409
+ 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>.
410
+ </Callout>
411
+ DESCRIPTION
412
+ },
413
+ :'clear_transaction_state_after_fork' => {
414
+ :default => false,
415
+ :public => true,
416
+ :type => Boolean,
417
+ :allowed_from_server => false,
418
+ :description => 'If `true`, the agent will clear `Tracer::State` in `Agent.drop_buffered_data`.'
420
419
  },
421
420
  :config_path => {
422
421
  :default => DefaultSource.config_path,
423
422
  :public => true,
424
423
  :type => String,
425
424
  :allowed_from_server => false,
426
- :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>.'
427
- },
428
- :config_search_paths => {
429
- :default => DefaultSource.config_search_paths,
430
- :public => false,
431
- :type => Array,
432
- :allowed_from_server => false,
433
- :description => "An array of candidate locations for the agent\'s configuration file."
434
- },
435
- :dispatcher => {
436
- :default => DefaultSource.dispatcher,
437
- :public => false,
438
- :type => Symbol,
439
- :allowed_from_server => false,
440
- :description => 'Autodetected application component that reports metrics to New Relic.'
425
+ :description => <<~DESC
426
+ Path to `newrelic.yml`. If undefined, the agent checks the following directories (in order):
427
+ * `config/newrelic.yml`
428
+ * `newrelic.yml`
429
+ * `$HOME/.newrelic/newrelic.yml`
430
+ * `$HOME/newrelic.yml`
431
+ DESC
441
432
  },
442
- :framework => {
443
- :default => DefaultSource.framework,
444
- :public => false,
445
- :type => Symbol,
446
- :allowed_from_server => false,
447
- :description => 'Autodetected application framework used to enable framework-specific functionality.'
433
+ :'exclude_newrelic_header' => {
434
+ :default => false,
435
+ :public => true,
436
+ :type => Boolean,
437
+ :allowed_from_server => true,
438
+ :description => 'Allows newrelic distributed tracing headers to be suppressed on outbound requests.'
448
439
  },
449
- :'autostart.blacklisted_constants' => {
450
- :default => 'Rails::Console',
440
+ :force_install_exit_handler => {
441
+ :default => false,
451
442
  :public => true,
452
- :type => String,
443
+ :type => Boolean,
453
444
  :allowed_from_server => false,
454
- :description => 'Deprecated. ' \
455
- 'For agent versions 6.8.0 or higher, ' \
456
- 'use <a href="#autostart-denylisted_constants"><code>' \
457
- 'autostart.denylisted_constants' \
458
- '</code></a> instead.'
445
+ :description => 'Forces the exit handler that sends all cached data to collector ' \
446
+ 'before shutting down to be installed regardless of detecting scenarios where it generally should not be. ' \
447
+ 'Known use-case for this option is where Sinatra is running as an embedded service within another framework ' \
448
+ 'and the agent is detecting the Sinatra app and skipping the `at_exit` handler as a result. Sinatra classically ' \
449
+ 'runs the entire application in an `at_exit` block and would otherwise misbehave if the agent\'s `at_exit` handler ' \
450
+ 'was also installed in those circumstances. Note: `send_data_on_exit` should also be set to `true` in tandem with this setting.'
459
451
  },
460
- :'autostart.denylisted_constants' => {
461
- :default => 'Rails::Console',
452
+ :high_security => {
453
+ :default => false,
462
454
  :public => true,
463
- :type => String,
455
+ :type => Boolean,
464
456
  :allowed_from_server => false,
465
- :description => 'Specify a list of constants that should prevent the agent from starting automatically. Separate individual constants with a comma <code>,</code>. For example, <code>Rails::Console,UninstrumentedBackgroundJob</code>.'
457
+ :description => 'If `true`, enables [high security mode](/docs/accounts-partnerships/accounts/security/high-security). Ensure you understand the implications of high security mode before enabling this setting.'
466
458
  },
467
- :'autostart.blacklisted_executables' => {
468
- :default => 'irb,rspec',
459
+ :labels => {
460
+ :default => '',
469
461
  :public => true,
470
462
  :type => String,
471
463
  :allowed_from_server => false,
472
- :description => 'Deprecated. ' \
473
- 'For agent versions 6.8.0 or higher, ' \
474
- 'use <a href="#autostart-denylisted_executables"><code>' \
475
- 'autostart.denylisted_executables' \
476
- '</code></a> instead.'
464
+ :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`.'
477
465
  },
478
- :'autostart.denylisted_executables' => {
479
- :default => value_of(:'autostart.blacklisted_executables'),
466
+ :log_file_name => {
467
+ :default => 'newrelic_agent.log',
480
468
  :public => true,
481
469
  :type => String,
482
470
  :allowed_from_server => false,
483
- :description => 'Defines a comma-delimited list of executables that the agent should not instrument. For example, <code>rake,my_ruby_script.rb</code>.'
471
+ :description => 'Defines a name for the log file.'
484
472
  },
485
- :'autostart.blacklisted_rake_tasks' => {
486
- :default => AUTOSTART_DENYLISTED_RAKE_TASKS,
473
+ :log_file_path => {
474
+ :default => DefaultSource::DEFAULT_LOG_DIR,
487
475
  :public => true,
488
476
  :type => String,
489
477
  :allowed_from_server => false,
490
- :description => 'Deprecated. ' \
491
- 'For agent versions 6.8.0 or higher, ' \
492
- 'use <a href="#autostart-denylisted_rake_tasks"><code>' \
493
- 'autostart.denylisted_rake_tasks' \
494
- '</code></a> instead.'
478
+ :description => 'Defines a path to the agent log file, excluding the filename.'
495
479
  },
496
- :'autostart.denylisted_rake_tasks' => {
497
- :default => value_of(:'autostart.blacklisted_rake_tasks'),
480
+ :marshaller => {
481
+ :default => 'json',
498
482
  :public => true,
499
483
  :type => String,
500
484
  :allowed_from_server => false,
501
- :description => 'Defines a comma-delimited list of Rake tasks that the agent should not instrument. For example, <code>assets:precompile,db:migrate</code>.'
485
+ :description => 'Specifies a marshaller for transmitting data to the New Relic [collector](/docs/apm/new-relic-apm/getting-started/glossary#collector). Currently `json` is the only valid value for this setting.'
502
486
  },
503
- :disable_rake => {
504
- :default => false,
487
+ :monitor_mode => {
488
+ :default => value_of(:enabled),
489
+ :documentation_default => true,
505
490
  :public => true,
506
491
  :type => Boolean,
507
492
  :allowed_from_server => false,
508
- :description => 'If <code>true</code>, disables Rake instrumentation.'
493
+ :description => 'When `true`, the agent transmits data about your app to the New Relic [collector](/docs/using-new-relic/welcome-new-relic/get-started/glossary/#collector).'
509
494
  },
510
- :disable_rake_instrumentation => {
495
+ :prepend_active_record_instrumentation => {
511
496
  :default => false,
512
- :public => false,
497
+ :public => true,
513
498
  :type => Boolean,
514
499
  :allowed_from_server => false,
515
- :description => 'Enable or disable Rake instrumentation. Preferred key is `disable_rake`'
500
+ :description => 'If `true`, uses `Module#prepend` rather than `alias_method` for ActiveRecord instrumentation.'
516
501
  },
517
- :'rake.tasks' => {
518
- :default => [],
502
+ :proxy_host => {
503
+ :default => nil,
504
+ :allow_nil => true,
519
505
  :public => true,
520
- :type => Array,
506
+ :type => String,
521
507
  :allowed_from_server => false,
522
- :transform => DefaultSource.method(:convert_to_regexp_list),
523
- :description => 'Specify an array of Rake tasks to automatically instrument.'
508
+ :description => 'Defines a host for communicating with the New Relic [collector](/docs/using-new-relic/welcome-new-relic/get-started/glossary/#collector) via a proxy server.'
524
509
  },
525
- :'rake.connect_timeout' => {
526
- :default => 10,
510
+ :proxy_pass => {
511
+ :default => nil,
512
+ :allow_nil => true,
527
513
  :public => true,
528
- :type => Integer,
514
+ :type => String,
529
515
  :allowed_from_server => false,
530
- :description => 'Timeout for waiting on connect to complete before a rake task'
531
- },
532
- :apdex_t => {
533
- :default => 0.5,
534
- :public => true,
535
- :type => Float,
536
- :allowed_from_server => true,
537
- :deprecated => true,
538
- :description => 'Deprecated. For agent versions 3.5.0 or higher, <a href="https://docs.newrelic.com/docs/apm/new-relic-apm/apdex/changing-your-apdex-settings">set your Apdex T via the New Relic UI</a>.'
516
+ :exclude_from_reported_settings => true,
517
+ :description => 'Defines a password for communicating with the New Relic [collector](/docs/using-new-relic/welcome-new-relic/get-started/glossary/#collector) via a proxy server.'
539
518
  },
540
- :'strip_exception_messages.enabled' => {
541
- :default => value_of(:high_security),
519
+ :proxy_port => {
520
+ :default => 8080,
521
+ :allow_nil => true,
542
522
  :public => true,
543
- :type => Boolean,
523
+ :type => Integer,
544
524
  :allowed_from_server => false,
545
- :description => 'If true, the agent strips messages from all exceptions except those in the <a href="#strip_exception_messages-allowlist">allowlist</a>. Enabled automatically in <a href="https://docs.newrelic.com/docs/accounts-partnerships/accounts/security/high-security">high security mode</a>.'
525
+ :description => 'Defines a port for communicating with the New Relic [collector](/docs/using-new-relic/welcome-new-relic/get-started/glossary/#collector) via a proxy server.'
546
526
  },
547
- :'strip_exception_messages.whitelist' => {
548
- :default => '',
527
+ :proxy_user => {
528
+ :default => nil,
529
+ :allow_nil => true,
549
530
  :public => true,
550
531
  :type => String,
551
- :deprecated => true,
552
532
  :allowed_from_server => false,
553
- :transform => DefaultSource.method(:convert_to_constant_list),
554
- :description => 'Deprecated. ' \
555
- 'For agent versions 6.8.0 or higher, ' \
556
- 'use <a href="#strip_exception_messages.allowed_classes"><code>' \
557
- 'strip_exception_messages.allowed_classes' \
558
- '</code></a> instead.'
533
+ :exclude_from_reported_settings => true,
534
+ :description => 'Defines a user for communicating with the New Relic [collector](/docs/using-new-relic/welcome-new-relic/get-started/glossary/#collector) via a proxy server.'
559
535
  },
560
- :'strip_exception_messages.allowed_classes' => {
536
+ :security_policies_token => {
561
537
  :default => '',
562
538
  :public => true,
563
539
  :type => String,
564
540
  :allowed_from_server => false,
565
- :transform => DefaultSource.method(:convert_to_constant_list),
566
- :description => 'Specify a list of exceptions you do not want the agent to strip when <a href="#strip_exception_messages-enabled">strip_exception_messages</a> is <code>true</code>. Separate exceptions with a comma. For example, <code>"ImportantException,PreserveMessageException"</code>.'
567
- },
568
- :host => {
569
- :default => DefaultSource.host,
570
- :public => false,
571
- :type => String,
572
- :allowed_from_server => false,
573
- :description => "URI for the New Relic data collection service."
541
+ :description => 'Applies Language Agent Security Policy settings.'
574
542
  },
575
- :api_host => {
576
- :default => DefaultSource.api_host,
577
- :public => false,
578
- :type => String,
543
+ :send_data_on_exit => {
544
+ :default => true,
545
+ :public => true,
546
+ :type => Boolean,
579
547
  :allowed_from_server => false,
580
- :description => 'API host for New Relic.'
548
+ :description => 'If `true`, enables the exit handler that sends data to the New Relic [collector](/docs/using-new-relic/welcome-new-relic/get-started/glossary/#collector) before shutting down.'
581
549
  },
582
- :port => {
583
- :default => 443,
584
- :public => false,
585
- :type => Integer,
550
+ :sync_startup => {
551
+ :default => false,
552
+ :public => true,
553
+ :type => Boolean,
586
554
  :allowed_from_server => false,
587
- :description => 'Port for the New Relic data collection service.'
555
+ :description => 'When set to `true`, forces a synchronous connection to the New Relic [collector](/docs/using-new-relic/welcome-new-relic/get-started/glossary/#collector) during application startup. For very short-lived processes, this helps ensure the New Relic agent has time to report.'
588
556
  },
589
- :api_port => {
590
- :default => value_of(:port),
591
- :public => false,
557
+ :timeout => {
558
+ :default => 2 * 60, # 2 minutes
559
+ :public => true,
592
560
  :type => Integer,
593
561
  :allowed_from_server => false,
594
- :description => 'Port for the New Relic API host.'
562
+ :description => 'Defines the maximum number of seconds the agent should spend attempting to connect to the collector.'
595
563
  },
596
- :sync_startup => {
597
- :default => false,
564
+ # Transaction tracer
565
+ :'transaction_tracer.enabled' => {
566
+ :default => true,
598
567
  :public => true,
599
568
  :type => Boolean,
600
- :allowed_from_server => false,
601
- :description => 'When set to <code>true</code>, forces a synchronous connection to the New Relic <a href="https://docs.newrelic.com/docs/apm/new-relic-apm/getting-started/glossary#collector">collector</a> during application startup. For very short-lived processes, this helps ensure the New Relic agent has time to report.'
569
+ :allowed_from_server => true,
570
+ :description => 'If `true`, enables collection of [transaction traces](/docs/apm/traces/transaction-traces/transaction-traces).'
602
571
  },
603
- :send_data_on_exit => {
572
+ :'transaction_tracer.explain_enabled' => {
604
573
  :default => true,
605
574
  :public => true,
606
575
  :type => Boolean,
607
- :allowed_from_server => false,
608
- :description => 'If <code>true</code>, enables the exit handler that sends data to the New Relic <a href="https://docs.newrelic.com/docs/apm/new-relic-apm/getting-started/glossary#collector">collector</a> before shutting down.'
576
+ :allowed_from_server => true,
577
+ :description => 'If `true`, enables the collection of explain plans in transaction traces. This setting will also apply to explain plans in slow SQL traces if [`slow_sql.explain_enabled`](#slow_sql-explain_enabled) is not set separately.'
609
578
  },
610
- :max_payload_size_in_bytes => {
611
- :default => 1000000,
612
- :public => false,
579
+ :'transaction_tracer.explain_threshold' => {
580
+ :default => 0.5,
581
+ :public => true,
582
+ :type => Float,
583
+ :allowed_from_server => true,
584
+ :description => 'Threshold (in seconds) above which the agent will collect explain plans. Relevant only when [`explain_enabled`](#transaction_tracer.explain_enabled) is true.'
585
+ },
586
+ :'transaction_tracer.limit_segments' => {
587
+ :default => 4000,
588
+ :public => true,
613
589
  :type => Integer,
614
590
  :allowed_from_server => true,
615
- :description => 'Maximum number of bytes to send to the New Relic data collection service.'
591
+ :description => 'Maximum number of transaction trace nodes to record in a single transaction trace.'
616
592
  },
617
- :put_for_data_send => {
593
+ :'transaction_tracer.record_redis_arguments' => {
618
594
  :default => false,
619
- :public => false,
595
+ :public => true,
620
596
  :type => Boolean,
621
597
  :allowed_from_server => false,
622
- :description => 'Use HTTP PUT requests instead of POST.'
598
+ :description => 'If `true`, the agent records Redis command arguments in transaction traces.'
623
599
  },
624
- :compressed_content_encoding => {
625
- :default => 'gzip',
626
- :public => false,
600
+ :'transaction_tracer.record_sql' => {
601
+ :default => 'obfuscated',
602
+ :public => true,
627
603
  :type => String,
628
- :allowed_from_server => false,
629
- :description => 'Encoding to use if data needs to be compressed. The options are deflate and gzip.'
630
- },
631
- :simple_compression => {
632
- :default => false,
633
- :public => false,
634
- :type => Boolean,
635
- :allowed_from_server => false,
636
- :description => 'When enabled the agent will compress payloads destined for the collector, but will not pre-compress parts of the payload.'
604
+ :allowed_from_server => true,
605
+ :description => 'Obfuscation level for SQL queries reported in transaction trace nodes.
606
+
607
+ By default, this is set to `obfuscated`, which strips out the numeric and string literals.
608
+
609
+ - If you do not want the agent to capture query information, set this to `none`.
610
+ - If you want the agent to capture all query information in its original form, set this to `raw`.
611
+ - When you enable [high security mode](/docs/agents/manage-apm-agents/configuration/high-security-mode), this is automatically set to `obfuscated`.'
637
612
  },
638
- :timeout => {
639
- :default => 2 * 60, # 2 minutes
613
+
614
+ :'transaction_tracer.stack_trace_threshold' => {
615
+ :default => 0.5,
640
616
  :public => true,
641
- :type => Integer,
642
- :allowed_from_server => false,
643
- :description => 'Defines the maximum number of seconds the agent should spend attempting to connect to the collector.'
644
- },
645
- :send_environment_info => {
646
- :default => true,
647
- :public => false,
648
- :type => Boolean,
649
- :allowed_from_server => false,
650
- :description => 'Enable or disable transmission of application environment information to the New Relic data collection service.'
617
+ :type => Float,
618
+ :allowed_from_server => true,
619
+ :description => 'Specify a threshold in seconds. The agent includes stack traces in transaction trace nodes when the stack trace duration exceeds this threshold.'
651
620
  },
652
- :data_report_period => {
653
- :default => 60,
654
- :public => false,
655
- :type => Integer,
621
+ :'transaction_tracer.transaction_threshold' => {
622
+ :default => DefaultSource.transaction_tracer_transaction_threshold,
623
+ :public => true,
624
+ :type => Float,
656
625
  :allowed_from_server => true,
657
- :description => 'Number of seconds betwixt connections to the New Relic data collection service.'
626
+ :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`.'
658
627
  },
659
- :event_report_period => {
660
- :default => 60,
661
- :public => false,
662
- :type => Integer,
628
+ # Error collector
629
+ :'error_collector.ignore_classes' => {
630
+ :default => ['ActionController::RoutingError', 'Sinatra::NotFound'],
631
+ :public => true,
632
+ :type => Array,
663
633
  :allowed_from_server => true,
664
- :description => 'Number of seconds betwixt connections to the New Relic event collection services.'
634
+ :dynamic_name => true,
635
+ :description => <<~DESCRIPTION
636
+ A list of error classes that the agent should ignore.
637
+
638
+ <Callout variant="caution">
639
+ This option can't be set via environment variable.
640
+ </Callout>
641
+ DESCRIPTION
665
642
  },
666
- :'event_report_period.analytic_event_data' => {
667
- :default => 60,
668
- :public => false,
669
- :type => Integer,
643
+ :'error_collector.capture_events' => {
644
+ :default => value_of(:'error_collector.enabled'),
645
+ :documentation_default => true,
646
+ :public => true,
647
+ :type => Boolean,
648
+ :allowed_from_server => true,
670
649
  :dynamic_name => true,
650
+ :description => 'If `true`, the agent collects [`TransactionError` events](/docs/insights/new-relic-insights/decorating-events/error-event-default-attributes-insights).'
651
+ },
652
+ :'error_collector.enabled' => {
653
+ :default => true,
654
+ :public => true,
655
+ :type => Boolean,
671
656
  :allowed_from_server => true,
672
- :description => 'Number of seconds betwixt connections to the New Relic analytic event collection services.'
657
+ :description => 'If `true`, the agent captures traced errors and error count metrics.'
673
658
  },
674
- :'event_report_period.custom_event_data' => {
675
- :default => 60,
676
- :public => false,
677
- :type => Integer,
678
- :dynamic_name => true,
659
+ :'error_collector.expected_classes' => {
660
+ :default => [],
661
+ :public => true,
662
+ :type => Array,
679
663
  :allowed_from_server => true,
680
- :description => 'Number of seconds betwixt connections to the New Relic custom event collection services.'
664
+ :dynamic_name => true,
665
+ :description => <<~DESCRIPTION
666
+ A list of error classes that the agent should treat as expected.
667
+
668
+ <Callout variant="caution">
669
+ This option can't be set via environment variable.
670
+ </Callout>
671
+ DESCRIPTION
681
672
  },
682
- :'event_report_period.error_event_data' => {
683
- :default => 60,
684
- :public => false,
685
- :type => Integer,
673
+ :'error_collector.expected_messages' => {
674
+ :default => {},
675
+ :public => true,
676
+ :type => Hash,
677
+ :allowed_from_server => true,
686
678
  :dynamic_name => true,
679
+ :description => <<~DESCRIPTION
680
+ 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.
681
+
682
+ <Callout variant="caution">
683
+ This option can't be set via environment variable.
684
+ </Callout>
685
+ DESCRIPTION
686
+ },
687
+ :'error_collector.expected_status_codes' => {
688
+ :default => '',
689
+ :public => true,
690
+ :type => String,
687
691
  :allowed_from_server => true,
688
- :description => 'Number of seconds betwixt connections to the New Relic error event collection services.'
692
+ :dynamic_name => true,
693
+ :description => 'A comma separated list of status codes, possibly including ranges. Errors associated with these status codes, where applicable, will be treated as expected.'
689
694
  },
690
- :'event_report_period.span_event_data' => {
691
- :default => 60,
692
- :public => false,
693
- :type => Integer,
695
+
696
+ :'error_collector.ignore_messages' => {
697
+ :default => {},
698
+ :public => true,
699
+ :type => Hash,
700
+ :allowed_from_server => true,
694
701
  :dynamic_name => true,
702
+ :description => <<~DESCRIPTION
703
+ 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.
704
+
705
+ <Callout variant="caution">
706
+ This option can't be set via environment variable.
707
+ </Callout>
708
+ DESCRIPTION
709
+ },
710
+ :'error_collector.ignore_status_codes' => {
711
+ :default => '',
712
+ :public => true,
713
+ :type => String,
695
714
  :allowed_from_server => true,
696
- :description => 'Number of seconds betwixt connections to the New Relic span event collection services.'
715
+ :dynamic_name => true,
716
+ :description => 'A comma separated list of status codes, possibly including ranges. Errors associated with these status codes, where applicable, will be ignored.'
697
717
  },
698
- :keep_retrying => {
699
- :default => true,
700
- :public => false,
701
- :type => Boolean,
702
- :deprecated => true,
718
+ :'error_collector.max_backtrace_frames' => {
719
+ :default => 50,
720
+ :public => true,
721
+ :type => Integer,
703
722
  :allowed_from_server => false,
704
- :description => 'Enable or disable retrying failed connections to the New Relic data collection service.'
723
+ :description => 'Defines the maximum number of frames in an error backtrace. Backtraces over this amount are truncated at the beginning and end.'
705
724
  },
706
- :force_install_exit_handler => {
707
- :default => false,
725
+ :'error_collector.max_event_samples_stored' => {
726
+ :default => 100,
708
727
  :public => true,
709
- :type => Boolean,
710
- :allowed_from_server => false,
711
- :description => 'Forces the exit handler that sends all cached data to collector ' \
712
- 'before shuttng down to be installed regardless of detecting scenarios where it generally should not be. ' \
713
- 'Known use-case for this option is where Sinatra is running as an embedded service within another framework ' \
714
- 'and the agent is detecting the Sinatra app and skipping the at_exit handler as a result. Sinatra classically ' \
715
- 'runs the entire application in an at_exit block and would otherwise misbehave if the Agent\'s at_exit handler ' \
716
- 'is also installed in those circumstances. Note: `send_data_on_exit` should also be set to `true` in tandem with this setting.'
728
+ :type => Integer,
729
+ :allowed_from_server => true,
730
+ :description => 'Defines the maximum number of [`TransactionError` events](/docs/insights/new-relic-insights/decorating-events/error-event-default-attributes-insights) reported per harvest cycle.'
717
731
  },
718
- :force_reconnect => {
719
- :default => false,
720
- :public => false,
732
+ # Browser monitoring
733
+ :'browser_monitoring.auto_instrument' => {
734
+ :default => value_of(:'rum.enabled'),
735
+ :documentation_default => true,
736
+ :public => true,
721
737
  :type => Boolean,
722
- :allowed_from_server => false,
723
- :description => 'Force a new connection to the server before running the worker loop. Creates a separate agent run and is recorded as a separate instance by the New Relic data collection service.'
738
+ :allowed_from_server => true,
739
+ :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).'
724
740
  },
725
- :report_instance_busy => {
741
+ # Transaction events
742
+ :'transaction_events.enabled' => {
726
743
  :default => true,
727
- :public => false,
744
+ :public => true,
728
745
  :type => Boolean,
729
- :allowed_from_server => false,
730
- :description => 'Enable or disable transmission of metrics recording the percentage of time application instances spend servicing requests (duty cycle metrics).'
746
+ :allowed_from_server => true,
747
+ :description => 'If `true`, enables transaction event sampling.'
731
748
  },
732
- :log_file_name => {
733
- :default => 'newrelic_agent.log',
749
+ :'transaction_events.max_samples_stored' => {
750
+ :default => 1200,
734
751
  :public => true,
735
- :type => String,
736
- :allowed_from_server => false,
737
- :description => 'Defines a name for the log file.'
752
+ :type => Integer,
753
+ :allowed_from_server => true,
754
+ :description => 'Defines the maximum number of transaction events reported from a single harvest.'
738
755
  },
739
- :log_file_path => {
740
- :default => DefaultSource::DEFAULT_LOG_DIR,
756
+ # Application logging
757
+ :'application_logging.enabled' => {
758
+ :default => true,
741
759
  :public => true,
742
- :type => String,
760
+ :type => Boolean,
743
761
  :allowed_from_server => false,
744
- :description => 'Defines a path to the agent log file, excluding the filename.'
762
+ :description => 'If `true`, enables log decoration and the collection of log events and metrics.'
745
763
  },
746
- :'audit_log.enabled' => {
747
- :default => false,
764
+ :'application_logging.forwarding.enabled' => {
765
+ :default => true,
748
766
  :public => true,
749
767
  :type => Boolean,
750
768
  :allowed_from_server => false,
751
- :description => 'If <code>true</code>, enables an audit log which logs communications with the New Relic <a href="https://docs.newrelic.com/docs/apm/new-relic-apm/getting-started/glossary#collector">collector</a>.'
769
+ :description => 'If `true`, the agent captures log records emitted by your application.'
752
770
  },
753
- :'audit_log.path' => {
754
- :default => DefaultSource.audit_log_path,
771
+ :'application_logging.forwarding.log_level' => {
772
+ :default => 'debug',
755
773
  :public => true,
756
774
  :type => String,
757
775
  :allowed_from_server => false,
758
- :description => 'Specifies a path to the audit log file (including the filename).'
776
+ :description => <<~DESCRIPTION
777
+ Sets the minimum level a log event must have to be forwarded to New Relic.
778
+
779
+ This is based on the integer values of Ruby's `Logger::Severity` constants: https://github.com/ruby/ruby/blob/master/lib/logger/severity.rb
780
+
781
+ The intention is to forward logs with the level given to the configuration, as well as any logs with a higher level of severity.
782
+
783
+ 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".
784
+
785
+ Valid values (ordered lowest to highest):
786
+ * "debug"
787
+ * "info"
788
+ * "warn"
789
+ * "error"
790
+ * "fatal"
791
+ * "unknown"
792
+ DESCRIPTION
759
793
  },
760
- :'audit_log.endpoints' => {
761
- :default => [".*"],
794
+ :'application_logging.forwarding.custom_attributes' => {
795
+ :default => {},
762
796
  :public => true,
763
- :type => Array,
797
+ :type => Hash,
798
+ :transform => DefaultSource.method(:convert_to_hash),
764
799
  :allowed_from_server => false,
765
- :transform => DefaultSource.method(:convert_to_regexp_list),
766
- :description => 'List of allowed endpoints to include in audit log'
800
+ :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"'
767
801
  },
768
- :disable_samplers => {
769
- :default => false,
802
+ :'application_logging.forwarding.max_samples_stored' => {
803
+ :default => 10000,
770
804
  :public => true,
771
- :type => Boolean,
772
- :allowed_from_server => false,
773
- :description => 'If <code>true</code>, disables the collection of sampler metrics. Sampler metrics are metrics that are not event-based (such as CPU time or memory usage).'
805
+ :type => Integer,
806
+ :allowed_from_server => true,
807
+ :description => 'Defines the maximum number of log records to buffer in memory at a time.',
808
+ :dynamic_name => true
774
809
  },
775
- :disable_resque => {
810
+ :'application_logging.local_decorating.enabled' => {
776
811
  :default => false,
777
812
  :public => true,
778
813
  :type => Boolean,
779
814
  :allowed_from_server => false,
780
- :description => 'If <code>true</code>, disables <a href="https://docs.newrelic.com/docs/agents/ruby-agent/background-jobs/resque-instrumentation">Resque instrumentation</a>.'
815
+ :description => 'If `true`, the agent decorates logs with metadata to link to entities, hosts, traces, and spans.'
781
816
  },
782
- :disable_sidekiq => {
783
- :default => false,
817
+ :'application_logging.metrics.enabled' => {
818
+ :default => true,
784
819
  :public => true,
785
820
  :type => Boolean,
786
- :allowed_from_server => false,
787
- :description => 'If <code>true</code>, disables <a href="https://docs.newrelic.com/docs/agents/ruby-agent/background-jobs/sidekiq-instrumentation">Sidekiq instrumentation</a>.'
821
+ :allowed_from_server => true,
822
+ :description => 'If `true`, the agent captures metrics related to logging for your application.'
788
823
  },
789
- :disable_dj => {
824
+ # Attributes
825
+ :'allow_all_headers' => {
790
826
  :default => false,
791
827
  :public => true,
792
828
  :type => Boolean,
793
829
  :allowed_from_server => false,
794
- :description => 'If <code>true</code>, disables <a href="https://docs.newrelic.com/docs/agents/ruby-agent/background-jobs/delayedjob">Delayed::Job instrumentation</a>.'
830
+ :description => 'If `true`, enables capture of all HTTP request headers for all destinations.'
795
831
  },
796
- :disable_sinatra => {
797
- :default => false,
832
+ :'attributes.enabled' => {
833
+ :default => true,
798
834
  :public => true,
799
835
  :type => Boolean,
800
836
  :allowed_from_server => false,
801
- :description => 'If <code>true</code> , disables <a href="https://docs.newrelic.com/docs/agents/ruby-agent/frameworks/sinatra-support">Sinatra instrumentation</a>.'
837
+ :description => 'If `true`, enables capture of attributes for all destinations.'
802
838
  },
803
- :disable_sinatra_auto_middleware => {
804
- :default => false,
839
+ :'attributes.exclude' => {
840
+ :default => [],
805
841
  :public => true,
806
- :type => Boolean,
842
+ :type => Array,
807
843
  :allowed_from_server => false,
808
- :description => 'If <code>true</code>, disables agent middleware for Sinatra. This middleware is responsible for advanced feature support such as <a href="https://docs.newrelic.com/docs/apm/transactions/cross-application-traces/cross-application-tracing">cross application tracing</a>, <a href="https://docs.newrelic.com/docs/browser/new-relic-browser/getting-started/new-relic-browser">page load timing</a>, and <a href="https://docs.newrelic.com/docs/apm/applications-menu/events/view-apm-error-analytics">error collection</a>.'
844
+ :transform => DefaultSource.method(:convert_to_list),
845
+ :description => 'Prefix of attributes to exclude from all destinations. Allows `*` as wildcard at end.'
809
846
  },
810
- :disable_view_instrumentation => {
811
- :default => false,
847
+ :'attributes.include' => {
848
+ :default => [],
812
849
  :public => true,
813
- :type => Boolean,
850
+ :type => Array,
814
851
  :allowed_from_server => false,
815
- :description => 'If <code>true</code>, disables view instrumentation.'
852
+ :transform => DefaultSource.method(:convert_to_list),
853
+ :description => 'Prefix of attributes to include in all destinations. Allows `*` as wildcard at end.'
816
854
  },
817
- :disable_harvest_thread => {
855
+ :'browser_monitoring.attributes.enabled' => {
818
856
  :default => false,
819
- :public => false,
857
+ :public => true,
820
858
  :type => Boolean,
821
859
  :allowed_from_server => false,
822
- :description => 'Enable or disable the harvest thread.'
860
+ :description => 'If `true`, the agent captures attributes from browser monitoring.'
823
861
  },
824
- :skip_ar_instrumentation => {
825
- :default => false,
826
- :public => false,
827
- :type => Boolean,
862
+ :'browser_monitoring.attributes.exclude' => {
863
+ :default => [],
864
+ :public => true,
865
+ :type => Array,
828
866
  :allowed_from_server => false,
829
- :description => 'Enable or disable active record instrumentation.'
867
+ :transform => DefaultSource.method(:convert_to_list),
868
+ :description => 'Prefix of attributes to exclude from browser monitoring. Allows `*` as wildcard at end.'
830
869
  },
831
- :disable_activerecord_instrumentation => {
832
- :default => value_of(:skip_ar_instrumentation),
870
+ :'browser_monitoring.attributes.include' => {
871
+ :default => [],
833
872
  :public => true,
834
- :type => Boolean,
873
+ :type => Array,
835
874
  :allowed_from_server => false,
836
- :description => 'If <code>true</code>, disables active record instrumentation.'
875
+ :transform => DefaultSource.method(:convert_to_list),
876
+ :description => 'Prefix of attributes to include in browser monitoring. Allows `*` as wildcard at end.'
837
877
  },
838
- :prepend_active_record_instrumentation => {
839
- :default => false,
878
+ :'error_collector.attributes.enabled' => {
879
+ :default => true,
840
880
  :public => true,
841
881
  :type => Boolean,
842
882
  :allowed_from_server => false,
843
- :description => 'If <code>true</code>, uses Module.prepend rather than alias_method for ActiveRecord instrumentation.'
883
+ :description => 'If `true`, the agent captures attributes from error collection.'
844
884
  },
845
- :prepend_net_instrumentation => {
846
- :default => false,
885
+ :'error_collector.attributes.exclude' => {
886
+ :default => [],
847
887
  :public => true,
848
- :type => Boolean,
888
+ :type => Array,
849
889
  :allowed_from_server => false,
850
- :description => 'If <code>true</code>, uses Module.prepend rather than alias_method for Net::HTTP instrumentation.'
890
+ :transform => DefaultSource.method(:convert_to_list),
891
+ :description => 'Prefix of attributes to exclude from error collection. Allows `*` as wildcard at end.'
851
892
  },
852
- :disable_data_mapper => {
853
- :default => false,
893
+ :'error_collector.attributes.include' => {
894
+ :default => [],
854
895
  :public => true,
855
- :type => Boolean,
896
+ :type => Array,
856
897
  :allowed_from_server => false,
857
- :description => 'If <code>true</code>, disables DataMapper instrumentation.'
898
+ :transform => DefaultSource.method(:convert_to_list),
899
+ :description => 'Prefix of attributes to include in error collection. Allows `*` as wildcard at end.'
858
900
  },
859
- :disable_activejob => {
860
- :default => false,
901
+ :'span_events.attributes.enabled' => {
902
+ :default => true,
861
903
  :public => true,
862
904
  :type => Boolean,
863
- :dynamic_name => true,
864
905
  :allowed_from_server => false,
865
- :description => 'If <code>true</code>, disables ActiveJob instrumentation.'
906
+ :description => 'If `true`, the agent captures attributes on span events.'
866
907
  },
867
- :disable_action_cable_instrumentation => {
868
- :default => false,
908
+ :'span_events.attributes.exclude' => {
909
+ :default => [],
869
910
  :public => true,
870
- :type => Boolean,
871
- :dynamic_name => true,
911
+ :type => Array,
872
912
  :allowed_from_server => false,
873
- :description => 'If <code>true</code>, disables Action Cable instrumentation.'
913
+ :transform => DefaultSource.method(:convert_to_list),
914
+ :description => 'Prefix of attributes to exclude from span events. Allows `*` as wildcard at end.'
874
915
  },
875
- :disable_active_storage => {
876
- :default => false,
916
+ :'span_events.attributes.include' => {
917
+ :default => [],
877
918
  :public => true,
878
- :type => Boolean,
879
- :dynamic_name => true,
919
+ :type => Array,
880
920
  :allowed_from_server => false,
881
- :description => 'If <code>true</code>, disables ActiveStorage instrumentation.'
921
+ :transform => DefaultSource.method(:convert_to_list),
922
+ :description => 'Prefix of attributes to include on span events. Allows `*` as wildcard at end.'
882
923
  },
883
- :disable_memcached => {
884
- :default => value_of(:disable_memcache_instrumentation),
924
+ :'transaction_events.attributes.enabled' => {
925
+ :default => true,
885
926
  :public => true,
886
927
  :type => Boolean,
887
928
  :allowed_from_server => false,
888
- :description => 'If <code>true</code>, disables instrumentation for the memcached gem.'
929
+ :description => 'If `true`, the agent captures attributes from transaction events.'
889
930
  },
890
- :disable_memcache_client => {
891
- :default => value_of(:disable_memcache_instrumentation),
931
+ :'transaction_events.attributes.exclude' => {
932
+ :default => [],
892
933
  :public => true,
893
- :type => Boolean,
934
+ :type => Array,
894
935
  :allowed_from_server => false,
895
- :description => 'If <code>true</code>, disables instrumentation for the memcache-client gem.'
936
+ :transform => DefaultSource.method(:convert_to_list),
937
+ :description => 'Prefix of attributes to exclude from transaction events. Allows `*` as wildcard at end.'
896
938
  },
897
- :disable_dalli => {
898
- :default => value_of(:disable_memcache_instrumentation),
899
- :public => true,
900
- :type => Boolean,
939
+ :'transaction_events.attributes.include' => {
940
+ :default => [],
941
+ :public => true,
942
+ :type => Array,
901
943
  :allowed_from_server => false,
902
- :description => 'If <code>true</code>, disables instrumentation for the dalli gem.'
944
+ :transform => DefaultSource.method(:convert_to_list),
945
+ :description => 'Prefix of attributes to include in transaction events. Allows `*` as wildcard at end.'
903
946
  },
904
- :disable_dalli_cas_client => {
905
- :default => value_of(:disable_memcache_instrumentation),
947
+ :'transaction_segments.attributes.enabled' => {
948
+ :default => true,
906
949
  :public => true,
907
950
  :type => Boolean,
908
951
  :allowed_from_server => false,
909
- :description => "If <code>true</code>, disables instrumentation for the dalli gem\'s additional CAS client support."
952
+ :description => 'If `true`, the agent captures attributes on transaction segments.'
910
953
  },
911
- :disable_memcache_instrumentation => {
912
- :default => false,
954
+ :'transaction_segments.attributes.exclude' => {
955
+ :default => [],
913
956
  :public => true,
914
- :type => Boolean,
957
+ :type => Array,
915
958
  :allowed_from_server => false,
916
- :description => 'If <code>true</code>, disables memcache instrumentation.'
959
+ :transform => DefaultSource.method(:convert_to_list),
960
+ :description => 'Prefix of attributes to exclude from transaction segments. Allows `*` as wildcard at end.'
917
961
  },
918
- :disable_gc_profiler => {
919
- :default => false,
962
+ :'transaction_segments.attributes.include' => {
963
+ :default => [],
920
964
  :public => true,
921
- :type => Boolean,
965
+ :type => Array,
922
966
  :allowed_from_server => false,
923
- :description => 'If <code>true</code>, disables the use of GC::Profiler to measure time spent in garbage collection'
967
+ :transform => DefaultSource.method(:convert_to_list),
968
+ :description => 'Prefix of attributes to include on transaction segments. Allows `*` as wildcard at end.'
924
969
  },
925
- :'sidekiq.capture_params' => {
926
- :default => false,
970
+ :'transaction_tracer.attributes.enabled' => {
971
+ :default => true,
927
972
  :public => true,
928
973
  :type => Boolean,
929
974
  :allowed_from_server => false,
930
- :dynamic_name => true,
931
- :deprecated => true,
932
- :description => 'If <code>true</code>, enables the capture of job arguments for transaction traces and traced errors in Sidekiq.'
975
+ :description => 'If `true`, the agent captures attributes from transaction traces.'
976
+ },
977
+ :'transaction_tracer.attributes.exclude' => {
978
+ :default => [],
979
+ :public => true,
980
+ :type => Array,
981
+ :allowed_from_server => false,
982
+ :transform => DefaultSource.method(:convert_to_list),
983
+ :description => 'Prefix of attributes to exclude from transaction traces. Allows `*` as wildcard at end.'
984
+ },
985
+ :'transaction_tracer.attributes.include' => {
986
+ :default => [],
987
+ :public => true,
988
+ :type => Array,
989
+ :allowed_from_server => false,
990
+ :transform => DefaultSource.method(:convert_to_list),
991
+ :description => 'Prefix of attributes to include in transaction traces. Allows `*` as wildcard at end.'
933
992
  },
934
- :'resque.capture_params' => {
993
+ # Audit log
994
+ :'audit_log.enabled' => {
935
995
  :default => false,
936
996
  :public => true,
937
997
  :type => Boolean,
938
998
  :allowed_from_server => false,
939
- :dynamic_name => true,
940
- :deprecated => true,
941
- :description => 'If <code>true</code>, enables the capture of job arguments for transaction traces and traced errors in Resque.'
999
+ :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).'
942
1000
  },
943
- :'resque.use_ruby_dns' => {
1001
+ :'audit_log.endpoints' => {
1002
+ :default => ['.*'],
1003
+ :public => true,
1004
+ :type => Array,
1005
+ :allowed_from_server => false,
1006
+ :transform => DefaultSource.method(:convert_to_regexp_list),
1007
+ :description => 'List of allowed endpoints to include in audit log.'
1008
+ },
1009
+ :'audit_log.path' => {
1010
+ :default => DefaultSource.audit_log_path,
1011
+ :documentation_default => 'log/newrelic_audit.log',
1012
+ :public => true,
1013
+ :type => String,
1014
+ :allowed_from_server => false,
1015
+ :description => 'Specifies a path to the audit log file (including the filename).'
1016
+ },
1017
+ # Autostart
1018
+ :'autostart.denylisted_constants' => {
1019
+ :default => %w[Rails::Command::ConsoleCommand
1020
+ Rails::Command::CredentialsCommand
1021
+ Rails::Command::Db::System::ChangeCommand
1022
+ Rails::Command::DbConsoleCommand
1023
+ Rails::Command::DestroyCommand
1024
+ Rails::Command::DevCommand
1025
+ Rails::Command::EncryptedCommand
1026
+ Rails::Command::GenerateCommand
1027
+ Rails::Command::InitializersCommand
1028
+ Rails::Command::NotesCommand
1029
+ Rails::Command::RoutesCommand
1030
+ Rails::Command::SecretsCommand
1031
+ Rails::Console
1032
+ Rails::DBConsole].join(','),
1033
+ :public => true,
1034
+ :type => String,
1035
+ :allowed_from_server => false,
1036
+ :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"`.'
1037
+ },
1038
+ :'autostart.denylisted_executables' => {
1039
+ :default => 'irb,rspec',
1040
+ :public => true,
1041
+ :type => String,
1042
+ :allowed_from_server => false,
1043
+ :description => 'Defines a comma-delimited list of executables that the agent should not instrument. For example, `"rake,my_ruby_script.rb"`.'
1044
+ },
1045
+ :'autostart.denylisted_rake_tasks' => {
1046
+ :default => AUTOSTART_DENYLISTED_RAKE_TASKS,
1047
+ :public => true,
1048
+ :type => String,
1049
+ :allowed_from_server => false,
1050
+ :description => 'Defines a comma-delimited list of Rake tasks that the agent should not instrument. For example, `"assets:precompile,db:migrate"`.'
1051
+ },
1052
+ # Code level metrics
1053
+ :'code_level_metrics.enabled' => {
944
1054
  :default => true,
945
- :public => false,
1055
+ :public => true,
946
1056
  :type => Boolean,
947
- :allowed_from_server => false,
948
- :description => 'Replace the libc DNS resolver with the all Ruby resolver Resolv'
1057
+ :allowed_from_server => true,
1058
+ :description => "If `true`, the agent will report source code level metrics for traced methods.\nsee: " \
1059
+ 'https://docs.newrelic.com/docs/apm/agents/ruby-agent/features/ruby-codestream-integration/'
949
1060
  },
950
- :capture_memcache_keys => {
1061
+ # Cross application tracer
1062
+ :"cross_application_tracer.enabled" => {
951
1063
  :default => false,
952
1064
  :public => true,
953
1065
  :type => Boolean,
954
1066
  :allowed_from_server => true,
955
- :description => 'Enable or disable the capture of memcache keys from transaction traces.'
1067
+ :deprecated => true,
1068
+ :description => deprecated_description(
1069
+ :'distributed_tracing.enabled',
1070
+ 'If `true`, enables [cross-application tracing](/docs/agents/ruby-agent/features/cross-application-tracing-ruby/) when `distributed_tracing.enabled` is set to `false`.'
1071
+ )
956
1072
  },
957
- :'transaction_tracer.enabled' => {
1073
+ # Custom attributes
1074
+ :'custom_attributes.enabled' => {
958
1075
  :default => true,
959
1076
  :public => true,
960
1077
  :type => Boolean,
961
- :allowed_from_server => true,
962
- :description => 'If <code>true</code>, enables collection of <a href="https://docs.newrelic.com/docs/apm/traces/transaction-traces/transaction-traces">transaction traces</a>.'
1078
+ :allowed_from_server => false,
1079
+ :description => 'If `false`, custom attributes will not be sent on events.'
963
1080
  },
964
- :'transaction_tracer.transaction_threshold' => {
965
- :default => DefaultSource.transaction_tracer_transaction_threshold,
1081
+ # Custom events
1082
+ :'custom_insights_events.enabled' => {
1083
+ :default => true,
966
1084
  :public => true,
967
- :type => Float,
1085
+ :type => Boolean,
968
1086
  :allowed_from_server => true,
969
- :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 <code><a href="https://docs.newrelic.com/docs/apm/new-relic-apm/getting-started/glossary#apdex_f">apdex_f</a></code>.'
1087
+ :description => 'If `true`, the agent captures [custom events](/docs/insights/new-relic-insights/adding-querying-data/inserting-custom-events-new-relic-apm-agents).'
970
1088
  },
971
- :'transaction_tracer.record_sql' => {
972
- :default => 'obfuscated',
1089
+ :'custom_insights_events.max_samples_stored' => {
1090
+ :default => 3000,
973
1091
  :public => true,
974
- :type => String,
1092
+ :type => Integer,
975
1093
  :allowed_from_server => true,
976
- :description => 'Obfuscation level for SQL queries reported in transaction trace nodes.</p>
977
-
978
- <p>By default, this is set to <code>obfuscated</code>, which strips out the numeric and string literals.</p>
979
-
980
- <ul>
981
- <li>If you do not want the agent to capture query information, set this to <code>none</code>.</li>
982
- <li>If you want the agent to capture all query information in its original form, set this to <code>raw</code>.</li>
983
- <li>When you enable <a href="/docs/agents/manage-apm-agents/configuration/high-security-mode">high security mode</a>, this is automatically set to <code>obfuscated</code>.</li>
984
- </ul>
985
- <p>' # Doc generator will wrap this in <p>...</p>
1094
+ :description => 'Specify a maximum number of custom events to buffer in memory at a time.',
1095
+ :dynamic_name => true
986
1096
  },
987
- :'transaction_tracer.record_redis_arguments' => {
988
- :default => false,
1097
+ # Datastore tracer
1098
+ :'datastore_tracer.database_name_reporting.enabled' => {
1099
+ :default => true,
989
1100
  :public => true,
990
1101
  :type => Boolean,
991
1102
  :allowed_from_server => false,
992
- :description => 'If <code>true</code>, the agent records Redis command arguments in transaction traces.'
1103
+ :description => 'If `false`, the agent will not add `database_name` parameter to transaction or slow sql traces.'
993
1104
  },
994
- :'transaction_tracer.capture_attributes' => {
1105
+ :'datastore_tracer.instance_reporting.enabled' => {
995
1106
  :default => true,
996
1107
  :public => true,
997
1108
  :type => Boolean,
998
- :deprecated => true,
999
1109
  :allowed_from_server => false,
1000
- :description => 'Deprecated; use <a href="#transaction_tracer-attributes-enabled"><code>transaction_tracer.attributes.enabled</code></a> instead.'
1110
+ :description => 'If `false`, the agent will not report datastore instance metrics, nor add `host` or `port_path_or_id` parameters to transaction or slow SQL traces.'
1001
1111
  },
1002
- :'transaction_tracer.explain_threshold' => {
1003
- :default => 0.5,
1112
+ # Disabling
1113
+ :disable_action_cable_instrumentation => {
1114
+ :default => false,
1004
1115
  :public => true,
1005
- :type => Float,
1006
- :allowed_from_server => true,
1007
- :description => 'Threshold (in seconds) above which the agent will collect explain plans. Relevant only when <code><a href="#transaction_tracer.explain_enabled">explain_enabled</a></code> is true.'
1116
+ :type => Boolean,
1117
+ :allowed_from_server => false,
1118
+ :description => 'If `true`, disables Action Cable instrumentation.'
1008
1119
  },
1009
- :'transaction_tracer.explain_enabled' => {
1120
+ # TODO: by subscribing to process_middleware.action_dispatch events,
1121
+ # we duplicate the efforts already performed by non-notifications
1122
+ # based instrumentation. In future, we ought to determine the
1123
+ # extent of the overlap and duplication and end up with only this
1124
+ # notifications based approach existing and the monkey patching
1125
+ # approach removed entirely. NOTE that we will likely not want to
1126
+ # do so until we are okay with dropping support for Rails < v6,
1127
+ # given that these events are available only for v6+.
1128
+ :disable_action_dispatch => {
1010
1129
  :default => true,
1011
- :public => true,
1130
+ :public => false,
1012
1131
  :type => Boolean,
1013
- :allowed_from_server => true,
1014
- :description => 'If <code>true</code>, enables the collection of explain plans in transaction traces. This setting will also apply to explain plans in slow SQL traces if <a href="#slow_sql-explain_enabled"><code>slow_sql.explain_enabled</code></a> is not set separately.'
1132
+ :allowed_from_server => false,
1133
+ :description => 'If `true`, disables Action Dispatch instrumentation.'
1015
1134
  },
1016
- :'transaction_tracer.stack_trace_threshold' => {
1017
- :default => 0.5,
1135
+ :disable_action_controller => {
1136
+ :default => false,
1018
1137
  :public => true,
1019
- :type => Float,
1020
- :allowed_from_server => true,
1021
- :description => 'Specify a threshold in seconds. The agent includes stack traces in transaction trace nodes when the stack trace duration exceeds this threshold.'
1138
+ :type => Boolean,
1139
+ :allowed_from_server => false,
1140
+ :description => 'If `true`, disables Action Controller instrumentation.'
1022
1141
  },
1023
- :'transaction_tracer.limit_segments' => {
1024
- :default => 4000,
1142
+ :disable_action_mailbox => {
1143
+ :default => false,
1025
1144
  :public => true,
1026
- :type => Integer,
1027
- :allowed_from_server => true,
1028
- :description => 'Maximum number of transaction trace nodes to record in a single transaction trace.'
1145
+ :type => Boolean,
1146
+ :allowed_from_server => false,
1147
+ :description => 'If `true`, disables Action Mailbox instrumentation.'
1029
1148
  },
1030
- :disable_sequel_instrumentation => {
1149
+ :disable_action_mailer => {
1031
1150
  :default => false,
1032
1151
  :public => true,
1033
1152
  :type => Boolean,
1034
1153
  :allowed_from_server => false,
1035
- :description => 'If <code>true</code>, disables <a href="https://docs.newrelic.com/docs/agents/ruby-agent/frameworks/sequel-instrumentation">Sequel instrumentation</a>.'
1154
+ :description => 'If `true`, disables Action Mailer instrumentation.'
1036
1155
  },
1037
- :disable_database_instrumentation => {
1156
+ :disable_activejob => {
1038
1157
  :default => false,
1039
1158
  :public => true,
1040
1159
  :type => Boolean,
1041
1160
  :allowed_from_server => false,
1042
- :deprecated => true,
1043
- :description => 'Deprecated; use <a href="#disable_sequel_instrumentation"><code>disable_sequel_instrumentation</code></a> instead.'
1161
+ :description => 'If `true`, disables Active Job instrumentation.'
1044
1162
  },
1045
- :disable_mongo => {
1046
- :default => false,
1047
- :public => true,
1048
- :type => Boolean,
1163
+ :disable_active_storage => {
1164
+ :default => false,
1165
+ :public => true,
1166
+ :type => Boolean,
1049
1167
  :allowed_from_server => false,
1050
- :dynamic_name => true,
1051
- :description => 'If <code>true</code>, the agent won\'t install <a href="https://docs.newrelic.com/docs/agents/ruby-agent/frameworks/mongo-instrumentation">instrumentation for the Mongo gem</a>.'
1168
+ :description => 'If `true`, disables Active Storage instrumentation.'
1052
1169
  },
1053
- :disable_redis => {
1054
- :default => false,
1055
- :public => true,
1056
- :type => Boolean,
1170
+ :disable_active_support => {
1171
+ :default => false,
1172
+ :public => true,
1173
+ :type => Boolean,
1057
1174
  :allowed_from_server => false,
1058
- :description => 'If <code>true</code>, the agent won\'t install <a href="https://docs.newrelic.com/docs/agents/ruby-agent/frameworks/redis-instrumentation">instrumentation for Redis</a>.'
1175
+ :description => 'If `true`, disables Active Support instrumentation.'
1059
1176
  },
1060
- :disable_redis_instrumentation => {
1061
- :default => false,
1062
- :public => false,
1063
- :type => Boolean,
1177
+ :disable_active_record_instrumentation => {
1178
+ :default => value_of(:skip_ar_instrumentation),
1179
+ :documentation_default => false,
1180
+ :public => true,
1181
+ :type => Boolean,
1182
+ :aliases => %i[disable_activerecord_instrumentation],
1064
1183
  :allowed_from_server => false,
1065
- :description => 'Disables installation of Redis instrumentation. Standard key to use is disable_redis.'
1184
+ :description => 'If `true`, disables Active Record instrumentation.'
1066
1185
  },
1067
- :'message_tracer.segment_parameters.enabled' => {
1068
- :default => true,
1069
- :public => true,
1070
- :type => Boolean,
1071
- :allowed_from_server => true,
1072
- :description => 'If <code>true</code>, the agent will collect metadata about messages and attach them as segment parameters.'
1186
+ :disable_active_record_notifications => {
1187
+ :default => false,
1188
+ :public => true,
1189
+ :type => Boolean,
1190
+ :dynamic_name => true,
1191
+ :aliases => %i[disable_activerecord_notifications],
1192
+ :allowed_from_server => false,
1193
+ :description => 'If `true`, disables instrumentation for Active Record 4+'
1073
1194
  },
1074
- :'slow_sql.enabled' => {
1075
- :default => value_of(:'transaction_tracer.enabled'),
1195
+ :disable_cpu_sampler => {
1196
+ :default => false,
1076
1197
  :public => true,
1077
1198
  :type => Boolean,
1078
- :allowed_from_server => true,
1079
- :description => 'If <code>true</code>, the agent collects <a href="https://docs.newrelic.com/docs/apm/applications-menu/monitoring/viewing-slow-query-details">slow SQL queries</a>.'
1199
+ :dynamic_name => true,
1200
+ :allowed_from_server => false,
1201
+ :description => 'If `true`, the agent won\'t sample the CPU usage of the host process.'
1080
1202
  },
1081
- :'slow_sql.explain_threshold' => {
1082
- :default => value_of(:'transaction_tracer.explain_threshold'),
1203
+ :disable_delayed_job_sampler => {
1204
+ :default => false,
1083
1205
  :public => true,
1084
- :type => Float,
1085
- :allowed_from_server => true,
1086
- :description => 'Specify a threshold in seconds. The agent collects <a href="https://docs.newrelic.com/docs/apm/applications-menu/monitoring/viewing-slow-query-details">slow SQL queries</a> and explain plans that exceed this threshold.'
1206
+ :type => Boolean,
1207
+ :dynamic_name => true,
1208
+ :allowed_from_server => false,
1209
+ :description => 'If `true`, the agent won\'t measure the depth of Delayed Job queues.'
1087
1210
  },
1088
- :'slow_sql.explain_enabled' => {
1089
- :default => value_of(:'transaction_tracer.explain_enabled'),
1211
+ :disable_gc_profiler => {
1212
+ :default => false,
1090
1213
  :public => true,
1091
1214
  :type => Boolean,
1092
- :allowed_from_server => true,
1093
- :description => 'If <code>true</code>, the agent collects explain plans in slow SQL queries. If this setting is omitted, the <a href="#transaction_tracer-explain_enabled"><code>transaction_tracer.explain_enabled</code></a> setting will be applied as the default setting for explain plans in slow SQL as well.'
1215
+ :allowed_from_server => false,
1216
+ :description => 'If `true`, disables the use of `GC::Profiler` to measure time spent in garbage collection'
1094
1217
  },
1095
- :'slow_sql.record_sql' => {
1096
- :default => value_of(:'transaction_tracer.record_sql'),
1218
+ :disable_memory_sampler => {
1219
+ :default => false,
1097
1220
  :public => true,
1098
- :type => String,
1099
- :allowed_from_server => true,
1100
- :description => 'Defines an obfuscation level for slow SQL queries. Valid options are <code>obfuscated</code>, <code>raw</code>, or <code>none</code>).'
1221
+ :type => Boolean,
1222
+ :dynamic_name => true,
1223
+ :allowed_from_server => false,
1224
+ :description => 'If `true`, the agent won\'t sample the memory usage of the host process.'
1101
1225
  },
1102
- :'slow_sql.use_longer_sql_id' => {
1226
+ :disable_middleware_instrumentation => {
1103
1227
  :default => false,
1104
1228
  :public => true,
1105
1229
  :type => Boolean,
1106
- :allowed_from_server => true,
1107
- :description => 'Generate a longer sql_id for slow SQL traces. sql_id is used for aggregation of similar queries.'
1230
+ :allowed_from_server => false,
1231
+ :description => <<~DESCRIPTION
1232
+ If `true`, the agent won't wrap third-party middlewares in instrumentation (regardless of whether they are installed via `Rack::Builder` or Rails).
1233
+
1234
+ <Callout variant="important">
1235
+ 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.
1236
+ </Callout>
1237
+ DESCRIPTION
1108
1238
  },
1109
- :'mongo.capture_queries' => {
1110
- :default => true,
1239
+ :disable_samplers => {
1240
+ :default => false,
1111
1241
  :public => true,
1112
1242
  :type => Boolean,
1113
- :allowed_from_server => true,
1114
- :description => 'If <code>true</code>, the agent captures Mongo queries in transaction traces.'
1243
+ :allowed_from_server => false,
1244
+ :description => 'If `true`, disables the collection of sampler metrics. Sampler metrics are metrics that are not event-based (such as CPU time or memory usage).'
1115
1245
  },
1116
- :'mongo.obfuscate_queries' => {
1117
- :default => true,
1246
+ :disable_sequel_instrumentation => {
1247
+ :default => false,
1118
1248
  :public => true,
1119
1249
  :type => Boolean,
1120
- :allowed_from_server => true,
1121
- :description => 'If <code>true</code>, the agent obfuscates Mongo queries in transaction traces.'
1250
+ :allowed_from_server => false,
1251
+ :description => 'If `true`, disables [Sequel instrumentation](/docs/agents/ruby-agent/frameworks/sequel-instrumentation).'
1122
1252
  },
1123
- :'error_collector.enabled' => {
1124
- :default => true,
1253
+ :disable_sidekiq => {
1254
+ :default => false,
1125
1255
  :public => true,
1126
1256
  :type => Boolean,
1127
- :allowed_from_server => true,
1128
- :description => 'If <code>true</code>, the agent captures traced errors and error count metrics.'
1257
+ :allowed_from_server => false,
1258
+ :description => 'If `true`, disables [Sidekiq instrumentation](/docs/agents/ruby-agent/background-jobs/sidekiq-instrumentation).'
1129
1259
  },
1130
- :'error_collector.capture_attributes' => {
1131
- :default => true,
1260
+ :disable_roda_auto_middleware => {
1261
+ :default => false,
1132
1262
  :public => true,
1133
1263
  :type => Boolean,
1134
- :deprecated => true,
1135
1264
  :allowed_from_server => false,
1136
- :description => 'Deprecated; use <a href="#error_collector-attributes-enabled"><code>error_collector.attributes.enabled</code></a> instead.'
1265
+ :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).'
1137
1266
  },
1138
- :'error_collector.ignore_errors' => {
1139
- :default => 'ActionController::RoutingError,Sinatra::NotFound',
1267
+ :disable_sinatra_auto_middleware => {
1268
+ :default => false,
1140
1269
  :public => true,
1141
- :type => String,
1142
- :allowed_from_server => true,
1143
- :description => 'Specify a comma-delimited list of error classes that the agent should ignore.'
1270
+ :type => Boolean,
1271
+ :allowed_from_server => false,
1272
+ :description => <<~DESCRIPTION
1273
+ 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).
1274
+
1275
+ <Callout variant="important">
1276
+ 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.
1277
+
1278
+ To continue using cross application tracing, update the following options in your `newrelic.yml` configuration file:
1279
+
1280
+ ```yaml
1281
+ # newrelic.yml
1282
+
1283
+ cross_application_tracer:
1284
+ enabled: true
1285
+ distributed_tracing:
1286
+ enabled: false
1287
+ ```
1288
+ </Callout>
1289
+ DESCRIPTION
1144
1290
  },
1145
- :'error_collector.max_backtrace_frames' => {
1146
- :default => 50,
1291
+ :disable_view_instrumentation => {
1292
+ :default => false,
1147
1293
  :public => true,
1148
- :type => Integer,
1294
+ :type => Boolean,
1149
1295
  :allowed_from_server => false,
1150
- :description => 'Defines the maximum number of frames in an error backtrace. Backtraces over this amount are truncated at the beginning and end.'
1296
+ :description => 'If `true`, disables view instrumentation.'
1151
1297
  },
1152
- :'error_collector.capture_events' => {
1153
- :default => value_of(:'error_collector.enabled'),
1298
+ :disable_vm_sampler => {
1299
+ :default => false,
1154
1300
  :public => true,
1155
1301
  :type => Boolean,
1156
- :allowed_from_server => true,
1157
1302
  :dynamic_name => true,
1158
- :description => 'If <code>true</code>, the agent collects <a href="https://docs.newrelic.com/docs/insights/new-relic-insights/decorating-events/error-event-default-attributes-insights">TransactionError events</a>.'
1303
+ :allowed_from_server => false,
1304
+ :description => 'If `true`, the agent won\'t [sample performance measurements from the Ruby VM](/docs/agents/ruby-agent/features/ruby-vm-measurements).'
1159
1305
  },
1160
- :'error_collector.max_event_samples_stored' => {
1161
- :default => 100,
1306
+ # Distributed tracing
1307
+ :'distributed_tracing.enabled' => {
1308
+ :default => true,
1162
1309
  :public => true,
1163
- :type => Integer,
1310
+ :type => Boolean,
1164
1311
  :allowed_from_server => true,
1165
- :description => 'Defines the maximum number of <a href="https://docs.newrelic.com/docs/insights/new-relic-insights/decorating-events/error-event-default-attributes-insights">TransactionError events</a> sent to Insights per harvest cycle.'
1312
+ :description => 'Distributed tracing lets you see the path that a request takes through your distributed system. Enabling distributed tracing changes the behavior of some New Relic features, so carefully consult the [transition guide](/docs/transition-guide-distributed-tracing) before you enable this feature.'
1166
1313
  },
1167
- :'rum.enabled' => {
1314
+ # Elasticsearch
1315
+ :'elasticsearch.capture_queries' => {
1168
1316
  :default => true,
1169
- :public => false,
1317
+ :public => true,
1170
1318
  :type => Boolean,
1171
1319
  :allowed_from_server => true,
1172
- :description => 'Enable or disable page load timing (sometimes referred to as real user monitoring or RUM).'
1320
+ :description => 'If `true`, the agent captures Elasticsearch queries in transaction traces.'
1173
1321
  },
1174
- :browser_key => {
1175
- :default => '',
1176
- :public => false,
1177
- :type => String,
1322
+ :'elasticsearch.obfuscate_queries' => {
1323
+ :default => true,
1324
+ :public => true,
1325
+ :type => Boolean,
1178
1326
  :allowed_from_server => true,
1179
- :description => 'Real user monitoring license key for the browser timing header.'
1327
+ :description => 'If `true`, the agent obfuscates Elasticsearch queries in transaction traces.'
1180
1328
  },
1181
- :beacon => {
1182
- :default => '',
1183
- :public => false,
1184
- :type => String,
1185
- :allowed_from_server => true,
1186
- :description => 'Beacon for real user monitoring.'
1187
- },
1188
- :error_beacon => {
1189
- :default => '',
1190
- :public => false,
1191
- :type => String,
1192
- :allowed_from_server => true,
1193
- :description => 'Error beacon for real user monitoring.'
1329
+ # Heroku
1330
+ :'heroku.use_dyno_names' => {
1331
+ :default => true,
1332
+ :public => true,
1333
+ :type => Boolean,
1334
+ :allowed_from_server => false,
1335
+ :description => 'If `true`, the agent uses Heroku dyno names as the hostname.'
1194
1336
  },
1195
- :application_id => {
1196
- :default => '',
1197
- :public => false,
1198
- :type => String,
1199
- :allowed_from_server => true,
1200
- :description => 'Application ID for real user monitoring.'
1337
+ :'heroku.dyno_name_prefixes_to_shorten' => {
1338
+ :default => %w[scheduler run],
1339
+ :public => true,
1340
+ :type => Array,
1341
+ :allowed_from_server => false,
1342
+ :transform => DefaultSource.method(:convert_to_list),
1343
+ :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`).'
1201
1344
  },
1202
- :js_agent_file => {
1345
+ # Infinite tracing
1346
+ :'infinite_tracing.trace_observer.host' => {
1203
1347
  :default => '',
1204
- :public => false,
1348
+ :public => true,
1205
1349
  :type => String,
1206
- :allowed_from_server => true,
1207
- :description => 'Javascript agent file for real user monitoring.'
1350
+ :allowed_from_server => false,
1351
+ :external => :infinite_tracing,
1352
+ :description => 'Configures the hostname for the trace observer Host. ' \
1353
+ 'When configured, enables tail-based sampling by sending all recorded spans ' \
1354
+ 'to a trace observer for further sampling decisions, irrespective of any usual ' \
1355
+ 'agent sampling decision.'
1208
1356
  },
1209
- :'browser_monitoring.auto_instrument' => {
1210
- :default => value_of(:'rum.enabled'),
1357
+ :'infinite_tracing.trace_observer.port' => {
1358
+ :default => 443,
1211
1359
  :public => true,
1212
- :type => Boolean,
1213
- :allowed_from_server => true,
1214
- :description => 'If <code>true</code>, enables <a href="https://docs.newrelic.com/docs/browser/new-relic-browser/installation-configuration/adding-apps-new-relic-browser#select-apm-app">auto-injection</a> of the JavaScript header for page load timing (sometimes referred to as real user monitoring or RUM).'
1360
+ :type => Integer,
1361
+ :allowed_from_server => false,
1362
+ :external => :infinite_tracing,
1363
+ :description => 'Configures the TCP/IP port for the trace observer Host'
1215
1364
  },
1216
- :'browser_monitoring.capture_attributes' => {
1217
- :default => false,
1365
+ # Instrumentation
1366
+ :'instrumentation.active_support_broadcast_logger' => {
1367
+ :default => instrumentation_value_from_boolean(:'application_logging.enabled'),
1368
+ :documentation_default => 'auto',
1369
+ :dynamic_name => true,
1218
1370
  :public => true,
1219
- :type => Boolean,
1220
- :deprecated => true,
1371
+ :type => String,
1221
1372
  :allowed_from_server => false,
1222
- :description => 'Deprecated; use <a href="#browser_monitoring-attributes-enabled"><code>browser_monitoring.attributes.enabled</code></a> instead.'
1373
+ :description => 'Controls auto-instrumentation of `ActiveSupport::BroadcastLogger` at start up. May be one of: `auto`, `prepend`, `chain`, `disabled`. Used in Rails versions >= 7.1.'
1223
1374
  },
1224
- :'browser_monitoring.loader' => {
1225
- :default => DefaultSource.browser_monitoring_loader,
1226
- :public => false,
1375
+ :'instrumentation.active_support_logger' => {
1376
+ :default => instrumentation_value_from_boolean(:'application_logging.enabled'),
1377
+ :documentation_default => 'auto',
1378
+ :dynamic_name => true,
1379
+ :public => true,
1227
1380
  :type => String,
1228
- :allowed_from_server => true,
1229
- :description => 'Type of JavaScript agent loader to use for browser monitoring instrumentation.'
1381
+ :allowed_from_server => false,
1382
+ :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.'
1230
1383
  },
1231
- :'browser_monitoring.loader_version' => {
1232
- :default => '',
1233
- :public => false,
1384
+ :'instrumentation.async_http' => {
1385
+ :default => 'auto',
1386
+ :public => true,
1234
1387
  :type => String,
1235
- :allowed_from_server => true,
1236
- :description => 'Version of JavaScript agent loader (returned from the New Relic <a href="https://docs.newrelic.com/docs/apm/new-relic-apm/getting-started/glossary#collector">collector</a>.)'
1237
- },
1238
- :'browser_monitoring.debug' => {
1239
- :default => false,
1240
- :public => false,
1241
- :type => Boolean,
1242
- :allowed_from_server => true,
1243
- :description => 'Enable or disable debugging version of JavaScript agent loader for browser monitoring instrumentation.'
1244
- },
1245
- :'browser_monitoring.ssl_for_http' => {
1246
- :default => nil,
1247
- :allow_nil => true,
1248
- :public => false,
1249
- :type => Boolean,
1250
- :allowed_from_server => true,
1251
- :description => 'Enable or disable HTTPS instrumentation by JavaScript agent on HTTP pages.'
1388
+ :dynamic_name => true,
1389
+ :allowed_from_server => false,
1390
+ :description => 'Controls auto-instrumentation of Async::HTTP at start up. May be one of: `auto`, `prepend`, `chain`, `disabled`.'
1252
1391
  },
1253
- :js_agent_loader => {
1254
- :default => '',
1255
- :public => false,
1392
+ :'instrumentation.bunny' => {
1393
+ :default => 'auto',
1394
+ :public => true,
1256
1395
  :type => String,
1257
- :allowed_from_server => true,
1258
- :description => 'JavaScript agent loader content.'
1259
- },
1260
- :js_errors_beta => {
1261
- :default => false,
1262
- :public => false,
1263
- :type => Boolean,
1396
+ :dynamic_name => true,
1264
1397
  :allowed_from_server => false,
1265
- :deprecated => true,
1266
- :description => 'Enable or disable beta JavaScript error reporting.'
1267
- },
1268
- :trusted_account_ids => {
1269
- :default => [],
1270
- :public => false,
1271
- :type => Array,
1272
- :allowed_from_server => true,
1273
- :description => 'List of trusted New Relic account IDs for the purposes of cross-application tracing. Inbound requests from applications including cross-application headers that do not come from an account in this list will be ignored.'
1398
+ :description => 'Controls auto-instrumentation of bunny at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.'
1274
1399
  },
1275
- :"cross_application_tracer.enabled" => {
1276
- :default => Proc.new { !NewRelic::Agent.config[:'distributed_tracing.enabled'] },
1400
+ :'instrumentation.fiber' => {
1401
+ :default => 'auto',
1277
1402
  :public => true,
1278
- :type => Boolean,
1279
- :allowed_from_server => true,
1280
- :description => 'If <code>true</code>, enables <a href="https://docs.newrelic.com/docs/apm/transactions/cross-application-traces/cross-application-tracing">cross-application tracing</a>.'
1281
- },
1282
- :cross_application_tracing => {
1283
- :default => nil,
1284
- :allow_nil => true,
1285
- :public => false,
1286
- :type => Boolean,
1403
+ :type => String,
1404
+ :dynamic_name => true,
1287
1405
  :allowed_from_server => false,
1288
- :deprecated => true,
1289
- :description => 'Deprecated in favor of cross_application_tracer.enabled'
1406
+ :description => 'Controls auto-instrumentation of the Fiber class at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.'
1290
1407
  },
1291
- :encoding_key => {
1292
- :default => '',
1293
- :public => false,
1408
+ :'instrumentation.concurrent_ruby' => {
1409
+ :default => 'auto',
1410
+ :public => true,
1294
1411
  :type => String,
1295
- :allowed_from_server => true,
1296
- :description => 'Encoding key for cross-application tracing.'
1412
+ :dynamic_name => true,
1413
+ :allowed_from_server => false,
1414
+ :description => 'Controls auto-instrumentation of the concurrent-ruby library at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.'
1297
1415
  },
1298
- :cross_process_id => {
1299
- :default => '',
1300
- :public => false,
1416
+ :'instrumentation.curb' => {
1417
+ :default => 'auto',
1418
+ :documentation_default => 'auto',
1419
+ :public => true,
1301
1420
  :type => String,
1302
- :allowed_from_server => true,
1303
- :description => 'Cross process ID for cross-application tracing.'
1421
+ :dynamic_name => true,
1422
+ :allowed_from_server => false,
1423
+ :description => 'Controls auto-instrumentation of Curb at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.'
1304
1424
  },
1305
- :'thread_profiler.enabled' => {
1306
- :default => DefaultSource.thread_profiler_enabled,
1425
+ :'instrumentation.delayed_job' => {
1426
+ :default => 'auto',
1427
+ :documentation_default => 'auto',
1307
1428
  :public => true,
1308
- :type => Boolean,
1309
- :allowed_from_server => true,
1310
- :description => 'If <code>true</code>, enables use of the <a href="https://docs.newrelic.com/docs/apm/applications-menu/events/thread-profiler-tool">thread profiler</a>.'
1311
- },
1312
- :'thread_profiler.max_profile_overhead' => {
1313
- :default => 0.05,
1314
- :public => false,
1315
- :type => Float,
1316
- :allowed_from_server => true,
1317
- :description => 'Maximum overhead percentage for thread profiling before agent reduces polling frequency'
1429
+ :type => String,
1430
+ :dynamic_name => true,
1431
+ :allowed_from_server => false,
1432
+ :description => 'Controls auto-instrumentation of Delayed Job at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.'
1318
1433
  },
1319
- :marshaller => {
1320
- :default => 'json',
1434
+ :'instrumentation.elasticsearch' => {
1435
+ :default => 'auto',
1321
1436
  :public => true,
1322
1437
  :type => String,
1438
+ :dynamic_name => true,
1323
1439
  :allowed_from_server => false,
1324
- :description => 'Specifies a marshaller for transmitting data to the New Relic <a href="https://docs.newrelic.com/docs/apm/new-relic-apm/getting-started/glossary#collector">collector</a>. Currently <code>json</code> is the only valid value for this setting.'
1440
+ :description => 'Controls auto-instrumentation of the elasticsearch library at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.'
1325
1441
  },
1326
- :'analytics_events.enabled' => {
1327
- :default => true,
1442
+ :'instrumentation.ethon' => {
1443
+ :default => 'auto',
1328
1444
  :public => true,
1329
- :type => Boolean,
1330
- :allowed_from_server => true,
1331
- :description => 'If <code>true</code>, enables analytics event sampling.'
1445
+ :type => String,
1446
+ :dynamic_name => true,
1447
+ :allowed_from_server => false,
1448
+ :description => 'Controls auto-instrumentation of ethon at start up. May be one of [auto|prepend|chain|disabled]'
1332
1449
  },
1333
- :'analytics_events.max_samples_stored' => {
1334
- :default => 1200,
1450
+ :'instrumentation.excon' => {
1451
+ :default => 'enabled',
1452
+ :documentation_default => 'enabled',
1335
1453
  :public => true,
1336
- :type => Integer,
1337
- :allowed_from_server => true,
1338
- :description => 'Defines the maximum number of request events reported from a single harvest.'
1454
+ :type => String,
1455
+ :dynamic_name => true,
1456
+ :allowed_from_server => false,
1457
+ :description => 'Controls auto-instrumentation of Excon at start-up. May be one of: `enabled`, `disabled`.'
1339
1458
  },
1340
- :'analytics_events.capture_attributes' => {
1341
- :default => true,
1459
+ :'instrumentation.grape' => {
1460
+ :default => 'auto',
1342
1461
  :public => true,
1343
- :type => Boolean,
1344
- :deprecated => true,
1462
+ :type => String,
1463
+ :dynamic_name => true,
1345
1464
  :allowed_from_server => false,
1346
- :description => 'Deprecated; use <a href="#transaction_events-attributes-enabled"><code>transaction_events.attributes.enabled</code></a> instead.'
1465
+ :description => 'Controls auto-instrumentation of Grape at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.'
1347
1466
  },
1348
- :restart_thread_in_children => {
1349
- :default => true,
1350
- :public => false,
1351
- :type => Boolean,
1467
+ :'instrumentation.grpc_client' => {
1468
+ :default => 'auto',
1469
+ :documentation_default => 'auto',
1470
+ :public => true,
1471
+ :type => String,
1472
+ :dynamic_name => true,
1352
1473
  :allowed_from_server => false,
1353
- :description => 'Controls whether to check on running a transaction whether to respawn the harvest thread.'
1474
+ :description => 'Controls auto-instrumentation of gRPC clients at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.'
1354
1475
  },
1355
- :normalize_json_string_encodings => {
1356
- :default => true,
1357
- :public => false,
1358
- :type => Boolean,
1476
+ :'instrumentation.grpc.host_denylist' => {
1477
+ :default => [],
1478
+ :public => true,
1479
+ :type => Array,
1359
1480
  :allowed_from_server => false,
1360
- :description => 'Controls whether to normalize string encodings prior to serializing data for the collector to JSON.'
1481
+ :transform => DefaultSource.method(:convert_to_regexp_list),
1482
+ :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.*"`)
1361
1483
  },
1362
- :backport_fast_active_record_connection_lookup => {
1363
- :default => false,
1484
+ :'instrumentation.grpc_server' => {
1485
+ :default => 'auto',
1486
+ :documentation_default => 'auto',
1364
1487
  :public => true,
1365
- :type => Boolean,
1488
+ :type => String,
1489
+ :dynamic_name => true,
1366
1490
  :allowed_from_server => false,
1367
- :description => 'Backports the faster ActiveRecord connection lookup introduced in Rails 6, which improves agent performance when instrumenting ActiveRecord. Note that this setting may not be compatible with other gems that patch ActiveRecord.'
1491
+ :description => 'Controls auto-instrumentation of gRPC servers at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.'
1368
1492
  },
1369
- :disable_vm_sampler => {
1370
- :default => false,
1371
- :public => true,
1372
- :type => Boolean,
1493
+ :'instrumentation.httpclient' => {
1494
+ :default => 'auto',
1495
+ :documentation_default => 'auto',
1496
+ :public => true,
1497
+ :type => String,
1373
1498
  :dynamic_name => true,
1374
1499
  :allowed_from_server => false,
1375
- :description => 'If <code>true</code>, the agent won\'t <a href="https://docs.newrelic.com/docs/agents/ruby-agent/features/ruby-vm-measurements">sample performance measurements from the Ruby VM</a>.'
1500
+ :description => 'Controls auto-instrumentation of HTTPClient at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.'
1376
1501
  },
1377
- :disable_memory_sampler => {
1378
- :default => false,
1379
- :public => true,
1380
- :type => Boolean,
1502
+ :'instrumentation.httprb' => {
1503
+ :default => 'auto',
1504
+ :documentation_default => 'auto',
1505
+ :public => true,
1506
+ :type => String,
1381
1507
  :dynamic_name => true,
1382
1508
  :allowed_from_server => false,
1383
- :description => 'If <code>true</code>, the agent won\'t sample the memory usage of the host process.'
1509
+ :description => 'Controls auto-instrumentation of http.rb gem at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.'
1384
1510
  },
1385
- :disable_cpu_sampler => {
1386
- :default => false,
1387
- :public => true,
1388
- :type => Boolean,
1511
+ :'instrumentation.httpx' => {
1512
+ :default => 'auto',
1513
+ :documentation_default => 'auto',
1514
+ :public => true,
1515
+ :type => String,
1389
1516
  :dynamic_name => true,
1390
1517
  :allowed_from_server => false,
1391
- :description => 'If <code>true</code>, the agent won\'t sample the CPU usage of the host process.'
1518
+ :description => 'Controls auto-instrumentation of httpx at start up. May be one of [auto|prepend|chain|disabled]'
1392
1519
  },
1393
- :disable_delayed_job_sampler => {
1394
- :default => false,
1395
- :public => true,
1396
- :type => Boolean,
1520
+ :'instrumentation.logger' => {
1521
+ :default => instrumentation_value_from_boolean(:'application_logging.enabled'),
1522
+ :documentation_default => 'auto',
1523
+ :public => true,
1524
+ :type => String,
1397
1525
  :dynamic_name => true,
1398
1526
  :allowed_from_server => false,
1399
- :description => 'If <code>true</code>, the agent won\'t measure the depth of Delayed Job queues.'
1527
+ :description => 'Controls auto-instrumentation of Ruby standard library Logger at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.'
1400
1528
  },
1401
- :disable_active_record_4 => {
1402
- :default => false,
1403
- :public => true,
1404
- :type => Boolean,
1529
+ :'instrumentation.memcache' => {
1530
+ :default => 'auto',
1531
+ :public => true,
1532
+ :type => String,
1405
1533
  :dynamic_name => true,
1406
1534
  :allowed_from_server => false,
1407
- :deprecated => true,
1408
- :description => 'Deprecated. ' \
1409
- 'For agent versions 6.3 or higher, ' \
1410
- 'use <a href="#disable_active_record_notifications"><code>' \
1411
- 'disable_active_record_notifications' \
1412
- '</code></a> instead.'
1413
- },
1414
- :disable_active_record_5 => {
1415
- :default => false,
1416
- :public => true,
1417
- :type => Boolean,
1535
+ :description => 'Controls auto-instrumentation of dalli gem for Memcache at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.'
1536
+ },
1537
+ :'instrumentation.memcached' => {
1538
+ :default => 'auto',
1539
+ :documentation_default => 'auto',
1540
+ :public => true,
1541
+ :type => String,
1418
1542
  :dynamic_name => true,
1419
1543
  :allowed_from_server => false,
1420
- :deprecated => true,
1421
- :description => 'Deprecated. ' \
1422
- 'For agent versions 6.3 or higher, ' \
1423
- 'use <a href="#disable_active_record_notifications"><code>' \
1424
- 'disable_active_record_notifications' \
1425
- '</code></a> instead.'
1544
+ :description => 'Controls auto-instrumentation of memcached gem for Memcache at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.'
1426
1545
  },
1427
- :disable_active_record_notifications => {
1428
- :default => false,
1429
- :public => true,
1430
- :type => Boolean,
1546
+ :'instrumentation.memcache_client' => {
1547
+ :default => 'auto',
1548
+ :documentation_default => 'auto',
1549
+ :public => true,
1550
+ :type => String,
1431
1551
  :dynamic_name => true,
1432
1552
  :allowed_from_server => false,
1433
- :description => 'If <code>true</code>, disables instrumentation for ActiveRecord 4, 5, and 6.'
1553
+ :description => 'Controls auto-instrumentation of memcache-client gem for Memcache at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.'
1434
1554
  },
1435
- :disable_bunny => {
1436
- :default => false,
1437
- :public => true,
1438
- :type => Boolean,
1555
+ :'instrumentation.mongo' => {
1556
+ :default => 'enabled',
1557
+ :documentation_default => 'enabled',
1558
+ :public => true,
1559
+ :type => String,
1439
1560
  :dynamic_name => true,
1440
1561
  :allowed_from_server => false,
1441
- :description => 'If <code>true</code>, disables instrumentation for the bunny gem.'
1562
+ :description => 'Controls auto-instrumentation of Mongo at start-up. May be one of: `enabled`, `disabled`.'
1442
1563
  },
1443
- :disable_curb => {
1444
- :default => false,
1445
- :public => true,
1446
- :type => Boolean,
1564
+ :'instrumentation.net_http' => {
1565
+ :default => 'auto',
1566
+ :documentation_default => 'auto',
1567
+ :public => true,
1568
+ :type => String,
1447
1569
  :dynamic_name => true,
1448
1570
  :allowed_from_server => false,
1449
- :description => 'If <code>true</code>, disables instrumentation for the curb gem.'
1571
+ :description => 'Controls auto-instrumentation of `Net::HTTP` at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.'
1450
1572
  },
1451
- :disable_excon => {
1452
- :default => false,
1453
- :public => true,
1454
- :type => Boolean,
1573
+ :'instrumentation.puma_rack' => {
1574
+ :default => value_of(:'instrumentation.rack'),
1575
+ :documentation_default => 'auto',
1576
+ :public => true,
1577
+ :type => String,
1455
1578
  :dynamic_name => true,
1456
1579
  :allowed_from_server => false,
1457
- :description => 'If <code>true</code>, disables instrumentation for the excon gem.'
1580
+ :description => 'Controls auto-instrumentation of `Puma::Rack`. When enabled, the agent hooks into the ' \
1581
+ '`to_app` method in `Puma::Rack::Builder` to find gems to instrument during ' \
1582
+ 'application startup. May be one of: `auto`, `prepend`, `chain`, `disabled`.'
1458
1583
  },
1459
- :disable_httpclient => {
1460
- :default => false,
1461
- :public => true,
1462
- :type => Boolean,
1584
+ :'instrumentation.puma_rack_urlmap' => {
1585
+ :default => value_of(:'instrumentation.rack_urlmap'),
1586
+ :documentation_default => 'auto',
1587
+ :public => true,
1588
+ :type => String,
1463
1589
  :dynamic_name => true,
1464
1590
  :allowed_from_server => false,
1465
- :description => 'If <code>true</code>, disables instrumentation for the httpclient gem.'
1591
+ :description => 'Controls auto-instrumentation of `Puma::Rack::URLMap` at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.'
1466
1592
  },
1467
- :disable_net_http => {
1468
- :default => false,
1469
- :public => true,
1470
- :type => Boolean,
1593
+ :'instrumentation.rack' => {
1594
+ :default => 'auto',
1595
+ :documentation_default => 'auto',
1596
+ :public => true,
1597
+ :type => String,
1471
1598
  :dynamic_name => true,
1472
1599
  :allowed_from_server => false,
1473
- :description => 'If <code>true</code>, disables instrumentation for Net::HTTP.'
1600
+ :description => 'Controls auto-instrumentation of Rack. When enabled, the agent hooks into the ' \
1601
+ '`to_app` method in `Rack::Builder` to find gems to instrument during ' \
1602
+ 'application startup. May be one of: `auto`, `prepend`, `chain`, `disabled`.'
1474
1603
  },
1475
- :disable_rack => {
1476
- :default => false,
1477
- :public => true,
1478
- :type => Boolean,
1604
+ :'instrumentation.rack_urlmap' => {
1605
+ :default => 'auto',
1606
+ :documentation_default => 'auto',
1607
+ :public => true,
1608
+ :type => String,
1479
1609
  :dynamic_name => true,
1480
1610
  :allowed_from_server => false,
1481
- :description => 'If <code>true</code>, prevents the agent from hooking into the <code>to_app</code> method in Rack::Builder to find gems to instrument during application startup.'
1611
+ :description => 'Controls auto-instrumentation of `Rack::URLMap` at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.'
1482
1612
  },
1483
- :disable_rack_urlmap => {
1484
- :default => false,
1485
- :public => true,
1486
- :type => Boolean,
1613
+ :'instrumentation.rake' => {
1614
+ :default => 'auto',
1615
+ :public => true,
1616
+ :type => String,
1487
1617
  :dynamic_name => true,
1488
1618
  :allowed_from_server => false,
1489
- :description => 'If <code>true</code>, prevents the agent from hooking into Rack::URLMap to install middleware tracing.'
1619
+ :description => 'Controls auto-instrumentation of rake at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.'
1490
1620
  },
1491
- :disable_puma_rack => {
1492
- :default => value_of(:disable_rack),
1493
- :public => true,
1494
- :type => Boolean,
1621
+ :'instrumentation.redis' => {
1622
+ :default => 'auto',
1623
+ :public => true,
1624
+ :type => String,
1495
1625
  :dynamic_name => true,
1496
1626
  :allowed_from_server => false,
1497
- :description => 'If <code>true</code>, prevents the agent from hooking into the <code>to_app</code> method in Puma::Rack::Builder to find gems to instrument during application startup.'
1627
+ :description => 'Controls auto-instrumentation of Redis at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.'
1498
1628
  },
1499
- :disable_puma_rack_urlmap => {
1500
- :default => value_of(:disable_rack_urlmap),
1501
- :public => true,
1502
- :type => Boolean,
1629
+ :'instrumentation.resque' => {
1630
+ :default => 'auto',
1631
+ :documentation_default => 'auto',
1632
+ :public => true,
1633
+ :type => String,
1503
1634
  :dynamic_name => true,
1504
1635
  :allowed_from_server => false,
1505
- :description => 'If <code>true</code>, prevents the agent from hooking into Puma::Rack::URLMap to install middleware tracing.'
1636
+ :description => 'Controls auto-instrumentation of resque at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.'
1506
1637
  },
1507
- :disable_typhoeus => {
1508
- :default => false,
1509
- :public => true,
1510
- :type => Boolean,
1638
+ :'instrumentation.roda' => {
1639
+ :default => 'auto',
1640
+ :public => true,
1641
+ :type => String,
1511
1642
  :dynamic_name => true,
1512
1643
  :allowed_from_server => false,
1513
- :description => 'If <code>true</code>, the agent won\'t install instrumentation for the typhoeus gem.'
1644
+ :description => 'Controls auto-instrumentation of Roda at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.'
1514
1645
  },
1515
- :disable_httprb => {
1516
- :default => false,
1517
- :public => true,
1518
- :type => Boolean,
1646
+ :'instrumentation.sinatra' => {
1647
+ :default => 'auto',
1648
+ :public => true,
1649
+ :type => String,
1519
1650
  :dynamic_name => true,
1520
1651
  :allowed_from_server => false,
1521
- :description => 'If <code>true</code>, the agent won\'t install instrumentation for the http.rb gem.'
1652
+ :description => 'Controls auto-instrumentation of Sinatra at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.'
1522
1653
  },
1523
- :disable_middleware_instrumentation => {
1524
- :default => false,
1525
- :public => true,
1526
- :type => Boolean,
1654
+ :'instrumentation.stripe' => {
1655
+ :default => 'enabled',
1656
+ :public => true,
1657
+ :type => String,
1527
1658
  :allowed_from_server => false,
1528
- :description => 'If <code>true</code>, the agent won\'t wrap third-party middlewares in instrumentation (regardless of whether they are installed via Rack::Builder or Rails).'
1659
+ :description => 'Controls auto-instrumentation of Stripe at startup. May be one of: `enabled`, `disabled`.'
1529
1660
  },
1530
- :disable_rails_middleware => {
1531
- :default => false,
1532
- :public => false,
1533
- :type => Boolean,
1661
+ :'instrumentation.view_component' => {
1662
+ :default => 'auto',
1663
+ :public => true,
1664
+ :type => String,
1665
+ :dynamic_name => true,
1534
1666
  :allowed_from_server => false,
1535
- :description => 'Internal name for controlling Rails 3+ middleware instrumentation'
1667
+ :description => 'Controls auto-instrumentation of ViewComponent at startup. May be one of: `auto`, `prepend`, `chain`, `disabled`.'
1668
+ },
1669
+ :'stripe.user_data.include' => {
1670
+ default: NewRelic::EMPTY_ARRAY,
1671
+ public: true,
1672
+ type: Array,
1673
+ dynamic_name: true,
1674
+ allowed_from_server: false,
1675
+ :transform => DefaultSource.method(:convert_to_list),
1676
+ :description => <<~DESCRIPTION
1677
+ An array of strings to specify which keys inside a Stripe event's `user_data` hash should be reported
1678
+ to New Relic. Each string in this array will be turned into a regular expression via `Regexp.new` to
1679
+ permit advanced matching. Setting the value to `["."]` will report all `user_data`.
1680
+ DESCRIPTION
1681
+ },
1682
+ :'stripe.user_data.exclude' => {
1683
+ default: NewRelic::EMPTY_ARRAY,
1684
+ public: true,
1685
+ type: Array,
1686
+ dynamic_name: true,
1687
+ allowed_from_server: false,
1688
+ :transform => DefaultSource.method(:convert_to_list),
1689
+ :description => <<~DESCRIPTION
1690
+ An array of strings to specify which keys and/or values inside a Stripe event's `user_data` hash should
1691
+ not be reported to New Relic. Each string in this array will be turned into a regular expression via
1692
+ `Regexp.new` to permit advanced matching. For each hash pair, if either the key or value is matched the
1693
+ pair will not be reported. By default, no `user_data` is reported, so this option should only be used if
1694
+ the `stripe.user_data.include` option is being used.
1695
+ DESCRIPTION
1696
+ },
1697
+ :'instrumentation.thread' => {
1698
+ :default => 'auto',
1699
+ :public => true,
1700
+ :type => String,
1701
+ :dynamic_name => true,
1702
+ :allowed_from_server => false,
1703
+ :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`.'
1536
1704
  },
1537
- :'heroku.use_dyno_names' => {
1538
- :default => true,
1539
- :public => true,
1540
- :type => Boolean,
1705
+ :'instrumentation.thread.tracing' => {
1706
+ :default => true,
1707
+ :public => true,
1708
+ :type => Boolean,
1541
1709
  :allowed_from_server => false,
1542
- :description => 'If <code>true</code>, the agent uses Heroku dyno names as the hostname.'
1710
+ :description => 'Controls auto-instrumentation of the Thread class at start-up to automatically add tracing to all Threads created in the application.'
1543
1711
  },
1544
- :'heroku.dyno_name_prefixes_to_shorten' => {
1545
- :default => ['scheduler', 'run'],
1546
- :public => true,
1547
- :type => Array,
1712
+ :'thread_ids_enabled' => {
1713
+ :default => false,
1714
+ :public => false,
1715
+ :type => Boolean,
1548
1716
  :allowed_from_server => false,
1549
- :transform => DefaultSource.method(:convert_to_list),
1550
- :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>).'
1717
+ :description => 'If enabled, will append the current Thread and Fiber object ids onto the segment names of segments created in Threads and concurrent-ruby'
1551
1718
  },
1552
- :'process_host.display_name' => {
1553
- :default => Proc.new{ NewRelic::Agent::Hostname.get },
1554
- :public => true,
1555
- :type => String,
1719
+ :'instrumentation.tilt' => {
1720
+ :default => 'auto',
1721
+ :public => true,
1722
+ :type => String,
1723
+ :dynamic_name => true,
1556
1724
  :allowed_from_server => false,
1557
- :description => 'Specify a custom host name for <a href="https://docs.newrelic.com/docs/apm/new-relic-apm/maintenance/add-rename-remove-hosts#display_name">display in the New Relic UI</a>.'
1725
+ :description => 'Controls auto-instrumentation of the Tilt template rendering library at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.'
1558
1726
  },
1559
- :labels => {
1560
- :default => '',
1561
- :public => true,
1562
- :type => String,
1727
+ :'instrumentation.typhoeus' => {
1728
+ :default => 'auto',
1729
+ :documentation_default => 'auto',
1730
+ :public => true,
1731
+ :type => String,
1732
+ :dynamic_name => true,
1563
1733
  :allowed_from_server => false,
1564
- :description => 'A dictionary of <a href="/docs/data-analysis/user-interface-functions/labels-categories-organize-your-apps-servers">label names</a> and values that will be applied to the data sent from this agent. May also be expressed as a semicolon-delimited <code>;</code> string of colon-separated <code>:</code> pairs. For example, <code><var>Server</var>:<var>One</var>;<var>Data Center</var>:<var>Primary</var></code>.'
1734
+ :description => 'Controls auto-instrumentation of Typhoeus at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.'
1565
1735
  },
1566
- :aggressive_keepalive => {
1567
- :default => true,
1568
- :public => false,
1569
- :type => Boolean,
1736
+ # Message tracer
1737
+ :'message_tracer.segment_parameters.enabled' => {
1738
+ :default => true,
1739
+ :public => true,
1740
+ :type => Boolean,
1570
1741
  :allowed_from_server => true,
1571
- :description => 'If true, attempt to keep the TCP connection to the collector alive between harvests.'
1742
+ :description => 'If `true`, the agent will collect metadata about messages and attach them as segment parameters.'
1572
1743
  },
1573
- :keep_alive_timeout => {
1574
- :default => 60,
1575
- :public => false,
1576
- :type => Integer,
1744
+ # Mongo
1745
+ :'mongo.capture_queries' => {
1746
+ :default => true,
1747
+ :public => true,
1748
+ :type => Boolean,
1577
1749
  :allowed_from_server => true,
1578
- :description => 'Timeout for keep alive on TCP connection to collector if supported by Ruby version. Only used in conjunction when aggressive_keepalive is enabled.'
1750
+ :description => 'If `true`, the agent captures Mongo queries in transaction traces.'
1579
1751
  },
1580
- :ca_bundle_path => {
1581
- :default => nil,
1582
- :allow_nil => true,
1583
- :public => true,
1584
- :type => String,
1585
- :allowed_from_server => false,
1586
- :description => "Manual override for the path to your local CA bundle. This CA bundle will be used to validate the SSL certificate presented by New Relic\'s data collection service."
1752
+ :'mongo.obfuscate_queries' => {
1753
+ :default => true,
1754
+ :public => true,
1755
+ :type => Boolean,
1756
+ :allowed_from_server => true,
1757
+ :description => 'If `true`, the agent obfuscates Mongo queries in transaction traces.'
1587
1758
  },
1759
+ # Process host
1760
+ :'process_host.display_name' => {
1761
+ :default => proc { NewRelic::Agent::Hostname.get },
1762
+ :public => true,
1763
+ :type => String,
1764
+ :allowed_from_server => false,
1765
+ :description => 'Specify a custom host name for [display in the New Relic UI](/docs/apm/new-relic-apm/maintenance/add-rename-remove-hosts#display_name).'
1766
+ },
1767
+ # Rails
1768
+ :'defer_rails_initialization' => {
1769
+ :default => false,
1770
+ :public => true,
1771
+ :type => Boolean,
1772
+ :external => true, # this config is used directly from the ENV variables
1773
+ :allowed_from_server => false,
1774
+ :description => <<-DESCRIPTION
1775
+ If `true`, when the agent is in an application using Ruby on Rails, it will start after `config/initializers` run.
1776
+
1777
+ <Callout variant="caution">
1778
+ This option may only be set by environment variable.
1779
+ </Callout>
1780
+ DESCRIPTION
1781
+ },
1782
+ # Rake
1783
+ :'rake.tasks' => {
1784
+ :default => [],
1785
+ :public => true,
1786
+ :type => Array,
1787
+ :allowed_from_server => false,
1788
+ :transform => DefaultSource.method(:convert_to_regexp_list),
1789
+ :description => 'Specify an Array of Rake tasks to automatically instrument. ' \
1790
+ 'This configuration option converts the Array to a RegEx list. If you\'d like ' \
1791
+ 'to allow all tasks by default, use `rake.tasks: [.+]`. No rake tasks will be ' \
1792
+ 'instrumented unless they\'re added to this list. For more information, ' \
1793
+ 'visit the [New Relic Rake Instrumentation docs](/docs/apm/agents/ruby-agent/background-jobs/rake-instrumentation).'
1794
+ },
1795
+ :'rake.connect_timeout' => {
1796
+ :default => 10,
1797
+ :public => true,
1798
+ :type => Integer,
1799
+ :allowed_from_server => false,
1800
+ :description => 'Timeout for waiting on connect to complete before a rake task'
1801
+ },
1802
+ # Rules
1588
1803
  :'rules.ignore_url_regexes' => {
1589
- :default => [],
1590
- :public => true,
1591
- :type => Array,
1804
+ :default => [],
1805
+ :public => true,
1806
+ :type => Array,
1592
1807
  :allowed_from_server => true,
1593
- :transform => DefaultSource.method(:convert_to_regexp_list),
1594
- :description => 'Define transactions you want the agent to ignore, by specifying a list of patterns matching the URI you want to ignore.'
1808
+ :transform => DefaultSource.method(:convert_to_regexp_list),
1809
+ :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).'
1810
+ },
1811
+ # Sidekiq
1812
+ :'sidekiq.args.include' => {
1813
+ default: NewRelic::EMPTY_ARRAY,
1814
+ public: true,
1815
+ type: Array,
1816
+ dynamic_name: true,
1817
+ allowed_from_server: false,
1818
+ description: <<~SIDEKIQ_ARGS_INCLUDE.chomp.tr("\n", ' ')
1819
+ An array of strings that will collectively serve as an allowlist for filtering which Sidekiq
1820
+ job arguments get reported to New Relic. To capture any Sidekiq arguments,
1821
+ 'job.sidekiq.args.*' must be added to the separate `:'attributes.include'` configuration option. Each
1822
+ string in this array will be turned into a regular expression via `Regexp.new` to permit advanced
1823
+ matching. For job argument hashes, if either a key or value matches the pair will be included. All
1824
+ matching job argument array elements and job argument scalars will be included.
1825
+ SIDEKIQ_ARGS_INCLUDE
1826
+ },
1827
+ :'sidekiq.args.exclude' => {
1828
+ default: NewRelic::EMPTY_ARRAY,
1829
+ public: true,
1830
+ type: Array,
1831
+ dynamic_name: true,
1832
+ allowed_from_server: false,
1833
+ description: <<~SIDEKIQ_ARGS_EXCLUDE.chomp.tr("\n", ' ')
1834
+ An array of strings that will collectively serve as a denylist for filtering which Sidekiq
1835
+ job arguments get reported to New Relic. To capture any Sidekiq arguments,
1836
+ 'job.sidekiq.args.*' must be added to the separate `:'attributes.include'` configuration option. Each string
1837
+ in this array will be turned into a regular expression via `Regexp.new` to permit advanced matching.
1838
+ For job argument hashes, if either a key or value matches the pair will be excluded. All matching job
1839
+ argument array elements and job argument scalars will be excluded.
1840
+ SIDEKIQ_ARGS_EXCLUDE
1841
+ },
1842
+ # Slow SQL
1843
+ :'slow_sql.enabled' => {
1844
+ :default => value_of(:'transaction_tracer.enabled'),
1845
+ :documentation_default => true,
1846
+ :public => true,
1847
+ :type => Boolean,
1848
+ :allowed_from_server => true,
1849
+ :description => 'If `true`, the agent collects [slow SQL queries](/docs/apm/applications-menu/monitoring/viewing-slow-query-details).'
1595
1850
  },
1596
- :'synthetics.traces_limit' => {
1597
- :default => 20,
1598
- :public => false,
1599
- :type => Integer,
1851
+ :'slow_sql.explain_threshold' => {
1852
+ :default => value_of(:'transaction_tracer.explain_threshold'),
1853
+ :documentation_default => 0.5,
1854
+ :public => true,
1855
+ :type => Float,
1600
1856
  :allowed_from_server => true,
1601
- :description => 'Maximum number of synthetics transaction traces to hold for a given harvest'
1857
+ :description => 'Specify a threshold in seconds. The agent collects [slow SQL queries](/docs/apm/applications-menu/monitoring/viewing-slow-query-details) and explain plans that exceed this threshold.'
1602
1858
  },
1603
- :'synthetics.events_limit' => {
1604
- :default => 200,
1605
- :public => false,
1606
- :type => Integer,
1859
+ :'slow_sql.explain_enabled' => {
1860
+ :default => value_of(:'transaction_tracer.explain_enabled'),
1861
+ :documentation_default => true,
1862
+ :public => true,
1863
+ :type => Boolean,
1607
1864
  :allowed_from_server => true,
1608
- :description => 'Maximum number of synthetics transaction events to hold for a given harvest'
1865
+ :description => 'If `true`, the agent collects explain plans in slow SQL queries. If this setting is omitted, the [`transaction_tracer.explain_enabled`](#transaction_tracer-explain_enabled) setting will be applied as the default setting for explain plans in slow SQL as well.'
1609
1866
  },
1610
- :'custom_insights_events.enabled' => {
1611
- :default => true,
1612
- :public => true,
1613
- :type => Boolean,
1867
+ :'slow_sql.record_sql' => {
1868
+ :default => value_of(:'transaction_tracer.record_sql'),
1869
+ :documentation_default => 'obfuscated',
1870
+ :public => true,
1871
+ :type => String,
1614
1872
  :allowed_from_server => true,
1615
- :description => 'If <code>true</code>, the agent captures <a href="/docs/insights/new-relic-insights/adding-querying-data/inserting-custom-events-new-relic-apm-agents">New Relic Insights custom events</a>.'
1873
+ :description => 'Defines an obfuscation level for slow SQL queries. Valid options are `obfuscated`, `raw`, or `none`.'
1616
1874
  },
1617
- :'custom_insights_events.max_samples_stored' => {
1618
- :default => 1000,
1619
- :public => true,
1620
- :type => Integer,
1875
+ :'slow_sql.use_longer_sql_id' => {
1876
+ :default => false,
1877
+ :public => true,
1878
+ :type => Boolean,
1621
1879
  :allowed_from_server => true,
1622
- :description => 'Specify a maximum number of custom Insights events to buffer in memory at a time.',
1623
- :dynamic_name => true
1880
+ :description => 'Generate a longer `sql_id` for slow SQL traces. `sql_id` is used for aggregation of similar queries.'
1624
1881
  },
1625
- :disable_grape_instrumentation => {
1626
- :default => false,
1627
- :public => false,
1628
- :type => Boolean,
1629
- :allowed_from_server => false,
1630
- :description => 'If <code>true</code>, the agent won\'t install Grape instrumentation.'
1882
+ # Span events
1883
+ :'span_events.enabled' => {
1884
+ :default => true,
1885
+ :public => true,
1886
+ :type => Boolean,
1887
+ :allowed_from_server => true,
1888
+ :description => 'If `true`, enables span event sampling.'
1631
1889
  },
1632
- :disable_grape => {
1633
- :default => false,
1634
- :public => true,
1635
- :type => Boolean,
1890
+ :'span_events.queue_size' => {
1891
+ :default => 10_000,
1892
+ :public => true,
1893
+ :type => Integer,
1636
1894
  :allowed_from_server => false,
1637
- :description => 'If <code>true</code>, the agent won\'t install Grape instrumentation.'
1895
+ :external => :infinite_tracing,
1896
+ :description => 'Sets the maximum number of span events to buffer when streaming to the trace observer.'
1638
1897
  },
1639
- :'attributes.enabled' => {
1640
- :default => true,
1641
- :public => true,
1642
- :type => Boolean,
1643
- :allowed_from_server => false,
1644
- :description => 'If <code>true</code>, enables capture of attributes for all destinations.'
1898
+ :'span_events.max_samples_stored' => {
1899
+ :default => 2000,
1900
+ :public => true,
1901
+ :type => Integer,
1902
+ :allowed_from_server => true,
1903
+ :description => 'Defines the maximum number of span events reported from a single harvest. Any Integer between `1` and `10000` is valid.'
1645
1904
  },
1646
- :'transaction_tracer.attributes.enabled' => {
1647
- :default => value_of(:'transaction_tracer.capture_attributes'),
1648
- :public => true,
1649
- :type => Boolean,
1905
+ # Strip exception messages
1906
+ :'strip_exception_messages.enabled' => {
1907
+ :default => value_of(:high_security),
1908
+ :documentation_default => false,
1909
+ :public => true,
1910
+ :type => Boolean,
1650
1911
  :allowed_from_server => false,
1651
- :description => 'If <code>true</code>, the agent captures attributes from transaction traces.'
1912
+ :description => 'If true, the agent strips messages from all exceptions except those in the [allowlist](#strip_exception_messages-allowlist). Enabled automatically in [high security mode](/docs/accounts-partnerships/accounts/security/high-security).'
1652
1913
  },
1653
- :'transaction_events.attributes.enabled' => {
1654
- :default => value_of(:'analytics_events.capture_attributes'),
1655
- :public => true,
1656
- :type => Boolean,
1914
+ :'strip_exception_messages.allowed_classes' => {
1915
+ :default => '',
1916
+ :public => true,
1917
+ :type => String,
1657
1918
  :allowed_from_server => false,
1658
- :description => 'If <code>true</code>, the agent captures attributes from transaction events.'
1919
+ :transform => DefaultSource.method(:convert_to_constant_list),
1920
+ :description => 'Specify a list of exceptions you do not want the agent to strip when [strip_exception_messages](#strip_exception_messages-enabled) is `true`. Separate exceptions with a comma. For example, `"ImportantException,PreserveMessageException"`.'
1659
1921
  },
1660
- :'error_collector.attributes.enabled' => {
1661
- :default => value_of(:'error_collector.capture_attributes'),
1662
- :public => true,
1663
- :type => Boolean,
1664
- :allowed_from_server => false,
1665
- :description => 'If <code>true</code>, the agent captures attributes from error collection.'
1922
+ # Thread profiler
1923
+ :'thread_profiler.enabled' => {
1924
+ :default => DefaultSource.thread_profiler_enabled,
1925
+ :documentation_default => false,
1926
+ :public => true,
1927
+ :type => Boolean,
1928
+ :allowed_from_server => true,
1929
+ :description => 'If `true`, enables use of the [thread profiler](/docs/apm/applications-menu/events/thread-profiler-tool).'
1666
1930
  },
1667
- :'browser_monitoring.attributes.enabled' => {
1668
- :default => value_of(:'browser_monitoring.capture_attributes'),
1669
- :public => true,
1670
- :type => Boolean,
1931
+ # Utilization
1932
+ :'utilization.detect_aws' => {
1933
+ :default => true,
1934
+ :public => true,
1935
+ :type => Boolean,
1671
1936
  :allowed_from_server => false,
1672
- :description => 'If <code>true</code>, the agent captures attributes from browser monitoring.'
1937
+ :dynamic_name => true,
1938
+ :description => 'If `true`, the agent automatically detects that it is running in an AWS environment.'
1673
1939
  },
1674
- :'span_events.attributes.enabled' => {
1675
- :default => true,
1676
- :public => true,
1677
- :type => Boolean,
1940
+ :'utilization.detect_azure' => {
1941
+ :default => true,
1942
+ :public => true,
1943
+ :type => Boolean,
1678
1944
  :allowed_from_server => false,
1679
- :description => 'If <code>true</code>, the agent captures attributes on span events.'
1945
+ :dynamic_name => true,
1946
+ :description => 'If `true`, the agent automatically detects that it is running in an Azure environment.'
1680
1947
  },
1681
- :'transaction_segments.attributes.enabled' => {
1682
- :default => true,
1683
- :public => true,
1684
- :type => Boolean,
1948
+ :'utilization.detect_docker' => {
1949
+ :default => true,
1950
+ :public => true,
1951
+ :type => Boolean,
1685
1952
  :allowed_from_server => false,
1686
- :description => 'If <code>true</code>, the agent captures attributes on transaction segments.'
1953
+ :description => 'If `true`, the agent automatically detects that it is running in Docker.'
1687
1954
  },
1688
- :'attributes.exclude' => {
1689
- :default => [],
1690
- :public => true,
1691
- :type => Array,
1955
+ :'utilization.detect_gcp' => {
1956
+ :default => true,
1957
+ :public => true,
1958
+ :type => Boolean,
1692
1959
  :allowed_from_server => false,
1693
- :transform => DefaultSource.method(:convert_to_list),
1694
- :description => 'Prefix of attributes to exclude from all destinations. Allows <code>*</code> as wildcard at end.'
1960
+ :dynamic_name => true,
1961
+ :description => 'If `true`, the agent automatically detects that it is running in an Google Cloud Platform environment.'
1695
1962
  },
1696
- :'transaction_tracer.attributes.exclude' => {
1697
- :default => [],
1698
- :public => true,
1699
- :type => Array,
1963
+ :'utilization.detect_kubernetes' => {
1964
+ :default => true,
1965
+ :public => true,
1966
+ :type => Boolean,
1700
1967
  :allowed_from_server => false,
1701
- :transform => DefaultSource.method(:convert_to_list),
1702
- :description => 'Prefix of attributes to exclude from transaction traces. Allows <code>*</code> as wildcard at end.'
1968
+ :description => 'If `true`, the agent automatically detects that it is running in Kubernetes.'
1703
1969
  },
1704
- :'transaction_events.attributes.exclude' => {
1705
- :default => [],
1706
- :public => true,
1707
- :type => Array,
1970
+ :'utilization.detect_pcf' => {
1971
+ :default => true,
1972
+ :public => true,
1973
+ :type => Boolean,
1708
1974
  :allowed_from_server => false,
1709
- :transform => DefaultSource.method(:convert_to_list),
1710
- :description => 'Prefix of attributes to exclude from transaction events. Allows <code>*</code> as wildcard at end.'
1975
+ :dynamic_name => true,
1976
+ :description => 'If `true`, the agent automatically detects that it is running in a Pivotal Cloud Foundry environment.'
1711
1977
  },
1712
- :'error_collector.attributes.exclude' => {
1713
- :default => [],
1714
- :public => true,
1715
- :type => Array,
1978
+ # Private
1979
+ :account_id => {
1980
+ :default => nil,
1981
+ :allow_nil => true,
1982
+ :public => false,
1983
+ :type => String,
1984
+ :allowed_from_server => true,
1985
+ :description => 'The account id associated with your application.'
1986
+ },
1987
+ :aggressive_keepalive => {
1988
+ :default => true,
1989
+ :public => false,
1990
+ :type => Boolean,
1991
+ :allowed_from_server => true,
1992
+ :description => 'If true, attempt to keep the TCP connection to the collector alive between harvests.'
1993
+ },
1994
+ :api_host => {
1995
+ :default => DefaultSource.api_host,
1996
+ :public => false,
1997
+ :type => String,
1716
1998
  :allowed_from_server => false,
1717
- :transform => DefaultSource.method(:convert_to_list),
1718
- :description => 'Prefix of attributes to exclude from error collection. Allows <code>*</code> as wildcard at end.'
1999
+ :description => 'API host for New Relic.'
1719
2000
  },
1720
- :'browser_monitoring.attributes.exclude' => {
1721
- :default => [],
1722
- :public => true,
1723
- :type => Array,
2001
+ :api_port => {
2002
+ :default => value_of(:port),
2003
+ :public => false,
2004
+ :type => Integer,
1724
2005
  :allowed_from_server => false,
1725
- :transform => DefaultSource.method(:convert_to_list),
1726
- :description => 'Prefix of attributes to exclude from browser monitoring. Allows <code>*</code> as wildcard at end.'
2006
+ :description => 'Port for the New Relic API host.'
1727
2007
  },
1728
- :'span_events.attributes.exclude' => {
1729
- :default => [],
1730
- :public => true,
1731
- :type => Array,
2008
+ :application_id => {
2009
+ :default => '',
2010
+ :public => false,
2011
+ :type => String,
2012
+ :allowed_from_server => true,
2013
+ :description => 'Application ID for real user monitoring.'
2014
+ },
2015
+ :beacon => {
2016
+ :default => '',
2017
+ :public => false,
2018
+ :type => String,
2019
+ :allowed_from_server => true,
2020
+ :description => 'Beacon for real user monitoring.'
2021
+ },
2022
+ :browser_key => {
2023
+ :default => '',
2024
+ :public => false,
2025
+ :type => String,
2026
+ :allowed_from_server => true,
2027
+ :description => 'Real user monitoring license key for the browser timing header.'
2028
+ },
2029
+ :'browser_monitoring.loader' => {
2030
+ :default => 'rum',
2031
+ :public => false,
2032
+ :type => String,
2033
+ :allowed_from_server => true,
2034
+ :description => 'Type of JavaScript agent loader to use for browser monitoring instrumentation.'
2035
+ },
2036
+ :'browser_monitoring.loader_version' => {
2037
+ :default => '',
2038
+ :public => false,
2039
+ :type => String,
2040
+ :allowed_from_server => true,
2041
+ :description => 'Version of JavaScript agent loader (returned from the New Relic [collector](/docs/apm/new-relic-apm/getting-started/glossary#collector).)'
2042
+ },
2043
+ :'browser_monitoring.debug' => {
2044
+ :default => false,
2045
+ :public => false,
2046
+ :type => Boolean,
2047
+ :allowed_from_server => true,
2048
+ :description => 'Enable or disable debugging version of JavaScript agent loader for browser monitoring instrumentation.'
2049
+ },
2050
+ :'browser_monitoring.ssl_for_http' => {
2051
+ :default => nil,
2052
+ :allow_nil => true,
2053
+ :public => false,
2054
+ :type => Boolean,
2055
+ :allowed_from_server => true,
2056
+ :description => 'Enable or disable HTTPS instrumentation by JavaScript agent on HTTP pages.'
2057
+ },
2058
+ :compressed_content_encoding => {
2059
+ :default => 'gzip',
2060
+ :public => false,
2061
+ :type => String,
1732
2062
  :allowed_from_server => false,
1733
- :transform => DefaultSource.method(:convert_to_list),
1734
- :description => 'Prefix of attributes to exclude from span events. Allows <code>*</code> as wildcard at end.'
2063
+ :description => 'Encoding to use if data needs to be compressed. The options are deflate and gzip.'
1735
2064
  },
1736
- :'transaction_segments.attributes.exclude' => {
1737
- :default => [],
1738
- :public => true,
1739
- :type => Array,
2065
+ :config_search_paths => {
2066
+ :default => DefaultSource.config_search_paths,
2067
+ :public => false,
2068
+ :type => Array,
1740
2069
  :allowed_from_server => false,
1741
- :transform => DefaultSource.method(:convert_to_list),
1742
- :description => 'Prefix of attributes to exclude from transaction segments. Allows <code>*</code> as wildcard at end.'
2070
+ :description => "An array of candidate locations for the agent's configuration file."
1743
2071
  },
1744
- :'attributes.include' => {
1745
- :default => [],
1746
- :public => true,
1747
- :type => Array,
2072
+ :cross_process_id => {
2073
+ :default => '',
2074
+ :public => false,
2075
+ :type => String,
2076
+ :allowed_from_server => true,
2077
+ :description => 'Cross process ID for cross-application tracing.'
2078
+ },
2079
+ :data_report_period => {
2080
+ :default => 60,
2081
+ :public => false,
2082
+ :type => Integer,
2083
+ :allowed_from_server => true,
2084
+ :description => 'Number of seconds betwixt connections to the New Relic data collection service.'
2085
+ },
2086
+ :dispatcher => {
2087
+ :default => DefaultSource.dispatcher,
2088
+ :public => false,
2089
+ :type => Symbol,
1748
2090
  :allowed_from_server => false,
1749
- :transform => DefaultSource.method(:convert_to_list),
1750
- :description => 'Prefix of attributes to include in all destinations. Allows <code>*</code> as wildcard at end.'
2091
+ :description => 'Autodetected application component that reports metrics to New Relic.'
1751
2092
  },
1752
- :'transaction_tracer.attributes.include' => {
1753
- :default => [],
1754
- :public => true,
1755
- :type => Array,
2093
+ :disable_harvest_thread => {
2094
+ :default => false,
2095
+ :public => false,
2096
+ :type => Boolean,
1756
2097
  :allowed_from_server => false,
1757
- :transform => DefaultSource.method(:convert_to_list),
1758
- :description => 'Prefix of attributes to include in transaction traces. Allows <code>*</code> as wildcard at end.'
2098
+ :description => 'Enable or disable the harvest thread.'
1759
2099
  },
1760
- :'transaction_events.attributes.include' => {
1761
- :default => [],
1762
- :public => true,
1763
- :type => Array,
2100
+ :disable_rails_middleware => {
2101
+ :default => false,
2102
+ :public => false,
2103
+ :type => Boolean,
1764
2104
  :allowed_from_server => false,
1765
- :transform => DefaultSource.method(:convert_to_list),
1766
- :description => 'Prefix of attributes to include in transaction events. Allows <code>*</code> as wildcard at end.'
2105
+ :description => 'Internal name for controlling Rails 3+ middleware instrumentation'
1767
2106
  },
1768
- :'error_collector.attributes.include' => {
1769
- :default => [],
1770
- :public => true,
1771
- :type => Array,
2107
+ :enabled => {
2108
+ :default => true,
2109
+ :public => false,
2110
+ :type => Boolean,
2111
+ :aliases => [:enable],
1772
2112
  :allowed_from_server => false,
1773
- :transform => DefaultSource.method(:convert_to_list),
1774
- :description => 'Prefix of attributes to include in error collection. Allows <code>*</code> as wildcard at end.'
2113
+ :description => 'Enable or disable the agent.'
2114
+ },
2115
+ :encoding_key => {
2116
+ :default => '',
2117
+ :public => false,
2118
+ :type => String,
2119
+ :allowed_from_server => true,
2120
+ :description => 'Encoding key for cross-application tracing.'
1775
2121
  },
1776
- :'browser_monitoring.attributes.include' => {
1777
- :default => [],
1778
- :public => true,
1779
- :type => Array,
1780
- :allowed_from_server => false,
1781
- :transform => DefaultSource.method(:convert_to_list),
1782
- :description => 'Prefix of attributes to include in browser monitoring. Allows <code>*</code> as wildcard at end.'
2122
+ :entity_guid => {
2123
+ :default => nil,
2124
+ :allow_nil => true,
2125
+ :public => false,
2126
+ :type => String,
2127
+ :allowed_from_server => true,
2128
+ :description => 'The [Entity GUID](/attribute-dictionary/span/entityguid) for the entity running your agent.'
1783
2129
  },
1784
- :'span_events.attributes.include' => {
1785
- :default => [],
1786
- :public => true,
1787
- :type => Array,
1788
- :allowed_from_server => false,
1789
- :transform => DefaultSource.method(:convert_to_list),
1790
- :description => 'Prefix of attributes to include on span events. Allows <code>*</code> as wildcard at end.'
2130
+ :error_beacon => {
2131
+ :default => '',
2132
+ :public => false,
2133
+ :type => String,
2134
+ :allowed_from_server => true,
2135
+ :description => 'Error beacon for real user monitoring.'
1791
2136
  },
1792
- :'transaction_segments.attributes.include' => {
1793
- :default => [],
1794
- :public => true,
1795
- :type => Array,
1796
- :allowed_from_server => false,
1797
- :transform => DefaultSource.method(:convert_to_list),
1798
- :description => 'Prefix of attributes to include on transaction segments. Allows <code>*</code> as wildcard at end.'
2137
+ :event_report_period => {
2138
+ :default => 60,
2139
+ :public => false,
2140
+ :type => Integer,
2141
+ :allowed_from_server => true,
2142
+ :description => 'Number of seconds betwixt connections to the New Relic event collection services.'
1799
2143
  },
1800
- :'custom_attributes.enabled' => {
1801
- :default => true,
1802
- :public => true,
1803
- :type => Boolean,
1804
- :allowed_from_server => false,
1805
- :description => 'If <code>false</code>, custom attributes will not be sent on Insights events.'
2144
+ :'event_report_period.transaction_event_data' => {
2145
+ :default => 60,
2146
+ :public => false,
2147
+ :type => Integer,
2148
+ :dynamic_name => true,
2149
+ :allowed_from_server => true,
2150
+ :description => 'Number of seconds betwixt connections to the New Relic transaction event collection services.'
1806
2151
  },
1807
- :'utilization.detect_aws' => {
1808
- :default => true,
1809
- :public => true,
1810
- :type => Boolean,
1811
- :allowed_from_server => false,
2152
+ :'event_report_period.custom_event_data' => {
2153
+ :default => 60,
2154
+ :public => false,
2155
+ :type => Integer,
1812
2156
  :dynamic_name => true,
1813
- :description => 'If <code>true</code>, the agent automatically detects that it is running in an AWS environment.'
2157
+ :allowed_from_server => true,
2158
+ :description => 'Number of seconds betwixt connections to the New Relic custom event collection services.'
1814
2159
  },
1815
- :'utilization.detect_azure' => {
1816
- :default => true,
1817
- :public => true,
1818
- :type => Boolean,
1819
- :allowed_from_server => false,
2160
+ :'event_report_period.error_event_data' => {
2161
+ :default => 60,
2162
+ :public => false,
2163
+ :type => Integer,
1820
2164
  :dynamic_name => true,
1821
- :description => 'If <code>true</code>, the agent automatically detects that it is running in an Azure environment.'
2165
+ :allowed_from_server => true,
2166
+ :description => 'Number of seconds betwixt connections to the New Relic error event collection services.'
1822
2167
  },
1823
- :'utilization.detect_gcp' => {
1824
- :default => true,
1825
- :public => true,
1826
- :type => Boolean,
1827
- :allowed_from_server => false,
2168
+ :'event_report_period.log_event_data' => {
2169
+ :default => 60,
2170
+ :public => false,
2171
+ :type => Integer,
1828
2172
  :dynamic_name => true,
1829
- :description => 'If <code>true</code>, the agent automatically detects that it is running in an Google Cloud Platform environment.'
2173
+ :allowed_from_server => true,
2174
+ :description => 'Number of seconds betwixt connections to the New Relic log event collection services.'
1830
2175
  },
1831
- :'utilization.detect_pcf' => {
1832
- :default => true,
1833
- :public => true,
1834
- :type => Boolean,
1835
- :allowed_from_server => false,
2176
+ :'event_report_period.span_event_data' => {
2177
+ :default => 60,
2178
+ :public => false,
2179
+ :type => Integer,
1836
2180
  :dynamic_name => true,
1837
- :description => 'If <code>true</code>, the agent automatically detects that it is running in a Pivotal Cloud Foundry environment.'
2181
+ :allowed_from_server => true,
2182
+ :description => 'Number of seconds betwixt connections to the New Relic span event collection services.'
1838
2183
  },
1839
- :'utilization.detect_docker' => {
1840
- :default => true,
1841
- :public => true,
1842
- :type => Boolean,
2184
+ :force_reconnect => {
2185
+ :default => false,
2186
+ :public => false,
2187
+ :type => Boolean,
1843
2188
  :allowed_from_server => false,
1844
- :description => 'If <code>true</code>, the agent automatically detects that it is running in Docker.'
2189
+ :description => 'Force a new connection to the server before running the worker loop. Creates a separate agent run and is recorded as a separate instance by the New Relic data collection service.'
1845
2190
  },
1846
- :'utilization.detect_kubernetes' => {
1847
- :default => true,
1848
- :public => true,
1849
- :type => Boolean,
2191
+ :framework => {
2192
+ :default => DefaultSource.framework,
2193
+ :public => false,
2194
+ :type => Symbol,
1850
2195
  :allowed_from_server => false,
1851
- :description => 'If <code>true</code>, the agent automatically detects that it is running in Kubernetes.'
2196
+ :description => 'Autodetected application framework used to enable framework-specific functionality.'
1852
2197
  },
1853
- :'utilization.billing_hostname' => {
1854
- :default => nil,
1855
- :allow_nil => true,
1856
- :public => false,
1857
- :type => String,
2198
+ :host => {
2199
+ :default => DefaultSource.host,
2200
+ :public => false,
2201
+ :type => String,
1858
2202
  :allowed_from_server => false,
1859
- :description => 'The configured server name by a customer.'
2203
+ :description => 'URI for the New Relic data collection service.'
1860
2204
  },
1861
- :'utilization.logical_processors' => {
1862
- :default => nil,
1863
- :allow_nil => true,
1864
- :public => false,
1865
- :type => Integer,
2205
+ :'infinite_tracing.batching' => {
2206
+ :default => true,
2207
+ :public => true,
2208
+ :type => Boolean,
1866
2209
  :allowed_from_server => false,
1867
- :description => 'The total number of hyper-threaded execution contexts available.'
2210
+ :external => :infinite_tracing,
2211
+ :description => 'If `true` (the default), data sent to the trace observer is batched instead of ' \
2212
+ 'sending each span individually.'
1868
2213
  },
1869
- :'utilization.total_ram_mib' => {
1870
- :default => nil,
1871
- :allow_nil => true,
1872
- :public => false,
1873
- :type => Integer,
2214
+ :'infinite_tracing.compression_level' => {
2215
+ :default => :high,
2216
+ :public => true,
2217
+ :type => Symbol,
1874
2218
  :allowed_from_server => false,
1875
- :description => 'This value represents the total amount of memory available to the host (not the process), in mebibytes (1024 squared or 1,048,576 bytes).'
2219
+ :external => :infinite_tracing,
2220
+ :description => <<~DESC
2221
+ Configure the compression level for data sent to the trace observer.
2222
+
2223
+ May be one of: `:none`, `:low`, `:medium`, `:high`.
2224
+
2225
+ Set the level to `:none` to disable compression.
2226
+ DESC
1876
2227
  },
1877
- :'datastore_tracer.instance_reporting.enabled' => {
1878
- :default => true,
1879
- :public => true,
1880
- :type => Boolean,
1881
- :allowed_from_server => false,
1882
- :description => 'If <code>false</code>, the agent will not report datastore instance metrics, nor add <code>host</code> or <code>port_path_or_id</code> parameters to transaction or slow sql traces.'
2228
+ :js_agent_file => {
2229
+ :default => '',
2230
+ :public => false,
2231
+ :type => String,
2232
+ :allowed_from_server => true,
2233
+ :description => 'JavaScript agent file for real user monitoring.'
1883
2234
  },
1884
- :'datastore_tracer.database_name_reporting.enabled' => {
1885
- :default => true,
1886
- :public => true,
1887
- :type => Boolean,
1888
- :allowed_from_server => false,
1889
- :description => 'If <code>false</code>, the agent will not add <code>database_name</code> parameter to transaction or slow sql traces.'
2235
+ :js_agent_loader => {
2236
+ :default => '',
2237
+ :public => false,
2238
+ :type => String,
2239
+ :allowed_from_server => true,
2240
+ :description => 'JavaScript agent loader content.',
2241
+ :exclude_from_reported_settings => true
1890
2242
  },
1891
- :'clear_transaction_state_after_fork' => {
1892
- :default => false,
1893
- :public => true,
1894
- :type => Boolean,
1895
- :allowed_from_server => false,
1896
- :description => 'If <code>true</code>, the agent will clear <code>Tracer::State</code> in <code>Agent.drop_buffered_data</code>.'
2243
+ :keep_alive_timeout => {
2244
+ :default => 60,
2245
+ :public => false,
2246
+ :type => Integer,
2247
+ :allowed_from_server => true,
2248
+ :description => 'Timeout for keep alive on TCP connection to collector if supported by Ruby version. Only used in conjunction when aggressive_keepalive is enabled.'
1897
2249
  },
1898
- :account_id => {
1899
- :default => nil,
1900
- :allow_nil => true,
2250
+ :max_payload_size_in_bytes => {
2251
+ :default => 1000000,
1901
2252
  :public => false,
1902
- :type => String,
2253
+ :type => Integer,
1903
2254
  :allowed_from_server => true,
1904
- :description => 'The account id associated with this application.'
2255
+ :description => 'Maximum number of bytes to send to the New Relic data collection service.'
2256
+ },
2257
+ :normalize_json_string_encodings => {
2258
+ :default => true,
2259
+ :public => false,
2260
+ :type => Boolean,
2261
+ :allowed_from_server => false,
2262
+ :description => 'Controls whether to normalize string encodings prior to serializing data for the collector to JSON.'
2263
+ },
2264
+ :port => {
2265
+ :default => 443,
2266
+ :public => false,
2267
+ :type => Integer,
2268
+ :allowed_from_server => false,
2269
+ :description => 'Port for the New Relic data collection service.'
1905
2270
  },
1906
2271
  :primary_application_id => {
1907
2272
  :default => nil,
@@ -1909,22 +2274,42 @@ module NewRelic
1909
2274
  :public => false,
1910
2275
  :type => String,
1911
2276
  :allowed_from_server => true,
1912
- :description => 'The primary id associated with this application.'
2277
+ :description => 'The primary id associated with your application.'
1913
2278
  },
1914
- :'distributed_tracing.enabled' => {
1915
- :default => false,
1916
- :public => true,
1917
- :type => Boolean,
2279
+ :put_for_data_send => {
2280
+ :default => false,
2281
+ :public => false,
2282
+ :type => Boolean,
1918
2283
  :allowed_from_server => false,
1919
- :description => 'Distributed tracing lets you see the path that a request takes through your distributed system. Enabling distributed tracing changes the behavior of some New Relic features, so carefully consult the <a href="https://docs.newrelic.com/docs/transition-guide-distributed-tracing">transition guide</a> before you enable this feature.'
2284
+ :description => 'Use HTTP PUT requests instead of POST.'
1920
2285
  },
1921
- :trusted_account_key => {
1922
- :default => nil,
1923
- :allow_nil => true,
2286
+ :report_instance_busy => {
2287
+ :default => true,
1924
2288
  :public => false,
1925
- :type => String,
2289
+ :type => Boolean,
2290
+ :allowed_from_server => false,
2291
+ :description => 'Enable or disable transmission of metrics recording the percentage of time application instances spend servicing requests (duty cycle metrics).'
2292
+ },
2293
+ :restart_thread_in_children => {
2294
+ :default => true,
2295
+ :public => false,
2296
+ :type => Boolean,
2297
+ :allowed_from_server => false,
2298
+ :description => 'Controls whether to check on running a transaction whether to respawn the harvest thread.'
2299
+ },
2300
+ :'resque.use_ruby_dns' => {
2301
+ :default => true,
2302
+ :public => false,
2303
+ :type => Boolean,
2304
+ :allowed_from_server => false,
2305
+ :description => 'Replace the libc DNS resolver with the all Ruby resolver Resolv'
2306
+ },
2307
+ :'rum.enabled' => {
2308
+ :default => true,
2309
+ :public => false,
2310
+ :type => Boolean,
1926
2311
  :allowed_from_server => true,
1927
- :description => 'A shared key to validate that a distributed trace payload came from a trusted account.'
2312
+ :description => 'Enable or disable page load timing (sometimes referred to as real user monitoring or RUM).'
1928
2313
  },
1929
2314
  :sampling_target => {
1930
2315
  :default => 10,
@@ -1940,55 +2325,96 @@ module NewRelic
1940
2325
  :allowed_from_server => true,
1941
2326
  :description => 'The period during which a target number of transactions should be marked as sampled.'
1942
2327
  },
1943
- :'span_events.enabled' => {
2328
+ :send_environment_info => {
1944
2329
  :default => true,
1945
- :public => true,
2330
+ :public => false,
1946
2331
  :type => Boolean,
1947
- :allowed_from_server => true,
1948
- :description => 'If <code>true</code>, enables span event sampling.'
2332
+ :allowed_from_server => false,
2333
+ :description => 'Enable or disable transmission of application environment information to the New Relic data collection service.'
1949
2334
  },
1950
- :'span_events.queue_size' => {
1951
- :default => 10_000,
1952
- :public => true,
1953
- :type => Integer,
2335
+ :simple_compression => {
2336
+ :default => false,
2337
+ :public => false,
2338
+ :type => Boolean,
1954
2339
  :allowed_from_server => false,
1955
- :external => :infinite_tracing,
1956
- :description => "Sets the maximum number of span events to buffer when streaming to the trace observer."
2340
+ :description => 'When enabled the agent will compress payloads destined for the collector, but will not pre-compress parts of the payload.'
1957
2341
  },
1958
- :'span_events.max_samples_stored' => {
1959
- :default => 1000,
1960
- :public => true,
2342
+ :skip_ar_instrumentation => {
2343
+ :default => false,
2344
+ :public => false,
2345
+ :type => Boolean,
2346
+ :allowed_from_server => false,
2347
+ :description => 'Enable or disable active record instrumentation.'
2348
+ },
2349
+ :'synthetics.traces_limit' => {
2350
+ :default => 20,
2351
+ :public => false,
1961
2352
  :type => Integer,
1962
2353
  :allowed_from_server => true,
1963
- :description => 'Defines the maximum number of span events reported from a single harvest.'
2354
+ :description => 'Maximum number of synthetics transaction traces to hold for a given harvest'
1964
2355
  },
1965
- :'exclude_newrelic_header' => {
2356
+ :'synthetics.events_limit' => {
2357
+ :default => 200,
2358
+ :public => false,
2359
+ :type => Integer,
2360
+ :allowed_from_server => true,
2361
+ :description => 'Maximum number of synthetics transaction events to hold for a given harvest'
2362
+ },
2363
+ :test_mode => {
1966
2364
  :default => false,
1967
- :public => true,
2365
+ :public => false,
1968
2366
  :type => Boolean,
2367
+ :allowed_from_server => false,
2368
+ :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.'
2369
+ },
2370
+ :'thread_profiler.max_profile_overhead' => {
2371
+ :default => 0.05,
2372
+ :public => false,
2373
+ :type => Float,
1969
2374
  :allowed_from_server => true,
1970
- :description => "Allows newrelic distributed tracing headers to be suppressed on outbound requests."
2375
+ :description => 'Maximum overhead percentage for thread profiling before agent reduces polling frequency'
1971
2376
  },
1972
- :'infinite_tracing.trace_observer.host' => {
1973
- :default => '',
1974
- :public => true,
2377
+ :trusted_account_ids => {
2378
+ :default => [],
2379
+ :public => false,
2380
+ :type => Array,
2381
+ :allowed_from_server => true,
2382
+ :description => 'List of trusted New Relic account IDs for the purposes of cross-application tracing. Inbound requests from applications including cross-application headers that do not come from an account in this list will be ignored.'
2383
+ },
2384
+ :trusted_account_key => {
2385
+ :default => nil,
2386
+ :allow_nil => true,
2387
+ :public => false,
2388
+ :type => String,
2389
+ :allowed_from_server => true,
2390
+ :description => 'A shared key to validate that a distributed trace payload came from a trusted account.'
2391
+ },
2392
+ :'utilization.billing_hostname' => {
2393
+ :default => nil,
2394
+ :allow_nil => true,
2395
+ :public => false,
1975
2396
  :type => String,
1976
2397
  :allowed_from_server => false,
1977
- :external => :infinite_tracing,
1978
- :description => "Configures the hostname for the Trace Observer Host. " \
1979
- "When configured, enables tail-based sampling by sending all recorded spans " \
1980
- "to a Trace Observer for further sampling decisions, irrespective of any usual " \
1981
- "agent sampling decision."
2398
+ :description => 'The configured server name by a customer.'
1982
2399
  },
1983
- :'infinite_tracing.trace_observer.port' => {
1984
- :default => 443,
1985
- :public => true,
2400
+ :'utilization.logical_processors' => {
2401
+ :default => nil,
2402
+ :allow_nil => true,
2403
+ :public => false,
1986
2404
  :type => Integer,
1987
2405
  :allowed_from_server => false,
1988
- :external => :infinite_tracing,
1989
- :description => "Configures the TCP/IP port for the Trace Observer Host"
2406
+ :description => 'The total number of hyper-threaded execution contexts available.'
2407
+ },
2408
+ :'utilization.total_ram_mib' => {
2409
+ :default => nil,
2410
+ :allow_nil => true,
2411
+ :public => false,
2412
+ :type => Integer,
2413
+ :allowed_from_server => false,
2414
+ :description => 'This value represents the total amount of memory available to the host (not the process), in mebibytes (1024 squared or 1,048,576 bytes).'
1990
2415
  }
1991
2416
  }.freeze
2417
+ # rubocop:enable Metrics/CollectionLiteralLength
1992
2418
  end
1993
2419
  end
1994
2420
  end