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>,
pub emit_app_lifecycle: bool,
pub endpoints_message_limit: u32,
/* 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>§emit_app_lifecycle: boolWhether to emit the app-started/app-closing lifecycle payloads.
Forked processes may not be required to emit these.
endpoints_message_limit: u32Maximum number of endpoints serialized into one payload
(DD_API_SECURITY_ENDPOINT_COLLECTION_MESSAGE_LIMIT in the tracers).
Endpoints sending is batched per heartbeat interval.
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 accepts original, human-facing URL strings; callers that
already hold a parsed Uri must use Config::set_endpoint_uri to
avoid re-parsing encoded file, unix, or windows URIs.
Sourcepub fn set_endpoint_uri(&mut self, uri: Uri) -> Result<()>
pub fn set_endpoint_uri(&mut self, uri: Uri) -> Result<()>
Sets the endpoint URL from an already-parsed Uri.
This is the non-stringifying counterpart to the url field in
TelemetryEndpoint. It is intended for integrations that already hold
a parsed URI and therefore must not pass its string representation back
through parse_uri. Other endpoint properties remain unchanged.
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).