pub struct TelemetryBuilder { /* private fields */ }Expand description
Builder for configuring telemetry
Implementations§
Source§impl TelemetryBuilder
impl TelemetryBuilder
Sourcepub fn service_name(self, name: impl Into<String>) -> Result<Self>
pub fn service_name(self, name: impl Into<String>) -> Result<Self>
Set the service name (required)
Sourcepub fn service_version(self, version: impl Into<String>) -> Self
pub fn service_version(self, version: impl Into<String>) -> Self
Set the service version (recommended)
Sourcepub fn db_path(self, path: impl Into<PathBuf>) -> Self
pub fn db_path(self, path: impl Into<PathBuf>) -> Self
Set custom database path for event storage
Sourcepub fn sync(self, config: SyncConfig) -> Self
pub fn sync(self, config: SyncConfig) -> Self
Configure sync settings
Sourcepub fn auto_sync(self, enabled: bool) -> Self
pub fn auto_sync(self, enabled: bool) -> Self
Enable automatic background syncing (enabled by default)
Sourcepub fn sync_interval(self, seconds: u64) -> Self
pub fn sync_interval(self, seconds: u64) -> Self
Set the auto-sync interval in seconds (default: 60)
Sourcepub fn sync_on_shutdown(self, enabled: bool) -> Self
pub fn sync_on_shutdown(self, enabled: bool) -> Self
Configure whether to sync on shutdown (default: true)
Sourcepub fn with_sync_credentials(
self,
org_id: impl Into<String>,
app_id: impl Into<String>,
token: impl Into<String>,
secret: impl Into<String>,
) -> Result<Self>
pub fn with_sync_credentials( self, org_id: impl Into<String>, app_id: impl Into<String>, token: impl Into<String>, secret: impl Into<String>, ) -> Result<Self>
Shorthand for setting sync credentials
Sourcepub fn privacy(self, config: PrivacyConfig) -> Self
pub fn privacy(self, config: PrivacyConfig) -> Self
Configure privacy settings
Sourcepub fn strict_privacy(self) -> Self
pub fn strict_privacy(self) -> Self
Shorthand for enabling strict privacy mode (GDPR-compliant)
Sourcepub fn minimal_privacy(self) -> Self
pub fn minimal_privacy(self) -> Self
Shorthand for minimal privacy mode
Sourcepub fn consent_required(self, required: bool) -> Self
pub fn consent_required(self, required: bool) -> Self
Require user consent before tracking
Sourcepub fn data_retention(self, days: u32) -> Self
pub fn data_retention(self, days: u32) -> Self
Set data retention period in days (0 = forever)
Sourcepub fn sanitize_paths(self, enabled: bool) -> Self
pub fn sanitize_paths(self, enabled: bool) -> Self
Enable or disable path sanitization
Sourcepub fn sanitize_emails(self, enabled: bool) -> Self
pub fn sanitize_emails(self, enabled: bool) -> Self
Enable or disable email sanitization
Sourcepub fn build(self) -> Result<TelemetryKit>
pub fn build(self) -> Result<TelemetryKit>
Build the TelemetryKit instance
Trait Implementations§
Source§impl Debug for TelemetryBuilder
impl Debug for TelemetryBuilder
Source§impl Default for TelemetryBuilder
impl Default for TelemetryBuilder
Source§fn default() -> TelemetryBuilder
fn default() -> TelemetryBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TelemetryBuilder
impl RefUnwindSafe for TelemetryBuilder
impl Send for TelemetryBuilder
impl Sync for TelemetryBuilder
impl Unpin for TelemetryBuilder
impl UnwindSafe for TelemetryBuilder
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