Skip to content

observability_core

Crate: observability_core · Path: crates/observability/observability_core

From src/lib.rs: traits and foundations for structured logging and observability with conditional compilation via features.

From crates/observability/observability_core/Cargo.toml:

FeaturePurpose
defaultstructured-logging
structured-loggingserde, serde_json, chrono, log, tracing, rand
otel-2025opentelemetry, opentelemetry-semantic-conventions
auto-instrumentationotel-2025 + semantic conventions
prometheus-federationprometheus crate
observabilityotel-2025, structured-logging, prometheus-federation

batching, context, error, noop, traits, adapters, domain, extension, ports.

Re-exports include ObservabilityManager, ObservabilityConfig, TraceContext, W3CTraceContext, context helpers (with_context, with_context_future, …), ObservabilityPlugin, SpanGuard, StructuredLogger, adapters (StandardLogAdapter, WasmStdoutAdapter, …), domain types (LogEntry, ProcessorChain, …), and ports (MetricsPort, TransportPort, …).

Constants: VERSION, DEFAULT_BATCH_SIZE, DEFAULT_FLUSH_INTERVAL_SECS.

There is also a longer README.md in the crate directory with usage examples; verify behavior against the current Cargo.toml and lib.rs if anything disagrees.

Full API reference: cargo doc -p observability_core --no-deps --all-features (as needed).