Martin Ennemoser wrote in post #1154169: > I have a ruby script which instruments Net::HTTP requests in Rails > applications. This works as follows: When Ruby loads the Net::HTTP > class, I > alias the request method. At every http request, my instrumented method > gets executed. So that this works, I need to execute my script BEFORE > ruby > loads the standard library and BEFORE Rails gets loaded. So I need the > earliest possible point in Rails where I can require my instrumentation > script.
Sound to me like you need to make your own Rack middleware and insert it into the stack in the appropriate place. http://guides.rubyonrails.org/rails_on_rack.html -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/215779e70b54b82829cf9f5244fd80c7%40ruby-forum.com. For more options, visit https://groups.google.com/d/optout.