Sha256: f1db956f4b70f023f09c3ea741d41a6cf551aa9cb4504231b0deb6463cc9b717

Contents?: true

Size: 808 Bytes

Versions: 1

Compression:

Stored size: 808 Bytes

Contents

# frozen_string_literal: true

require 'elastic_apm/stacktrace'
require 'elastic_apm/context'
require 'elastic_apm/error/exception'
require 'elastic_apm/error/log'

module ElasticAPM
  # @api private
  class Error
    def initialize(culprit: nil, context: nil)
      @id = SecureRandom.hex(16)
      @culprit = culprit
      @timestamp = Util.micros
      @context = context
    end

    attr_accessor :id, :culprit, :exception, :log, :transaction_id,
      :transaction, :context, :parent_id, :trace_id
    attr_reader :timestamp

    def inspect
      "<ElasticAPM::Error id:#{id}" \
        " culprit:#{culprit}" \
        " timestamp:#{timestamp}" \
        " transaction_id:#{transaction_id}" \
        " trace_id:#{trace_id}" \
        " exception:#{exception.inspect}" \
        ">"
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
elastic-apm-3.2.0 lib/elastic_apm/error.rb