Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/fluent/plugin/opentelemetry/http_output_handler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ def export(record)
uri, headers, body = get_post_data(record)
response = @connections[record["type"]].post(body: body, headers: headers, idempotent: true)

# Explicitly consume the response body to clear the socket buffer.
# Without this, Excon retains the buffer, causing memory leaks and blocking persistent connections.
response.body

return if response.status >= 200 && response.status < 300

if response.status == 400
Expand Down