Class: Sentry::TransactionEvent

Inherits:
Event show all
Defined in:
lib/sentry/transaction_event.rb

Constant Summary collapse

ATTRIBUTES =
%i(
  event_id level timestamp start_timestamp
  release environment server_name modules
  user tags contexts extra
  transaction platform sdk type
)

Constants inherited from Event

Event::MAX_MESSAGE_SIZE_IN_BYTES

Instance Attribute Summary collapse

Attributes inherited from Event

#configuration, #exception, #request, #stacktrace, #threads

Instance Method Summary collapse

Methods inherited from Event

#add_exception_interface, #add_request_interface, #add_threads_interface, get_log_message, get_message_from_exception, #initialize, #initialize_stacktrace_interface, #level=, #rack_env=, #timestamp=, #to_json_compatible

Constructor Details

This class inherits a constructor from Sentry::Event

Instance Attribute Details

#spansObject

Returns the value of attribute spans.



13
14
15
# File 'lib/sentry/transaction_event.rb', line 13

def spans
  @spans
end

Instance Method Details

#start_timestamp=(time) ⇒ Object



15
16
17
# File 'lib/sentry/transaction_event.rb', line 15

def start_timestamp=(time)
  @start_timestamp = time.is_a?(Time) ? time.to_f : time
end

#to_hashObject



23
24
25
26
27
# File 'lib/sentry/transaction_event.rb', line 23

def to_hash
  data = super
  data[:spans] = @spans.map(&:to_hash) if @spans
  data
end

#typeObject



19
20
21
# File 'lib/sentry/transaction_event.rb', line 19

def type
  "transaction"
end