exclude performance events from non-performance metrics/lists

This commit is contained in:
Francis Cao committed 2026-05-07 14:17:03 -07:00
1 parent 88ccf5348e
commit 17e7a4a63a
16 files changed
+55 -8

No files matched your search

@@ -1,4 +1,5 @@
import clickhouse from '@/lib/clickhouse';
import { EVENT_TYPE } from '@/lib/constants';
import { CLICKHOUSE, PRISMA, runQuery } from '@/lib/db';
import prisma from '@/lib/prisma';
import type { EventDataNumericStats, PropertyFilter, QueryFilters } from '@/lib/types';
@@ -43,6 +44,7 @@ async function relationalQuery(
${joinSessionQuery}
where website_event.website_id = {{websiteId::uuid}}
and website_event.created_at between {{startDate}} and {{endDate}}
and website_event.event_type != ${EVENT_TYPE.performance}
${filterQuery}
${pfSQL}
)
@@ -84,6 +86,7 @@ async function clickhouseQuery(
${cohortQuery}
where website_event.website_id = {websiteId:UUID}
and website_event.created_at between {startDate:DateTime64} and {endDate:DateTime64}
and website_event.event_type != ${EVENT_TYPE.performance}
${filterQuery}
${pfSQL}
)