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§
- Tracer
Guard - Injectable tracer provider handle.
- Tracing
Config - Configuration for an OTLP trace exporter.
Enums§
- Otlp
Protocol - 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.