adapters
Adapters layer - Concrete implementations of ports for external integrations
This module contains WASM-compatible implementations that connect our core domain to external systems like stdout, HTTP endpoints, and standard logging frameworks.
Structs
Section titled “Structs”JsonFormatter
Section titled “JsonFormatter”JSON formatter for structured logging output
CompactJsonFormatter
Section titled “CompactJsonFormatter”Compact JSON formatter (single line)
PlainTextFormatter
Section titled “PlainTextFormatter”Plain text formatter for human-readable output
WasmStdoutAdapter
Section titled “WasmStdoutAdapter”WASM stdout transport adapter
Methods
fn new(formatter: Box<dyn FormatterPort>) -> Selfwith_json_formatter
Section titled “with_json_formatter”fn with_json_formatter() -> Selfwith_compact_formatter
Section titled “with_compact_formatter”fn with_compact_formatter() -> Selfwith_plain_text_formatter
Section titled “with_plain_text_formatter”fn with_plain_text_formatter() -> SelfNoOpTransport
Section titled “NoOpTransport”No-op transport for testing/disabled logging
LogDirectives
Section titled “LogDirectives”Parsed RUST_LOG-style directives for per-target log filtering.
Supports: "info", "info,agent_sdk=debug,a2a_protocol_core=trace".
Unknown tokens are silently ignored.
Methods
from_level
Section titled “from_level”fn from_level(level: LogLevel) -> Selffn parse(s: &str) -> SelfParse a RUST_LOG-style directive string.
Examples: "info", "info,agent_sdk=debug", "warn,a2a_protocol_core=trace,llm_client=debug".
global_level
Section titled “global_level”fn global_level(&self) -> LogLevelmax_level
Section titled “max_level”fn max_level(&self) -> LogLevelenabled
Section titled “enabled”fn enabled(&self, level: LogLevel, target: &str) -> boolCheck whether a log record at level from target should be emitted.
StandardLogAdapter
Section titled “StandardLogAdapter”Standard logging adapter that hooks into Rust’s log crate
Methods
fn new(processor_chain: ProcessorChain, transport: Arc<dyn TransportPort>, directives: LogDirectives) -> SelfWasmContextAdapter
Section titled “WasmContextAdapter”Thread-local context adapter (WASM-compatible)
Methods
fn new() -> SelfLoggingSetupBuilder
Section titled “LoggingSetupBuilder”Builder for creating a complete logging setup
Methods
fn new() -> Selfwith_processor_chain
Section titled “with_processor_chain”fn with_processor_chain(self, chain: ProcessorChain) -> Selfwith_transport
Section titled “with_transport”fn with_transport(self, transport: Arc<dyn TransportPort>) -> Selfwith_level_filter
Section titled “with_level_filter”fn with_level_filter(self, level: LogLevel) -> Selfwith_directives
Section titled “with_directives”fn with_directives(self, directives: LogDirectives) -> Selffn build(self) -> ObservabilityResult<StandardLogAdapter>TracingSubscriberAdapter
Section titled “TracingSubscriberAdapter”Tracing subscriber adapter for structured logging integration
This adapter implements tracing::Subscriber to capture tracing events and convert them to LogEntry for processing through the hexagonal architecture
Methods
fn new(processor_chain: ProcessorChain, transport: Arc<dyn TransportPort>, level_filter: LogLevel) -> SelfTracingIntegrationBuilder
Section titled “TracingIntegrationBuilder”Builder for creating tracing-integrated logging setup
Methods
fn new() -> Selfwith_processor_chain
Section titled “with_processor_chain”fn with_processor_chain(self, chain: ProcessorChain) -> Selfwith_transport
Section titled “with_transport”fn with_transport(self, transport: Arc<dyn TransportPort>) -> Selfwith_level_filter
Section titled “with_level_filter”fn with_level_filter(self, level: LogLevel) -> Selffn build(self) -> ObservabilityResult<TracingSubscriberAdapter>WasmStdoutMetricsAdapter
Section titled “WasmStdoutMetricsAdapter”Basic WASM stdout adapter for metrics (correlation-focused)
Methods
fn new() -> Selfdisabled
Section titled “disabled”fn disabled() -> SelfUnifiedWasmStdoutAdapter
Section titled “UnifiedWasmStdoutAdapter”Extended WASM adapter that handles both logs and metrics with correlation
Methods
fn new() -> Selftransport_metric
Section titled “transport_metric”fn transport_metric(&self, entry: &MetricsEntry) -> ObservabilityResult<()>Process metrics entry through same formatting as logs for correlation