newrelic_rpm 6.8.0.360 → 9.2.2

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