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 bringstracing-subscriber0.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
tracingspans 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.
Add the crate
logdrop in Cargo.toml, its layer in main and one line per traced library.
Kubernetes
Install the LogDrop Helm chart; one pod annotation gives the service its settings.
Other hosts
Virtual machines, Docker and other platforms: set the settings as 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.
Custom spans
Add spans for business operations with tracing.
Settings
Every LOGDROP_* setting, its default and its range.
Limits
What LogDrop accepts per request, per key and per project.
Rotate the ingest key
Replace a key without losing traces.
What LogDrop records
The data a span carries, and what never leaves your service.
Verify what you install
How Cargo checks the crate, and the signature of the chart.
Licences
The licence of the crate and of what it uses.
Troubleshooting
Crate messages and what to do about them.
.png)