Crate tracing_loki_but_better

Crate tracing_loki_but_better 

Source
Expand description

§tracing-loki-but-better

A tracing layer for Loki.

Some code reused from tracing-loki, but the most critical parts of the code (namely BackgroundTask) have been entirely rewritten to avoid queues and manual implementations of futures (in other words, this crate has less memory and less CPU use).

§Features

  • rustls: use rustls as the TLS backend. Enabled by default.
  • native-tls: use native-tls as the TLS backend.

§Examples

See the examples folder.

Structs§

BackgroundTask
The background task for sending logs off to Loki.
BackgroundTaskHandle
A handle to shut down a background task. Call Self::shutdown to shut down the associated task.
LokiBuilder
Builder for constructing a LokiLayer and its corresponding BackgroundTask.
LokiLayer
The Layer implementation for shipping logs to Loki.