Where it lands
Spectra will attach run metrics, device profiles, and traces to the marketing benchmark library and family runtimes—same schemas from local mem proofs to cluster-backed stores.Define spectra_schema! and spectra_metric! macros—no build.rs required—then emit through typed Recorder/Logger helpers. Topology is embedded (in-process store) or remote (network-backed); optional SpectraSink fans emits to a transport you own while async storage persists. Same APIs whether you are proving Boson claim rates or tracing Valence request debug logs. Published as uf-spectra; imports stay use spectra::….
On the roadmap
Spectra will attach run metrics, device profiles, and traces to the marketing benchmark library and family runtimes—same schemas from local mem proofs to cluster-backed stores.Code sample
From the upstream getting-started docs — see also all code recipes on Resources.
Spectra schemaSpectra
Declarative metrics + event schemas
use spectra_macros::{spectra_metric, spectra_schema};
spectra_schema! {
RequestDebugLog {
store: "default",
table: "request_debug_log",
version: "0.1.0",
description: "Structured debug events for request tracing",
fields: [
message: {
r#type: String,
classification: { pii: false, safe_for_console: true },
},
],
}
}
spectra_metric! {
CacheHits {
store: "default",
name: "cache_hits",
version: "0.1.0",
description: "Counter for cache hit events",
}
}