Class: Sleuth::Event

Inherits:
ActiveSupport::Notifications::Event
  • Object
show all
Defined in:
lib/sleuth/event.rb

Instance Method Summary collapse

Instance Method Details

#formatted_endObject



7
8
9
# File 'lib/sleuth/event.rb', line 7

def formatted_end
  "%s%06d" % [@end.utc.iso8601, @end.usec]
end

#formatted_timeObject



3
4
5
# File 'lib/sleuth/event.rb', line 3

def formatted_time
  "%s%06d" % [time.utc.iso8601, time.usec]
end

#messageObject



15
16
17
18
19
# File 'lib/sleuth/event.rb', line 15

def message
  parts = [formatted_time, formatted_end, transaction.full_name,
           transaction.parent || '-', duration, payload.inspect]
  "%s %s %s %s %0.4f -- %s" % parts
end

#transactionObject



11
12
13
# File 'lib/sleuth/event.rb', line 11

def transaction
  Transaction.running[transaction_id]
end