Sha256: fc0c32451ff3c318c873e7b06f38974d190a2d4bbfae8a587817bfb9dd47a812

Contents?: true

Size: 949 Bytes

Versions: 4

Compression:

Stored size: 949 Bytes

Contents

# typed: false

require 'datadog/core/encoding'

require 'ddtrace/transport/http/api/map'
require 'ddtrace/transport/http/api/spec'

require 'ddtrace/transport/http/traces'

module Datadog
  module Transport
    module HTTP
      # Namespace for API components
      module API
        # Default API versions
        V4 = 'v0.4'.freeze
        V3 = 'v0.3'.freeze

        module_function

        def defaults
          Map[
            V4 => Spec.new do |s|
              s.traces = Traces::API::Endpoint.new(
                '/v0.4/traces'.freeze,
                Core::Encoding::MsgpackEncoder,
                service_rates: true
              )
            end,
            V3 => Spec.new do |s|
              s.traces = Traces::API::Endpoint.new(
                '/v0.3/traces'.freeze,
                Core::Encoding::MsgpackEncoder
              )
            end,
          ].with_fallbacks(V4 => V3)
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ddtrace-1.2.0 lib/ddtrace/transport/http/api.rb
ddtrace-1.1.0 lib/ddtrace/transport/http/api.rb
ddtrace-1.0.0 lib/ddtrace/transport/http/api.rb
ddtrace-1.0.0.beta2 lib/ddtrace/transport/http/api.rb