# rskit-observability — OpenTelemetry Integration
OpenTelemetry tracing, metrics, logs, and context propagation.
[](https://github.com/kbukum/rskit/actions/workflows/ci.yml) [](https://crates.io/crates/rskit-observability) [](https://docs.rs/rskit-observability) [](https://github.com/kbukum/rskit/blob/main/LICENSE) [](https://github.com/kbukum/rskit/blob/main/core/Cargo.toml)
## Features
- `tracer_provider()` — injectable OTLP trace provider with configurable sampling via `TracingConfig`
- `init_metrics()` — injectable OTLP metrics pipeline via `MetricsConfig`
- `init_logs()` — injectable OTLP log provider via `LogsConfig`
- `OperationContext` — tracks service, operation, request ID, and elapsed time
- `ServiceHealth` — aggregate health status across registered components
- `HealthStatus` — Healthy / Degraded / Unhealthy
- W3C Trace-Context propagation (`extract_trace_context` / `inject_trace_context`)
- OTLP over gRPC and HTTP/protobuf via `OtlpProtocol`
## Usage
```toml
[dependencies]
rskit-observability = "0.2.0-alpha.1"
```
```rust
use rskit_observability::{OperationContext, ServiceHealth, HealthStatus};
let ctx = OperationContext::new("order-svc", "create_order", "req-1", "user-42");
// ... do work ...
ctx.end_operation("success", None);
let _elapsed = ctx.elapsed();
let health = ServiceHealth::new("order-svc", "0.1.0-alpha.1");
health.register("db");
health.update("db", HealthStatus::Healthy, None);
assert!(health.is_healthy());
```
## See Also
[Main repository README](https://github.com/kbukum/rskit)