pub struct ObservabilityConfig {
pub level: String,
pub format: String,
pub structured: bool,
pub context_enrichment: bool,
pub default_context: HashMap<String, Value>,
}Expand description
Configuration for observability
Fields§
§level: StringMinimum log level to process
format: StringOutput format: “json”, “compact”, “plain”
structured: boolEnable structured logging features
context_enrichment: boolEnable context enrichment
default_context: HashMap<String, Value>Additional context fields to always include
Implementations§
Source§impl ObservabilityConfig
impl ObservabilityConfig
Sourcepub fn parse_level(&self) -> ObservabilityResult<LogLevel>
pub fn parse_level(&self) -> ObservabilityResult<LogLevel>
Parse log level from string (global level only, ignores per-crate directives).
Sourcepub fn parse_directives(&self) -> LogDirectives
pub fn parse_directives(&self) -> LogDirectives
Parse RUST_LOG-style directives from the level string.
Accepts both simple levels ("info") and per-crate directives
("info,agent_sdk=debug,a2a_protocol_core=trace").
Sourcepub fn create_transport(&self) -> Arc<dyn TransportPort>
pub fn create_transport(&self) -> Arc<dyn TransportPort>
Create transport based on format configuration
Sourcepub fn validate(&self) -> ObservabilityResult<()>
pub fn validate(&self) -> ObservabilityResult<()>
Validate configuration
Trait Implementations§
Source§impl Clone for ObservabilityConfig
impl Clone for ObservabilityConfig
Source§fn clone(&self) -> ObservabilityConfig
fn clone(&self) -> ObservabilityConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ObservabilityConfig
impl Debug for ObservabilityConfig
Source§impl Default for ObservabilityConfig
impl Default for ObservabilityConfig
Source§impl<'de> Deserialize<'de> for ObservabilityConfig
impl<'de> Deserialize<'de> for ObservabilityConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ObservabilityConfig
impl PartialEq for ObservabilityConfig
Source§impl Serialize for ObservabilityConfig
impl Serialize for ObservabilityConfig
impl StructuralPartialEq for ObservabilityConfig
Auto Trait Implementations§
impl Freeze for ObservabilityConfig
impl RefUnwindSafe for ObservabilityConfig
impl Send for ObservabilityConfig
impl Sync for ObservabilityConfig
impl Unpin for ObservabilityConfig
impl UnsafeUnpin for ObservabilityConfig
impl UnwindSafe for ObservabilityConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more