Class: Datadog::DataStreams::Transport::HTTP::Stats::API::Endpoint

Inherits:
Core::Transport::HTTP::API::Endpoint show all
Defined in:
lib/datadog/data_streams/transport/http/stats.rb

Overview

Endpoint for submitting DSM stats data

Instance Attribute Summary

Attributes inherited from Core::Transport::HTTP::API::Endpoint

#path, #verb

Instance Method Summary collapse

Constructor Details

#initialize(path) ⇒ Endpoint

Returns a new instance of Endpoint.



60
61
62
# File 'lib/datadog/data_streams/transport/http/stats.rb', line 60

def initialize(path)
  super(:post, path)
end

Instance Method Details

#call(env, &block) ⇒ Object



64
65
66
67
68
69
70
71
72
73
74
75
# File 'lib/datadog/data_streams/transport/http/stats.rb', line 64

def call(env, &block)
  # Build request
  env.verb = verb
  env.path = path
  env.body = env.request.parcel.data

  # Send request
  http_response = yield(env)

  # Build response
  Response.new(http_response)
end

#encoderObject



77
78
79
80
# File 'lib/datadog/data_streams/transport/http/stats.rb', line 77

def encoder
  # DSM handles encoding in the transport layer
  nil
end