Skip to content

Commit e26ca7b

Browse files
MichaelSun48andrewshie-sentry
authored andcommitted
feat(taxonomy): Add setup prompts to empty states (#91828)
Adds a bullet point to the taxonomy views (except user feedback) prompting users to setup telemetry that would populate those views: **Errors & Outages:** ![image](https://github.com/user-attachments/assets/d14e9a59-1e9e-42ca-a85c-c2a7f59a2127) **Breached Metrics & Warnings:** ![image](https://github.com/user-attachments/assets/17a46c0a-e855-401d-bca1-b1f87306b2ee)
1 parent 5a8daf3 commit e26ca7b

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

static/app/views/issueList/noGroupsHandler/noIssuesMatched.tsx

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,19 @@ import {navigateTo} from 'sentry/actionCreators/navigation';
66
import ExternalLink from 'sentry/components/links/externalLink';
77
import {t, tct} from 'sentry/locale';
88
import {space} from 'sentry/styles/space';
9+
import {useLocation} from 'sentry/utils/useLocation';
910
import useOrganization from 'sentry/utils/useOrganization';
1011
import useRouter from 'sentry/utils/useRouter';
1112

1213
function NoIssuesMatched() {
1314
const organization = useOrganization();
1415
const router = useRouter();
16+
17+
const location = useLocation();
18+
const onBreachedMetricsView = location.pathname.endsWith('/issues/breached-metrics/');
19+
const onWarningsView = location.pathname.endsWith('/issues/warnings/');
20+
const onErrorsAndOutagesView = location.pathname.endsWith('/issues/errors-outages/');
21+
1522
return (
1623
<Wrapper data-test-id="empty-state" className="empty-state">
1724
<img src={campingImg} alt="Camping spot illustration" height={200} />
@@ -48,6 +55,36 @@ function NoIssuesMatched() {
4855
}
4956
)}
5057
</li>
58+
{(onBreachedMetricsView || onWarningsView) && (
59+
<li>
60+
{tct('Make sure [link] is set up in your project.', {
61+
link: (
62+
<ExternalLink href="https://docs.sentry.io/platform-redirect/?next=%2Ftracing%2F">
63+
{t('tracing')}
64+
</ExternalLink>
65+
),
66+
})}
67+
</li>
68+
)}
69+
{onErrorsAndOutagesView && (
70+
<li>
71+
{tct(
72+
'Make sure [uptimeLink] and [cronsLink] monitoring is set up in your project.',
73+
{
74+
uptimeLink: (
75+
<ExternalLink href="https://docs.sentry.io/product/alerts/uptime-monitoring/">
76+
{t('uptime')}
77+
</ExternalLink>
78+
),
79+
cronsLink: (
80+
<ExternalLink href="https://docs.sentry.io/platform-redirect/?next=%2Fcrons%2F">
81+
{t('cron')}
82+
</ExternalLink>
83+
),
84+
}
85+
)}
86+
</li>
87+
)}
5188
</Tips>
5289
</MessageContainer>
5390
</Wrapper>

0 commit comments

Comments
 (0)