origin-telemetry 0.2.0

Tracing setup and logging conventions for Origin.
Documentation

origin-telemetry

Tracing setup and logging conventions for Origin.

Part of Origin, a Rust/Tauri platform for building desktop applications from a shared set of domain crates. See the workspace documentation for how the pieces fit together, and ARCHITECTURE.md for the rules this crate follows.

Example

use origin_telemetry::{Format, TelemetryConfig, spans};

// A process that speaks a protocol on stdout (e.g. MCP over stdio) must log to
// stderr instead, or a single log line corrupts the stream.
let config = TelemetryConfig {
    format: Format::Json,
    ..TelemetryConfig::for_stdout_protocol()
};
origin_telemetry::init(config);

let span = spans::sync(&sync_id, &connector_id, &account_id);
let _entered = span.enter();
tracing::info!("sync started");

Stability

Pre-1.0 (0.2.0). Public types, enums and field sets may still change between minor versions; pin an exact version if that matters to you.