Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

fix(analytics): keep PostHog outages non-fatal (#6906)

Ezra Ellette098058415d68
diff --git a/apps/screenpipe-app-tauri/src-tauri/src/analytics.rs b/apps/screenpipe-app-tauri/src-tauri/src/analytics.rs
index 96d9bef18..444dda8a6 100755
--- a/apps/screenpipe-app-tauri/src-tauri/src/analytics.rs
+++ b/apps/screenpipe-app-tauri/src-tauri/src/analytics.rs
@@ -389,7 +389,9 @@ impl AnalyticsManager {
// Send periodic event with health data + feature config
if let Err(e) = self.send_event("app_still_running", Some(props)).await {
- error!("failed to send periodic posthog event: {}", e);
+ // Analytics transport is best-effort. Offline machines and
+ // transient PostHog outages must not become app errors.
+ warn!("failed to send periodic posthog event: {}", e);
}
}
}
@@ -633,7 +635,9 @@ pub fn start_analytics(
.send_event("app_started", Some(feature_config))
.await
{
- error!("Failed to send initial PostHog event: {}", e);
+ // A telemetry outage must never make a healthy app startup an
+ // error; the next periodic event provides another opportunity.
+ warn!("Failed to send initial PostHog event: {}", e);
}
}
});