pub struct Config {
pub telemetry_debug_logging_enabled: bool,
pub telemetry_heartbeat_interval: Duration,
pub direct_submission_enabled: bool,
pub restartable: bool,
pub debug_enabled: bool,
/* private fields */
}Fields§
§telemetry_debug_logging_enabled: boolEnables debug logging
telemetry_heartbeat_interval: Duration§direct_submission_enabled: bool§restartable: boolPrevents LifecycleAction::Stop from terminating the worker (except if the WorkerHandle is dropped)
debug_enabled: boolImplementations§
Source§impl Config
impl Config
pub fn endpoint(&self) -> Option<&Endpoint>
pub fn set_endpoint(&mut self, endpoint: Endpoint) -> Result<()>
pub fn set_endpoint_test_token<T: Into<Cow<'static, str>>>( &mut self, test_token: Option<T>, )
pub fn from_settings(settings: &Settings) -> Self
Sourcepub fn set_host_from_url(&mut self, host_url: &str) -> Result<()>
pub fn set_host_from_url(&mut self, host_url: &str) -> Result<()>
set_host sets the host telemetry should connect to.
It handles the following schemes
- http/https
- unix sockets unix://<path to the socket>
- windows pipes of the format windows:<pipe name>
- files, with the format file://<path to the file>
If the host_url is http/https, any path will be ignored and replaced by the appropriate telemetry endpoint path
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
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
Auto Trait Implementations§
impl !Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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