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.51.1 lib/ddtrace/transport/http/api.rb
ddtrace-0.51.0 lib/ddtrace/transport/http/api.rb
ddtrace-0.50.0 lib/ddtrace/transport/http/api.rb
ddtrace-0.49.0 lib/ddtrace/transport/http/api.rb
ddtrace-0.48.0 lib/ddtrace/transport/http/api.rb
ddtrace-0.47.0 lib/ddtrace/transport/http/api.rb
ddtrace-0.46.0 lib/ddtrace/transport/http/api.rb
ddtrace-0.45.0 lib/ddtrace/transport/http/api.rb
ddtrace-0.44.0 lib/ddtrace/transport/http/api.rb
ddtrace-0.43.0 lib/ddtrace/transport/http/api.rb
ddtrace-0.42.0 lib/ddtrace/transport/http/api.rb
ddtrace-0.41.0 lib/ddtrace/transport/http/api.rb
ls-trace-0.2.0 lib/ddtrace/transport/http/api.rb
ddtrace-0.40.0 lib/ddtrace/transport/http/api.rb
ddtrace-0.39.0 lib/ddtrace/transport/http/api.rb
ddtrace-0.38.0 lib/ddtrace/transport/http/api.rb
ddtrace-0.37.0 lib/ddtrace/transport/http/api.rb
ddtrace-0.36.0 lib/ddtrace/transport/http/api.rb
ls-trace-0.1.2 lib/ddtrace/transport/http/api.rb
ddtrace-0.35.2 lib/ddtrace/transport/http/api.rb