Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions knip.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ const productionEntryPoints = [
'static/app/components/pipeline/**/*.{js,ts,tsx}',
// TODO: Remove when used
'static/app/views/seerExplorer/contexts/**/*.{js,ts,tsx}',
// TODO: Remove when used
'static/app/components/featureShowcase.tsx',
];

const testingEntryPoints = [
Expand Down
15 changes: 10 additions & 5 deletions static/app/components/featureShowcase.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {

import {Button} from '@sentry/scraps/button';
import {Image, type ImageProps} from '@sentry/scraps/image';
import {Container, Flex, Stack} from '@sentry/scraps/layout';
import {Flex, Stack} from '@sentry/scraps/layout';
import {Heading, Text} from '@sentry/scraps/text';

import type {ModalRenderProps} from 'sentry/actionCreators/modal';
Expand Down Expand Up @@ -62,7 +62,7 @@ function StepTitle({children}: {children: ReactNode}) {
}

function StepContent({children}: {children: ReactNode}) {
return <Text as="p">{children}</Text>;
return <Stack gap="xl">{children}</Stack>;
}

/**
Expand Down Expand Up @@ -162,16 +162,21 @@ function FeatureShowcase({closeModal, children, onStepChange}: FeatureShowcasePr
};

return (
<Container data-test-id="feature-showcase">
<Stack data-test-id="feature-showcase" gap="md">
<Flex justify="end">
<Button priority="transparent" onClick={closeModal} aria-label={t('Close tour')}>
<Button
priority="transparent"
size="sm"
onClick={closeModal}
aria-label={t('Close tour')}
>
<IconClose size="xs" />
</Button>
</Flex>
<ShowcaseContext.Provider value={contextValue}>
{activeStep}
</ShowcaseContext.Provider>
</Container>
</Stack>
);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,196 @@
import {useCallback} from 'react';
import {css, type Theme} from '@emotion/react';

import monitorsTourAlertsImage from 'sentry-images/spot/monitors-tour-alerts.svg';
import monitorsTourConnectingImage from 'sentry-images/spot/monitors-tour-connecting.svg';
import monitorsTourIntroImage from 'sentry-images/spot/monitors-tour-intro.svg';
import monitorsTourMonitorsImage from 'sentry-images/spot/monitors-tour-monitors.svg';
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: should this graphic include mobile builds as well? (don't want to block the PR on this, just curious if we should try to get that in the graphic for launch)


import {Button} from '@sentry/scraps/button';
import {Stack} from '@sentry/scraps/layout';
import {ExternalLink} from '@sentry/scraps/link';
import {Text} from '@sentry/scraps/text';

import {openModal} from 'sentry/actionCreators/modal';
import {FeatureShowcase} from 'sentry/components/featureShowcase';
import {IconInfo} from 'sentry/icons';
import {t, tct} from 'sentry/locale';
import {trackAnalytics} from 'sentry/utils/analytics';
import {useOrganization} from 'sentry/utils/useOrganization';

const DOCS_URL = 'https://docs.sentry.io/product/new-monitors-and-alerts/';

export function AlertsMonitorsShowcaseButton() {
const organization = useOrganization();

const handleClick = useCallback(() => {
trackAnalytics('monitors.onboarding_modal_viewed', {organization, step: 0});
openModal(
deps => (
<FeatureShowcase
{...deps}
onStepChange={step => {
trackAnalytics('monitors.onboarding_modal_viewed', {
organization,
step,
});
}}
>
<FeatureShowcase.Step>
<FeatureShowcase.Image
src={monitorsTourIntroImage}
alt={t('Introducing Monitors and Alerts')}
/>
<FeatureShowcase.StepTitle>
{t('Introducing Monitors & Alerts')}
</FeatureShowcase.StepTitle>
<FeatureShowcase.StepContent>
{t(
'Monitors detect problems and create issues. These issues trigger Alerts to notify your team.'
)}
</FeatureShowcase.StepContent>
Comment thread
malwilley marked this conversation as resolved.
<FeatureShowcase.StepActions />
</FeatureShowcase.Step>
<FeatureShowcase.Step>
<FeatureShowcase.Image
src={monitorsTourMonitorsImage}
alt={t('Monitors detect problems and create issues')}
/>
<FeatureShowcase.StepTitle>
{t('Monitors detect problems and create issues')}
</FeatureShowcase.StepTitle>
<FeatureShowcase.StepContent>
<Text>
{t(
'Set conditions across your data and when a threshold is breached, Sentry creates an issue.'
)}
</Text>
<Stack gap="sm">
<Text bold>{t('Types of Monitors:')}</Text>
<ul>
<li>
<Text>
<Text bold as="span">
{t('Metric')}
</Text>
{' — '}
{t('span attributes, logs, custom metrics, and more')}
</Text>
</li>
<li>
<Text>
<Text bold as="span">
{t('Cron')}
</Text>
{' — '}
{t('scheduled, recurring job health')}
</Text>
</li>
<li>
<Text>
<Text bold as="span">
{t('Uptime')}
</Text>
{' — '}
{t('service availability and reliability')}
</Text>
</li>
<li>
<Text>
<Text bold as="span">
{t('Mobile Builds')}
</Text>
{' — '}
{t('build size and regressions')}
</Text>
</li>
<li>
<Text>
<Text bold as="span">
{t('Error')}
</Text>{' '}
{t('(managed by Sentry)')}
{' — '}
{t(
'groups incoming errors into issues based on your project settings'
)}
</Text>
</li>
</ul>
</Stack>
</FeatureShowcase.StepContent>
<FeatureShowcase.StepActions />
</FeatureShowcase.Step>
<FeatureShowcase.Step>
<FeatureShowcase.Image
src={monitorsTourAlertsImage}
alt={t('Alerts notify your team')}
/>
<FeatureShowcase.StepTitle>
{t('Alerts notify your team')}
</FeatureShowcase.StepTitle>
<FeatureShowcase.StepContent>
<Text>
{t(
'Alerts notify your team. Define who gets paged, when, and how — via Slack, email, PagerDuty, and more.'
)}
</Text>
<Text>
{t(
'Scale and connect to many monitors, projects, and issue types. Configure your routing so the right people get notified when it matters.'
)}
</Text>
</FeatureShowcase.StepContent>
<FeatureShowcase.StepActions />
</FeatureShowcase.Step>
<FeatureShowcase.Step>
<FeatureShowcase.Image
src={monitorsTourConnectingImage}
alt={t('Connecting Alerts and Monitors')}
/>
<FeatureShowcase.StepTitle>
{t('Connecting Alerts & Monitors')}
</FeatureShowcase.StepTitle>
<FeatureShowcase.StepContent>
<Text>
{t(
'When creating a Monitor you have the option of setting up a new Alert or connecting to an existing Alert at the same time.'
)}
</Text>
<Text>
{t(
'When creating or editing Alerts you can connect to existing routing without ever touching your Monitor logic.'
)}
</Text>
<Text>
{tct('For more information, [link:read the docs].', {
link: <ExternalLink href={DOCS_URL} />,
})}
</Text>
</FeatureShowcase.StepContent>
<FeatureShowcase.StepActions />
</FeatureShowcase.Step>
</FeatureShowcase>
),
{
modalCss: (theme: Theme) => css`
width: 490px;

[role='document'] {
padding: ${theme.space['2xl']};
padding-top: ${theme.space.lg};
}
`,
}
);
}, [organization]);

return (
<Button
size="sm"
icon={<IconInfo />}
onClick={handleClick}
aria-label={t('Feature tour')}
/>
);
}
2 changes: 2 additions & 0 deletions static/app/utils/analytics/monitorsAnalyticsEvents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export type MonitorsEventParameters = {
};
'monitor.created': DetectorCreateAnalyticsEventPayload;
'monitor.updated': DetectorAnalyticsEventPayload;
'monitors.onboarding_modal_viewed': {step: number};
};

type MonitorsAnalyticsKey = keyof MonitorsEventParameters;
Expand All @@ -38,4 +39,5 @@ export const monitorsEventMap: Record<MonitorsAnalyticsKey, string> = {
'monitor.updated': 'Detectors: Updated',
'automation.created': 'Automations: Created',
'automation.updated': 'Automations: Updated',
'monitors.onboarding_modal_viewed': 'Monitors: Onboarding Modal Viewed',
};
2 changes: 2 additions & 0 deletions static/app/views/automations/list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {ProjectPageFilter} from 'sentry/components/pageFilters/project/projectPa
import {usePageFilters} from 'sentry/components/pageFilters/usePageFilters';
import {Pagination} from 'sentry/components/pagination';
import {SentryDocumentTitle} from 'sentry/components/sentryDocumentTitle';
import {AlertsMonitorsShowcaseButton} from 'sentry/components/workflowEngine/alertsMonitorsShowcaseButton';
import {WorkflowEngineListLayout as ListLayout} from 'sentry/components/workflowEngine/layout/list';
import {IconAdd} from 'sentry/icons';
import {t} from 'sentry/locale';
Expand Down Expand Up @@ -151,6 +152,7 @@ function Actions() {
const organization = useOrganization();
return (
<Flex gap="sm">
<AlertsMonitorsShowcaseButton />
<AutomationFeedbackButton />
<LinkButton
to={makeAutomationCreatePathname(organization.slug)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {Flex} from '@sentry/scraps/layout';

import {ALL_ACCESS_PROJECTS} from 'sentry/components/pageFilters/constants';
import {usePageFilters} from 'sentry/components/pageFilters/usePageFilters';
import {AlertsMonitorsShowcaseButton} from 'sentry/components/workflowEngine/alertsMonitorsShowcaseButton';
import {IconAdd} from 'sentry/icons';
import {t} from 'sentry/locale';
import type {DetectorType} from 'sentry/types/workflowEngine/detectors';
Expand All @@ -26,6 +27,7 @@ export function DetectorListActions({children, detectorType}: DetectorListAction

return (
<Flex gap="sm">
<AlertsMonitorsShowcaseButton />
{children}
<MonitorFeedbackButton />
<LinkButton
Expand Down
Loading
Loading