Skip to main content

Crate rskit_observability

Crate rskit_observability 

Source
Expand description

OpenTelemetry tracing, metrics, and context propagation.

This crate wires up the OpenTelemetry SDK with the tracing ecosystem so that spans and metrics are automatically exported via OTLP.

Re-exports§

pub use attribute::SpanAttributeValue;
pub use attribute::record_current_span_attribute;
pub use attribute::record_span_attribute;
pub use attribute::set_current_span_attribute;
pub use attribute::set_span_attribute;
pub use context::OperationContext;
pub use health::ComponentHealth;
pub use health::HealthStatus;
pub use health::ServiceHealth;
pub use logs::LogsConfig;
pub use logs::LogsHandle;
pub use logs::init_logs;
pub use metrics::MetricsConfig;
pub use metrics::MetricsHandle;
pub use metrics::init_metrics;
pub use metrics::init_metrics_with_protocol;
pub use propagation::extract_trace_context;
pub use propagation::inject_trace_context;

Modules§

attribute
Span attribute helpers. Span attribute helpers shared by tracing and OpenTelemetry integrations.
context
Operation context for cross-cutting observability concerns. Operation context for tracking cross-cutting observability concerns.
health
Service health tracking for aggregate component monitoring. Service health tracking for aggregate component monitoring.
logs
OpenTelemetry log pipeline.
metrics
OpenTelemetry metrics pipeline.
propagation
W3C Trace-Context propagation helpers. W3C Trace-Context propagation helpers.

Structs§

TracerGuard
Injectable tracer provider handle.
TracingConfig
Configuration for an OTLP trace exporter.

Enums§

OtlpProtocol
OTLP exporter protocol.

Constants§

SERVICE_NAME
Stable OTel semantic-convention key for service name.

Functions§

set_operation_attributes
Attach bounded operation attributes to an active tracing span.
tracer_provider
Build an injectable OpenTelemetry tracer provider without touching global state.
tracer_provider_with_protocol
Build an injectable OpenTelemetry tracer provider with an explicit OTLP protocol.