Module: Datadog::Transport::HTTP::API

Defined in:
lib/ddtrace/transport/http/api.rb,
lib/ddtrace/transport/http/api/map.rb,
lib/ddtrace/transport/http/api/spec.rb,
lib/ddtrace/transport/http/api/endpoint.rb,
lib/ddtrace/transport/http/api/instance.rb,
lib/ddtrace/transport/http/api/fallbacks.rb

Overview

Namespace for API components

Defined Under Namespace

Modules: Fallbacks Classes: Endpoint, Instance, Map, Spec

Constant Summary collapse

V4 =

Default API versions

'v0.4'.freeze
V3 =
'v0.3'.freeze
V2 =
'v0.2'.freeze

Class Method Summary collapse

Class Method Details

.defaultsObject



20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/ddtrace/transport/http/api.rb', line 20

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