panelContent.tsx 8.9 KB

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