From bd7236e31dec997da7dc5fe15e71539116d4d162 Mon Sep 17 00:00:00 2001 From: Paolo D'Amico Date: Sun, 21 Mar 2021 11:48:39 -0700 Subject: [PATCH 1/2] Fix unmounted logic bug --- frontend/src/lib/utils/eventUsageLogic.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/lib/utils/eventUsageLogic.ts b/frontend/src/lib/utils/eventUsageLogic.ts index ea90eae197800..6ad2df724d5e7 100644 --- a/frontend/src/lib/utils/eventUsageLogic.ts +++ b/frontend/src/lib/utils/eventUsageLogic.ts @@ -7,6 +7,7 @@ import { eventUsageLogicType } from './eventUsageLogicType' import { AnnotationType, FilterType, DashboardType, PersonType, DashboardMode } from '~/types' import { ViewType } from 'scenes/insights/insightLogic' import dayjs from 'dayjs' +import { preflightLogic } from 'scenes/PreflightCheck/logic' const keyMappingKeys = Object.keys(keyMapping.event) @@ -181,7 +182,7 @@ export const eventUsageLogic = kea< const { created_at, name, is_shared, pinned, creation_mode } = dashboard const properties: Record = { created_at, - name: userLogic.values.user?.is_multi_tenancy ? name : undefined, // Don't send name on self-hosted + name: preflightLogic.values.preflight?.cloud ? name : undefined, // Don't send name on self-hosted is_shared, pinned, creation_mode, From 227a978c01fab32557776da1adf2903457d6c8f8 Mon Sep 17 00:00:00 2001 From: Paolo D'Amico Date: Tue, 23 Mar 2021 13:04:30 -0700 Subject: [PATCH 2/2] don't send name altogether --- frontend/src/lib/utils/eventUsageLogic.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/frontend/src/lib/utils/eventUsageLogic.ts b/frontend/src/lib/utils/eventUsageLogic.ts index 6ad2df724d5e7..fdfdaaa6770dc 100644 --- a/frontend/src/lib/utils/eventUsageLogic.ts +++ b/frontend/src/lib/utils/eventUsageLogic.ts @@ -7,7 +7,6 @@ import { eventUsageLogicType } from './eventUsageLogicType' import { AnnotationType, FilterType, DashboardType, PersonType, DashboardMode } from '~/types' import { ViewType } from 'scenes/insights/insightLogic' import dayjs from 'dayjs' -import { preflightLogic } from 'scenes/PreflightCheck/logic' const keyMappingKeys = Object.keys(keyMapping.event) @@ -179,10 +178,9 @@ export const eventUsageLogic = kea< }, reportDashboardViewed: async ({ dashboard, hasShareToken }, breakpoint) => { await breakpoint(500) // Debounce to avoid noisy events from continuous navigation - const { created_at, name, is_shared, pinned, creation_mode } = dashboard + const { created_at, is_shared, pinned, creation_mode } = dashboard const properties: Record = { created_at, - name: preflightLogic.values.preflight?.cloud ? name : undefined, // Don't send name on self-hosted is_shared, pinned, creation_mode,