pub struct ObservabilityConfig {
pub service_name: String,
pub service_version: String,
pub security_auditing: bool,
pub performance_monitoring: bool,
pub log_level: String,
}Expand description
OpenTelemetry observability configuration
Fields§
§service_name: StringService name for tracing
service_version: StringService version
security_auditing: boolEnable security audit logging
performance_monitoring: boolEnable performance monitoring
log_level: StringCustom log level filter
Implementations§
Source§impl ObservabilityConfig
impl ObservabilityConfig
Sourcepub fn with_service_name(self, name: impl Into<String>) -> Self
pub fn with_service_name(self, name: impl Into<String>) -> Self
Set service name
Sourcepub fn with_service_version(self, version: impl Into<String>) -> Self
pub fn with_service_version(self, version: impl Into<String>) -> Self
Set service version
Sourcepub fn with_log_level(self, level: impl Into<String>) -> Self
pub fn with_log_level(self, level: impl Into<String>) -> Self
Set log level filter
Sourcepub fn enable_security_auditing(self) -> Self
pub fn enable_security_auditing(self) -> Self
Enable security audit logging
Sourcepub fn enable_performance_monitoring(self) -> Self
pub fn enable_performance_monitoring(self) -> Self
Enable performance monitoring
Sourcepub fn init(self) -> Result<ObservabilityGuard, ObservabilityError>
pub fn init(self) -> Result<ObservabilityGuard, ObservabilityError>
Initialize observability with this 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
Auto Trait Implementations§
impl Freeze for ObservabilityConfig
impl RefUnwindSafe for ObservabilityConfig
impl Send for ObservabilityConfig
impl Sync for ObservabilityConfig
impl Unpin 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