Sha256: 682b0d8d6d2a3ca27725936f08f76e2186fc42d1d81403b3a8987e1cacf801a4
Contents?: true
Size: 691 Bytes
Versions: 7
Compression:
Stored size: 691 Bytes
Contents
# frozen_string_literal: true module Sentry # TransactionEvent represents events that carry transaction data (type: "transaction"). class TransactionEvent < Event TYPE = "transaction" # @return [<Array[Span]>] attr_accessor :spans # @return [Float, nil] attr_reader :start_timestamp # Sets the event's start_timestamp. # @param time [Time, Float] # @return [void] def start_timestamp=(time) @start_timestamp = time.is_a?(Time) ? time.to_f : time end # @return [Hash] def to_hash data = super data[:spans] = @spans.map(&:to_hash) if @spans data[:start_timestamp] = @start_timestamp data end end end
Version data entries
7 entries across 7 versions & 2 rubygems