newrelic_rpm 9.1.0 → 9.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (360) hide show
  1. checksums.yaml +4 -4
  2. data/.build_ignore +27 -0
  3. data/CHANGELOG.md +841 -7
  4. data/CONTRIBUTING.md +2 -9
  5. data/README.md +25 -22
  6. data/Rakefile +2 -2
  7. data/bin/newrelic +3 -9
  8. data/bin/newrelic_rpm +15 -0
  9. data/init.rb +2 -2
  10. data/lib/boot/strap.rb +102 -0
  11. data/lib/new_relic/agent/agent.rb +11 -2
  12. data/lib/new_relic/agent/agent_helpers/connect.rb +13 -8
  13. data/lib/new_relic/agent/agent_helpers/harvest.rb +3 -0
  14. data/lib/new_relic/agent/agent_helpers/shutdown.rb +4 -1
  15. data/lib/new_relic/agent/agent_helpers/special_startup.rb +1 -1
  16. data/lib/new_relic/agent/agent_helpers/start_worker_thread.rb +4 -3
  17. data/lib/new_relic/agent/agent_helpers/startup.rb +11 -3
  18. data/lib/new_relic/agent/agent_logger.rb +3 -1
  19. data/lib/new_relic/agent/attribute_filter.rb +3 -3
  20. data/lib/new_relic/agent/attribute_pre_filtering.rb +109 -0
  21. data/lib/new_relic/agent/aws.rb +68 -0
  22. data/lib/new_relic/agent/configuration/default_source.rb +918 -166
  23. data/lib/new_relic/agent/configuration/environment_source.rb +15 -3
  24. data/lib/new_relic/agent/configuration/high_security_source.rb +1 -0
  25. data/lib/new_relic/agent/configuration/manager.rb +72 -11
  26. data/lib/new_relic/agent/configuration/security_policy_source.rb +11 -0
  27. data/lib/new_relic/agent/configuration/yaml_source.rb +22 -2
  28. data/lib/new_relic/agent/connect/request_builder.rb +1 -1
  29. data/lib/new_relic/agent/custom_event_aggregator.rb +27 -1
  30. data/lib/new_relic/agent/database/obfuscation_helpers.rb +11 -11
  31. data/lib/new_relic/agent/database/obfuscator.rb +1 -0
  32. data/lib/new_relic/agent/database.rb +41 -1
  33. data/lib/new_relic/agent/database_adapter.rb +1 -1
  34. data/lib/new_relic/agent/datastores/mongo/metric_translator.rb +1 -1
  35. data/lib/new_relic/agent/datastores/redis.rb +1 -1
  36. data/lib/new_relic/agent/distributed_tracing/cross_app_tracing.rb +1 -1
  37. data/lib/new_relic/agent/distributed_tracing/distributed_trace_payload.rb +4 -8
  38. data/lib/new_relic/agent/distributed_tracing.rb +5 -3
  39. data/lib/new_relic/agent/error_collector.rb +40 -11
  40. data/lib/new_relic/agent/event_loop.rb +1 -1
  41. data/lib/new_relic/agent/external.rb +2 -0
  42. data/lib/new_relic/agent/harvester.rb +1 -1
  43. data/lib/new_relic/agent/health_check.rb +136 -0
  44. data/lib/new_relic/agent/http_clients/abstract.rb +4 -0
  45. data/lib/new_relic/agent/http_clients/async_http_wrappers.rb +80 -0
  46. data/lib/new_relic/agent/http_clients/curb_wrappers.rb +1 -3
  47. data/lib/new_relic/agent/http_clients/ethon_wrappers.rb +109 -0
  48. data/lib/new_relic/agent/http_clients/excon_wrappers.rb +0 -3
  49. data/lib/new_relic/agent/http_clients/http_rb_wrappers.rb +1 -3
  50. data/lib/new_relic/agent/http_clients/httpclient_wrappers.rb +0 -3
  51. data/lib/new_relic/agent/http_clients/httpx_wrappers.rb +91 -0
  52. data/lib/new_relic/agent/http_clients/net_http_wrappers.rb +1 -4
  53. data/lib/new_relic/agent/http_clients/typhoeus_wrappers.rb +0 -3
  54. data/lib/new_relic/agent/http_clients/uri_util.rb +1 -1
  55. data/lib/new_relic/agent/instrumentation/action_controller_other_subscriber.rb +1 -1
  56. data/lib/new_relic/agent/instrumentation/action_dispatch.rb +1 -1
  57. data/lib/new_relic/agent/instrumentation/action_dispatch_subscriber.rb +1 -1
  58. data/lib/new_relic/agent/instrumentation/action_mailbox.rb +1 -1
  59. data/lib/new_relic/agent/instrumentation/action_mailer.rb +1 -1
  60. data/lib/new_relic/agent/instrumentation/active_job.rb +1 -1
  61. data/lib/new_relic/agent/instrumentation/active_job_subscriber.rb +6 -2
  62. data/lib/new_relic/agent/instrumentation/active_merchant.rb +3 -16
  63. data/lib/new_relic/agent/instrumentation/active_record.rb +8 -13
  64. data/lib/new_relic/agent/instrumentation/active_record_helper.rb +8 -5
  65. data/lib/new_relic/agent/instrumentation/active_record_notifications.rb +13 -10
  66. data/lib/new_relic/agent/instrumentation/active_record_prepend.rb +2 -2
  67. data/lib/new_relic/agent/instrumentation/active_record_subscriber.rb +9 -16
  68. data/lib/new_relic/agent/instrumentation/active_support_broadcast_logger/chain.rb +69 -0
  69. data/lib/new_relic/agent/instrumentation/active_support_broadcast_logger/instrumentation.rb +17 -0
  70. data/lib/new_relic/agent/instrumentation/active_support_broadcast_logger/prepend.rb +37 -0
  71. data/lib/new_relic/agent/instrumentation/active_support_broadcast_logger.rb +21 -0
  72. data/lib/new_relic/agent/instrumentation/active_support_logger/instrumentation.rb +4 -0
  73. data/lib/new_relic/agent/instrumentation/active_support_logger.rb +3 -3
  74. data/lib/new_relic/agent/instrumentation/async_http/chain.rb +23 -0
  75. data/lib/new_relic/agent/instrumentation/async_http/instrumentation.rb +37 -0
  76. data/lib/new_relic/agent/instrumentation/async_http/prepend.rb +15 -0
  77. data/lib/new_relic/agent/instrumentation/async_http.rb +27 -0
  78. data/lib/new_relic/agent/instrumentation/aws_sdk_firehose/chain.rb +21 -0
  79. data/lib/new_relic/agent/instrumentation/aws_sdk_firehose/instrumentation.rb +66 -0
  80. data/lib/new_relic/agent/instrumentation/aws_sdk_firehose/prepend.rb +15 -0
  81. data/lib/new_relic/agent/instrumentation/aws_sdk_firehose.rb +22 -0
  82. data/lib/new_relic/agent/instrumentation/aws_sdk_kinesis/chain.rb +21 -0
  83. data/lib/new_relic/agent/instrumentation/aws_sdk_kinesis/instrumentation.rb +91 -0
  84. data/lib/new_relic/agent/instrumentation/aws_sdk_kinesis/prepend.rb +15 -0
  85. data/lib/new_relic/agent/instrumentation/aws_sdk_kinesis.rb +22 -0
  86. data/lib/new_relic/agent/instrumentation/aws_sdk_lambda/chain.rb +33 -0
  87. data/lib/new_relic/agent/instrumentation/aws_sdk_lambda/instrumentation.rb +93 -0
  88. data/lib/new_relic/agent/instrumentation/aws_sdk_lambda/prepend.rb +23 -0
  89. data/lib/new_relic/agent/instrumentation/aws_sdk_lambda.rb +23 -0
  90. data/lib/new_relic/agent/instrumentation/aws_sqs/chain.rb +37 -0
  91. data/lib/new_relic/agent/instrumentation/aws_sqs/instrumentation.rb +67 -0
  92. data/lib/new_relic/agent/instrumentation/aws_sqs/prepend.rb +21 -0
  93. data/lib/new_relic/agent/instrumentation/aws_sqs.rb +23 -0
  94. data/lib/new_relic/agent/instrumentation/bunny/chain.rb +1 -1
  95. data/lib/new_relic/agent/instrumentation/bunny/instrumentation.rb +23 -0
  96. data/lib/new_relic/agent/instrumentation/bunny.rb +4 -5
  97. data/lib/new_relic/agent/instrumentation/concurrent_ruby/chain.rb +1 -1
  98. data/lib/new_relic/agent/instrumentation/concurrent_ruby/instrumentation.rb +3 -4
  99. data/lib/new_relic/agent/instrumentation/concurrent_ruby/prepend.rb +1 -1
  100. data/lib/new_relic/agent/instrumentation/concurrent_ruby.rb +2 -3
  101. data/lib/new_relic/agent/instrumentation/controller_instrumentation.rb +5 -2
  102. data/lib/new_relic/agent/instrumentation/curb/instrumentation.rb +4 -0
  103. data/lib/new_relic/agent/instrumentation/curb.rb +4 -5
  104. data/lib/new_relic/agent/instrumentation/delayed_job/chain.rb +1 -0
  105. data/lib/new_relic/agent/instrumentation/delayed_job/instrumentation.rb +3 -0
  106. data/lib/new_relic/agent/instrumentation/delayed_job_instrumentation.rb +0 -23
  107. data/lib/new_relic/agent/instrumentation/dynamodb/chain.rb +27 -0
  108. data/lib/new_relic/agent/instrumentation/dynamodb/instrumentation.rb +64 -0
  109. data/lib/new_relic/agent/instrumentation/dynamodb/prepend.rb +19 -0
  110. data/lib/new_relic/agent/instrumentation/dynamodb.rb +23 -0
  111. data/lib/new_relic/agent/instrumentation/elasticsearch/chain.rb +2 -3
  112. data/lib/new_relic/agent/instrumentation/elasticsearch/instrumentation.rb +65 -10
  113. data/lib/new_relic/agent/instrumentation/elasticsearch.rb +2 -4
  114. data/lib/new_relic/agent/instrumentation/ethon/chain.rb +39 -0
  115. data/lib/new_relic/agent/instrumentation/ethon/instrumentation.rb +105 -0
  116. data/lib/new_relic/agent/instrumentation/ethon/prepend.rb +35 -0
  117. data/lib/new_relic/agent/instrumentation/ethon.rb +35 -0
  118. data/lib/new_relic/agent/instrumentation/excon/middleware.rb +3 -0
  119. data/lib/new_relic/agent/instrumentation/excon.rb +1 -17
  120. data/lib/new_relic/agent/instrumentation/fiber/chain.rb +11 -4
  121. data/lib/new_relic/agent/instrumentation/fiber/instrumentation.rb +2 -6
  122. data/lib/new_relic/agent/instrumentation/fiber/prepend.rb +10 -3
  123. data/lib/new_relic/agent/instrumentation/fiber.rb +1 -3
  124. data/lib/new_relic/agent/instrumentation/grape/instrumentation.rb +4 -3
  125. data/lib/new_relic/agent/instrumentation/grape.rb +1 -1
  126. data/lib/new_relic/agent/instrumentation/grpc/client/chain.rb +1 -1
  127. data/lib/new_relic/agent/instrumentation/grpc/client/instrumentation.rb +5 -2
  128. data/lib/new_relic/agent/instrumentation/grpc/client/prepend.rb +1 -1
  129. data/lib/new_relic/agent/instrumentation/grpc/client/request_wrapper.rb +1 -1
  130. data/lib/new_relic/agent/instrumentation/grpc/server/instrumentation.rb +5 -1
  131. data/lib/new_relic/agent/instrumentation/grpc_client.rb +2 -2
  132. data/lib/new_relic/agent/instrumentation/grpc_server.rb +2 -2
  133. data/lib/new_relic/agent/instrumentation/httpclient/instrumentation.rb +4 -0
  134. data/lib/new_relic/agent/instrumentation/httpclient.rb +1 -5
  135. data/lib/new_relic/agent/instrumentation/httprb/instrumentation.rb +4 -0
  136. data/lib/new_relic/agent/instrumentation/httprb.rb +0 -1
  137. data/lib/new_relic/agent/instrumentation/httpx/chain.rb +20 -0
  138. data/lib/new_relic/agent/instrumentation/httpx/instrumentation.rb +51 -0
  139. data/lib/new_relic/agent/instrumentation/httpx/prepend.rb +15 -0
  140. data/lib/new_relic/agent/instrumentation/httpx.rb +23 -0
  141. data/lib/new_relic/agent/instrumentation/logger/instrumentation.rb +3 -0
  142. data/lib/new_relic/agent/instrumentation/logger.rb +1 -3
  143. data/lib/new_relic/agent/instrumentation/logstasher/chain.rb +21 -0
  144. data/lib/new_relic/agent/instrumentation/logstasher/instrumentation.rb +24 -0
  145. data/lib/new_relic/agent/instrumentation/logstasher/prepend.rb +13 -0
  146. data/lib/new_relic/agent/instrumentation/logstasher.rb +25 -0
  147. data/lib/new_relic/agent/instrumentation/memcache/dalli.rb +4 -2
  148. data/lib/new_relic/agent/instrumentation/memcache/helper.rb +2 -2
  149. data/lib/new_relic/agent/instrumentation/memcache/instrumentation.rb +13 -4
  150. data/lib/new_relic/agent/instrumentation/memcache/prepend.rb +4 -2
  151. data/lib/new_relic/agent/instrumentation/memcache.rb +4 -5
  152. data/lib/new_relic/agent/instrumentation/mongodb_command_subscriber.rb +3 -5
  153. data/lib/new_relic/agent/instrumentation/net_http/instrumentation.rb +13 -3
  154. data/lib/new_relic/agent/instrumentation/net_http.rb +2 -1
  155. data/lib/new_relic/agent/instrumentation/notifications_subscriber.rb +4 -2
  156. data/lib/new_relic/agent/instrumentation/opensearch/chain.rb +21 -0
  157. data/lib/new_relic/agent/instrumentation/opensearch/instrumentation.rb +66 -0
  158. data/lib/new_relic/agent/instrumentation/opensearch/prepend.rb +13 -0
  159. data/lib/new_relic/agent/instrumentation/opensearch.rb +23 -0
  160. data/lib/new_relic/agent/instrumentation/padrino/instrumentation.rb +4 -0
  161. data/lib/new_relic/agent/instrumentation/padrino.rb +3 -3
  162. data/lib/new_relic/agent/instrumentation/queue_time.rb +1 -1
  163. data/lib/new_relic/agent/instrumentation/rack/instrumentation.rb +9 -0
  164. data/lib/new_relic/agent/instrumentation/rails3/action_controller.rb +4 -0
  165. data/lib/new_relic/agent/instrumentation/rails_notifications/action_cable.rb +1 -1
  166. data/lib/new_relic/agent/instrumentation/rails_notifications/action_controller.rb +10 -5
  167. data/lib/new_relic/agent/instrumentation/rake/instrumentation.rb +4 -0
  168. data/lib/new_relic/agent/instrumentation/rake.rb +1 -2
  169. data/lib/new_relic/agent/instrumentation/rdkafka/chain.rb +72 -0
  170. data/lib/new_relic/agent/instrumentation/rdkafka/instrumentation.rb +70 -0
  171. data/lib/new_relic/agent/instrumentation/rdkafka/prepend.rb +67 -0
  172. data/lib/new_relic/agent/instrumentation/rdkafka.rb +25 -0
  173. data/lib/new_relic/agent/instrumentation/redis/cluster_middleware.rb +26 -0
  174. data/lib/new_relic/agent/instrumentation/redis/constants.rb +2 -2
  175. data/lib/new_relic/agent/instrumentation/redis/instrumentation.rb +18 -11
  176. data/lib/new_relic/agent/instrumentation/redis/middleware.rb +3 -0
  177. data/lib/new_relic/agent/instrumentation/redis.rb +11 -5
  178. data/lib/new_relic/agent/instrumentation/resque/instrumentation.rb +4 -0
  179. data/lib/new_relic/agent/instrumentation/resque.rb +8 -6
  180. data/lib/new_relic/agent/instrumentation/roda/chain.rb +43 -0
  181. data/lib/new_relic/agent/instrumentation/roda/ignorer.rb +45 -0
  182. data/lib/new_relic/agent/instrumentation/roda/instrumentation.rb +68 -0
  183. data/lib/new_relic/agent/instrumentation/roda/prepend.rb +24 -0
  184. data/lib/new_relic/agent/instrumentation/roda/roda_transaction_namer.rb +29 -0
  185. data/lib/new_relic/agent/instrumentation/roda.rb +36 -0
  186. data/lib/new_relic/agent/instrumentation/ruby_kafka/chain.rb +55 -0
  187. data/lib/new_relic/agent/instrumentation/ruby_kafka/instrumentation.rb +67 -0
  188. data/lib/new_relic/agent/instrumentation/ruby_kafka/prepend.rb +60 -0
  189. data/lib/new_relic/agent/instrumentation/ruby_kafka.rb +25 -0
  190. data/lib/new_relic/agent/instrumentation/ruby_openai/chain.rb +36 -0
  191. data/lib/new_relic/agent/instrumentation/ruby_openai/instrumentation.rb +196 -0
  192. data/lib/new_relic/agent/instrumentation/ruby_openai/prepend.rb +20 -0
  193. data/lib/new_relic/agent/instrumentation/ruby_openai.rb +35 -0
  194. data/lib/new_relic/agent/instrumentation/sequel.rb +1 -1
  195. data/lib/new_relic/agent/instrumentation/sidekiq/client.rb +4 -0
  196. data/lib/new_relic/agent/instrumentation/sidekiq/extensions/delay_extensions.rb +24 -0
  197. data/lib/new_relic/agent/instrumentation/sidekiq/extensions/delayed_class.rb +2 -2
  198. data/lib/new_relic/agent/instrumentation/sidekiq/server.rb +26 -3
  199. data/lib/new_relic/agent/instrumentation/sidekiq.rb +13 -16
  200. data/lib/new_relic/agent/instrumentation/sinatra/ignorer.rb +1 -1
  201. data/lib/new_relic/agent/instrumentation/sinatra/instrumentation.rb +4 -0
  202. data/lib/new_relic/agent/instrumentation/sinatra/transaction_namer.rb +1 -3
  203. data/lib/new_relic/agent/instrumentation/sinatra.rb +3 -19
  204. data/lib/new_relic/agent/instrumentation/stripe.rb +28 -0
  205. data/lib/new_relic/agent/instrumentation/stripe_subscriber.rb +98 -0
  206. data/lib/new_relic/agent/instrumentation/thread/chain.rb +1 -1
  207. data/lib/new_relic/agent/instrumentation/thread/instrumentation.rb +1 -5
  208. data/lib/new_relic/agent/instrumentation/thread/prepend.rb +1 -1
  209. data/lib/new_relic/agent/instrumentation/thread.rb +0 -2
  210. data/lib/new_relic/agent/instrumentation/tilt/instrumentation.rb +4 -0
  211. data/lib/new_relic/agent/instrumentation/tilt.rb +0 -4
  212. data/lib/new_relic/agent/instrumentation/typhoeus/instrumentation.rb +7 -3
  213. data/lib/new_relic/agent/instrumentation/typhoeus.rb +0 -1
  214. data/lib/new_relic/agent/instrumentation/view_component/chain.rb +21 -0
  215. data/lib/new_relic/agent/instrumentation/view_component/instrumentation.rb +45 -0
  216. data/lib/{tasks/instrumentation_generator/templates/instrumentation.tt → new_relic/agent/instrumentation/view_component/prepend.rb} +4 -4
  217. data/lib/new_relic/agent/instrumentation/view_component.rb +24 -0
  218. data/lib/new_relic/agent/javascript_instrumentor.rb +2 -4
  219. data/lib/new_relic/agent/llm/chat_completion_message.rb +25 -0
  220. data/lib/new_relic/agent/llm/chat_completion_summary.rb +66 -0
  221. data/lib/new_relic/agent/llm/embedding.rb +60 -0
  222. data/lib/new_relic/agent/llm/llm_event.rb +95 -0
  223. data/lib/new_relic/agent/llm/response_headers.rb +80 -0
  224. data/lib/new_relic/agent/llm.rb +49 -0
  225. data/lib/new_relic/agent/local_log_decorator.rb +20 -3
  226. data/lib/new_relic/agent/log_event_aggregator.rb +149 -26
  227. data/lib/new_relic/agent/log_event_attributes.rb +115 -0
  228. data/lib/new_relic/agent/logging.rb +5 -5
  229. data/lib/new_relic/agent/messaging.rb +18 -7
  230. data/lib/new_relic/agent/method_tracer.rb +4 -1
  231. data/lib/new_relic/agent/method_tracer_helpers.rb +26 -5
  232. data/lib/new_relic/agent/monitors/inbound_request_monitor.rb +1 -1
  233. data/lib/new_relic/agent/monitors/synthetics_monitor.rb +12 -1
  234. data/lib/new_relic/agent/new_relic_service/encoders.rb +2 -2
  235. data/lib/new_relic/agent/new_relic_service/json_marshaller.rb +2 -2
  236. data/lib/new_relic/agent/new_relic_service.rb +61 -28
  237. data/lib/new_relic/agent/obfuscator.rb +0 -2
  238. data/lib/new_relic/agent/opentelemetry/context/propagation/trace_propagator.rb +66 -0
  239. data/lib/new_relic/agent/opentelemetry/context/propagation.rb +15 -0
  240. data/lib/{tasks/instrumentation_generator/templates/Envfile.tt → new_relic/agent/opentelemetry/context.rb} +9 -5
  241. data/lib/new_relic/agent/opentelemetry/trace/span.rb +31 -0
  242. data/lib/new_relic/agent/opentelemetry/trace/tracer.rb +129 -0
  243. data/lib/new_relic/agent/opentelemetry/trace/tracer_provider.rb +18 -0
  244. data/lib/new_relic/agent/opentelemetry/trace.rb +15 -0
  245. data/lib/new_relic/agent/opentelemetry/transaction_patch.rb +69 -0
  246. data/lib/new_relic/agent/opentelemetry_bridge.rb +32 -0
  247. data/lib/new_relic/agent/parameter_filtering.rb +1 -1
  248. data/lib/new_relic/agent/pipe_channel_manager.rb +2 -2
  249. data/lib/new_relic/agent/pipe_service.rb +1 -1
  250. data/lib/new_relic/agent/rules_engine/segment_terms_rule.rb +1 -2
  251. data/lib/new_relic/agent/rules_engine.rb +1 -1
  252. data/lib/new_relic/agent/sampler.rb +1 -0
  253. data/lib/new_relic/agent/samplers/cpu_sampler.rb +1 -1
  254. data/lib/new_relic/agent/samplers/memory_sampler.rb +1 -1
  255. data/lib/new_relic/agent/serverless_handler.rb +406 -0
  256. data/lib/new_relic/agent/serverless_handler_event_sources.json +155 -0
  257. data/lib/new_relic/agent/serverless_handler_event_sources.rb +49 -0
  258. data/lib/new_relic/agent/span_event_primitive.rb +32 -15
  259. data/lib/new_relic/agent/sql_sampler.rb +0 -1
  260. data/lib/new_relic/agent/system_info.rb +40 -0
  261. data/lib/new_relic/agent/threading/agent_thread.rb +1 -2
  262. data/lib/new_relic/agent/threading/backtrace_node.rb +10 -1
  263. data/lib/new_relic/agent/tracer.rb +16 -16
  264. data/lib/new_relic/agent/transaction/abstract_segment.rb +103 -41
  265. data/lib/new_relic/agent/transaction/datastore_segment.rb +1 -1
  266. data/lib/new_relic/agent/transaction/distributed_tracer.rb +3 -3
  267. data/lib/new_relic/agent/transaction/distributed_tracing.rb +7 -8
  268. data/lib/new_relic/agent/transaction/external_request_segment.rb +5 -12
  269. data/lib/new_relic/agent/transaction/message_broker_segment.rb +5 -3
  270. data/lib/new_relic/agent/transaction/request_attributes.rb +54 -11
  271. data/lib/new_relic/agent/transaction/trace_context.rb +34 -5
  272. data/lib/new_relic/agent/transaction/tracing.rb +20 -4
  273. data/lib/new_relic/agent/transaction.rb +38 -13
  274. data/lib/new_relic/agent/transaction_error_primitive.rb +39 -19
  275. data/lib/new_relic/agent/transaction_event_primitive.rb +19 -0
  276. data/lib/new_relic/agent/transaction_time_aggregator.rb +1 -1
  277. data/lib/new_relic/agent/utilization/ecs.rb +22 -0
  278. data/lib/new_relic/agent/utilization/ecs_v4.rb +22 -0
  279. data/lib/new_relic/agent/utilization/gcp.rb +1 -3
  280. data/lib/new_relic/agent/utilization/vendor.rb +5 -7
  281. data/lib/new_relic/agent/utilization_data.rb +40 -5
  282. data/lib/new_relic/agent/vm/{mri_vm.rb → c_ruby_vm.rb} +10 -18
  283. data/lib/new_relic/agent/vm.rb +2 -2
  284. data/lib/new_relic/agent/worker_loop.rb +1 -1
  285. data/lib/new_relic/agent.rb +286 -17
  286. data/lib/new_relic/base64.rb +25 -0
  287. data/lib/new_relic/cli/command.rb +6 -3
  288. data/lib/new_relic/constants.rb +8 -0
  289. data/lib/new_relic/control/class_methods.rb +1 -7
  290. data/lib/new_relic/control/frameworks/grape.rb +14 -0
  291. data/lib/new_relic/control/frameworks/padrino.rb +14 -0
  292. data/lib/new_relic/control/frameworks/rails.rb +17 -5
  293. data/lib/new_relic/control/frameworks/rails4.rb +1 -3
  294. data/lib/new_relic/control/frameworks/roda.rb +20 -0
  295. data/lib/new_relic/control/instance_methods.rb +13 -0
  296. data/lib/new_relic/control/instrumentation.rb +2 -16
  297. data/lib/new_relic/control/private_instance_methods.rb +4 -0
  298. data/lib/new_relic/control/security_interface.rb +57 -0
  299. data/lib/new_relic/control.rb +1 -1
  300. data/lib/new_relic/dependency_detection.rb +25 -13
  301. data/lib/new_relic/environment_report.rb +2 -2
  302. data/lib/new_relic/helper.rb +22 -0
  303. data/lib/new_relic/language_support.rb +12 -1
  304. data/lib/new_relic/latest_changes.rb +1 -1
  305. data/lib/new_relic/local_environment.rb +31 -18
  306. data/lib/new_relic/noticed_error.rb +5 -2
  307. data/lib/new_relic/rack/agent_hooks.rb +1 -1
  308. data/lib/new_relic/rack/agent_middleware.rb +0 -16
  309. data/lib/new_relic/rack/browser_monitoring.rb +29 -13
  310. data/lib/new_relic/supportability_helper.rb +5 -1
  311. data/lib/new_relic/thread_local_storage.rb +31 -0
  312. data/lib/new_relic/traced_thread.rb +2 -3
  313. data/lib/new_relic/version.rb +1 -1
  314. data/lib/sequel/extensions/new_relic_instrumentation.rb +4 -3
  315. data/lib/tasks/bump_version.rake +21 -0
  316. data/lib/tasks/config.rake +11 -5
  317. data/lib/tasks/coverage_report.rake +1 -1
  318. data/lib/tasks/gha.rake +31 -0
  319. data/lib/tasks/helpers/config.html.erb +94 -0
  320. data/lib/tasks/helpers/format.rb +11 -7
  321. data/lib/tasks/helpers/newrelicyml.rb +211 -0
  322. data/lib/tasks/helpers/version_bump.rb +62 -0
  323. data/lib/tasks/newrelic.rb +1 -0
  324. data/lib/tasks/newrelicyml.rake +13 -0
  325. data/lib/tasks/tests.rake +71 -0
  326. data/newrelic.yml +657 -251
  327. data/newrelic_rpm.gemspec +17 -10
  328. data/test/agent_helper.rb +38 -4
  329. metadata +230 -44
  330. data/.gitignore +0 -43
  331. data/.project +0 -23
  332. data/.rubocop.yml +0 -1909
  333. data/.rubocop_todo.yml +0 -61
  334. data/.simplecov +0 -15
  335. data/.snyk +0 -11
  336. data/.yardopts +0 -27
  337. data/Brewfile +0 -12
  338. data/DOCKER.md +0 -167
  339. data/Dockerfile +0 -10
  340. data/Guardfile +0 -26
  341. data/bin/newrelic_cmd +0 -6
  342. data/config/database.yml +0 -5
  343. data/config.dot +0 -278
  344. data/docker-compose.yml +0 -107
  345. data/lefthook.yml +0 -9
  346. data/lib/new_relic/agent/range_extensions.rb +0 -27
  347. data/lib/tasks/helpers/removers.rb +0 -33
  348. data/lib/tasks/instrumentation_generator/README.md +0 -63
  349. data/lib/tasks/instrumentation_generator/TODO.md +0 -33
  350. data/lib/tasks/instrumentation_generator/instrumentation.thor +0 -121
  351. data/lib/tasks/instrumentation_generator/templates/chain.tt +0 -22
  352. data/lib/tasks/instrumentation_generator/templates/chain_method.tt +0 -8
  353. data/lib/tasks/instrumentation_generator/templates/dependency_detection.tt +0 -29
  354. data/lib/tasks/instrumentation_generator/templates/instrumentation_method.tt +0 -3
  355. data/lib/tasks/instrumentation_generator/templates/newrelic.yml.tt +0 -19
  356. data/lib/tasks/instrumentation_generator/templates/prepend.tt +0 -13
  357. data/lib/tasks/instrumentation_generator/templates/prepend_method.tt +0 -3
  358. data/lib/tasks/instrumentation_generator/templates/test.tt +0 -15
  359. data/lib/tasks/multiverse.rake +0 -6
  360. data/lib/tasks/multiverse.rb +0 -83
data/newrelic_rpm.gemspec CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |s|
10
10
  s.version = NewRelic::VERSION::STRING
11
11
  s.required_ruby_version = '>= 2.4.0'
12
12
  s.required_rubygems_version = Gem::Requirement.new('> 1.3.1') if s.respond_to?(:required_rubygems_version=)
13
- s.authors = ['Tanna McClure', 'Kayla Reopelle', 'James Bunch', 'Hannah Ramadan']
13
+ s.authors = ['Tanna McClure', 'Kayla Reopelle', 'Hannah Ramadan']
14
14
  s.licenses = ['Apache-2.0']
15
15
  s.description = <<~EOS
16
16
  New Relic is a performance management system, developed by New Relic,
@@ -21,7 +21,8 @@ Gem::Specification.new do |s|
21
21
  https://github.com/newrelic/newrelic-ruby-agent/
22
22
  EOS
23
23
  s.email = 'support@newrelic.com'
24
- s.executables = %w[newrelic_cmd newrelic nrdebug]
24
+ # TODO: MAJOR VERSION - remove newrelic, deprecated since version xxx.
25
+ s.executables = %w[newrelic_rpm newrelic nrdebug]
25
26
  s.extra_rdoc_files = [
26
27
  'CHANGELOG.md',
27
28
  'LICENSE',
@@ -38,31 +39,37 @@ Gem::Specification.new do |s|
38
39
  'homepage_uri' => 'https://newrelic.com/ruby'
39
40
  }
40
41
 
41
- file_list = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features|infinite_tracing|\.github)/(?!agent_helper.rb)}) }
42
- build_file_path = 'lib/new_relic/build.rb'
43
- file_list << build_file_path if File.exist?(build_file_path)
42
+ reject_list = File.read(File.expand_path('../.build_ignore', __FILE__)).split("\n")
43
+ file_list = `git ls-files -z`.split("\x0").reject { |f| reject_list.any? { |rf| f.start_with?(rf) } }
44
+ # test/agent_helper.rb is a requirement for the NewRelic::Agent.require_test_helper public API
45
+ test_helper_path = 'test/agent_helper.rb'
46
+ file_list << test_helper_path
44
47
  s.files = file_list
45
48
 
46
- s.homepage = 'https://github.com/newrelic/rpm'
49
+ s.homepage = 'https://github.com/newrelic/newrelic-ruby-agent'
47
50
  s.require_paths = ['lib']
48
51
  s.summary = 'New Relic Ruby Agent'
52
+
49
53
  s.add_development_dependency 'bundler'
50
54
  s.add_development_dependency 'feedjira', '3.2.1' unless ENV['CI'] || RUBY_VERSION < '2.5' # for Gabby
51
55
  s.add_development_dependency 'httparty' unless ENV['CI'] # for perf tests and Gabby
52
56
  s.add_development_dependency 'minitest', "#{RUBY_VERSION >= '2.7.0' ? '5.3.3' : '4.7.5'}"
53
57
  s.add_development_dependency 'minitest-stub-const', '0.6'
54
58
  s.add_development_dependency 'mocha', '~> 1.16'
55
- s.add_development_dependency 'pry' unless ENV['CI']
59
+ s.add_development_dependency 'mutex_m' # used by Minitest, not included in Rubies above v3.3
60
+ s.add_development_dependency 'ostruct' # used by Rack, not included in Rubies above v3.4
61
+ s.add_development_dependency 'pry' if ENV['ENABLE_PRY']
62
+ s.add_development_dependency 'rack'
56
63
  s.add_development_dependency 'rake', '12.3.3'
57
64
 
58
- s.add_development_dependency 'rubocop', '1.44.1' unless ENV['CI'] && RUBY_VERSION < '3.0.0'
59
- s.add_development_dependency 'rubocop-ast', '1.24.1' unless ENV['CI'] && RUBY_VERSION < '3.0.0'
65
+ s.add_development_dependency 'rubocop', '1.57.2' unless ENV['CI'] && RUBY_VERSION < '3.0.0'
66
+ s.add_development_dependency 'rubocop-ast', '1.28.1' unless ENV['CI'] && RUBY_VERSION < '3.0.0'
60
67
  s.add_development_dependency 'rubocop-minitest', '0.27.0' unless ENV['CI'] && RUBY_VERSION < '3.0.0'
61
68
  s.add_development_dependency 'rubocop-performance', '1.16.0' unless ENV['CI'] && RUBY_VERSION < '3.0.0'
62
69
  s.add_development_dependency 'rubocop-rake', '0.6.0' unless ENV['CI'] && RUBY_VERSION < '3.0.0'
63
70
 
64
71
  s.add_development_dependency 'simplecov' if RUBY_VERSION >= '2.7.0'
65
72
  s.add_development_dependency 'thor' unless ENV['CI']
66
- s.add_development_dependency 'warning' if RUBY_VERSION >= '2.4.0'
73
+ s.add_development_dependency 'warning'
67
74
  s.add_development_dependency 'yard'
68
75
  end
data/test/agent_helper.rb CHANGED
@@ -112,7 +112,14 @@ def assert_log_contains(log, message)
112
112
  lines = log.array
113
113
 
114
114
  assert (lines.any? { |line| line.match(message) }),
115
- "Could not find message. Log contained: #{lines.join("\n")}"
115
+ "Could not find message: '#{message.inspect}'. Log contained: #{lines.join("\n")}"
116
+ end
117
+
118
+ def refute_log_contains(log, message)
119
+ lines = log.array
120
+
121
+ refute (lines.any? { |line| line.match(message) }),
122
+ "Found message: '#{message.inspect}'. Log contained: #{lines.join("\n")}"
116
123
  end
117
124
 
118
125
  def assert_audit_log_contains(audit_log_contents, needle)
@@ -228,7 +235,9 @@ def assert_metrics_recorded(expected)
228
235
  expected.each do |specish, expected_attrs|
229
236
  expected_spec = metric_spec_from_specish(specish)
230
237
  actual_stats = NewRelic::Agent.instance.stats_engine.to_h[expected_spec]
231
- if !actual_stats
238
+ if actual_stats
239
+ assert(actual_stats)
240
+ else
232
241
  all_specs = NewRelic::Agent.instance.stats_engine.to_h.keys.sort
233
242
  matches = all_specs.select { |spec| spec.name == expected_spec.name }
234
243
  matches.map! { |m| " #{m.inspect}" }
@@ -845,7 +854,7 @@ ensure
845
854
  end
846
855
 
847
856
  def json_dump_and_encode(object)
848
- Base64.encode64(JSON.dump(object))
857
+ NewRelic::Base64.encode64(JSON.dump(object))
849
858
  end
850
859
 
851
860
  def get_last_analytics_event
@@ -871,7 +880,7 @@ def load_cross_agent_test(name)
871
880
  test_file_path = File.join(cross_agent_tests_dir, "#{name}.json")
872
881
  data = File.read(test_file_path)
873
882
  data.gsub!('callCount', 'call_count')
874
- data = JSON.load(data)
883
+ data = JSON.parse(data)
875
884
  data.each { |testcase| testcase['testname'].tr!(' ', '_') if String === testcase['testname'] }
876
885
  data
877
886
  end
@@ -1025,3 +1034,28 @@ def defer_testing_to_min_supported_rails(test_file, min_rails_version, supports_
1025
1034
  puts "Skipping tests in #{File.basename(test_file)} because Rails >= #{min_rails_version} is unavailable" if ENV['VERBOSE_TEST_OUTPUT']
1026
1035
  end
1027
1036
  end
1037
+
1038
+ def first_call_for(subject)
1039
+ items = $collector.calls_for(subject)
1040
+
1041
+ if defined?(JRUBY_VERSION)
1042
+ refute_predicate items.size, :zero?, "Expected at least one call for '#{subject}'"
1043
+ else
1044
+ assert_equal 1, items.size, "Expected exactly one call for '#{subject}'"
1045
+ end
1046
+
1047
+ items.first
1048
+ end
1049
+
1050
+ def ruby_version_float
1051
+ RUBY_VERSION.split('.')[0..1].join('.').to_f
1052
+ end
1053
+
1054
+ def rails_version
1055
+ @rails_version ||= Gem::Version.new(Rails::VERSION::STRING)
1056
+ end
1057
+
1058
+ def rails_version_at_least?(version_string)
1059
+ version_string += '.0' until version_string.count('.') >= 2 # '7' => '7.0.0'
1060
+ rails_version >= Gem::Version.new(version_string)
1061
+ end
metadata CHANGED
@@ -1,17 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: newrelic_rpm
3
3
  version: !ruby/object:Gem::Version
4
- version: 9.1.0
4
+ version: 9.21.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tanna McClure
8
8
  - Kayla Reopelle
9
- - James Bunch
10
9
  - Hannah Ramadan
11
- autorequire:
12
10
  bindir: bin
13
11
  cert_chain: []
14
- date: 2023-03-30 00:00:00.000000000 Z
12
+ date: 1980-01-02 00:00:00.000000000 Z
15
13
  dependencies:
16
14
  - !ruby/object:Gem::Dependency
17
15
  name: bundler
@@ -69,6 +67,48 @@ dependencies:
69
67
  - - "~>"
70
68
  - !ruby/object:Gem::Version
71
69
  version: '1.16'
70
+ - !ruby/object:Gem::Dependency
71
+ name: mutex_m
72
+ requirement: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ type: :development
78
+ prerelease: false
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ version: '0'
84
+ - !ruby/object:Gem::Dependency
85
+ name: ostruct
86
+ requirement: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - ">="
89
+ - !ruby/object:Gem::Version
90
+ version: '0'
91
+ type: :development
92
+ prerelease: false
93
+ version_requirements: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - ">="
96
+ - !ruby/object:Gem::Version
97
+ version: '0'
98
+ - !ruby/object:Gem::Dependency
99
+ name: rack
100
+ requirement: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - ">="
103
+ - !ruby/object:Gem::Version
104
+ version: '0'
105
+ type: :development
106
+ prerelease: false
107
+ version_requirements: !ruby/object:Gem::Requirement
108
+ requirements:
109
+ - - ">="
110
+ - !ruby/object:Gem::Version
111
+ version: '0'
72
112
  - !ruby/object:Gem::Dependency
73
113
  name: rake
74
114
  requirement: !ruby/object:Gem::Requirement
@@ -83,6 +123,76 @@ dependencies:
83
123
  - - '='
84
124
  - !ruby/object:Gem::Version
85
125
  version: 12.3.3
126
+ - !ruby/object:Gem::Dependency
127
+ name: rubocop
128
+ requirement: !ruby/object:Gem::Requirement
129
+ requirements:
130
+ - - '='
131
+ - !ruby/object:Gem::Version
132
+ version: 1.57.2
133
+ type: :development
134
+ prerelease: false
135
+ version_requirements: !ruby/object:Gem::Requirement
136
+ requirements:
137
+ - - '='
138
+ - !ruby/object:Gem::Version
139
+ version: 1.57.2
140
+ - !ruby/object:Gem::Dependency
141
+ name: rubocop-ast
142
+ requirement: !ruby/object:Gem::Requirement
143
+ requirements:
144
+ - - '='
145
+ - !ruby/object:Gem::Version
146
+ version: 1.28.1
147
+ type: :development
148
+ prerelease: false
149
+ version_requirements: !ruby/object:Gem::Requirement
150
+ requirements:
151
+ - - '='
152
+ - !ruby/object:Gem::Version
153
+ version: 1.28.1
154
+ - !ruby/object:Gem::Dependency
155
+ name: rubocop-minitest
156
+ requirement: !ruby/object:Gem::Requirement
157
+ requirements:
158
+ - - '='
159
+ - !ruby/object:Gem::Version
160
+ version: 0.27.0
161
+ type: :development
162
+ prerelease: false
163
+ version_requirements: !ruby/object:Gem::Requirement
164
+ requirements:
165
+ - - '='
166
+ - !ruby/object:Gem::Version
167
+ version: 0.27.0
168
+ - !ruby/object:Gem::Dependency
169
+ name: rubocop-performance
170
+ requirement: !ruby/object:Gem::Requirement
171
+ requirements:
172
+ - - '='
173
+ - !ruby/object:Gem::Version
174
+ version: 1.16.0
175
+ type: :development
176
+ prerelease: false
177
+ version_requirements: !ruby/object:Gem::Requirement
178
+ requirements:
179
+ - - '='
180
+ - !ruby/object:Gem::Version
181
+ version: 1.16.0
182
+ - !ruby/object:Gem::Dependency
183
+ name: rubocop-rake
184
+ requirement: !ruby/object:Gem::Requirement
185
+ requirements:
186
+ - - '='
187
+ - !ruby/object:Gem::Version
188
+ version: 0.6.0
189
+ type: :development
190
+ prerelease: false
191
+ version_requirements: !ruby/object:Gem::Requirement
192
+ requirements:
193
+ - - '='
194
+ - !ruby/object:Gem::Version
195
+ version: 0.6.0
86
196
  - !ruby/object:Gem::Dependency
87
197
  name: simplecov
88
198
  requirement: !ruby/object:Gem::Requirement
@@ -134,45 +244,32 @@ description: |
134
244
  https://github.com/newrelic/newrelic-ruby-agent/
135
245
  email: support@newrelic.com
136
246
  executables:
137
- - newrelic_cmd
138
247
  - newrelic
248
+ - newrelic_rpm
139
249
  - nrdebug
140
250
  extensions: []
141
251
  extra_rdoc_files:
142
252
  - CHANGELOG.md
253
+ - CONTRIBUTING.md
143
254
  - LICENSE
144
255
  - README.md
145
- - CONTRIBUTING.md
146
256
  - newrelic.yml
147
257
  files:
148
- - ".gitignore"
149
- - ".project"
150
- - ".rubocop.yml"
151
- - ".rubocop_todo.yml"
152
- - ".simplecov"
153
- - ".snyk"
154
- - ".yardopts"
155
- - Brewfile
258
+ - ".build_ignore"
156
259
  - CHANGELOG.md
157
260
  - CONTRIBUTING.md
158
- - DOCKER.md
159
- - Dockerfile
160
261
  - Gemfile
161
- - Guardfile
162
262
  - LICENSE
163
263
  - README.md
164
264
  - Rakefile
165
265
  - THIRD_PARTY_NOTICES.md
166
266
  - Thorfile
167
267
  - bin/newrelic
168
- - bin/newrelic_cmd
268
+ - bin/newrelic_rpm
169
269
  - bin/nrdebug
170
- - config.dot
171
- - config/database.yml
172
- - docker-compose.yml
173
270
  - init.rb
174
271
  - install.rb
175
- - lefthook.yml
272
+ - lib/boot/strap.rb
176
273
  - lib/new_relic/agent.rb
177
274
  - lib/new_relic/agent/adaptive_sampler.rb
178
275
  - lib/new_relic/agent/agent.rb
@@ -185,10 +282,12 @@ files:
185
282
  - lib/new_relic/agent/agent_helpers/transmit.rb
186
283
  - lib/new_relic/agent/agent_logger.rb
187
284
  - lib/new_relic/agent/attribute_filter.rb
285
+ - lib/new_relic/agent/attribute_pre_filtering.rb
188
286
  - lib/new_relic/agent/attribute_processing.rb
189
287
  - lib/new_relic/agent/attributes.rb
190
288
  - lib/new_relic/agent/audit_logger.rb
191
289
  - lib/new_relic/agent/autostart.rb
290
+ - lib/new_relic/agent/aws.rb
192
291
  - lib/new_relic/agent/chained_call.rb
193
292
  - lib/new_relic/agent/commands/agent_command.rb
194
293
  - lib/new_relic/agent/commands/agent_command_router.rb
@@ -243,13 +342,17 @@ files:
243
342
  - lib/new_relic/agent/external.rb
244
343
  - lib/new_relic/agent/guid_generator.rb
245
344
  - lib/new_relic/agent/harvester.rb
345
+ - lib/new_relic/agent/health_check.rb
246
346
  - lib/new_relic/agent/heap.rb
247
347
  - lib/new_relic/agent/hostname.rb
248
348
  - lib/new_relic/agent/http_clients/abstract.rb
349
+ - lib/new_relic/agent/http_clients/async_http_wrappers.rb
249
350
  - lib/new_relic/agent/http_clients/curb_wrappers.rb
351
+ - lib/new_relic/agent/http_clients/ethon_wrappers.rb
250
352
  - lib/new_relic/agent/http_clients/excon_wrappers.rb
251
353
  - lib/new_relic/agent/http_clients/http_rb_wrappers.rb
252
354
  - lib/new_relic/agent/http_clients/httpclient_wrappers.rb
355
+ - lib/new_relic/agent/http_clients/httpx_wrappers.rb
253
356
  - lib/new_relic/agent/http_clients/net_http_wrappers.rb
254
357
  - lib/new_relic/agent/http_clients/typhoeus_wrappers.rb
255
358
  - lib/new_relic/agent/http_clients/uri_util.rb
@@ -275,11 +378,35 @@ files:
275
378
  - lib/new_relic/agent/instrumentation/active_storage.rb
276
379
  - lib/new_relic/agent/instrumentation/active_storage_subscriber.rb
277
380
  - lib/new_relic/agent/instrumentation/active_support.rb
381
+ - lib/new_relic/agent/instrumentation/active_support_broadcast_logger.rb
382
+ - lib/new_relic/agent/instrumentation/active_support_broadcast_logger/chain.rb
383
+ - lib/new_relic/agent/instrumentation/active_support_broadcast_logger/instrumentation.rb
384
+ - lib/new_relic/agent/instrumentation/active_support_broadcast_logger/prepend.rb
278
385
  - lib/new_relic/agent/instrumentation/active_support_logger.rb
279
386
  - lib/new_relic/agent/instrumentation/active_support_logger/chain.rb
280
387
  - lib/new_relic/agent/instrumentation/active_support_logger/instrumentation.rb
281
388
  - lib/new_relic/agent/instrumentation/active_support_logger/prepend.rb
282
389
  - lib/new_relic/agent/instrumentation/active_support_subscriber.rb
390
+ - lib/new_relic/agent/instrumentation/async_http.rb
391
+ - lib/new_relic/agent/instrumentation/async_http/chain.rb
392
+ - lib/new_relic/agent/instrumentation/async_http/instrumentation.rb
393
+ - lib/new_relic/agent/instrumentation/async_http/prepend.rb
394
+ - lib/new_relic/agent/instrumentation/aws_sdk_firehose.rb
395
+ - lib/new_relic/agent/instrumentation/aws_sdk_firehose/chain.rb
396
+ - lib/new_relic/agent/instrumentation/aws_sdk_firehose/instrumentation.rb
397
+ - lib/new_relic/agent/instrumentation/aws_sdk_firehose/prepend.rb
398
+ - lib/new_relic/agent/instrumentation/aws_sdk_kinesis.rb
399
+ - lib/new_relic/agent/instrumentation/aws_sdk_kinesis/chain.rb
400
+ - lib/new_relic/agent/instrumentation/aws_sdk_kinesis/instrumentation.rb
401
+ - lib/new_relic/agent/instrumentation/aws_sdk_kinesis/prepend.rb
402
+ - lib/new_relic/agent/instrumentation/aws_sdk_lambda.rb
403
+ - lib/new_relic/agent/instrumentation/aws_sdk_lambda/chain.rb
404
+ - lib/new_relic/agent/instrumentation/aws_sdk_lambda/instrumentation.rb
405
+ - lib/new_relic/agent/instrumentation/aws_sdk_lambda/prepend.rb
406
+ - lib/new_relic/agent/instrumentation/aws_sqs.rb
407
+ - lib/new_relic/agent/instrumentation/aws_sqs/chain.rb
408
+ - lib/new_relic/agent/instrumentation/aws_sqs/instrumentation.rb
409
+ - lib/new_relic/agent/instrumentation/aws_sqs/prepend.rb
283
410
  - lib/new_relic/agent/instrumentation/bunny.rb
284
411
  - lib/new_relic/agent/instrumentation/bunny/chain.rb
285
412
  - lib/new_relic/agent/instrumentation/bunny/instrumentation.rb
@@ -299,10 +426,18 @@ files:
299
426
  - lib/new_relic/agent/instrumentation/delayed_job/instrumentation.rb
300
427
  - lib/new_relic/agent/instrumentation/delayed_job/prepend.rb
301
428
  - lib/new_relic/agent/instrumentation/delayed_job_instrumentation.rb
429
+ - lib/new_relic/agent/instrumentation/dynamodb.rb
430
+ - lib/new_relic/agent/instrumentation/dynamodb/chain.rb
431
+ - lib/new_relic/agent/instrumentation/dynamodb/instrumentation.rb
432
+ - lib/new_relic/agent/instrumentation/dynamodb/prepend.rb
302
433
  - lib/new_relic/agent/instrumentation/elasticsearch.rb
303
434
  - lib/new_relic/agent/instrumentation/elasticsearch/chain.rb
304
435
  - lib/new_relic/agent/instrumentation/elasticsearch/instrumentation.rb
305
436
  - lib/new_relic/agent/instrumentation/elasticsearch/prepend.rb
437
+ - lib/new_relic/agent/instrumentation/ethon.rb
438
+ - lib/new_relic/agent/instrumentation/ethon/chain.rb
439
+ - lib/new_relic/agent/instrumentation/ethon/instrumentation.rb
440
+ - lib/new_relic/agent/instrumentation/ethon/prepend.rb
306
441
  - lib/new_relic/agent/instrumentation/excon.rb
307
442
  - lib/new_relic/agent/instrumentation/excon/middleware.rb
308
443
  - lib/new_relic/agent/instrumentation/fiber.rb
@@ -332,11 +467,19 @@ files:
332
467
  - lib/new_relic/agent/instrumentation/httprb/chain.rb
333
468
  - lib/new_relic/agent/instrumentation/httprb/instrumentation.rb
334
469
  - lib/new_relic/agent/instrumentation/httprb/prepend.rb
470
+ - lib/new_relic/agent/instrumentation/httpx.rb
471
+ - lib/new_relic/agent/instrumentation/httpx/chain.rb
472
+ - lib/new_relic/agent/instrumentation/httpx/instrumentation.rb
473
+ - lib/new_relic/agent/instrumentation/httpx/prepend.rb
335
474
  - lib/new_relic/agent/instrumentation/ignore_actions.rb
336
475
  - lib/new_relic/agent/instrumentation/logger.rb
337
476
  - lib/new_relic/agent/instrumentation/logger/chain.rb
338
477
  - lib/new_relic/agent/instrumentation/logger/instrumentation.rb
339
478
  - lib/new_relic/agent/instrumentation/logger/prepend.rb
479
+ - lib/new_relic/agent/instrumentation/logstasher.rb
480
+ - lib/new_relic/agent/instrumentation/logstasher/chain.rb
481
+ - lib/new_relic/agent/instrumentation/logstasher/instrumentation.rb
482
+ - lib/new_relic/agent/instrumentation/logstasher/prepend.rb
340
483
  - lib/new_relic/agent/instrumentation/memcache.rb
341
484
  - lib/new_relic/agent/instrumentation/memcache/chain.rb
342
485
  - lib/new_relic/agent/instrumentation/memcache/dalli.rb
@@ -352,6 +495,10 @@ files:
352
495
  - lib/new_relic/agent/instrumentation/net_http/instrumentation.rb
353
496
  - lib/new_relic/agent/instrumentation/net_http/prepend.rb
354
497
  - lib/new_relic/agent/instrumentation/notifications_subscriber.rb
498
+ - lib/new_relic/agent/instrumentation/opensearch.rb
499
+ - lib/new_relic/agent/instrumentation/opensearch/chain.rb
500
+ - lib/new_relic/agent/instrumentation/opensearch/instrumentation.rb
501
+ - lib/new_relic/agent/instrumentation/opensearch/prepend.rb
355
502
  - lib/new_relic/agent/instrumentation/padrino.rb
356
503
  - lib/new_relic/agent/instrumentation/padrino/chain.rb
357
504
  - lib/new_relic/agent/instrumentation/padrino/instrumentation.rb
@@ -373,8 +520,13 @@ files:
373
520
  - lib/new_relic/agent/instrumentation/rake/chain.rb
374
521
  - lib/new_relic/agent/instrumentation/rake/instrumentation.rb
375
522
  - lib/new_relic/agent/instrumentation/rake/prepend.rb
523
+ - lib/new_relic/agent/instrumentation/rdkafka.rb
524
+ - lib/new_relic/agent/instrumentation/rdkafka/chain.rb
525
+ - lib/new_relic/agent/instrumentation/rdkafka/instrumentation.rb
526
+ - lib/new_relic/agent/instrumentation/rdkafka/prepend.rb
376
527
  - lib/new_relic/agent/instrumentation/redis.rb
377
528
  - lib/new_relic/agent/instrumentation/redis/chain.rb
529
+ - lib/new_relic/agent/instrumentation/redis/cluster_middleware.rb
378
530
  - lib/new_relic/agent/instrumentation/redis/constants.rb
379
531
  - lib/new_relic/agent/instrumentation/redis/instrumentation.rb
380
532
  - lib/new_relic/agent/instrumentation/redis/middleware.rb
@@ -384,10 +536,25 @@ files:
384
536
  - lib/new_relic/agent/instrumentation/resque/helper.rb
385
537
  - lib/new_relic/agent/instrumentation/resque/instrumentation.rb
386
538
  - lib/new_relic/agent/instrumentation/resque/prepend.rb
539
+ - lib/new_relic/agent/instrumentation/roda.rb
540
+ - lib/new_relic/agent/instrumentation/roda/chain.rb
541
+ - lib/new_relic/agent/instrumentation/roda/ignorer.rb
542
+ - lib/new_relic/agent/instrumentation/roda/instrumentation.rb
543
+ - lib/new_relic/agent/instrumentation/roda/prepend.rb
544
+ - lib/new_relic/agent/instrumentation/roda/roda_transaction_namer.rb
545
+ - lib/new_relic/agent/instrumentation/ruby_kafka.rb
546
+ - lib/new_relic/agent/instrumentation/ruby_kafka/chain.rb
547
+ - lib/new_relic/agent/instrumentation/ruby_kafka/instrumentation.rb
548
+ - lib/new_relic/agent/instrumentation/ruby_kafka/prepend.rb
549
+ - lib/new_relic/agent/instrumentation/ruby_openai.rb
550
+ - lib/new_relic/agent/instrumentation/ruby_openai/chain.rb
551
+ - lib/new_relic/agent/instrumentation/ruby_openai/instrumentation.rb
552
+ - lib/new_relic/agent/instrumentation/ruby_openai/prepend.rb
387
553
  - lib/new_relic/agent/instrumentation/sequel.rb
388
554
  - lib/new_relic/agent/instrumentation/sequel_helper.rb
389
555
  - lib/new_relic/agent/instrumentation/sidekiq.rb
390
556
  - lib/new_relic/agent/instrumentation/sidekiq/client.rb
557
+ - lib/new_relic/agent/instrumentation/sidekiq/extensions/delay_extensions.rb
391
558
  - lib/new_relic/agent/instrumentation/sidekiq/extensions/delayed_class.rb
392
559
  - lib/new_relic/agent/instrumentation/sidekiq/server.rb
393
560
  - lib/new_relic/agent/instrumentation/sinatra.rb
@@ -396,6 +563,8 @@ files:
396
563
  - lib/new_relic/agent/instrumentation/sinatra/instrumentation.rb
397
564
  - lib/new_relic/agent/instrumentation/sinatra/prepend.rb
398
565
  - lib/new_relic/agent/instrumentation/sinatra/transaction_namer.rb
566
+ - lib/new_relic/agent/instrumentation/stripe.rb
567
+ - lib/new_relic/agent/instrumentation/stripe_subscriber.rb
399
568
  - lib/new_relic/agent/instrumentation/thread.rb
400
569
  - lib/new_relic/agent/instrumentation/thread/chain.rb
401
570
  - lib/new_relic/agent/instrumentation/thread/instrumentation.rb
@@ -408,11 +577,22 @@ files:
408
577
  - lib/new_relic/agent/instrumentation/typhoeus/chain.rb
409
578
  - lib/new_relic/agent/instrumentation/typhoeus/instrumentation.rb
410
579
  - lib/new_relic/agent/instrumentation/typhoeus/prepend.rb
580
+ - lib/new_relic/agent/instrumentation/view_component.rb
581
+ - lib/new_relic/agent/instrumentation/view_component/chain.rb
582
+ - lib/new_relic/agent/instrumentation/view_component/instrumentation.rb
583
+ - lib/new_relic/agent/instrumentation/view_component/prepend.rb
411
584
  - lib/new_relic/agent/internal_agent_error.rb
412
585
  - lib/new_relic/agent/javascript_instrumentor.rb
413
586
  - lib/new_relic/agent/linking_metadata.rb
587
+ - lib/new_relic/agent/llm.rb
588
+ - lib/new_relic/agent/llm/chat_completion_message.rb
589
+ - lib/new_relic/agent/llm/chat_completion_summary.rb
590
+ - lib/new_relic/agent/llm/embedding.rb
591
+ - lib/new_relic/agent/llm/llm_event.rb
592
+ - lib/new_relic/agent/llm/response_headers.rb
414
593
  - lib/new_relic/agent/local_log_decorator.rb
415
594
  - lib/new_relic/agent/log_event_aggregator.rb
595
+ - lib/new_relic/agent/log_event_attributes.rb
416
596
  - lib/new_relic/agent/log_once.rb
417
597
  - lib/new_relic/agent/log_priority.rb
418
598
  - lib/new_relic/agent/logging.rb
@@ -433,13 +613,21 @@ files:
433
613
  - lib/new_relic/agent/noticeable_error.rb
434
614
  - lib/new_relic/agent/null_logger.rb
435
615
  - lib/new_relic/agent/obfuscator.rb
616
+ - lib/new_relic/agent/opentelemetry/context.rb
617
+ - lib/new_relic/agent/opentelemetry/context/propagation.rb
618
+ - lib/new_relic/agent/opentelemetry/context/propagation/trace_propagator.rb
619
+ - lib/new_relic/agent/opentelemetry/trace.rb
620
+ - lib/new_relic/agent/opentelemetry/trace/span.rb
621
+ - lib/new_relic/agent/opentelemetry/trace/tracer.rb
622
+ - lib/new_relic/agent/opentelemetry/trace/tracer_provider.rb
623
+ - lib/new_relic/agent/opentelemetry/transaction_patch.rb
624
+ - lib/new_relic/agent/opentelemetry_bridge.rb
436
625
  - lib/new_relic/agent/parameter_filtering.rb
437
626
  - lib/new_relic/agent/payload_metric_mapping.rb
438
627
  - lib/new_relic/agent/pipe_channel_manager.rb
439
628
  - lib/new_relic/agent/pipe_service.rb
440
629
  - lib/new_relic/agent/prepend_supportability.rb
441
630
  - lib/new_relic/agent/priority_sampled_buffer.rb
442
- - lib/new_relic/agent/range_extensions.rb
443
631
  - lib/new_relic/agent/rules_engine.rb
444
632
  - lib/new_relic/agent/rules_engine/replacement_rule.rb
445
633
  - lib/new_relic/agent/rules_engine/segment_terms_rule.rb
@@ -450,6 +638,9 @@ files:
450
638
  - lib/new_relic/agent/samplers/memory_sampler.rb
451
639
  - lib/new_relic/agent/samplers/object_sampler.rb
452
640
  - lib/new_relic/agent/samplers/vm_sampler.rb
641
+ - lib/new_relic/agent/serverless_handler.rb
642
+ - lib/new_relic/agent/serverless_handler_event_sources.json
643
+ - lib/new_relic/agent/serverless_handler_event_sources.rb
453
644
  - lib/new_relic/agent/span_event_aggregator.rb
454
645
  - lib/new_relic/agent/span_event_primitive.rb
455
646
  - lib/new_relic/agent/sql_sampler.rb
@@ -491,16 +682,19 @@ files:
491
682
  - lib/new_relic/agent/transaction_time_aggregator.rb
492
683
  - lib/new_relic/agent/utilization/aws.rb
493
684
  - lib/new_relic/agent/utilization/azure.rb
685
+ - lib/new_relic/agent/utilization/ecs.rb
686
+ - lib/new_relic/agent/utilization/ecs_v4.rb
494
687
  - lib/new_relic/agent/utilization/gcp.rb
495
688
  - lib/new_relic/agent/utilization/pcf.rb
496
689
  - lib/new_relic/agent/utilization/vendor.rb
497
690
  - lib/new_relic/agent/utilization_data.rb
498
691
  - lib/new_relic/agent/vm.rb
692
+ - lib/new_relic/agent/vm/c_ruby_vm.rb
499
693
  - lib/new_relic/agent/vm/jruby_vm.rb
500
694
  - lib/new_relic/agent/vm/monotonic_gc_profiler.rb
501
- - lib/new_relic/agent/vm/mri_vm.rb
502
695
  - lib/new_relic/agent/vm/snapshot.rb
503
696
  - lib/new_relic/agent/worker_loop.rb
697
+ - lib/new_relic/base64.rb
504
698
  - lib/new_relic/cli/command.rb
505
699
  - lib/new_relic/cli/commands/deployments.rb
506
700
  - lib/new_relic/cli/commands/install.rb
@@ -511,15 +705,19 @@ files:
511
705
  - lib/new_relic/control/class_methods.rb
512
706
  - lib/new_relic/control/frameworks.rb
513
707
  - lib/new_relic/control/frameworks/external.rb
708
+ - lib/new_relic/control/frameworks/grape.rb
709
+ - lib/new_relic/control/frameworks/padrino.rb
514
710
  - lib/new_relic/control/frameworks/rails.rb
515
711
  - lib/new_relic/control/frameworks/rails3.rb
516
712
  - lib/new_relic/control/frameworks/rails4.rb
517
713
  - lib/new_relic/control/frameworks/rails_notifications.rb
714
+ - lib/new_relic/control/frameworks/roda.rb
518
715
  - lib/new_relic/control/frameworks/ruby.rb
519
716
  - lib/new_relic/control/frameworks/sinatra.rb
520
717
  - lib/new_relic/control/instance_methods.rb
521
718
  - lib/new_relic/control/instrumentation.rb
522
719
  - lib/new_relic/control/private_instance_methods.rb
720
+ - lib/new_relic/control/security_interface.rb
523
721
  - lib/new_relic/control/server_methods.rb
524
722
  - lib/new_relic/delayed_job_injection.rb
525
723
  - lib/new_relic/dependency_detection.rb
@@ -540,43 +738,33 @@ files:
540
738
  - lib/new_relic/recipes/capistrano_legacy.rb
541
739
  - lib/new_relic/recipes/helpers/send_deployment.rb
542
740
  - lib/new_relic/supportability_helper.rb
741
+ - lib/new_relic/thread_local_storage.rb
543
742
  - lib/new_relic/traced_thread.rb
544
743
  - lib/new_relic/version.rb
545
744
  - lib/newrelic_rpm.rb
546
745
  - lib/sequel/extensions/new_relic_instrumentation.rb
547
746
  - lib/sequel/plugins/new_relic_instrumentation.rb
548
747
  - lib/tasks/all.rb
748
+ - lib/tasks/bump_version.rake
549
749
  - lib/tasks/config.rake
550
750
  - lib/tasks/coverage_report.rake
751
+ - lib/tasks/gha.rake
551
752
  - lib/tasks/helpers/config.html.erb
552
753
  - lib/tasks/helpers/config.text.erb
553
754
  - lib/tasks/helpers/format.rb
554
755
  - lib/tasks/helpers/matches.rb
756
+ - lib/tasks/helpers/newrelicyml.rb
555
757
  - lib/tasks/helpers/prompt.rb
556
- - lib/tasks/helpers/removers.rb
758
+ - lib/tasks/helpers/version_bump.rb
557
759
  - lib/tasks/install.rake
558
- - lib/tasks/instrumentation_generator/README.md
559
- - lib/tasks/instrumentation_generator/TODO.md
560
- - lib/tasks/instrumentation_generator/instrumentation.thor
561
- - lib/tasks/instrumentation_generator/templates/Envfile.tt
562
- - lib/tasks/instrumentation_generator/templates/chain.tt
563
- - lib/tasks/instrumentation_generator/templates/chain_method.tt
564
- - lib/tasks/instrumentation_generator/templates/dependency_detection.tt
565
- - lib/tasks/instrumentation_generator/templates/instrumentation.tt
566
- - lib/tasks/instrumentation_generator/templates/instrumentation_method.tt
567
- - lib/tasks/instrumentation_generator/templates/newrelic.yml.tt
568
- - lib/tasks/instrumentation_generator/templates/prepend.tt
569
- - lib/tasks/instrumentation_generator/templates/prepend_method.tt
570
- - lib/tasks/instrumentation_generator/templates/test.tt
571
- - lib/tasks/multiverse.rake
572
- - lib/tasks/multiverse.rb
573
760
  - lib/tasks/newrelic.rb
761
+ - lib/tasks/newrelicyml.rake
574
762
  - lib/tasks/tests.rake
575
763
  - newrelic.yml
576
764
  - newrelic_rpm.gemspec
577
765
  - recipes/newrelic.rb
578
766
  - test/agent_helper.rb
579
- homepage: https://github.com/newrelic/rpm
767
+ homepage: https://github.com/newrelic/newrelic-ruby-agent
580
768
  licenses:
581
769
  - Apache-2.0
582
770
  metadata:
@@ -585,7 +773,6 @@ metadata:
585
773
  documentation_uri: https://docs.newrelic.com/docs/agents/ruby-agent
586
774
  source_code_uri: https://github.com/newrelic/newrelic-ruby-agent
587
775
  homepage_uri: https://newrelic.com/ruby
588
- post_install_message:
589
776
  rdoc_options: []
590
777
  require_paths:
591
778
  - lib
@@ -600,8 +787,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
600
787
  - !ruby/object:Gem::Version
601
788
  version: 1.3.1
602
789
  requirements: []
603
- rubygems_version: 3.1.6
604
- signing_key:
790
+ rubygems_version: 3.6.9
605
791
  specification_version: 4
606
792
  summary: New Relic Ruby Agent
607
793
  test_files: []