LogDrop
Backend Tracing

Rust

Trace Rust services with the LogDrop Rust crate.

LogDrop traces Rust services with the LogDrop Rust crate, logdrop on crates.io. A Rust binary cannot load an agent at run time, so your service adds the crate, puts its layer into the tracing subscriber in main and adds one line per library it wants traced. On Kubernetes, one pod annotation then gives it its settings.

The crate is a tracing layer with OpenTelemetry Rust and LogDrop's pipeline. It records the requests your service handles and its calls to databases and other services, removes everything that could carry personal or secret data, and sends the spans to LogDrop over HTTPS with a traces ingest key. It removes the same data as the Java, Node.js, Python, .NET, Go and PHP agents, so a request that crosses services in these languages appears as one trace.

Current release: LogDrop Rust crate logdrop 0.1.0-alpha1 and Helm chart logdrop-infrastructure 0.1.1-alpha15.

Requirements

Before you add the crate, check that you have the LogDrop project and key, and that your platform, Rust version and libraries are supported.

  • The project, the traces ingest key and the endpoint from Before you start.
  • Rust 1.85 or newer and a service that uses tracing (the crate brings tracing-subscriber 0.3).
  • On Kubernetes: Kubernetes 1.28 or newer with Helm 3.8 or newer. Rust services run on any node architecture: there is no agent image.
  • Traced libraries (Add the crate): axum 0.8 and other tower HTTP servers, tonic gRPC servers, reqwest 0.13 through reqwest-middleware 0.5, and sqlx 0.9 (PostgreSQL, MySQL, MariaDB, SQLite). Your own tracing spans at INFO level and above are recorded too.
  • Not supported yet: Redis clients, message brokers, actix-web and outgoing tonic calls. Their work appears inside the request's span, not as its own call.

Set it up

Add the crate to your service first. Then give it its settings with the guide for where the service runs: on Kubernetes through the LogDrop chart and one pod annotation, elsewhere through environment variables.

Reference

These pages hold the details behind the set-up guides. Use them to add your own spans, change a setting, plan for limits or fix a problem.

On this page