Class: Datadog::DI::Transport::HTTP::Diagnostics::API::Endpoint Private
- Inherits:
-
Core::Transport::HTTP::API::Endpoint
- Object
- Core::Transport::HTTP::API::Endpoint
- Datadog::DI::Transport::HTTP::Diagnostics::API::Endpoint
- Defined in:
- lib/datadog/di/transport/http/diagnostics.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Attribute Summary collapse
- #encoder ⇒ Object readonly private
Attributes inherited from Core::Transport::HTTP::API::Endpoint
Instance Method Summary collapse
- #call(env, &block) ⇒ Object private
-
#initialize(path, encoder) ⇒ Endpoint
constructor
private
A new instance of Endpoint.
Constructor Details
#initialize(path, encoder) ⇒ Endpoint
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Endpoint.
14 15 16 17 |
# File 'lib/datadog/di/transport/http/diagnostics.rb', line 14 def initialize(path, encoder) super(:post, path) @encoder = encoder end |
Instance Attribute Details
#encoder ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
12 13 14 |
# File 'lib/datadog/di/transport/http/diagnostics.rb', line 12 def encoder @encoder end |
Instance Method Details
#call(env, &block) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
19 20 21 22 23 24 25 26 27 28 |
# File 'lib/datadog/di/transport/http/diagnostics.rb', line 19 def call(env, &block) event_payload = Core::Vendor::Multipart::Post::UploadIO.new( StringIO.new(env.request.parcel.data), env.request.parcel.content_type, 'event.json', ) env.form = {'event' => event_payload} super end |