diff --git a/instrumentation/active_job/lib/opentelemetry/instrumentation/active_job/instrumentation.rb b/instrumentation/active_job/lib/opentelemetry/instrumentation/active_job/instrumentation.rb index d4f5dfe3c..a5b9d22e0 100644 --- a/instrumentation/active_job/lib/opentelemetry/instrumentation/active_job/instrumentation.rb +++ b/instrumentation/active_job/lib/opentelemetry/instrumentation/active_job/instrumentation.rb @@ -71,7 +71,7 @@ def require_dependencies def patch_activejob Handlers.subscribe - ActiveSupport.on_load(:active_job) do + ::ActiveSupport.on_load(:active_job) do ::ActiveJob::Base.prepend(Patches::Base) unless ::ActiveJob::Base <= Patches::Base end end