Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

Root crate sentry, editor tag

Ilyac743f119a897
diff --git a/Cargo.lock b/Cargo.lock
index 87912ebf1..23f933916 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -755,6 +755,7 @@ dependencies = [
"cap-rendering",
"cpal 0.15.3 (git+https://github.com/RustAudio/cpal?rev=f43d36e55494993bbbde3299af0c53e5cdf4d4cf)",
"ffmpeg-next",
+ "sentry",
"serde",
"specta",
"tokio",
diff --git a/Cargo.toml b/Cargo.toml
index 0512956d4..51221b366 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -29,6 +29,7 @@ nokhwa-bindings-macos = { git = "https://github.com/CapSoftware/nokhwa", rev = "
wgpu = "22.1.0"
flume = "0.11.0"
thiserror = "1.0"
+sentry = { version = "0.34.0", features = ["anyhow"] }
windows = "0.58.0"
windows-sys = "0.59.0"
diff --git a/apps/desktop/src-tauri/Cargo.toml b/apps/desktop/src-tauri/Cargo.toml
index 7d9bcd785..13e4f369d 100644
--- a/apps/desktop/src-tauri/Cargo.toml
+++ b/apps/desktop/src-tauri/Cargo.toml
@@ -59,13 +59,13 @@ rodio = "0.19.0"
png = "0.17.13"
device_query = "2.1.0"
base64 = "0.22.1"
-sentry = { version = "0.34.0", features = ["anyhow"] }
reqwest = { version = "0.12.7", features = ["json", "stream", "multipart"] }
dotenvy_macro = "0.15.7"
global-hotkey = "0.6.3"
rand = "0.8.5"
cpal.workspace = true
keyed_priority_queue = "0.4.2"
+sentry.workspace = true
cap-utils = { path = "../../../crates/utils" }
cap-project = { path = "../../../crates/project" }
diff --git a/apps/desktop/src-tauri/src/lib.rs b/apps/desktop/src-tauri/src/lib.rs
index 189938185..de954c6a0 100644
--- a/apps/desktop/src-tauri/src/lib.rs
+++ b/apps/desktop/src-tauri/src/lib.rs
@@ -1904,7 +1904,10 @@ pub async fn run() {
tauri::async_runtime::set(tokio::runtime::Handle::current());
#[allow(unused_mut)]
- let mut builder = tauri::Builder::default();
+ let mut builder =
+ tauri::Builder::default().plugin(tauri_plugin_single_instance::init(|app, _args, _cwd| {
+ let _ = ShowCapWindow::Main.show(app);
+ }));
#[cfg(target_os = "macos")]
{
@@ -1912,9 +1915,6 @@ pub async fn run() {
}
builder
- .plugin(tauri_plugin_single_instance::init(|app, _args, _cwd| {
- let _ = ShowCapWindow::Main.show(app);
- }))
.plugin(tauri_plugin_shell::init())
.plugin(tauri_plugin_dialog::init())
.plugin(tauri_plugin_store::Builder::new().build())
diff --git a/crates/editor/Cargo.toml b/crates/editor/Cargo.toml
index f512a7a6b..711e589b3 100644
--- a/crates/editor/Cargo.toml
+++ b/crates/editor/Cargo.toml
@@ -15,3 +15,4 @@ axum = { version = "0.7.5", features = ["ws"] }
ffmpeg.workspace = true
specta.workspace = true
serde = { version = "1", features = ["derive"] }
+sentry.workspace = true
diff --git a/crates/editor/src/editor_instance.rs b/crates/editor/src/editor_instance.rs
index 704ed66ef..7276c13ac 100644
--- a/crates/editor/src/editor_instance.rs
+++ b/crates/editor/src/editor_instance.rs
@@ -37,6 +37,10 @@ impl EditorInstance {
video_id: String,
on_state_change: impl Fn(&EditorState) + Send + Sync + 'static,
) -> Arc<Self> {
+ sentry::configure_scope(|scope| {
+ scope.set_tag("window", "editor");
+ });
+
let project_path = projects_path.join(format!(
"{}{}",
video_id,