import {browserHistory} from 'react-router'; import styled from '@emotion/styled'; import * as Sentry from '@sentry/react'; import emptyStateImg from 'sentry-images/spot/performance-empty-state.svg'; import tourAlert from 'sentry-images/spot/performance-tour-alert.svg'; import tourCorrelate from 'sentry-images/spot/performance-tour-correlate.svg'; import tourMetrics from 'sentry-images/spot/performance-tour-metrics.svg'; import tourTrace from 'sentry-images/spot/performance-tour-trace.svg'; import { addErrorMessage, addLoadingMessage, clearIndicators, } from 'app/actionCreators/indicator'; import {Client} from 'app/api'; import Button from 'app/components/button'; import ButtonBar from 'app/components/buttonBar'; import FeatureTourModal, { TourImage, TourStep, TourText, } from 'app/components/modals/featureTourModal'; import OnboardingPanel from 'app/components/onboardingPanel'; import {t} from 'app/locale'; import {Organization, Project} from 'app/types'; import trackAdvancedAnalyticsEvent from 'app/utils/analytics/trackAdvancedAnalyticsEvent'; import withApi from 'app/utils/withApi'; const performanceSetupUrl = 'https://docs.sentry.io/performance-monitoring/getting-started/'; const docsLink = ( ); export const PERFORMANCE_TOUR_STEPS: TourStep[] = [ { title: t('Track Application Metrics'), image: , body: ( {t( 'Monitor your slowest pageloads and APIs to see which users are having the worst time.' )} ), actions: docsLink, }, { title: t('Correlate Errors and Performance'), image: , body: ( {t( 'See what errors occurred within a transaction and the impact of those errors.' )} ), actions: docsLink, }, { title: t('Watch and Alert'), image: , body: ( {t( 'Highlight mission-critical pages and APIs and set latency alerts to notify you before things go wrong.' )} ), actions: docsLink, }, { title: t('Trace Across Systems'), image: , body: ( {t( "Follow a trace from a user's session and drill down to identify any bottlenecks that occur." )} ), }, ]; type Props = { organization: Organization; api: Client; project: Project; }; function Onboarding({organization, project, api}: Props) { function handleAdvance(step: number, duration: number) { trackAdvancedAnalyticsEvent('performance_views.tour.advance', { step, duration, organization, }); } function handleClose(step: number, duration: number) { trackAdvancedAnalyticsEvent('performance_views.tour.close', { step, duration, organization, }); } return ( }>

{t('Pinpoint problems')}

{t( 'Something seem slow? Track down transactions to connect the dots between 10-second page loads and poor-performing API calls or slow database queries.' )}

{({showModal}) => ( )}
); } const PerfImage = styled('img')` @media (min-width: ${p => p.theme.breakpoints[0]}) { max-width: unset; user-select: none; position: absolute; top: 75px; bottom: 0; width: 450px; margin-top: auto; margin-bottom: auto; } @media (min-width: ${p => p.theme.breakpoints[1]}) { width: 480px; } @media (min-width: ${p => p.theme.breakpoints[2]}) { width: 600px; } `; const ButtonList = styled(ButtonBar)` grid-template-columns: repeat(auto-fit, minmax(130px, max-content)); margin-bottom: 16px; `; export default withApi(Onboarding);