lib/fozzie/rails/middleware.rb in fozzie-0.0.22 vs lib/fozzie/rails/middleware.rb in fozzie-0.0.23
- old
+ new
@@ -7,16 +7,18 @@
# This middlewware times server processing for a resource, not view render.
class Middleware < Fozzie::Rack::Middleware
# Generates the statistics key for the current path
def generate_key(env)
- path_str = env['PATH_INFO']
+ path_str = env['PATH_INFO']
+ request_method = env['REQUEST_METHOD']
+
return nil unless path_str
begin
routing = routing_lookup
- path = routing.recognize_path(path_str)
+ path = routing.recognize_path(path_str, :method => request_method)
stat = [path[:controller], path[:action], "render"].join('.')
stat
rescue => exc
S.increment "routing.error"
nil
@@ -32,6 +34,6 @@
end
end
end
-end
\ No newline at end of file
+end