Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

chore(analytics): reduce dashboard event payloads (#74844)

Ben White6eaf5473037f
diff --git a/frontend/src/lib/utils/eventUsageLogic.ts b/frontend/src/lib/utils/eventUsageLogic.ts
index f851fbd4c62c..9d79274ac396 100644
--- a/frontend/src/lib/utils/eventUsageLogic.ts
+++ b/frontend/src/lib/utils/eventUsageLogic.ts
@@ -754,7 +754,6 @@ export interface eventUsageLogicActions {
}
reportDashboardRefreshed: (
dashboardId: number,
- dashboard: DashboardType<QueryBasedInsightModel> | null,
filters: Record<string, any>,
variables: Record<string, any>,
lastRefreshed: string | Dayjs | null,
@@ -770,7 +769,6 @@ export interface eventUsageLogicActions {
}
) => {
action: string
- dashboard: DashboardType<QueryBasedInsightModel<Node<Record<string, any>>>> | null
dashboardId: number
filters: Record<string, any>
forceRefresh: boolean
@@ -2133,7 +2131,6 @@ export const eventUsageLogic = kea<eventUsageLogicType>([
) => ({ dashboard, themeId }),
reportDashboardRefreshed: (
dashboardId: number,
- dashboard: DashboardType<QueryBasedInsightModel> | null,
filters: Record<string, any>,
variables: Record<string, any>,
lastRefreshed: string | Dayjs | null,
@@ -2149,7 +2146,6 @@ export const eventUsageLogic = kea<eventUsageLogicType>([
}
) => ({
dashboardId,
- dashboard,
filters,
variables,
lastRefreshed,
@@ -2950,7 +2946,6 @@ export const eventUsageLogic = kea<eventUsageLogicType>([
dashboard_id: id,
lastRefreshed: lastRefreshed?.toISOString(),
refreshAge: lastRefreshed ? now().diff(lastRefreshed, 'seconds') : undefined,
- dashboard: sanitizeDashboard(dashboard),
uses_data_warehouse_source: false,
data_warehouse_tiles_count: 0,
}
@@ -3095,7 +3090,6 @@ export const eventUsageLogic = kea<eventUsageLogicType>([
},
reportDashboardRefreshed: async ({
dashboardId,
- dashboard,
filters,
variables,
lastRefreshed,
@@ -3105,7 +3099,6 @@ export const eventUsageLogic = kea<eventUsageLogicType>([
}) => {
posthog.capture(`dashboard refreshed`, {
dashboard_id: dashboardId,
- dashboard: sanitizeDashboard(dashboard),
filters,
variables,
last_refreshed: lastRefreshed?.toString(),
diff --git a/frontend/src/scenes/dashboard/dashboardLogic.tsx b/frontend/src/scenes/dashboard/dashboardLogic.tsx
index 3cdfc8f12748..975818d5ef2c 100644
--- a/frontend/src/scenes/dashboard/dashboardLogic.tsx
+++ b/frontend/src/scenes/dashboard/dashboardLogic.tsx
@@ -3600,7 +3600,6 @@ export const dashboardLogic = kea<dashboardLogicType>([
urlFilters,
urlVariables,
dashboardLoadData,
- dashboard,
lastDashboardRefresh,
} = values
@@ -3697,7 +3696,6 @@ export const dashboardLogic = kea<dashboardLogicType>([
eventUsageLogic.actions.reportDashboardRefreshed(
dashboardId,
- dashboard,
urlFilters,
urlVariables,
lastDashboardRefresh,