Class: Railswatch::Instrument::MetricsCollector
- Inherits:
-
Object
- Object
- Railswatch::Instrument::MetricsCollector
- Defined in:
- lib/railswatch/instrument/metrics_collector.rb
Instance Method Summary collapse
-
#call(event_name, started, finished, event_id, payload) ⇒ Object
payload { controller: “PostsController”, action: “index”, params: => “index”, “controller” => “posts”, headers: #<ActionDispatch::Http::Headers:0x0055a67a519b88>, format: :html, method: “GET”, path: “/posts”, status: 200, view_runtime: 46.848, db_runtime: 0.157 }.
Instance Method Details
#call(event_name, started, finished, event_id, payload) ⇒ Object
payload
controller: "PostsController",
action: "index",
params: {"action" => "index", "controller" => "posts",
headers: #<ActionDispatch::Http::Headers:0x0055a67a519b88>,
format: :html,
method: "GET",
path: "/posts",
status: 200,
view_runtime: 46.848,
db_runtime: 0.157
}
20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/railswatch/instrument/metrics_collector.rb', line 20 def call(event_name, started, finished, event_id, payload) return if Railswatch.skip return if CurrentRequest.current.data return if ignored_event?(payload) CurrentRequest.current.data = build_record( event_name: event_name, started: started, finished: finished, event_id: event_id, payload: payload ) end |