pub struct TelemetryConfig {
pub log_level: Option<String>,
pub json_log_output: bool,
}Expand description
Configuration for telemetry initialization.
This struct allows configuring various aspects of telemetry,
including OTLP, Prometheus, console output, and other settings.
Most fields have corresponding environment variables that are automatically
read when using TelemetryConfig::new() or TelemetryConfig::default().
Fields§
§log_level: Option<String>Log level (default: “info”)
json_log_output: boolImplementations§
Source§impl TelemetryConfig
impl TelemetryConfig
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new TelemetryConfig with default values from environment variables.
Sourcepub fn with_log_level(self, level: impl Into<String>) -> Self
pub fn with_log_level(self, level: impl Into<String>) -> Self
Set the log level.
pub fn with_json_log_output(self, output: bool) -> Self
Trait Implementations§
Source§impl Clone for TelemetryConfig
impl Clone for TelemetryConfig
Source§fn clone(&self) -> TelemetryConfig
fn clone(&self) -> TelemetryConfig
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 TelemetryConfig
impl Debug for TelemetryConfig
Auto Trait Implementations§
impl Freeze for TelemetryConfig
impl RefUnwindSafe for TelemetryConfig
impl Send for TelemetryConfig
impl Sync for TelemetryConfig
impl Unpin for TelemetryConfig
impl UnsafeUnpin for TelemetryConfig
impl UnwindSafe for TelemetryConfig
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