Timber v1.0.9 Timber.Transports.HTTP

An efficient HTTP transport that buffers and delivers log messages over HTTP to the Timber API. It uses batching, keep-alive connections, and msgpack to deliver logs with high-throughput and little overhead.

The HTTP transport functions differently than a traditional buffer in that it is designed for batch delivery. This means messages are buffered by default and flushed on an internval. If the buffer size exceeds :max_buffer_size before the next intervaled flush, the buffer will be immediately flushed.

All outgoing requests are made asynchronously. If a second request is made while the previous (first) request is still being processed, then the transport will enter synchronous mode, waiting for a response before proceeding with the request.

Configuration

Custom HTTP client

By default, hackney is used via Timber.Transports.HTTP.HackneyClient. You can define your own custom HTTP client by adhering to the Timber.Transports.HTTP.Client behaviour. Afterwards, you must specify your client in the configuration:

config :timber, :http_transport, http_client: MyHTTPClient