Module: Datadog::Transport::IO::Traces::Client
- Defined in:
- lib/ddtrace/transport/io/traces.rb
Overview
Extensions for HTTP client
Instance Method Summary collapse
Instance Method Details
#send_traces(traces) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/ddtrace/transport/io/traces.rb', line 18 def send_traces(traces) # Build a request req = Transport::Traces::Request.new(traces) send_request(req) do |out, request| # Encode trace data data = encode_data(encoder, request) # Write to IO result = if block_given? yield(out, data) else write_data(out, data) end # Generate response Traces::Response.new(result) end end |