Skip to content

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.

From crates/observability/structured_logging/Cargo.toml (authoritative):

FeaturePurpose
defaultconvenience
conveniencellm-logging, template-logging, a2a-logging
performance-optimizedstring-interner, buffer-pool, fast-paths
correlation-enhancedbaggage-support, scoped-context
wasm-optimizedperformance-optimized

Sub-features (llm-logging, template-logging, a2a-logging, etc.) are declared in the same file.

From src/lib.rs: panic_handler, extension always; performance / correlation / convenience / context_adapter are gated behind the features above.

  • Re-exports many observability_core types (ObservabilityManager, ObservabilityConfig, formatters, ports, …).
  • create_logger, create_logger_from_config, and (with performance-optimized) performance helpers.
  • With convenience: domain helpers such as set_llm_context, log_llm_request, with_llm_context, etc. (see lib.rs re-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.