Class: Sleuth::Event
- Inherits:
-
ActiveSupport::Notifications::Event
- Object
- ActiveSupport::Notifications::Event
- Sleuth::Event
- Defined in:
- lib/sleuth/event.rb
Instance Method Summary collapse
Instance Method Details
#formatted_end ⇒ Object
7 8 9 |
# File 'lib/sleuth/event.rb', line 7 def formatted_end "%s%06d" % [@end.utc.iso8601, @end.usec] end |
#formatted_time ⇒ Object
3 4 5 |
# File 'lib/sleuth/event.rb', line 3 def formatted_time "%s%06d" % [time.utc.iso8601, time.usec] end |
#message ⇒ Object
15 16 17 18 19 |
# File 'lib/sleuth/event.rb', line 15 def parts = [formatted_time, formatted_end, transaction.full_name, transaction.parent || '-', duration, payload.inspect] "%s %s %s %s %0.4f -- %s" % parts end |
#transaction ⇒ Object
11 12 13 |
# File 'lib/sleuth/event.rb', line 11 def transaction Transaction.running[transaction_id] end |