pub struct TelemetryBundle { /* private fields */ }Expand description
Declarative configuration for the telemetry stack. Consume with
open.
Implementations§
Source§impl TelemetryBundle
impl TelemetryBundle
Sourcepub fn new(event_schema_version: u32) -> Self
pub fn new(event_schema_version: u32) -> Self
Empty bundle — at least one of with_anonymous /
with_pseudonymous must be called before open.
Sourcepub fn with_recent_log_capacity(self, n: usize) -> Self
pub fn with_recent_log_capacity(self, n: usize) -> Self
Capacity of the user-facing “recently emitted” ring buffer
surfaced by the PrivacySettings widget’s “Inspect data sent”
accordion. Default: 200 events. Independent of any adapter’s
own outbound queue.
Sourcepub fn with_anonymous(self, reporter: Rc<dyn UsageReporter>) -> Self
pub fn with_anonymous(self, reporter: Rc<dyn UsageReporter>) -> Self
Install the anonymous-mode adapter (e.g.
teksilo-analytics-plausible). The adapter’s install_id()
must return None.
Sourcepub fn with_pseudonymous(self, reporter: Rc<dyn UsageReporter>) -> Self
pub fn with_pseudonymous(self, reporter: Rc<dyn UsageReporter>) -> Self
Install the pseudonymous-mode adapter (e.g.
teksilo-analytics-posthog). The adapter’s install_id() must
return Some(uuid) once configured.
Sourcepub fn with_default_mode(self, mode: TelemetryMode) -> Self
pub fn with_default_mode(self, mode: TelemetryMode) -> Self
Which mode is active on first run before the user picks.
pub fn with_debounce(self, debounce: Duration) -> Self
pub fn with_data_processor_name(self, name: impl Into<String>) -> Self
pub fn with_privacy_policy_url(self, url: impl Into<String>) -> Self
pub fn with_data_residency_region(self, region: DataResidencyRegion) -> Self
pub fn with_retention_days(self, days: u32) -> Self
Sourcepub fn open(
self,
paths: &AppPaths,
settings: &SettingsStore,
) -> Result<OpenedTelemetry, TelemetryBundleError>
pub fn open( self, paths: &AppPaths, settings: &SettingsStore, ) -> Result<OpenedTelemetry, TelemetryBundleError>
Open every requested service against paths. Reads the
runtime endpoint override from settings exactly once; the
override is propagated to adapters via their constructors
(each adapter is responsible for honoring it).
Trait Implementations§
Source§impl Clone for TelemetryBundle
impl Clone for TelemetryBundle
Source§fn clone(&self) -> TelemetryBundle
fn clone(&self) -> TelemetryBundle
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more