structured_logging
Crate: structured_logging · Path: crates/observability/structured_logging
Description (Cargo.toml): Enhanced structured logging with performance optimizations and convenience APIs for SpinKube agents.
Feature flags
Section titled “Feature flags”From crates/observability/structured_logging/Cargo.toml (authoritative):
| Feature | Purpose |
|---|---|
default | convenience |
convenience | llm-logging, template-logging, a2a-logging |
performance-optimized | string-interner, buffer-pool, fast-paths |
correlation-enhanced | baggage-support, scoped-context |
wasm-optimized | performance-optimized |
Sub-features (llm-logging, template-logging, a2a-logging, etc.) are declared in the same file.
Modules
Section titled “Modules”From src/lib.rs: panic_handler, extension always; performance / correlation / convenience / context_adapter are gated behind the features above.
Key APIs
Section titled “Key APIs”- Re-exports many
observability_coretypes (ObservabilityManager,ObservabilityConfig, formatters, ports, …). create_logger,create_logger_from_config, and (withperformance-optimized) performance helpers.- With
convenience: domain helpers such asset_llm_context,log_llm_request,with_llm_context, etc. (seelib.rsre-exports). panic_handler:install_panic_handler,PanicHandlerConfig, stats helpers.
Crate README.md describes the layered architecture; confirm feature names and dependencies against Cargo.toml before copying examples.
Full API reference: cargo doc -p structured_logging --no-deps.