Expand description
§telemetry-kit
Privacy-first, batteries-included telemetry for Rust applications.
§Quick Start
use telemetry_kit::prelude::*;
#[tokio::main]
async fn main() -> telemetry_kit::Result<()> {
// Initialize telemetry with sensible defaults
let telemetry = TelemetryKit::builder()
.service_name("my-app")?
.service_version(env!("CARGO_PKG_VERSION"))
.build()?;
// Track events
telemetry.track_command("build", |event| {
event
.flag("--release")
.duration_ms(1234)
.success(true)
}).await?;
Ok(())
}§Features
- Zero-config: Sensible defaults, minimal boilerplate
- Privacy-first: Built-in anonymization and GDPR compliance
- CLI-optimized: Perfect for command-line applications
- Self-hostable: Simple collection server included
§Sync Protocol
The SDK automatically syncs events to telemetry-kit.dev using HMAC-SHA256 authentication. Events are buffered locally in SQLite and synced in batches.
Re-exports§
pub use error::Result;pub use error::TelemetryError;
Modules§
- auto_
sync - Auto-sync background task for telemetry-kit
- error
- Error types for telemetry-kit
- event
- Event schema types and builders
- prelude
- Prelude module for convenient imports
- privacy
- Privacy controls and consent management for telemetry-kit
- storage
- SQLite storage for buffering events
- sync
- Sync protocol implementation for telemetry-kit
- user
- User identification utilities
Structs§
- Telemetry
Builder - Builder for configuring telemetry
- Telemetry
Kit - Main telemetry SDK