From a9f4cac548a839eb0c7306330eb4c61d74563f8d Mon Sep 17 00:00:00 2001 From: Michael Neale Date: Mon, 9 Feb 2026 19:32:51 +1100 Subject: [PATCH] chore: strip posthog for sessions/models/daily only (#7079) --- crates/goose/src/posthog.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/crates/goose/src/posthog.rs b/crates/goose/src/posthog.rs index f2a689f1..9c94820d 100644 --- a/crates/goose/src/posthog.rs +++ b/crates/goose/src/posthog.rs @@ -244,6 +244,11 @@ pub fn emit_error_with_context(error_type: &str, context: ErrorContext) { return; } + // Temporarily disabled - only session_started events are sent + let _ = (&error_type, &context); + return; + + #[allow(unreachable_code)] let installation = load_or_create_installation(); let error_type = error_type.to_string(); @@ -257,6 +262,10 @@ pub fn emit_custom_slash_command_used() { return; } + // Temporarily disabled - only session_started events are sent + return; + + #[allow(unreachable_code)] let installation = load_or_create_installation(); tokio::spawn(async move { @@ -533,6 +542,11 @@ pub async fn emit_event( return Ok(()); } + // Temporarily disabled - only session_started events are sent + let _ = (event_name, &mut properties); + return Ok(()); + + #[allow(unreachable_code)] let installation = load_or_create_installation(); let client = posthog_rs::client(POSTHOG_API_KEY).await; let mut event = posthog_rs::Event::new(event_name, &installation.installation_id);