detritus-server
detritus-server is the Detritus telemetry and crash ingestion receiver.
The package installs the detritusd binary for operators and exposes a small library surface for
embedding the receiver in tests, local tooling, or custom orchestration.
The server accepts OTLP/gRPC log exports and HTTP/2 multipart crash uploads, writes append-only
NDJSON logs, stores crash blobs by content hash, and maintains source indexes for crash metadata.
Quick start
Install and run the receiver binary:
Embed the server when a test or harness needs its own listener:
use ;
use TcpListener;
# async
Production deployments should load real token configuration with load_security_config rather
than constructing a test token store.
Examples
embed_server- bind an embedded receiver on a kernel-assigned local port and shut it down.
Run with:
Feature flags
This crate currently has no optional Cargo features.
The default package includes both the library and the detritusd binary.
Compression, decompression, HTTP/2, Prometheus metrics, authentication, rate limiting, and retention
janitor support are part of the v0.1.0 receiver.
Authentication
Every ingestion request except /healthz and /metrics requires a bearer token.
Token files are TOML documents loaded by load_security_config.
Tokens store Argon2 encoded hashes, a project name, and a canonical source prefix.
The server checks tokens in constant time where it compares source components.
Storage
Logs are written as daily NDJSON files under the configured data directory. Crash dumps and attachments are content-addressed by SHA-256, so duplicate uploads can share blobs. Crash metadata is stored as source-indexed JSON that points at those blobs. See the storage layout documentation for the exact on-disk paths.
Operations
detritusd exposes /healthz for liveness and /metrics in OpenMetrics text format.
The retention janitor deletes old logs, expired crash indexes, and unreferenced blobs according to
RetentionConfig.
See docs/src/deployment/operations.md in the workspace for deployment notes, token-file format, and runtime
expectations.
Compatibility
- Detritus protocol version: v0.1.0 /
PROTOCOL_VERSION == 1. - Client compatibility:
detritus-clientv0.1.0. - MSRV: Rust 1.88.
- Edition: Rust 2024.
- Binary:
detritusd.
Related crates
- detritus-client - client SDK for tracing and crash capture.
- detritus-protocol - shared wire types and OTLP log facade.
- detritus-server - this receiver binary and embeddable server.
Documentation
License
Licensed under the Apache License, Version 2.0.