Class: Yabeda::Rails::Event
- Inherits:
-
ActiveSupport::Notifications::Event
- Object
- ActiveSupport::Notifications::Event
- Yabeda::Rails::Event
- Defined in:
- lib/yabeda/rails/event.rb
Overview
ActiveSupport Event with added logic for Yabeda tags formatting
Instance Method Summary collapse
Instance Method Details
#db_runtime ⇒ Object
28 29 30 |
# File 'lib/yabeda/rails/event.rb', line 28 def db_runtime ms2s payload[:db_runtime] end |
#duration ⇒ Object
20 21 22 |
# File 'lib/yabeda/rails/event.rb', line 20 def duration ms2s super end |
#labels ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/yabeda/rails/event.rb', line 7 def labels @labels ||= begin labels = { controller: controller, action: action, status: status, format: format, method: method, } labels.merge(payload.slice(*Yabeda..keys - labels.keys)) end end |
#view_runtime ⇒ Object
24 25 26 |
# File 'lib/yabeda/rails/event.rb', line 24 def view_runtime ms2s payload[:view_runtime] end |