newrelic_rpm 5.7.0.350 → 9.0.0

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