Why
The core rlg crate renders records in LogFormat::OTLP shape but only writes them to local sinks (stdout, file, os_log, journald). To actually ship the records to a collector you need a network transport. rlg-otlp is that transport.
OTLP/HTTP JSON is the v0.0.10 wire format. Protobuf is on the v0.0.11 roadmap.
Install
[]
= "0.0.10"
= "0.0.10"
Usage
use Log;
use LogFormat;
use OtlpExporter;
let exporter = builder
.endpoint
.header
.timeout_secs
.build;
let record = error
.component
.with
.format;
exporter.export_one.unwrap;
Endpoint examples
| Collector | URL |
|---|---|
| Honeycomb | https://api.honeycomb.io/v1/logs (set x-honeycomb-team) |
| Datadog | https://http-intake.logs.datadoghq.com/api/v2/logs (set dd-api-key) |
| Grafana Tempo | https://tempo-prod-04-prod-us-east-0.grafana.net/v1/logs |
| Jaeger | http://jaeger-collector:4318/v1/logs |
| Otelcol | http://localhost:4318/v1/logs |
License
Dual-licensed under Apache 2.0 or MIT, at your option.