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
Rust agentsagiaiai-memoryaudio-recordingcomputer-visionhermeshermes-agentllmlocal-ailocal-firstmachine-learningmcpmultimodalopenclawprivacyrewindscreen-recordingspeech-to-textycombinator
chore: add sentry
Louis Beaumont01cda487ee7c
diff --git a/Cargo.toml b/Cargo.tomlindex aba82d474..fd00b38a9 100644--- a/Cargo.toml+++ b/Cargo.toml@@ -43,6 +43,7 @@ vcpkg = "0.2"cc = "1.0"once_cell = "1.20.2"+sentry = "0.36.0"[patch.crates-io]# enables chinese mirror (hf is banned in china) and native-tlsdiff --git a/screenpipe-server/Cargo.toml b/screenpipe-server/Cargo.tomlindex 393814336..553a8c05c 100644--- a/screenpipe-server/Cargo.toml+++ b/screenpipe-server/Cargo.toml@@ -46,6 +46,7 @@ rand = "0.8.5"thiserror = "1"#opentelemetry+sentry = { workspace = true }opentelemetry = "0.21"opentelemetry-appender-tracing = "0.2"opentelemetry-otlp = { version = "0.14", features = [diff --git a/screenpipe-server/src/bin/screenpipe-server.rs b/screenpipe-server/src/bin/screenpipe-server.rsindex a91258b8f..ecce67de6 100644--- a/screenpipe-server/src/bin/screenpipe-server.rs+++ b/screenpipe-server/src/bin/screenpipe-server.rs@@ -19,6 +19,7 @@ use screenpipe_server::{use screenpipe_vision::monitor::list_monitors;#[cfg(target_os = "macos")]use screenpipe_vision::run_ui;+use sentry;use serde_json::{json, Value};use std::{collections::HashMap,@@ -133,6 +134,19 @@ async fn main() -> anyhow::Result<()> {debug!("starting screenpipe server");let cli = Cli::parse();+ // Initialize Sentry only if telemetry is enabled+ let _sentry_guard = if !cli.disable_telemetry {+ Some(sentry::init((+ "https://cf682877173997afc8463e5ca2fbe3c7@o4507617161314304.ingest.us.sentry.io/4507617170161664",+ sentry::ClientOptions {+ release: sentry::release_name!(),+ ..Default::default()+ }+ )))+ } else {+ None+ };+let local_data_dir = get_base_dir(&cli.data_dir)?;let local_data_dir_clone = local_data_dir.clone();