class

Logit::Backend::OTLP::HttpClient

Inherits Reference / Object

HTTP client wrapper for sending OTLP payloads.

Handles connection management, error handling, and request formatting. All errors are caught and logged to STDERR - the client never raises.

Constructors

new(endpoint : String, headers : Hash(String, String), timeout : Time::Span)
Source

Instance methods

close

Closes the HTTP client connection.

Source
send(payload : String) : Bool

Sends a JSON payload to the OTLP endpoint.

Returns true on success (2xx response), false otherwise. Never raises - all errors are logged to STDERR.

Source