panelContent.tsx 9.0 KB

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