Skip to content

Commit

Permalink
Revert "ref(replay): query custom tags from replays dataset (#78573)"
Browse files Browse the repository at this point in the history
This reverts commit 5bc828b.
  • Loading branch information
aliu39 authored Oct 3, 2024
1 parent 2f4fa60 commit 38350e8
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
1 change: 0 additions & 1 deletion static/app/views/alerts/rules/metric/types.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ export enum Dataset {
/** Also used for crash free alerts */
METRICS = 'metrics',
ISSUE_PLATFORM = 'search_issues',
REPLAYS = 'replays',
}

export enum EventTypes {
Expand Down
2 changes: 1 addition & 1 deletion static/app/views/alerts/wizard/options.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export enum MEPAlertsDataset {
export type MetricAlertType = Exclude<AlertType, 'issues' | 'uptime_monitor'>;

export const DatasetMEPAlertQueryTypes: Record<
Exclude<Dataset, Dataset.ISSUE_PLATFORM | Dataset.SESSIONS | Dataset.REPLAYS>, // IssuePlatform (search_issues) is not used in alerts, so we can exclude it here
Exclude<Dataset, 'search_issues' | Dataset.SESSIONS>, // IssuePlatform (search_issues) is not used in alerts, so we can exclude it here
MEPAlertsQueryType
> = {
[Dataset.ERRORS]: MEPAlertsQueryType.ERROR,
Expand Down
2 changes: 1 addition & 1 deletion static/app/views/alerts/wizard/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import type {MetricAlertType, WizardRuleTemplate} from './options';

// A set of unique identifiers to be able to tie aggregate and dataset back to a wizard alert type
const alertTypeIdentifiers: Record<
Exclude<Dataset, Dataset.ISSUE_PLATFORM | Dataset.REPLAYS>, // IssuePlatform (search_issues) is not used in alerts, so we can exclude it here
Exclude<Dataset, 'search_issues'>, // IssuePlatform (search_issues) is not used in alerts, so we can exclude it here
Partial<Record<MetricAlertType, string>>
> = {
[Dataset.ERRORS]: {
Expand Down
13 changes: 8 additions & 5 deletions static/app/views/replays/list/replaySearchBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ function ReplaySearchBar(props: Props) {
{
orgSlug: organization.slug,
projectIds: projectIds.map(String),
dataset: Dataset.REPLAYS,
dataset: Dataset.ISSUE_PLATFORM,
useCache: true,
enabled: true,
keepPreviousData: false,
Expand All @@ -139,18 +139,21 @@ function ReplaySearchBar(props: Props) {
},
{}
);
const customTags: TagCollection = useMemo(() => {
const issuePlatformTags: TagCollection = useMemo(() => {
return (tagQuery.data ?? []).reduce<TagCollection>((acc, tag) => {
acc[tag.key] = {...tag, kind: FieldKind.TAG};
return acc;
}, {});
}, [tagQuery]);
// tagQuery.isLoading and tagQuery.isError are not used

const filterKeys = useMemo(() => getReplayFilterKeys(customTags), [customTags]);
const filterKeys = useMemo(
() => getReplayFilterKeys(issuePlatformTags),
[issuePlatformTags]
);
const filterKeySections = useMemo(() => {
return getFilterKeySections(customTags, organization);
}, [customTags, organization]);
return getFilterKeySections(issuePlatformTags, organization);
}, [issuePlatformTags, organization]);

const getTagValues = useCallback(
(tag: Tag, searchQuery: string): Promise<string[]> => {
Expand Down

0 comments on commit 38350e8

Please sign in to comment.