diff --git a/lib/new_relic/agent/instrumentation/active_support_broadcast_logger.rb b/lib/new_relic/agent/instrumentation/active_support_broadcast_logger.rb index 8505dd2d72..3e51c1abd6 100644 --- a/lib/new_relic/agent/instrumentation/active_support_broadcast_logger.rb +++ b/lib/new_relic/agent/instrumentation/active_support_broadcast_logger.rb @@ -12,8 +12,6 @@ depends_on { defined?(ActiveSupport::BroadcastLogger) } executes do - NewRelic::Agent.logger.info('Installing ActiveSupport::BroadcastLogger instrumentation') - if use_prepend? prepend_instrument ActiveSupport::BroadcastLogger, NewRelic::Agent::Instrumentation::ActiveSupportBroadcastLogger::Prepend else diff --git a/lib/new_relic/agent/instrumentation/active_support_logger.rb b/lib/new_relic/agent/instrumentation/active_support_logger.rb index a89effca96..73c8f66159 100644 --- a/lib/new_relic/agent/instrumentation/active_support_logger.rb +++ b/lib/new_relic/agent/instrumentation/active_support_logger.rb @@ -14,8 +14,6 @@ end executes do - NewRelic::Agent.logger.info('Installing ActiveSupport::Logger instrumentation') - if use_prepend? # the only method currently instrumented is a class method prepend_instrument ActiveSupport::Logger.singleton_class, NewRelic::Agent::Instrumentation::ActiveSupportLogger::Prepend diff --git a/lib/new_relic/agent/instrumentation/async_http.rb b/lib/new_relic/agent/instrumentation/async_http.rb index 0087877e95..82aa620915 100644 --- a/lib/new_relic/agent/instrumentation/async_http.rb +++ b/lib/new_relic/agent/instrumentation/async_http.rb @@ -16,9 +16,8 @@ end executes do - NewRelic::Agent.logger.info('Installing async_http instrumentation') - require 'async/http/internet' + if use_prepend? prepend_instrument Async::HTTP::Internet, NewRelic::Agent::Instrumentation::AsyncHttp::Prepend else diff --git a/lib/new_relic/agent/instrumentation/aws_sqs.rb b/lib/new_relic/agent/instrumentation/aws_sqs.rb index 7f5acb82c3..35d55428e2 100644 --- a/lib/new_relic/agent/instrumentation/aws_sqs.rb +++ b/lib/new_relic/agent/instrumentation/aws_sqs.rb @@ -14,8 +14,6 @@ end executes do - NewRelic::Agent.logger.info('Installing aws-sdk-sqs instrumentation') - if use_prepend? prepend_instrument Aws::SQS::Client, NewRelic::Agent::Instrumentation::AwsSqs::Prepend else diff --git a/lib/new_relic/agent/instrumentation/bunny.rb b/lib/new_relic/agent/instrumentation/bunny.rb index b7cf291eb0..c9486acf0b 100644 --- a/lib/new_relic/agent/instrumentation/bunny.rb +++ b/lib/new_relic/agent/instrumentation/bunny.rb @@ -14,7 +14,6 @@ end executes do - NewRelic::Agent.logger.info('Installing Bunny instrumentation') require 'new_relic/agent/distributed_tracing/cross_app_tracing' require 'new_relic/agent/messaging' require 'new_relic/agent/transaction/message_broker_segment' @@ -22,9 +21,9 @@ executes do if use_prepend? - prepend_instrument Bunny::Exchange, NewRelic::Agent::Instrumentation::Bunny::Prepend::Exchange - prepend_instrument Bunny::Queue, NewRelic::Agent::Instrumentation::Bunny::Prepend::Queue - prepend_instrument Bunny::Consumer, NewRelic::Agent::Instrumentation::Bunny::Prepend::Consumer + prepend_instrument Bunny::Exchange, NewRelic::Agent::Instrumentation::Bunny::Prepend::Exchange, 'Bunny::Exchange' + prepend_instrument Bunny::Queue, NewRelic::Agent::Instrumentation::Bunny::Prepend::Queue, 'Bunny::Queue' + prepend_instrument Bunny::Consumer, NewRelic::Agent::Instrumentation::Bunny::Prepend::Consumer, 'Bunny::Consumer' else chain_instrument NewRelic::Agent::Instrumentation::Bunny::Chain end diff --git a/lib/new_relic/agent/instrumentation/concurrent_ruby.rb b/lib/new_relic/agent/instrumentation/concurrent_ruby.rb index 0937bcd73b..0e8c661940 100644 --- a/lib/new_relic/agent/instrumentation/concurrent_ruby.rb +++ b/lib/new_relic/agent/instrumentation/concurrent_ruby.rb @@ -16,8 +16,6 @@ end executes do - NewRelic::Agent.logger.info('Installing concurrent-ruby instrumentation') - if use_prepend? prepend_instrument(Concurrent::ThreadPoolExecutor, NewRelic::Agent::Instrumentation::ConcurrentRuby::Prepend) diff --git a/lib/new_relic/agent/instrumentation/curb.rb b/lib/new_relic/agent/instrumentation/curb.rb index 2aa2699e67..aa38d183c9 100644 --- a/lib/new_relic/agent/instrumentation/curb.rb +++ b/lib/new_relic/agent/instrumentation/curb.rb @@ -16,17 +16,16 @@ end executes do - NewRelic::Agent.logger.info('Installing Curb instrumentation') require 'new_relic/agent/distributed_tracing/cross_app_tracing' require 'new_relic/agent/http_clients/curb_wrappers' end executes do if use_prepend? - prepend_instrument Curl::Easy, NewRelic::Agent::Instrumentation::Curb::Easy::Prepend - prepend_instrument Curl::Multi, NewRelic::Agent::Instrumentation::Curb::Multi::Prepend + prepend_instrument Curl::Easy, NewRelic::Agent::Instrumentation::Curb::Easy::Prepend, 'Curb::Easy' + prepend_instrument Curl::Multi, NewRelic::Agent::Instrumentation::Curb::Multi::Prepend, 'Curb::Multi' else - chain_instrument NewRelic::Agent::Instrumentation::Curb::Chain + chain_instrument NewRelic::Agent::Instrumentation::Curb::Chain, NewRelic::Agent::Instrumentation::Curb::Multi::INSTRUMENTATION_NAME end end end diff --git a/lib/new_relic/agent/instrumentation/delayed_job_instrumentation.rb b/lib/new_relic/agent/instrumentation/delayed_job_instrumentation.rb index e5c88644e5..b9bde8ac1d 100644 --- a/lib/new_relic/agent/instrumentation/delayed_job_instrumentation.rb +++ b/lib/new_relic/agent/instrumentation/delayed_job_instrumentation.rb @@ -82,10 +82,6 @@ def method_name(payload_object) defined?(Delayed) && defined?(Delayed::Worker) end - executes do - NewRelic::Agent.logger.info('Installing DelayedJob instrumentation [part 1/2]') - end - executes do if use_prepend? prepend_instrument Delayed::Worker, NewRelic::Agent::Instrumentation::DelayedJob::Prepend diff --git a/lib/new_relic/agent/instrumentation/dynamodb.rb b/lib/new_relic/agent/instrumentation/dynamodb.rb index 7f74e76f08..dedd1f3c43 100644 --- a/lib/new_relic/agent/instrumentation/dynamodb.rb +++ b/lib/new_relic/agent/instrumentation/dynamodb.rb @@ -14,8 +14,6 @@ end executes do - NewRelic::Agent.logger.info('Installing DynamoDB instrumentation') - if use_prepend? prepend_instrument Aws::DynamoDB::Client, NewRelic::Agent::Instrumentation::DynamoDB::Prepend else diff --git a/lib/new_relic/agent/instrumentation/elasticsearch.rb b/lib/new_relic/agent/instrumentation/elasticsearch.rb index dca764b752..3c34f3c442 100644 --- a/lib/new_relic/agent/instrumentation/elasticsearch.rb +++ b/lib/new_relic/agent/instrumentation/elasticsearch.rb @@ -14,8 +14,6 @@ end executes do - NewRelic::Agent.logger.info('Installing Elasticsearch instrumentation') - to_instrument = if Gem::Version.create(Elasticsearch::VERSION) < Gem::Version.create('8.0.0') Elasticsearch::Transport::Client else diff --git a/lib/new_relic/agent/instrumentation/ethon.rb b/lib/new_relic/agent/instrumentation/ethon.rb index 20daa492d5..8af7469ced 100644 --- a/lib/new_relic/agent/instrumentation/ethon.rb +++ b/lib/new_relic/agent/instrumentation/ethon.rb @@ -21,10 +21,6 @@ defined?(Ethon) && Gem::Version.new(Ethon::VERSION) >= Gem::Version.new('0.12.0') end - executes do - NewRelic::Agent.logger.info('Installing ethon instrumentation') - end - executes do if use_prepend? # NOTE: by default prepend_instrument will go with the module name that diff --git a/lib/new_relic/agent/instrumentation/fiber.rb b/lib/new_relic/agent/instrumentation/fiber.rb index ada212afb0..2412cbe891 100644 --- a/lib/new_relic/agent/instrumentation/fiber.rb +++ b/lib/new_relic/agent/instrumentation/fiber.rb @@ -14,8 +14,6 @@ end executes do - NewRelic::Agent.logger.info('Installing Fiber instrumentation') - if use_prepend? prepend_instrument Fiber, NewRelic::Agent::Instrumentation::MonitoredFiber::Prepend else diff --git a/lib/new_relic/agent/instrumentation/httpclient.rb b/lib/new_relic/agent/instrumentation/httpclient.rb index 9dc9678d86..dc6e1fc871 100644 --- a/lib/new_relic/agent/instrumentation/httpclient.rb +++ b/lib/new_relic/agent/instrumentation/httpclient.rb @@ -23,7 +23,6 @@ end executes do - NewRelic::Agent.logger.info('Installing HTTPClient instrumentation') require 'new_relic/agent/distributed_tracing/cross_app_tracing' require 'new_relic/agent/http_clients/httpclient_wrappers' end diff --git a/lib/new_relic/agent/instrumentation/httprb.rb b/lib/new_relic/agent/instrumentation/httprb.rb index 822a2b0469..0def79c154 100644 --- a/lib/new_relic/agent/instrumentation/httprb.rb +++ b/lib/new_relic/agent/instrumentation/httprb.rb @@ -14,7 +14,6 @@ end executes do - NewRelic::Agent.logger.info('Installing http.rb Wrappers') require 'new_relic/agent/distributed_tracing/cross_app_tracing' require 'new_relic/agent/http_clients/http_rb_wrappers' end diff --git a/lib/new_relic/agent/instrumentation/httpx.rb b/lib/new_relic/agent/instrumentation/httpx.rb index d709532ef0..ed58385230 100644 --- a/lib/new_relic/agent/instrumentation/httpx.rb +++ b/lib/new_relic/agent/instrumentation/httpx.rb @@ -13,10 +13,6 @@ defined?(HTTPX) && Gem::Version.new(HTTPX::VERSION) >= Gem::Version.new('1.0.0') end - executes do - NewRelic::Agent.logger.info('Installing httpx instrumentation') - end - executes do if use_prepend? prepend_instrument HTTPX::Session, NewRelic::Agent::Instrumentation::HTTPX::Prepend diff --git a/lib/new_relic/agent/instrumentation/logger.rb b/lib/new_relic/agent/instrumentation/logger.rb index c351fa6f59..a92b978660 100644 --- a/lib/new_relic/agent/instrumentation/logger.rb +++ b/lib/new_relic/agent/instrumentation/logger.rb @@ -15,12 +15,10 @@ end executes do - NewRelic::Agent.logger.info('Installing Logger instrumentation') - if use_prepend? prepend_instrument Logger, NewRelic::Agent::Instrumentation::Logger::Prepend else - chain_instrument NewRelic::Agent::Instrumentation::Logger + chain_instrument NewRelic::Agent::Instrumentation::Logger, NewRelic::Agent::Instrumentation::Logger::INSTRUMENTATION_NAME end end end diff --git a/lib/new_relic/agent/instrumentation/logstasher.rb b/lib/new_relic/agent/instrumentation/logstasher.rb index 2799996e5e..81129cabce 100644 --- a/lib/new_relic/agent/instrumentation/logstasher.rb +++ b/lib/new_relic/agent/instrumentation/logstasher.rb @@ -16,8 +16,6 @@ end executes do - NewRelic::Agent.logger.info('Installing LogStasher instrumentation') - if use_prepend? prepend_instrument LogStasher.singleton_class, NewRelic::Agent::Instrumentation::LogStasher::Prepend else diff --git a/lib/new_relic/agent/instrumentation/memcache.rb b/lib/new_relic/agent/instrumentation/memcache.rb index f5a9caa2b8..6d2e470a98 100644 --- a/lib/new_relic/agent/instrumentation/memcache.rb +++ b/lib/new_relic/agent/instrumentation/memcache.rb @@ -74,7 +74,6 @@ depends_on { NewRelic::Agent::Instrumentation::Memcache::DalliCAS.should_instrument? } executes do - NewRelic::Agent.logger.info('Installing Dalli CAS Client Memcache instrumentation') if use_prepend? prepend_module = NewRelic::Agent::Instrumentation::Memcache::Prepend prepend_module.dalli_cas_prependers do |client_class, instrumenting_module| diff --git a/lib/new_relic/agent/instrumentation/opensearch.rb b/lib/new_relic/agent/instrumentation/opensearch.rb index 0b10f1914a..0871fe1b15 100644 --- a/lib/new_relic/agent/instrumentation/opensearch.rb +++ b/lib/new_relic/agent/instrumentation/opensearch.rb @@ -14,8 +14,6 @@ end executes do - NewRelic::Agent.logger.info('Installing opensearch-ruby instrumentation') - if use_prepend? prepend_instrument OpenSearch::Transport::Client, NewRelic::Agent::Instrumentation::OpenSearch::Prepend else diff --git a/lib/new_relic/agent/instrumentation/padrino.rb b/lib/new_relic/agent/instrumentation/padrino.rb index 912c0a9487..a81f8ff5b2 100644 --- a/lib/new_relic/agent/instrumentation/padrino.rb +++ b/lib/new_relic/agent/instrumentation/padrino.rb @@ -22,11 +22,11 @@ depends_on { defined?(Padrino) && defined?(Padrino::Routing::InstanceMethods) } executes do - NewRelic::Agent.logger.info('Installing Padrino instrumentation') + supportability_name = NewRelic::Agent::Instrumentation::Padrino::INSTRUMENTATION_NAME if use_prepend? - prepend_instrument Padrino::Application, NewRelic::Agent::Instrumentation::PadrinoTracer::Prepend + prepend_instrument Padrino::Application, NewRelic::Agent::Instrumentation::PadrinoTracer::Prepend, supportability_name else - chain_instrument NewRelic::Agent::Instrumentation::PadrinoTracer::Chain + chain_instrument NewRelic::Agent::Instrumentation::PadrinoTracer::Chain, supportability_name end end end diff --git a/lib/new_relic/agent/instrumentation/rake.rb b/lib/new_relic/agent/instrumentation/rake.rb index 543b52b50d..0581a64153 100644 --- a/lib/new_relic/agent/instrumentation/rake.rb +++ b/lib/new_relic/agent/instrumentation/rake.rb @@ -17,7 +17,6 @@ depends_on { NewRelic::Agent::Instrumentation::Rake.safe_from_third_party_gem? } executes do - NewRelic::Agent.logger.info('Installing Rake instrumentation') NewRelic::Agent.logger.debug("Instrumenting Rake tasks: #{NewRelic::Agent.config[:'rake.tasks']}") end diff --git a/lib/new_relic/agent/instrumentation/rdkafka.rb b/lib/new_relic/agent/instrumentation/rdkafka.rb index 51b8dae73d..e42cc774be 100644 --- a/lib/new_relic/agent/instrumentation/rdkafka.rb +++ b/lib/new_relic/agent/instrumentation/rdkafka.rb @@ -10,8 +10,6 @@ end executes do - NewRelic::Agent.logger.info('Installing rdkafka instrumentation') - require_relative 'rdkafka/instrumentation' require_relative 'rdkafka/chain' require_relative 'rdkafka/prepend' diff --git a/lib/new_relic/agent/instrumentation/redis.rb b/lib/new_relic/agent/instrumentation/redis.rb index fa435855c3..fdfd43a2a8 100644 --- a/lib/new_relic/agent/instrumentation/redis.rb +++ b/lib/new_relic/agent/instrumentation/redis.rb @@ -31,7 +31,6 @@ end executes do - NewRelic::Agent.logger.info('Installing Redis Instrumentation') if NewRelic::Agent::Instrumentation::Redis::Constants::HAS_REDIS_CLIENT RedisClient.register(NewRelic::Agent::Instrumentation::RedisClient::Middleware) diff --git a/lib/new_relic/agent/instrumentation/resque.rb b/lib/new_relic/agent/instrumentation/resque.rb index 8ccd3a8933..3c4158d17e 100644 --- a/lib/new_relic/agent/instrumentation/resque.rb +++ b/lib/new_relic/agent/instrumentation/resque.rb @@ -18,10 +18,6 @@ defined?(Airbrake) && defined?(Airbrake::AIRBRAKE_VERSION) && Gem::Version.create(Airbrake::AIRBRAKE_VERSION) < Gem::Version.create('11.0.3') end - executes do - NewRelic::Agent.logger.info('Installing Resque instrumentation') - end - executes do if NewRelic::Agent.config[:'resque.use_ruby_dns'] && NewRelic::Agent.config[:dispatcher] == :resque NewRelic::Agent.logger.info('Requiring resolv-replace') diff --git a/lib/new_relic/agent/instrumentation/roda.rb b/lib/new_relic/agent/instrumentation/roda.rb index c9f85b263f..2e82f6288a 100644 --- a/lib/new_relic/agent/instrumentation/roda.rb +++ b/lib/new_relic/agent/instrumentation/roda.rb @@ -20,15 +20,15 @@ require_relative '../../rack/agent_hooks' require_relative '../../rack/browser_monitoring' - NewRelic::Agent.logger.info('Installing Roda instrumentation') - if use_prepend? require_relative 'roda/prepend' - prepend_instrument Roda.singleton_class, NewRelic::Agent::Instrumentation::Roda::Build::Prepend + + supportability_name = NewRelic::Agent::Instrumentation::Roda::Tracer::INSTRUMENTATION_NAME + prepend_instrument Roda.singleton_class, NewRelic::Agent::Instrumentation::Roda::Build::Prepend, supportability_name prepend_instrument Roda, NewRelic::Agent::Instrumentation::Roda::Prepend else require_relative 'roda/chain' - chain_instrument NewRelic::Agent::Instrumentation::Roda::Build::Chain + chain_instrument NewRelic::Agent::Instrumentation::Roda::Build::Chain, supportability_name chain_instrument NewRelic::Agent::Instrumentation::Roda::Chain end Roda.class_eval { extend NewRelic::Agent::Instrumentation::Roda::Ignorer } diff --git a/lib/new_relic/agent/instrumentation/ruby_kafka.rb b/lib/new_relic/agent/instrumentation/ruby_kafka.rb index 6ab2c88654..42da1c2c86 100644 --- a/lib/new_relic/agent/instrumentation/ruby_kafka.rb +++ b/lib/new_relic/agent/instrumentation/ruby_kafka.rb @@ -14,8 +14,6 @@ end executes do - NewRelic::Agent.logger.info('Installing ruby-kafka instrumentation') - if use_prepend? prepend_instrument Kafka::Producer, NewRelic::Agent::Instrumentation::RubyKafkaProducer::Prepend prepend_instrument Kafka::Consumer, NewRelic::Agent::Instrumentation::RubyKafkaConsumer::Prepend diff --git a/lib/new_relic/agent/instrumentation/sinatra.rb b/lib/new_relic/agent/instrumentation/sinatra.rb index ceb743e574..29e83370fa 100644 --- a/lib/new_relic/agent/instrumentation/sinatra.rb +++ b/lib/new_relic/agent/instrumentation/sinatra.rb @@ -16,10 +16,6 @@ depends_on { Sinatra::Base.private_method_defined?(:process_route) } depends_on { Sinatra::Base.private_method_defined?(:route_eval) } - executes do - NewRelic::Agent.logger.info('Installing Sinatra instrumentation') - end - executes do if use_prepend? prepend_instrument Sinatra::Base, NewRelic::Agent::Instrumentation::Sinatra::Prepend @@ -32,14 +28,15 @@ end executes do + supportability_name = NewRelic::Agent::Instrumentation::Sinatra::Tracer::INSTRUMENTATION_NAME # These requires are inside an executes block because they require rack, and # we can't be sure that rack is available when this file is first required. require 'new_relic/rack/agent_hooks' require 'new_relic/rack/browser_monitoring' if use_prepend? - prepend_instrument Sinatra::Base.singleton_class, NewRelic::Agent::Instrumentation::Sinatra::Build::Prepend + prepend_instrument Sinatra::Base.singleton_class, NewRelic::Agent::Instrumentation::Sinatra::Build::Prepend, supportability_name else - chain_instrument NewRelic::Agent::Instrumentation::Sinatra::Build::Chain + chain_instrument NewRelic::Agent::Instrumentation::Sinatra::Build::Chain, supportability_name end end end diff --git a/lib/new_relic/agent/instrumentation/thread.rb b/lib/new_relic/agent/instrumentation/thread.rb index e5880206c6..536c5b7467 100644 --- a/lib/new_relic/agent/instrumentation/thread.rb +++ b/lib/new_relic/agent/instrumentation/thread.rb @@ -9,8 +9,6 @@ named :thread executes do - NewRelic::Agent.logger.info('Installing Thread Instrumentation') - if use_prepend? prepend_instrument Thread, NewRelic::Agent::Instrumentation::MonitoredThread::Prepend else diff --git a/lib/new_relic/agent/instrumentation/tilt.rb b/lib/new_relic/agent/instrumentation/tilt.rb index f9c9d2765f..5f27e9b442 100644 --- a/lib/new_relic/agent/instrumentation/tilt.rb +++ b/lib/new_relic/agent/instrumentation/tilt.rb @@ -11,10 +11,6 @@ depends_on { defined?(Tilt) } - executes do - NewRelic::Agent.logger.info('Installing Tilt instrumentation') - end - executes do if use_prepend? prepend_instrument Tilt::Template, NewRelic::Agent::Instrumentation::Tilt::Prepend diff --git a/lib/new_relic/agent/instrumentation/typhoeus.rb b/lib/new_relic/agent/instrumentation/typhoeus.rb index def686f7a3..0699e1e34d 100644 --- a/lib/new_relic/agent/instrumentation/typhoeus.rb +++ b/lib/new_relic/agent/instrumentation/typhoeus.rb @@ -18,7 +18,6 @@ end executes do - NewRelic::Agent.logger.info('Installing Typhoeus instrumentation') require 'new_relic/agent/distributed_tracing/cross_app_tracing' require 'new_relic/agent/http_clients/typhoeus_wrappers' end diff --git a/lib/new_relic/agent/instrumentation/view_component.rb b/lib/new_relic/agent/instrumentation/view_component.rb index 900336c67a..d9f09c0f52 100644 --- a/lib/new_relic/agent/instrumentation/view_component.rb +++ b/lib/new_relic/agent/instrumentation/view_component.rb @@ -15,8 +15,6 @@ end executes do - NewRelic::Agent.logger.info('Installing ViewComponent instrumentation') - if use_prepend? prepend_instrument ViewComponent::Base, NewRelic::Agent::Instrumentation::ViewComponent::Prepend else diff --git a/lib/tasks/instrumentation_generator/templates/dependency_detection.tt b/lib/tasks/instrumentation_generator/templates/dependency_detection.tt index 2b17a16e80..e5c82ebb6f 100644 --- a/lib/tasks/instrumentation_generator/templates/dependency_detection.tt +++ b/lib/tasks/instrumentation_generator/templates/dependency_detection.tt @@ -18,8 +18,11 @@ DependencyDetection.defer do end executes do - NewRelic::Agent.logger.info('Installing <%= @name.downcase %> instrumentation') - + # prepend_instrument and chain_instrument call extract_supportability_name + # to get the library name for supportability metrics and info-level logging. + # This is done by spliting on the 2nd to last spot of the instrumented + # module. If this isn't how we want the name to appear, pass in the desired + # name as a third argument. if use_prepend? prepend_instrument <%= @class_name %>, NewRelic::Agent::Instrumentation::<%= @class_name %>::Prepend else