Sha256: 8c12c7d9b84f7e6d4aa70c1549702f64449d671333e36d368170c8e4e764a23a

Contents?: true

Size: 923 Bytes

Versions: 20

Compression:

Stored size: 923 Bytes

Contents

module Appsignal
  class JSExceptionTransaction

    def initialize(data)
      @data = data
      @time = Time.now.to_i
    end

    def type
      :exception
    end

    def action
      @data['action']
    end

    def clear_events!; end
    def convert_values_to_primitives!; end
    def events; []; end

    def to_hash
      {
        :request_id => SecureRandom.uuid,
        :log_entry => {
          :action      => action,
          :path        => @data['path'],
          :kind        => 'frontend',
          :time        => @time,
          :environment => @data['environment'],
          :revision    => Appsignal.agent.revision
        },
        :exception => {
          :exception => @data['name'],
          :message   => @data['message'],
          :backtrace => @data['backtrace']
        },
        :failed => true
      }
    end

    def complete!
      Appsignal.enqueue(self)
    end

  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
appsignal-0.11.15 lib/appsignal/js_exception_transaction.rb
appsignal-0.11.14 lib/appsignal/js_exception_transaction.rb
appsignal-0.11.14.beta.1 lib/appsignal/js_exception_transaction.rb
appsignal-0.11.13 lib/appsignal/js_exception_transaction.rb
appsignal-0.11.13.beta.4 lib/appsignal/js_exception_transaction.rb
appsignal-0.11.13.beta.3 lib/appsignal/js_exception_transaction.rb
appsignal-0.11.13.beta.2 lib/appsignal/js_exception_transaction.rb
appsignal-0.11.13.beta.1 lib/appsignal/js_exception_transaction.rb
appsignal-0.11.13.beta.0 lib/appsignal/js_exception_transaction.rb
appsignal-0.11.12 lib/appsignal/js_exception_transaction.rb
appsignal-0.11.11 lib/appsignal/js_exception_transaction.rb
appsignal-0.11.10 lib/appsignal/js_exception_transaction.rb
appsignal-0.11.10.beta.2 lib/appsignal/js_exception_transaction.rb
appsignal-0.11.10.beta.1 lib/appsignal/js_exception_transaction.rb
appsignal-0.11.9 lib/appsignal/js_exception_transaction.rb
appsignal-0.11.8.beta.4 lib/appsignal/js_exception_transaction.rb
appsignal-0.11.8.beta.3 lib/appsignal/js_exception_transaction.rb
appsignal-0.11.8.beta.2 lib/appsignal/js_exception_transaction.rb
appsignal-0.11.8.beta.1 lib/appsignal/js_exception_transaction.rb
appsignal-0.11.8.beta.0 lib/appsignal/js_exception_transaction.rb