Class: Yabeda::Hanami::Event
- Inherits:
-
Dry::Events::Event
- Object
- Dry::Events::Event
- Yabeda::Hanami::Event
- Defined in:
- lib/yabeda/hanami/event.rb
Overview
Dry::Events::Event with added logic for Yabeda tags formatting
Instance Method Summary collapse
Instance Method Details
#duration ⇒ Object
21 22 23 |
# File 'lib/yabeda/hanami/event.rb', line 21 def duration ms2s payload[:time] end |
#labels ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/yabeda/hanami/event.rb', line 9 def labels @labels ||= begin labels = { method: method, path: path, status: status, remote_ip: remote_ip } labels.merge(payload.slice(*Yabeda..keys - labels.keys)) end end |