Sha256: bbc228abb8847d857254fb2aa90d236fedbc4ef16640e927c3675037659ceca4

Contents?: true

Size: 1.12 KB

Versions: 41

Compression:

Stored size: 1.12 KB

Contents

require 'ddtrace/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
        V2 = 'v0.2'.freeze

        module_function

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

Version data entries

41 entries across 41 versions & 2 rubygems

Version Path
ddtrace-0.35.1 lib/ddtrace/transport/http/api.rb
ddtrace-0.35.0 lib/ddtrace/transport/http/api.rb
ddtrace-0.34.2 lib/ddtrace/transport/http/api.rb
ddtrace-0.34.1 lib/ddtrace/transport/http/api.rb
ddtrace-0.34.0 lib/ddtrace/transport/http/api.rb
ddtrace-0.33.1 lib/ddtrace/transport/http/api.rb
ddtrace-0.33.0 lib/ddtrace/transport/http/api.rb
ddtrace-0.32.0 lib/ddtrace/transport/http/api.rb
ddtrace-0.31.1 lib/ddtrace/transport/http/api.rb
ddtrace-0.31.0 lib/ddtrace/transport/http/api.rb
ddtrace-0.30.1 lib/ddtrace/transport/http/api.rb
ddtrace-0.30.0 lib/ddtrace/transport/http/api.rb
ddtrace-0.29.1 lib/ddtrace/transport/http/api.rb
ddtrace-0.26.1 lib/ddtrace/transport/http/api.rb
ls-trace-0.1.1 lib/ddtrace/transport/http/api.rb
ddtrace-0.29.0 lib/ddtrace/transport/http/api.rb
ddtrace-0.28.0 lib/ddtrace/transport/http/api.rb
ddtrace-0.27.0 lib/ddtrace/transport/http/api.rb
ddtrace-0.26.0 lib/ddtrace/transport/http/api.rb
ddtrace-0.25.1 lib/ddtrace/transport/http/api.rb