panelContent.tsx 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. import diagramApdex from 'sentry-images/spot/alerts-wizard-apdex.svg';
  2. import diagramCLS from 'sentry-images/spot/alerts-wizard-cls.svg';
  3. import diagramCrashFreeSessions from 'sentry-images/spot/alerts-wizard-crash-free-sessions.svg';
  4. import diagramCrashFreeUsers from 'sentry-images/spot/alerts-wizard-crash-free-users.svg';
  5. import diagramCustom from 'sentry-images/spot/alerts-wizard-custom.svg';
  6. import diagramErrors from 'sentry-images/spot/alerts-wizard-errors.svg';
  7. import diagramFailureRate from 'sentry-images/spot/alerts-wizard-failure-rate.svg';
  8. import diagramFID from 'sentry-images/spot/alerts-wizard-fid.svg';
  9. import diagramIssues from 'sentry-images/spot/alerts-wizard-issues.svg';
  10. import diagramLCP from 'sentry-images/spot/alerts-wizard-lcp.svg';
  11. import diagramThroughput from 'sentry-images/spot/alerts-wizard-throughput.svg';
  12. import diagramTransactionDuration from 'sentry-images/spot/alerts-wizard-transaction-duration.svg';
  13. import diagramUsers from 'sentry-images/spot/alerts-wizard-users-experiencing-errors.svg';
  14. import {t} from 'sentry/locale';
  15. import {AlertType} from './options';
  16. type PanelContent = {
  17. description: string;
  18. examples: string[];
  19. docsLink?: string;
  20. illustration?: string;
  21. };
  22. export const AlertWizardPanelContent: Record<AlertType, PanelContent> = {
  23. issues: {
  24. description: t(
  25. 'Issues are groups of errors that have a similar stacktrace. Set an alert for new issues, when an issue changes state, frequency of errors, or users affected by an issue.'
  26. ),
  27. examples: [
  28. t("When the triggering event's level is fatal."),
  29. t('When an issue was seen 100 times in the last 2 days.'),
  30. t(
  31. 'Create a JIRA ticket when an issue changes state from resolved to unresolved and is unassigned.'
  32. ),
  33. ],
  34. illustration: diagramIssues,
  35. },
  36. num_errors: {
  37. description: t(
  38. 'Alert when the number of errors in a project matching your filters crosses a threshold. This is useful for monitoring the overall level or errors in your project or errors occurring in specific parts of your app.'
  39. ),
  40. examples: [
  41. t('When the signup page has more than 10k errors in 5 minutes.'),
  42. t('When there are more than 500k errors in 10 minutes from a specific file.'),
  43. ],
  44. illustration: diagramErrors,
  45. },
  46. users_experiencing_errors: {
  47. description: t(
  48. 'Alert when the number of users affected by errors in your project crosses a threshold.'
  49. ),
  50. examples: [
  51. t('When 100k users experience an error in 1 hour.'),
  52. t('When 100 users experience a problem on the Checkout page.'),
  53. ],
  54. illustration: diagramUsers,
  55. },
  56. throughput: {
  57. description: t(
  58. 'Throughput is the total number of transactions in a project and you can alert when it reaches a threshold within a period of time.'
  59. ),
  60. examples: [
  61. t('When number of transactions on a key page exceeds 100k per minute.'),
  62. t('When number of transactions drops below a threshold.'),
  63. ],
  64. illustration: diagramThroughput,
  65. },
  66. trans_duration: {
  67. description: t(
  68. 'Monitor how long it takes for transactions to complete. Use flexible aggregates like percentiles, averages, and min/max.'
  69. ),
  70. examples: [
  71. t('When any transaction is slower than 3 seconds.'),
  72. t('When the 75th percentile response time is higher than 250 milliseconds.'),
  73. ],
  74. illustration: diagramTransactionDuration,
  75. },
  76. apdex: {
  77. description: t(
  78. 'Apdex is a metric used to track and measure user satisfaction based on your application response times. The Apdex score provides the ratio of satisfactory, tolerable, and frustrated requests in a specific transaction or endpoint.'
  79. ),
  80. examples: [t('When apdex is below 300.')],
  81. docsLink: 'https://docs.sentry.io/product/performance/metrics/#apdex',
  82. illustration: diagramApdex,
  83. },
  84. failure_rate: {
  85. description: t(
  86. 'Failure rate is the percentage of unsuccessful transactions. Sentry treats transactions with a status other than “ok,” “canceled,” and “unknown” as failures.'
  87. ),
  88. examples: [t('When the failure rate for an important endpoint reaches 10%.')],
  89. docsLink: 'https://docs.sentry.io/product/performance/metrics/#failure-rate',
  90. illustration: diagramFailureRate,
  91. },
  92. lcp: {
  93. description: t(
  94. 'Largest Contentful Paint (LCP) measures loading performance. It marks the point when the largest image or text block is visible within the viewport. A fast LCP helps reassure the user that the page is useful, and so we recommend an LCP of less than 2.5 seconds.'
  95. ),
  96. examples: [
  97. t('When the 75th percentile LCP of your homepage is longer than 2.5 seconds.'),
  98. ],
  99. docsLink: 'https://docs.sentry.io/product/performance/web-vitals',
  100. illustration: diagramLCP,
  101. },
  102. fid: {
  103. description: t(
  104. 'First Input Delay (FID) measures interactivity as the response time when the user tries to interact with the viewport. A low FID helps ensure that a page is useful, and we recommend a FID of less than 100 milliseconds.'
  105. ),
  106. examples: [t('When the average FID of a page is longer than 4 seconds.')],
  107. docsLink: 'https://docs.sentry.io/product/performance/web-vitals',
  108. illustration: diagramFID,
  109. },
  110. cls: {
  111. description: t(
  112. 'Cumulative Layout Shift (CLS) measures visual stability by quantifying unexpected layout shifts that occur during the entire lifespan of the page. A CLS of less than 0.1 is a good user experience, while anything greater than 0.25 is poor.'
  113. ),
  114. examples: [t('When the CLS of a page is more than 0.5.')],
  115. docsLink: 'https://docs.sentry.io/product/performance/web-vitals',
  116. illustration: diagramCLS,
  117. },
  118. custom: {
  119. description: t(
  120. 'Alert on metrics which are not listed above, such as first paint (FP), first contentful paint (FCP), and time to first byte (TTFB).'
  121. ),
  122. examples: [
  123. t('When the 95th percentile FP of a page is longer than 250 milliseconds.'),
  124. t('When the average TTFB of a page is longer than 600 millliseconds.'),
  125. ],
  126. illustration: diagramCustom,
  127. },
  128. crash_free_sessions: {
  129. description: t(
  130. 'A session begins when a user starts the application and ends when it’s closed or sent to the background. A crash is when a session ends due to an error and this type of alert lets you monitor when those crashed sessions exceed a threshold. This lets you get a better picture of the health of your app.'
  131. ),
  132. examples: [
  133. t('When the Crash Free Rate is below 98%, send a Slack notification to the team.'),
  134. ],
  135. illustration: diagramCrashFreeSessions,
  136. },
  137. crash_free_users: {
  138. description: t(
  139. 'Crash Free Users is the percentage of distinct users that haven’t experienced a crash and so this type of alert tells you when the overall user experience dips below a certain unacceptable threshold.'
  140. ),
  141. examples: [
  142. t('When the Crash Free Rate is below 97%, send an email notification to yourself.'),
  143. ],
  144. illustration: diagramCrashFreeUsers,
  145. },
  146. };