Rack middlewares are automatically instrumented with Ruby agent version 3.9.0 or higher.
The NewRelic::Agent::Instrumentation::Rack
module is deprecated. After upgrading to Ruby agent version 3.9.0 or higher, New Relic recommends that you remove any references to this module from your code. For more information, see Instrumenting Metal controllers.