Skip to content

Commit 1c865c9

Browse files
ref(feedback): update associated event section if no event exists (#91677)
before: <img width="727" alt="SCR-20250514-ncua" src="https://github.com/user-attachments/assets/b2ec6753-9231-4532-8b16-391a0726d749" /> after: <img width="794" alt="SCR-20250514-nden" src="https://github.com/user-attachments/assets/5d662353-286c-4b99-96b1-00406fa6b3de" /> also adds analytic tracking when the banner shows up, along w/ org slug. --------- Co-authored-by: Andrew Liu <159852527+aliu39@users.noreply.github.com>
1 parent df9b7d0 commit 1c865c9

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

static/app/components/feedback/feedbackItem/crashReportSection.tsx

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import {useEffect} from 'react';
12
import styled from '@emotion/styled';
23

34
import {Alert} from 'sentry/components/core/alert';
@@ -8,6 +9,7 @@ import Placeholder from 'sentry/components/placeholder';
89
import {tct} from 'sentry/locale';
910
import {space} from 'sentry/styles/space';
1011
import type {Organization} from 'sentry/types/organization';
12+
import {trackAnalytics} from 'sentry/utils/analytics';
1113

1214
interface Props {
1315
crashReportId: string;
@@ -26,14 +28,26 @@ export default function CrashReportSection({
2628
projectSlug,
2729
});
2830

31+
useEffect(() => {
32+
if (!groupData) {
33+
trackAnalytics('feedback.no_associated_event_found', {
34+
orgSlug: organization.slug,
35+
organization,
36+
});
37+
}
38+
}, [organization, groupData]);
39+
2940
if (isFetching) {
3041
return <Placeholder height="92px" />;
3142
}
3243

3344
if (!groupData) {
3445
return (
35-
<Alert type="error" showIcon>
36-
{tct('Unable to find error [id]', {id: crashReportId})}
46+
<Alert type="warning" showIcon>
47+
{tct(
48+
'Event [id] was linked but not found in this project. The event might have been dropped or the ID may be incorrect.',
49+
{id: crashReportId}
50+
)}
3751
</Alert>
3852
);
3953
}

static/app/utils/analytics/feedbackAnalyticsEvents.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export type FeedbackEventParameters = {
88
'feedback.list-item-selected': Record<string, unknown>;
99
'feedback.list-view-setup-sidebar': {platform: string};
1010
'feedback.mark-spam-clicked': {type: 'bulk' | 'details'};
11+
'feedback.no_associated_event_found': {orgSlug: string};
1112
'feedback.trace-section.crash-report-dup': Record<string, unknown>;
1213
'feedback.trace-section.error': Record<string, unknown>;
1314
'feedback.trace-section.loaded': {numEvents: number};
@@ -32,4 +33,5 @@ export const feedbackEventMap: Record<FeedbackEventKey, string | null> = {
3233
'The Only Same-trace Issue Matches Associated Event ID',
3334
'feedback.trace-section.error': 'Error Fetching Trace Data in Feedback Details',
3435
'feedback.trace-section.loaded': 'Fetched Same-trace Issue Data in Feedback Details',
36+
'feedback.no_associated_event_found': 'Associated Event Not Found in Feedback',
3537
};

0 commit comments

Comments
 (0)