diff --git a/frontend/__snapshots__/scenes-app-logs--logs-scene--dark.png b/frontend/__snapshots__/scenes-app-logs--logs-scene--dark.png index dae9d8d413cbf..942b750bc649e 100644 Binary files a/frontend/__snapshots__/scenes-app-logs--logs-scene--dark.png and b/frontend/__snapshots__/scenes-app-logs--logs-scene--dark.png differ diff --git a/frontend/src/lib/components/TaxonomicFilter/taxonomicFilterLogic.tsx b/frontend/src/lib/components/TaxonomicFilter/taxonomicFilterLogic.tsx index 150d4cc4401ea..e9ad55f96c84b 100644 --- a/frontend/src/lib/components/TaxonomicFilter/taxonomicFilterLogic.tsx +++ b/frontend/src/lib/components/TaxonomicFilter/taxonomicFilterLogic.tsx @@ -33,7 +33,10 @@ import { dataWarehouseJoinsLogic } from 'scenes/data-warehouse/external/dataWare import { dataWarehouseSettingsSceneLogic } from 'scenes/data-warehouse/settings/dataWarehouseSettingsSceneLogic' import { experimentsLogic } from 'scenes/experiments/experimentsLogic' import { COHORT_BEHAVIORAL_LIMITATIONS_URL } from 'scenes/feature-flags/constants' -import { getInternalEventFilterOptions } from 'scenes/hog-functions/filters/HogFunctionFiltersInternal' +import { + getProductEventFilterOptions, + getProductEventPropertyFilterOptions, +} from 'scenes/hog-functions/filters/HogFunctionFiltersInternal' import { MaxContextTaxonomicFilterOption } from 'scenes/max/maxTypes' import { NotebookType } from 'scenes/notebooks/types' import { groupDisplayId } from 'scenes/persons/GroupActorDisplay' @@ -285,7 +288,7 @@ export const taxonomicFilterLogic = kea([ type: TaxonomicFilterGroupType.InternalEvents, options: [ { name: 'All internal events', value: null }, - ...getInternalEventFilterOptions('standard').map((item) => ({ + ...getProductEventFilterOptions('activity-log').map((item) => ({ name: item.label, value: item.value, })), @@ -397,6 +400,18 @@ export const taxonomicFilterLogic = kea([ propertyAllowList?.[TaxonomicFilterGroupType.EventProperties]?.filter(isString), ...propertyTaxonomicGroupProps(), }, + { + name: 'Internal event properties', + searchPlaceholder: 'internal event properties', + type: TaxonomicFilterGroupType.InternalEventProperties, + options: getProductEventPropertyFilterOptions('activity-log').map((value) => ({ + name: value, + value, + group: TaxonomicFilterGroupType.EventProperties, + })), + getIcon: getPropertyDefinitionIcon, + getPopoverHeader: () => 'Internal event properties', + }, { name: 'Event metadata', searchPlaceholder: 'event metadata', @@ -471,12 +486,11 @@ export const taxonomicFilterLogic = kea([ searchPlaceholder: 'exceptions', type: TaxonomicFilterGroupType.ErrorTrackingProperties, options: [ - ...[ - '$exception_types', - '$exception_values', - '$exception_sources', - '$exception_functions', - ].map((value) => ({ name: value, value, group: TaxonomicFilterGroupType.EventProperties })), + ...getProductEventPropertyFilterOptions('error-tracking').map((value) => ({ + name: value, + value, + group: TaxonomicFilterGroupType.EventProperties, + })), ...(currentTeam?.person_display_name_properties ? currentTeam.person_display_name_properties.map((property) => ({ name: property, diff --git a/frontend/src/lib/components/TaxonomicFilter/types.ts b/frontend/src/lib/components/TaxonomicFilter/types.ts index 370f6cb5ed1b2..858f94e99e4ec 100644 --- a/frontend/src/lib/components/TaxonomicFilter/types.ts +++ b/frontend/src/lib/components/TaxonomicFilter/types.ts @@ -140,6 +140,7 @@ export enum TaxonomicFilterGroupType { Elements = 'elements', Events = 'events', InternalEvents = 'internal_events', + InternalEventProperties = 'internal_event_properties', EventProperties = 'event_properties', EventFeatureFlags = 'event_feature_flags', EventMetadata = 'event_metadata', diff --git a/frontend/src/queries/schema.json b/frontend/src/queries/schema.json index 2c9dc5c2a33e8..1870a3589bdd5 100644 --- a/frontend/src/queries/schema.json +++ b/frontend/src/queries/schema.json @@ -25843,6 +25843,7 @@ "elements", "events", "internal_events", + "internal_event_properties", "event_properties", "event_feature_flags", "event_metadata", diff --git a/frontend/src/scenes/hog-functions/filters/HogFunctionFiltersInternal.tsx b/frontend/src/scenes/hog-functions/filters/HogFunctionFiltersInternal.tsx index 65c45e6690655..8620c754cdb48 100644 --- a/frontend/src/scenes/hog-functions/filters/HogFunctionFiltersInternal.tsx +++ b/frontend/src/scenes/hog-functions/filters/HogFunctionFiltersInternal.tsx @@ -19,7 +19,7 @@ type FilterOption = { value: string; label: string } /** * Options for the 'Trigger' field on the new destination page */ -export const getInternalEventFilterOptions = (contextId: HogFunctionConfigurationContextId): FilterOption[] => { +export const getProductEventFilterOptions = (contextId: HogFunctionConfigurationContextId): FilterOption[] => { switch (contextId) { case 'error-tracking': return [ @@ -53,6 +53,29 @@ export const getInternalEventFilterOptions = (contextId: HogFunctionConfiguratio } } +export const getProductEventPropertyFilterOptions = (contextId: HogFunctionConfigurationContextId): string[] => { + switch (contextId) { + case 'activity-log': + return [ + 'id', + 'unread', + 'organization_id', + 'was_impersonated', + 'is_system', + 'activity', + 'item_id', + 'scope', + 'detail.name', + 'detail.changes', + 'created_at', + ] + case 'error-tracking': + return ['$exception_types', '$exception_values', '$exception_sources', '$exception_functions'] + } + + return [] +} + const getSimpleFilterValue = (value?: CyclotronJobFiltersType): string | undefined => { return value?.events?.[0]?.id } @@ -72,7 +95,7 @@ const setSimpleFilterValue = (options: FilterOption[], value: string): Cyclotron export function HogFunctionFiltersInternal(): JSX.Element { const { contextId } = useValues(hogFunctionConfigurationLogic) - const options = useMemo(() => getInternalEventFilterOptions(contextId), [contextId]) + const options = useMemo(() => getProductEventFilterOptions(contextId), [contextId]) const taxonomicGroupTypes = useMemo(() => { if (contextId === 'error-tracking') { diff --git a/posthog/schema.py b/posthog/schema.py index 7f4808002a54d..c4b190bc89200 100644 --- a/posthog/schema.py +++ b/posthog/schema.py @@ -2823,6 +2823,7 @@ class TaxonomicFilterGroupType(StrEnum): ELEMENTS = "elements" EVENTS = "events" INTERNAL_EVENTS = "internal_events" + INTERNAL_EVENT_PROPERTIES = "internal_event_properties" EVENT_PROPERTIES = "event_properties" EVENT_FEATURE_FLAGS = "event_feature_flags" EVENT_METADATA = "event_metadata" diff --git a/products/workflows/frontend/Workflows/hogflows/filters/HogFlowFilters.tsx b/products/workflows/frontend/Workflows/hogflows/filters/HogFlowFilters.tsx index bbf027ffaf0ee..9d81cf9a047ec 100644 --- a/products/workflows/frontend/Workflows/hogflows/filters/HogFlowFilters.tsx +++ b/products/workflows/frontend/Workflows/hogflows/filters/HogFlowFilters.tsx @@ -22,11 +22,23 @@ export type HogFlowFiltersProps = { */ export function HogFlowEventFilters({ filters, setFilters, typeKey, buttonCopy }: HogFlowFiltersProps): JSX.Element { const shouldShowInternalEvents = useFeatureFlag('WORKFLOWS_INTERNAL_EVENT_FILTERS') + const actionsTaxonomicGroupTypes = [TaxonomicFilterGroupType.Events, TaxonomicFilterGroupType.Actions] if (shouldShowInternalEvents) { actionsTaxonomicGroupTypes.push(TaxonomicFilterGroupType.InternalEvents) } + const propertyTaxonomicGroupTypes = [ + TaxonomicFilterGroupType.EventProperties, + TaxonomicFilterGroupType.EventFeatureFlags, + TaxonomicFilterGroupType.Elements, + TaxonomicFilterGroupType.PersonProperties, + TaxonomicFilterGroupType.HogQLExpression, + ] + if (shouldShowInternalEvents) { + propertyTaxonomicGroupTypes.push(TaxonomicFilterGroupType.InternalEventProperties) + } + return (