From 87c3e4dd86a9ffa7d464cb83fbe52473b2aa88c9 Mon Sep 17 00:00:00 2001 From: Thomas Eizinger Date: Thu, 12 Dec 2024 06:03:48 +1100 Subject: [PATCH] fix(telemetry): disable for unofficial environments (#7482) On the one hand, learning about in which edgecases our software fails is useful and thus having telemetry also active for self-hosted users is beneficial. On the other hand, we have neither control nor a contact to those self-hosted and whatever they are doing might spam our Sentry account with errors that we can't do anything about. To mitigate this, we disable telemetry for self-hosted users with the next release. Once we have more resources, we can consider enabling this again. --- rust/telemetry/src/lib.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/rust/telemetry/src/lib.rs b/rust/telemetry/src/lib.rs index 01670c204..7bdbfaa08 100644 --- a/rust/telemetry/src/lib.rs +++ b/rust/telemetry/src/lib.rs @@ -47,8 +47,11 @@ impl Telemetry { let environment = match api_url { "wss://api.firezone.dev" | "wss://api.firezone.dev/" => "production", "wss://api.firez.one" | "wss://api.firez.one/" => "staging", - "ws://api:8081" | "ws://api:8081/" => "docker-compose", - _ => "self-hosted", + _ => { + tracing::debug!(%api_url, "Telemetry won't start in unofficial environment"); + + return; + } }; tracing::info!("Starting telemetry");