pub struct Config {
pub telemetry_debug_logging_enabled: bool,
pub telemetry_heartbeat_interval: Duration,
pub telemetry_extended_heartbeat_interval: Duration,
pub direct_submission_enabled: bool,
pub restartable: bool,
pub debug_enabled: bool,
pub session_id: Option<String>,
pub parent_session_id: Option<String>,
pub root_session_id: Option<String>,
/* private fields */
}Fields§
§telemetry_debug_logging_enabled: boolEnables debug logging
telemetry_heartbeat_interval: Duration§telemetry_extended_heartbeat_interval: Duration§direct_submission_enabled: bool§restartable: boolPrevents LifecycleAction::Stop from terminating the worker (except if the WorkerHandle is dropped)
debug_enabled: bool§session_id: Option<String>§parent_session_id: Option<String>§root_session_id: Option<String>Implementations§
Source§impl Config
impl Config
pub fn endpoint(&self) -> Option<&Endpoint>
Sourcepub fn set_endpoint(&mut self, endpoint: TelemetryEndpoint) -> Result<()>
pub fn set_endpoint(&mut self, endpoint: TelemetryEndpoint) -> Result<()>
Applies a TelemetryEndpoint patch to the endpoint, then rewrites the
path to the telemetry path appropriate for the resulting scheme and API
key. This is the single entry point for endpoint configuration so the URL
path invariant always holds.
Sourcepub fn set_endpoint_test_token<T: Into<Cow<'static, str>>>(
&mut self,
test_token: Option<T>,
)
pub fn set_endpoint_test_token<T: Into<Cow<'static, str>>>( &mut self, test_token: Option<T>, )
Sets (or, with None, clears) the X-Datadog-Test-Session-Token header
sent with requests. Unlike Config::set_endpoint, None clears the
token rather than leaving it unchanged, and an absent endpoint is left
absent (no default is inserted).
pub fn from_settings(settings: &Settings) -> Self
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 UnsafeUnpin 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