class Logit::Backend::OTLP::HttpClient

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.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(endpoint : String, headers : Hash(String, String), timeout : Time::Span) #

[View source]

Instance Method Detail

def close : Nil #

Closes the HTTP client connection.


[View source]
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.


[View source]