lib/heavylog/middleware.rb in heavylog-0.0.4 vs lib/heavylog/middleware.rb in heavylog-0.0.5
- old
+ new
@@ -11,9 +11,11 @@
def call(env)
ignore = env['PATH_INFO'] =~ @assets_regex
if !ignore
request = ActionDispatch::Request.new(env)
RequestStore.store[:heavylog_request_id] = request.uuid
+ RequestStore.store[:heavylog_request_start] = Time.now.iso8601
+ RequestStore.store[:heavylog_request_ip] = request.ip
end
@app.call(env)
ensure
Heavylog.finish if !ignore