Skip to main content

rskit_observability/
lib.rs

1//! OpenTelemetry tracing, metrics, and context propagation.
2//!
3//! This crate wires up the OpenTelemetry SDK with the `tracing` ecosystem
4//! so that spans and metrics are automatically exported via OTLP.
5
6#![warn(missing_docs)]
7
8/// Span attribute helpers.
9pub mod attribute;
10/// Operation context for cross-cutting observability concerns.
11pub mod context;
12/// Service health tracking for aggregate component monitoring.
13pub mod health;
14/// OpenTelemetry log pipeline.
15pub mod logs;
16/// OpenTelemetry metrics pipeline.
17pub mod metrics;
18/// W3C Trace-Context propagation helpers.
19pub mod propagation;
20/// OpenTelemetry tracer initialization.
21mod tracer;
22
23pub use attribute::{
24    SpanAttributeValue, record_current_span_attribute, record_span_attribute,
25    set_current_span_attribute, set_span_attribute,
26};
27pub use context::OperationContext;
28pub use health::{ComponentHealth, HealthStatus, ServiceHealth};
29pub use logs::{LogsConfig, LogsHandle, init_logs};
30pub use metrics::{MetricsConfig, MetricsHandle, init_metrics, init_metrics_with_protocol};
31pub use propagation::{extract_trace_context, inject_trace_context};
32pub use tracer::{
33    OtlpProtocol, SERVICE_NAME, TracerGuard, TracingConfig, set_operation_attributes,
34    tracer_provider, tracer_provider_with_protocol,
35};