Sha256: 8007d1f1c12ad79106ce4a2ed6100cc45d5f2eee11bbfbf2ee8448e107540027

Contents?: true

Size: 1.12 KB

Versions: 7

Compression:

Stored size: 1.12 KB

Contents

# typed: true

require_relative '../../../../ddtrace/transport/http/api/map'
require_relative '../../encoding/profile'
require_relative 'api/spec'
require_relative 'api/instance'
require_relative 'api/endpoint'

module Datadog
  module Profiling
    module Transport
      module HTTP
        # Extensions for HTTP API Spec
        module API
          # Default API versions
          V1 = 'v1'.freeze

          module_function

          def agent_defaults
            @agent_defaults ||= Datadog::Transport::HTTP::API::Map[
              V1 => Spec.new do |s|
                s.profiles = Endpoint.new(
                  '/profiling/v1/input'.freeze,
                  Profiling::Encoding::Profile::Protobuf
                )
              end
            ]
          end

          def api_defaults
            @api_defaults ||= Datadog::Transport::HTTP::API::Map[
              V1 => Spec.new do |s|
                s.profiles = Endpoint.new(
                  '/v1/input'.freeze,
                  Profiling::Encoding::Profile::Protobuf
                )
              end
            ]
          end
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
ddtrace-1.5.2 lib/datadog/profiling/transport/http/api.rb
ddtrace-1.5.1 lib/datadog/profiling/transport/http/api.rb
ddtrace-1.5.0 lib/datadog/profiling/transport/http/api.rb
ddtrace-1.4.2 lib/datadog/profiling/transport/http/api.rb
ddtrace-1.4.1 lib/datadog/profiling/transport/http/api.rb
ddtrace-1.4.0 lib/datadog/profiling/transport/http/api.rb
ddtrace-1.3.0 lib/datadog/profiling/transport/http/api.rb