panelContent.tsx 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  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 diagramCustomTransaction from 'sentry-images/spot/alerts-wizard-custom.svg';
  6. import diagramCustomMetrics from 'sentry-images/spot/alerts-wizard-custom-metrics.svg';
  7. import diagramErrors from 'sentry-images/spot/alerts-wizard-errors.svg';
  8. import diagramFailureRate from 'sentry-images/spot/alerts-wizard-failure-rate.svg';
  9. import diagramFID from 'sentry-images/spot/alerts-wizard-fid.svg';
  10. import diagramIssues from 'sentry-images/spot/alerts-wizard-issues.svg';
  11. import diagramLCP from 'sentry-images/spot/alerts-wizard-lcp.svg';
  12. import diagramThroughput from 'sentry-images/spot/alerts-wizard-throughput.svg';
  13. import diagramTransactionDuration from 'sentry-images/spot/alerts-wizard-transaction-duration.svg';
  14. import diagramUsers from 'sentry-images/spot/alerts-wizard-users-experiencing-errors.svg';
  15. import {t} from 'sentry/locale';
  16. import {AlertType} from './options';
  17. type PanelContent = {
  18. description: string;
  19. examples: string[];
  20. docsLink?: string;
  21. illustration?: string;
  22. };
  23. export const AlertWizardPanelContent: Record<AlertType, PanelContent> = {
  24. issues: {
  25. description: t(
  26. '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.'
  27. ),
  28. examples: [
  29. t("When the triggering event's level is fatal."),
  30. t('When an issue was seen 100 times in the last 2 days.'),
  31. t(
  32. 'Create a JIRA ticket when an issue changes state from resolved to unresolved and is unassigned.'
  33. ),
  34. ],
  35. illustration: diagramIssues,
  36. },
  37. num_errors: {
  38. description: t(
  39. '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.'
  40. ),
  41. examples: [
  42. t('When the signup page has more than 10k errors in 5 minutes.'),
  43. t('When there are more than 500k errors in 10 minutes from a specific file.'),
  44. ],
  45. illustration: diagramErrors,
  46. },
  47. users_experiencing_errors: {
  48. description: t(
  49. 'Alert when the number of users affected by errors in your project crosses a threshold.'
  50. ),
  51. examples: [
  52. t('When 100k users experience an error in 1 hour.'),
  53. t('When 100 users experience a problem on the Checkout page.'),
  54. ],
  55. illustration: diagramUsers,
  56. },
  57. throughput: {
  58. description: t(
  59. 'Throughput is the total number of transactions in a project and you can alert when it reaches a threshold within a period of time.'
  60. ),
  61. examples: [
  62. t('When number of transactions on a key page exceeds 100k per minute.'),
  63. t('When number of transactions drops below a threshold.'),
  64. ],
  65. illustration: diagramThroughput,
  66. },
  67. trans_duration: {
  68. description: t(
  69. 'Monitor how long it takes for transactions to complete. Use flexible aggregates like percentiles, averages, and min/max.'
  70. ),
  71. examples: [
  72. t('When any transaction is slower than 3 seconds.'),
  73. t('When the 75th percentile response time is higher than 250 milliseconds.'),
  74. ],
  75. illustration: diagramTransactionDuration,
  76. },
  77. apdex: {
  78. description: t(
  79. '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.'
  80. ),
  81. examples: [t('When apdex is below 300.')],
  82. docsLink: 'https://docs.sentry.io/product/performance/metrics/#apdex',
  83. illustration: diagramApdex,
  84. },
  85. failure_rate: {
  86. description: t(
  87. 'Failure rate is the percentage of unsuccessful transactions. Sentry treats transactions with a status other than “ok,” “canceled,” and “unknown” as failures.'
  88. ),
  89. examples: [t('When the failure rate for an important endpoint reaches 10%.')],
  90. docsLink: 'https://docs.sentry.io/product/performance/metrics/#failure-rate',
  91. illustration: diagramFailureRate,
  92. },
  93. lcp: {
  94. description: t(
  95. '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.'
  96. ),
  97. examples: [
  98. t('When the 75th percentile LCP of your homepage is longer than 2.5 seconds.'),
  99. ],
  100. docsLink: 'https://docs.sentry.io/product/performance/web-vitals',
  101. illustration: diagramLCP,
  102. },
  103. fid: {
  104. description: t(
  105. '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.'
  106. ),
  107. examples: [t('When the average FID of a page is longer than 4 seconds.')],
  108. docsLink: 'https://docs.sentry.io/product/performance/web-vitals',
  109. illustration: diagramFID,
  110. },
  111. cls: {
  112. description: t(
  113. '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.'
  114. ),
  115. examples: [t('When the CLS of a page is more than 0.5.')],
  116. docsLink: 'https://docs.sentry.io/product/performance/web-vitals',
  117. illustration: diagramCLS,
  118. },
  119. custom_transactions: {
  120. description: t(
  121. 'Alert on performance metrics which are not listed above, such as first paint (FP), first contentful paint (FCP), and time to first byte (TTFB).'
  122. ),
  123. examples: [
  124. t('When the 95th percentile FP of a page is longer than 250 milliseconds.'),
  125. t('When the average TTFB of a page is longer than 600 millliseconds.'),
  126. ],
  127. illustration: diagramCustomTransaction,
  128. },
  129. custom_metrics: {
  130. description: t(
  131. 'Alert on custom metrics that you have configured and are not related to errors, transactions or sessions.'
  132. ),
  133. examples: [
  134. t('When the number of sign-ups dropped by 10% compared to the previous week.'),
  135. t(
  136. 'When the 75th percentile of your login flow is taking longer than 500 milliseconds.'
  137. ),
  138. ],
  139. illustration: diagramCustomMetrics,
  140. },
  141. crash_free_sessions: {
  142. description: t(
  143. '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.'
  144. ),
  145. examples: [
  146. t('When the Crash Free Rate is below 98%, send a Slack notification to the team.'),
  147. ],
  148. illustration: diagramCrashFreeSessions,
  149. },
  150. crash_free_users: {
  151. description: t(
  152. '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.'
  153. ),
  154. examples: [
  155. t('When the Crash Free Rate is below 97%, send an email notification to yourself.'),
  156. ],
  157. illustration: diagramCrashFreeUsers,
  158. },
  159. };