Sha256: 7ee3bc3c1416aa4ed5a2479a64c62484e20286490072532b1a2dbf2769e4b429

Contents?: true

Size: 842 Bytes

Versions: 3

Compression:

Stored size: 842 Bytes

Contents

# frozen_string_literal: true

module ElasticAPM
  class Span
    # @api private
    class Context
      def initialize(db: nil, http: nil)
        @db = db && Db.new(db)
        @http = http && Http.new(http)
      end

      attr_accessor :sync, :db, :http

      # @api private
      class Db
        def initialize(instance: nil, statement: nil, type: nil, user: nil)
          @instance = instance
          @statement = statement
          @type = type
          @user = user
        end

        attr_accessor :instance, :statement, :type, :user
      end

      # @api private
      class Http
        def initialize(url: nil, status_code: nil, method: nil)
          @url = url
          @status_code = status_code
          @method = method
        end

        attr_accessor :url, :status_code, :method
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
elastic-apm-2.1.2 lib/elastic_apm/span/context.rb
elastic-apm-2.1.1 lib/elastic_apm/span/context.rb
elastic-apm-2.1.0 lib/elastic_apm/span/context.rb