Skip to main content

Crate rpi_telemetry

Crate rpi_telemetry 

Source
Expand description

Mirrors packages/telemetry/src. Minimal span/event contracts with a noop default implementation.

Real providers and the agent loop call into TelemetryContext at request boundaries. The default NoopTelemetryContext does nothing. Consumers stay monomorphic by holding a &dyn TelemetryContext defaulting to NOOP_TELEMETRY_CONTEXT.

Telemetry in the TS source is a thin span/attribute layer used opportunistically; we port only the surface downstream crates actually touch.

Re-exports§

pub use context::SpanGuard;
pub use context::TelemetryContext;
pub use noop::NoopTelemetryContext;
pub use noop::NOOP_TELEMETRY_CONTEXT;
pub use production::ProductionTelemetryContext;
pub use types::AttributeValue;
pub use types::SpanAttributes;
pub use types::SpanOptions;
pub use types::SpanStatus;

Modules§

context
Telemetry context trait + RAII span guard.
noop
Noop telemetry context — the default backend. Does nothing and allocates nothing beyond a SpanGuard::noop().
production
Production telemetry context implementation.
testing
In-memory telemetry context for tests. Collects span starts/ends into a Vec<(name, SpanStatus)> so tests can assert which spans ran and how they ended.
types
Span attribute primitives.

Enums§

TelemetryError
Error returned by span operations.