From bbd5cf2ba64d128000e90eb15d66edcfaf19bbb3 Mon Sep 17 00:00:00 2001 From: Miodec Date: Tue, 29 Apr 2025 23:27:35 +0200 Subject: [PATCH] chore: remove analytics logging --- frontend/src/ts/config.ts | 2 -- frontend/src/ts/controllers/theme-controller.ts | 2 -- frontend/src/ts/event-handlers/global.ts | 4 ---- frontend/src/ts/sentry.ts | 1 + 4 files changed, 1 insertion(+), 8 deletions(-) diff --git a/frontend/src/ts/config.ts b/frontend/src/ts/config.ts index ab158ba16..79272a35a 100644 --- a/frontend/src/ts/config.ts +++ b/frontend/src/ts/config.ts @@ -7,7 +7,6 @@ import { } from "./config-validation"; import * as ConfigEvent from "./observables/config-event"; import { isAuthenticated } from "./firebase"; -import * as AnalyticsController from "./controllers/analytics-controller"; import * as AccountButton from "./elements/account-button"; import { debounce } from "throttle-debounce"; import { @@ -1565,7 +1564,6 @@ export function setLanguage(language: Language, nosave?: boolean): boolean { if (!isConfigValueValid("language", language, LanguageSchema)) return false; config.language = language; - void AnalyticsController.log("changedLanguage", { language }); saveToLocalStorage("language", nosave); ConfigEvent.dispatch("language", config.language); diff --git a/frontend/src/ts/controllers/theme-controller.ts b/frontend/src/ts/controllers/theme-controller.ts index fb8b8c150..880cbb712 100644 --- a/frontend/src/ts/controllers/theme-controller.ts +++ b/frontend/src/ts/controllers/theme-controller.ts @@ -10,7 +10,6 @@ import * as ConfigEvent from "../observables/config-event"; import * as DB from "../db"; import * as Notifications from "../elements/notifications"; import * as Loader from "../elements/loader"; -import * as AnalyticsController from "../controllers/analytics-controller"; import { debounce } from "throttle-debounce"; import { tryCatch } from "@monkeytype/util/trycatch"; @@ -173,7 +172,6 @@ async function apply( } } - void AnalyticsController.log("changedTheme", { theme: name }); // if (!isPreview) { const colors = await ThemeColors.getAll(); $(".keymapKey").attr("style", ""); diff --git a/frontend/src/ts/event-handlers/global.ts b/frontend/src/ts/event-handlers/global.ts index 8aafcb4c3..95b57fac8 100644 --- a/frontend/src/ts/event-handlers/global.ts +++ b/frontend/src/ts/event-handlers/global.ts @@ -56,8 +56,4 @@ window.onunhandledrejection = function (e): void { }); console.error(e); } - void log("error", { - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access - error: (e.reason?.stack ?? "") as string, - }); }; diff --git a/frontend/src/ts/sentry.ts b/frontend/src/ts/sentry.ts index 681c8ef81..99ec374fa 100644 --- a/frontend/src/ts/sentry.ts +++ b/frontend/src/ts/sentry.ts @@ -42,6 +42,7 @@ export function init(): void { */ "NotFoundError: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.", "NotFoundError: Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node.", + "Error: There is no clipping info for given tab", ], }); }