class
Logit::Backend::OTLP::HttpClient
- Logit::Backend::OTLP::HttpClient
- Reference
- Object
Overview
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.
Defined in:
logit/backends/otlp/http_client.crConstructors
Instance Method Summary
-
#close : Nil
Closes the HTTP client connection.
-
#send(payload : String) : Bool
Sends a JSON payload to the OTLP endpoint.
Constructor Detail
def self.new(endpoint : String, headers : Hash(String, String), timeout : Time::Span)
#
Instance Method Detail
def 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.