data.tsx 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884
  1. import {t} from 'sentry/locale';
  2. import {uniqueId} from 'sentry/utils/guid';
  3. import {DashboardDetails, DisplayType, WidgetType} from './types';
  4. type DashboardTemplate = DashboardDetails & {
  5. description: string;
  6. };
  7. export const EMPTY_DASHBOARD: DashboardDetails = {
  8. id: '',
  9. dateCreated: '',
  10. createdBy: undefined,
  11. title: t('Untitled dashboard'),
  12. widgets: [],
  13. };
  14. export const DASHBOARDS_TEMPLATES: DashboardTemplate[] = [
  15. {
  16. id: 'default-template',
  17. dateCreated: '',
  18. createdBy: undefined,
  19. title: t('General Template'),
  20. description: t('Various Frontend and Backend Widgets'),
  21. widgets: [
  22. {
  23. title: t('Number of Errors'),
  24. displayType: DisplayType.BIG_NUMBER,
  25. interval: '5m',
  26. queries: [
  27. {
  28. name: '',
  29. fields: ['count()'],
  30. conditions: '!event.type:transaction',
  31. orderby: 'count()',
  32. },
  33. ],
  34. widgetType: WidgetType.DISCOVER,
  35. tempId: uniqueId(),
  36. },
  37. {
  38. title: t('Number of Issues'),
  39. displayType: DisplayType.BIG_NUMBER,
  40. interval: '5m',
  41. queries: [
  42. {
  43. name: '',
  44. fields: ['count_unique(issue)'],
  45. conditions: '!event.type:transaction',
  46. orderby: 'count_unique(issue)',
  47. },
  48. ],
  49. widgetType: WidgetType.DISCOVER,
  50. tempId: uniqueId(),
  51. },
  52. {
  53. title: t('Events'),
  54. displayType: DisplayType.LINE,
  55. interval: '5m',
  56. queries: [
  57. {
  58. name: t('Events'),
  59. fields: ['count()'],
  60. conditions: '!event.type:transaction',
  61. orderby: 'count()',
  62. },
  63. ],
  64. widgetType: WidgetType.DISCOVER,
  65. tempId: uniqueId(),
  66. },
  67. {
  68. title: t('Affected Users'),
  69. displayType: DisplayType.LINE,
  70. interval: '5m',
  71. queries: [
  72. {
  73. name: t('Known Users'),
  74. fields: ['count_unique(user)'],
  75. conditions: 'has:user.email !event.type:transaction',
  76. orderby: 'count_unique(user)',
  77. },
  78. {
  79. name: t('Anonymous Users'),
  80. fields: ['count_unique(user)'],
  81. conditions: '!has:user.email !event.type:transaction',
  82. orderby: 'count_unique(user)',
  83. },
  84. ],
  85. widgetType: WidgetType.DISCOVER,
  86. tempId: uniqueId(),
  87. },
  88. {
  89. title: t('Handled vs. Unhandled'),
  90. displayType: DisplayType.LINE,
  91. interval: '5m',
  92. queries: [
  93. {
  94. name: t('Handled'),
  95. fields: ['count()'],
  96. conditions: 'error.handled:true',
  97. orderby: 'count()',
  98. },
  99. {
  100. name: t('Unhandled'),
  101. fields: ['count()'],
  102. conditions: 'error.handled:false',
  103. orderby: 'count()',
  104. },
  105. ],
  106. widgetType: WidgetType.DISCOVER,
  107. tempId: uniqueId(),
  108. },
  109. {
  110. title: t('Errors by Country'),
  111. displayType: DisplayType.WORLD_MAP,
  112. interval: '5m',
  113. queries: [
  114. {
  115. name: t('Error counts'),
  116. fields: ['count()'],
  117. conditions: '!event.type:transaction has:geo.country_code',
  118. orderby: 'count()',
  119. },
  120. ],
  121. widgetType: WidgetType.DISCOVER,
  122. tempId: uniqueId(),
  123. },
  124. {
  125. title: t('High Throughput Transactions'),
  126. displayType: DisplayType.TABLE,
  127. interval: '5m',
  128. queries: [
  129. {
  130. name: '',
  131. fields: ['count()', 'transaction'],
  132. conditions: '!event.type:error',
  133. orderby: '-count',
  134. },
  135. ],
  136. widgetType: WidgetType.DISCOVER,
  137. tempId: uniqueId(),
  138. },
  139. {
  140. title: t('Errors by Browser'),
  141. displayType: DisplayType.TABLE,
  142. interval: '5m',
  143. queries: [
  144. {
  145. name: '',
  146. fields: ['browser.name', 'count()'],
  147. conditions: '!event.type:transaction has:browser.name',
  148. orderby: '-count',
  149. },
  150. ],
  151. widgetType: WidgetType.DISCOVER,
  152. tempId: uniqueId(),
  153. },
  154. {
  155. title: t('Overall User Misery'),
  156. displayType: DisplayType.BIG_NUMBER,
  157. interval: '5m',
  158. queries: [
  159. {
  160. name: '',
  161. fields: ['user_misery(300)'],
  162. conditions: '',
  163. orderby: '',
  164. },
  165. ],
  166. widgetType: WidgetType.DISCOVER,
  167. tempId: uniqueId(),
  168. },
  169. {
  170. title: t('High Throughput Transactions'),
  171. displayType: DisplayType.TOP_N,
  172. interval: '5m',
  173. queries: [
  174. {
  175. name: '',
  176. fields: ['transaction', 'count()'],
  177. conditions: '!event.type:error',
  178. orderby: '-count',
  179. },
  180. ],
  181. widgetType: WidgetType.DISCOVER,
  182. tempId: uniqueId(),
  183. },
  184. {
  185. title: t('Issues Assigned to Me or My Teams'),
  186. displayType: DisplayType.TABLE,
  187. interval: '5m',
  188. queries: [
  189. {
  190. name: '',
  191. fields: ['assignee', 'issue', 'title'],
  192. conditions: 'assigned_or_suggested:me is:unresolved',
  193. orderby: 'priority',
  194. },
  195. ],
  196. widgetType: WidgetType.ISSUE,
  197. tempId: uniqueId(),
  198. },
  199. {
  200. title: t('Transactions Ordered by Misery'),
  201. displayType: DisplayType.TABLE,
  202. interval: '5m',
  203. queries: [
  204. {
  205. name: '',
  206. fields: ['transaction', 'user_misery(300)'],
  207. conditions: '',
  208. orderby: '-user_misery_300',
  209. },
  210. ],
  211. widgetType: WidgetType.DISCOVER,
  212. tempId: uniqueId(),
  213. },
  214. ],
  215. },
  216. {
  217. id: 'frontend-template',
  218. title: t('Frontend Template'),
  219. dateCreated: '',
  220. createdBy: undefined,
  221. description: t('Erroring URLs and Web Vitals'),
  222. widgets: [
  223. {
  224. title: t('Top 5 Issues by Unique Users Over Time'),
  225. displayType: DisplayType.TOP_N,
  226. interval: '5m',
  227. queries: [
  228. {
  229. name: '',
  230. fields: ['issue', 'count_unique(user)'],
  231. conditions: '',
  232. orderby: '-count_unique_user',
  233. },
  234. ],
  235. widgetType: WidgetType.DISCOVER,
  236. tempId: uniqueId(),
  237. },
  238. {
  239. title: t('Errors by Browser as Percentage'),
  240. displayType: DisplayType.AREA,
  241. interval: '5m',
  242. queries: [
  243. {
  244. name: '',
  245. fields: [
  246. 'equation|count_if(browser.name,equals,Chrome)/count() * 100',
  247. 'equation|count_if(browser.name,equals,Firefox)/count() * 100',
  248. 'equation|count_if(browser.name,equals,Safari)/count() * 100',
  249. ],
  250. conditions: 'has:browser.name',
  251. orderby: '',
  252. },
  253. ],
  254. widgetType: WidgetType.DISCOVER,
  255. tempId: uniqueId(),
  256. },
  257. {
  258. title: t('Issues Assigned to Me or My Teams'),
  259. displayType: DisplayType.TABLE,
  260. interval: '5m',
  261. queries: [
  262. {
  263. name: '',
  264. fields: ['assignee', 'issue', 'title'],
  265. conditions: 'assigned_or_suggested:me is:unresolved',
  266. orderby: 'priority',
  267. },
  268. ],
  269. widgetType: WidgetType.ISSUE,
  270. tempId: uniqueId(),
  271. },
  272. {
  273. title: t('Top 5 Issues by Unique Users'),
  274. displayType: DisplayType.TABLE,
  275. interval: '5m',
  276. queries: [
  277. {
  278. name: '',
  279. fields: ['issue', 'count_unique(user)', 'title'],
  280. conditions: '',
  281. orderby: '-count_unique_user',
  282. },
  283. ],
  284. widgetType: WidgetType.DISCOVER,
  285. tempId: uniqueId(),
  286. },
  287. {
  288. title: t('URLs grouped by Issue'),
  289. displayType: DisplayType.TABLE,
  290. interval: '5m',
  291. queries: [
  292. {
  293. name: '',
  294. fields: ['http.url', 'issue', 'count_unique(user)'],
  295. conditions: 'event.type:error',
  296. orderby: '-count_unique_user',
  297. },
  298. ],
  299. widgetType: WidgetType.DISCOVER,
  300. tempId: uniqueId(),
  301. },
  302. {
  303. title: t('Transactions 404ing'),
  304. displayType: DisplayType.TABLE,
  305. interval: '5m',
  306. queries: [
  307. {
  308. name: '',
  309. fields: ['transaction', 'count()'],
  310. conditions: 'transaction.status:not_found',
  311. orderby: '-count',
  312. },
  313. ],
  314. widgetType: WidgetType.DISCOVER,
  315. tempId: uniqueId(),
  316. },
  317. {
  318. title: t('Layout Shift Over Time'),
  319. displayType: DisplayType.LINE,
  320. interval: '5m',
  321. queries: [
  322. {
  323. name: '',
  324. fields: ['p75(measurements.cls)'],
  325. conditions: '',
  326. orderby: '',
  327. },
  328. ],
  329. widgetType: WidgetType.DISCOVER,
  330. tempId: uniqueId(),
  331. },
  332. {
  333. title: t('LCP by Country'),
  334. displayType: DisplayType.WORLD_MAP,
  335. interval: '5m',
  336. queries: [
  337. {
  338. name: '',
  339. fields: ['p75(measurements.lcp)'],
  340. conditions: 'has:geo.country_code',
  341. orderby: '',
  342. },
  343. ],
  344. widgetType: WidgetType.DISCOVER,
  345. tempId: uniqueId(),
  346. },
  347. {
  348. title: t('Page Load Over Time'),
  349. displayType: DisplayType.LINE,
  350. interval: '5m',
  351. queries: [
  352. {
  353. name: '',
  354. fields: ['p75(measurements.lcp)', 'p75(measurements.fcp)'],
  355. conditions: 'transaction.op:pageload',
  356. orderby: '',
  357. },
  358. ],
  359. widgetType: WidgetType.DISCOVER,
  360. tempId: uniqueId(),
  361. },
  362. {
  363. title: t('Slowest Pageloads'),
  364. displayType: DisplayType.TABLE,
  365. interval: '5m',
  366. queries: [
  367. {
  368. name: '',
  369. fields: ['transaction', 'count()'],
  370. conditions: 'transaction.op:pageload p75(measurements.lcp):>4s',
  371. orderby: '-count',
  372. },
  373. ],
  374. widgetType: WidgetType.DISCOVER,
  375. tempId: uniqueId(),
  376. },
  377. {
  378. title: t('Overall LCP'),
  379. displayType: DisplayType.BIG_NUMBER,
  380. interval: '5m',
  381. queries: [
  382. {
  383. name: '',
  384. fields: ['p75(measurements.lcp)'],
  385. conditions: '',
  386. orderby: '',
  387. },
  388. ],
  389. widgetType: WidgetType.DISCOVER,
  390. tempId: uniqueId(),
  391. },
  392. {
  393. title: t('Slow Page Navigations'),
  394. displayType: DisplayType.TABLE,
  395. interval: '5m',
  396. queries: [
  397. {
  398. name: '',
  399. fields: ['transaction', 'count()'],
  400. conditions: 'transaction.duration:>2s',
  401. orderby: '-count',
  402. },
  403. ],
  404. widgetType: WidgetType.DISCOVER,
  405. tempId: uniqueId(),
  406. },
  407. {
  408. title: t('Overall FCP'),
  409. displayType: DisplayType.BIG_NUMBER,
  410. interval: '5m',
  411. queries: [
  412. {
  413. name: '',
  414. fields: ['p75(measurements.fcp)'],
  415. conditions: '',
  416. orderby: '',
  417. },
  418. ],
  419. widgetType: WidgetType.DISCOVER,
  420. tempId: uniqueId(),
  421. },
  422. ],
  423. },
  424. {
  425. id: 'backend-template',
  426. title: t('Backend Template'),
  427. dateCreated: '',
  428. createdBy: undefined,
  429. description: t('Issues and Performance'),
  430. widgets: [
  431. {
  432. title: t('Top 5 Issues by Unique Users Over Time'),
  433. displayType: DisplayType.TOP_N,
  434. interval: '5m',
  435. queries: [
  436. {
  437. name: '',
  438. fields: ['issue', 'count_unique(user)'],
  439. conditions: '',
  440. orderby: '-count_unique_user',
  441. },
  442. ],
  443. widgetType: WidgetType.DISCOVER,
  444. tempId: uniqueId(),
  445. },
  446. {
  447. title: t('Transactions Erroring Over Time'),
  448. displayType: DisplayType.TOP_N,
  449. interval: '5m',
  450. queries: [
  451. {
  452. name: '',
  453. fields: ['transaction', 'count()'],
  454. conditions: 'transaction.status:internal_error',
  455. orderby: '-count',
  456. },
  457. ],
  458. widgetType: WidgetType.DISCOVER,
  459. tempId: uniqueId(),
  460. },
  461. {
  462. title: t('Erroring Transactions by Percentage'),
  463. displayType: DisplayType.TABLE,
  464. interval: '5m',
  465. queries: [
  466. {
  467. name: '',
  468. fields: [
  469. 'equation|count_if(transaction.status,equals,internal_error) / count() * 100',
  470. 'transaction',
  471. 'count_if(transaction.status,equals,internal_error)',
  472. 'count()',
  473. ],
  474. conditions: 'count():>100',
  475. orderby: '-equation[0]',
  476. },
  477. ],
  478. widgetType: WidgetType.DISCOVER,
  479. tempId: uniqueId(),
  480. },
  481. {
  482. title: t('Top 5 Issues by Unique Users'),
  483. displayType: DisplayType.TABLE,
  484. interval: '5m',
  485. queries: [
  486. {
  487. name: '',
  488. fields: ['issue', 'count_unique(user)', 'title'],
  489. conditions: '',
  490. orderby: '-count_unique_user',
  491. },
  492. ],
  493. widgetType: WidgetType.DISCOVER,
  494. tempId: uniqueId(),
  495. },
  496. {
  497. title: t('Transactions Erroring'),
  498. displayType: DisplayType.TABLE,
  499. interval: '5m',
  500. queries: [
  501. {
  502. name: '',
  503. fields: ['count()', 'transaction'],
  504. conditions: 'transaction.status:internal_error',
  505. orderby: '-count',
  506. },
  507. ],
  508. widgetType: WidgetType.DISCOVER,
  509. tempId: uniqueId(),
  510. },
  511. {
  512. title: t('Issues Assigned to Me or My Teams'),
  513. displayType: DisplayType.TABLE,
  514. interval: '5m',
  515. queries: [
  516. {
  517. name: '',
  518. fields: ['assignee', 'issue', 'title'],
  519. conditions: 'assigned_or_suggested:me is:unresolved',
  520. orderby: 'priority',
  521. },
  522. ],
  523. widgetType: WidgetType.ISSUE,
  524. tempId: uniqueId(),
  525. },
  526. {
  527. title: t('p75 of Duration by Country'),
  528. displayType: DisplayType.WORLD_MAP,
  529. interval: '5m',
  530. queries: [
  531. {
  532. name: '',
  533. fields: ['p75(transaction.duration)'],
  534. conditions: '',
  535. orderby: '',
  536. },
  537. ],
  538. widgetType: WidgetType.DISCOVER,
  539. tempId: uniqueId(),
  540. },
  541. {
  542. title: t('p75 Over Time'),
  543. displayType: DisplayType.LINE,
  544. interval: '5m',
  545. queries: [
  546. {
  547. name: '',
  548. fields: ['p75(transaction.duration)'],
  549. conditions: '',
  550. orderby: '',
  551. },
  552. ],
  553. widgetType: WidgetType.DISCOVER,
  554. tempId: uniqueId(),
  555. },
  556. {
  557. title: t('Throughput (Events Per Minute)'),
  558. displayType: DisplayType.LINE,
  559. interval: '5m',
  560. queries: [
  561. {
  562. name: 'Transactions',
  563. fields: ['epm()'],
  564. conditions: 'event.type:transaction',
  565. orderby: '',
  566. },
  567. {
  568. name: 'Errors',
  569. fields: ['epm()'],
  570. conditions: 'event.type:error',
  571. orderby: '',
  572. },
  573. ],
  574. widgetType: WidgetType.DISCOVER,
  575. tempId: uniqueId(),
  576. },
  577. {
  578. title: t('Tasks Transactions with Poor Apdex'),
  579. displayType: DisplayType.TABLE,
  580. interval: '5m',
  581. queries: [
  582. {
  583. name: '',
  584. fields: ['count()', 'transaction'],
  585. conditions: 'apdex():<0.5 transaction.op:*task*',
  586. orderby: '-count',
  587. },
  588. ],
  589. widgetType: WidgetType.DISCOVER,
  590. tempId: uniqueId(),
  591. },
  592. {
  593. title: t('HTTP Transactions with Poor Apdex'),
  594. displayType: DisplayType.TABLE,
  595. interval: '5m',
  596. queries: [
  597. {
  598. name: '',
  599. fields: ['epm()', 'http.method', 'http.status_code', 'transaction'],
  600. conditions:
  601. 'apdex():<0.5 transaction.op:*http* has:http.method has:http.status_code',
  602. orderby: '-epm',
  603. },
  604. ],
  605. widgetType: WidgetType.DISCOVER,
  606. tempId: uniqueId(),
  607. },
  608. {
  609. title: t('Overall Apdex'),
  610. displayType: DisplayType.BIG_NUMBER,
  611. interval: '5m',
  612. queries: [
  613. {
  614. name: '',
  615. fields: ['apdex(300)'],
  616. conditions: '',
  617. orderby: '',
  618. },
  619. ],
  620. widgetType: WidgetType.DISCOVER,
  621. tempId: uniqueId(),
  622. },
  623. {
  624. title: t('Overall p75'),
  625. displayType: DisplayType.BIG_NUMBER,
  626. interval: '5m',
  627. queries: [
  628. {
  629. name: '',
  630. fields: ['p75(transaction.duration)'],
  631. conditions: '',
  632. orderby: '',
  633. },
  634. ],
  635. widgetType: WidgetType.DISCOVER,
  636. tempId: uniqueId(),
  637. },
  638. ],
  639. },
  640. {
  641. id: 'mobile-template',
  642. title: t('Mobile Template'),
  643. dateCreated: '',
  644. createdBy: undefined,
  645. description: t('Crash Details and Performance Vitals'),
  646. widgets: [
  647. {
  648. title: t('Total Crashes'),
  649. displayType: DisplayType.BIG_NUMBER,
  650. interval: '5m',
  651. queries: [
  652. {
  653. name: '',
  654. fields: ['count()'],
  655. conditions: 'error.handled:false event.type:error',
  656. orderby: '',
  657. },
  658. ],
  659. widgetType: WidgetType.DISCOVER,
  660. tempId: uniqueId(),
  661. },
  662. {
  663. title: t('Unique Users Who Crashed'),
  664. displayType: DisplayType.BIG_NUMBER,
  665. interval: '5m',
  666. queries: [
  667. {
  668. name: '',
  669. fields: ['count_unique(user)'],
  670. conditions: 'error.handled:false event.type:error',
  671. orderby: '',
  672. },
  673. ],
  674. widgetType: WidgetType.DISCOVER,
  675. tempId: uniqueId(),
  676. },
  677. {
  678. title: t('Overall Number of Errors'),
  679. displayType: DisplayType.BIG_NUMBER,
  680. interval: '5m',
  681. queries: [
  682. {
  683. name: '',
  684. fields: ['count()'],
  685. conditions: 'event.type:error',
  686. orderby: '',
  687. },
  688. ],
  689. widgetType: WidgetType.DISCOVER,
  690. tempId: uniqueId(),
  691. },
  692. {
  693. title: t('Issues Causing Crashes'),
  694. displayType: DisplayType.TABLE,
  695. interval: '5m',
  696. queries: [
  697. {
  698. name: '',
  699. fields: ['issue', 'count()', 'count_unique(user)'],
  700. conditions: 'error.handled:false',
  701. orderby: '-count_unique_user',
  702. },
  703. ],
  704. widgetType: WidgetType.DISCOVER,
  705. tempId: uniqueId(),
  706. },
  707. {
  708. title: t('Crashes Over Time'),
  709. displayType: DisplayType.LINE,
  710. interval: '5m',
  711. queries: [
  712. {
  713. name: t('Crashes'),
  714. fields: ['count()', 'count_unique(user)'],
  715. conditions: 'error.handled:false',
  716. orderby: '',
  717. },
  718. ],
  719. widgetType: WidgetType.DISCOVER,
  720. tempId: uniqueId(),
  721. },
  722. {
  723. title: t('Crashes by OS'),
  724. displayType: DisplayType.TABLE,
  725. interval: '5m',
  726. queries: [
  727. {
  728. name: '',
  729. fields: ['os', 'count()'],
  730. conditions: 'has:os error.handled:false',
  731. orderby: '-count',
  732. },
  733. ],
  734. widgetType: WidgetType.DISCOVER,
  735. tempId: uniqueId(),
  736. },
  737. {
  738. title: t('Overall Warm Startup Time'),
  739. displayType: DisplayType.BIG_NUMBER,
  740. interval: '5m',
  741. queries: [
  742. {
  743. name: '',
  744. fields: ['p75(measurements.app_start_warm)'],
  745. conditions: 'has:measurements.app_start_warm',
  746. orderby: '',
  747. },
  748. ],
  749. widgetType: WidgetType.DISCOVER,
  750. tempId: uniqueId(),
  751. },
  752. {
  753. title: t('Overall Cold Startup Time'),
  754. displayType: DisplayType.BIG_NUMBER,
  755. interval: '5m',
  756. queries: [
  757. {
  758. name: '',
  759. fields: ['p75(measurements.app_start_cold)'],
  760. conditions: 'has:measurements.app_start_cold',
  761. orderby: '',
  762. },
  763. ],
  764. widgetType: WidgetType.DISCOVER,
  765. tempId: uniqueId(),
  766. },
  767. {
  768. title: t('Overall Throughput'),
  769. displayType: DisplayType.BIG_NUMBER,
  770. interval: '5m',
  771. queries: [
  772. {
  773. name: '',
  774. fields: ['epm()'],
  775. conditions: '',
  776. orderby: '',
  777. },
  778. ],
  779. widgetType: WidgetType.DISCOVER,
  780. tempId: uniqueId(),
  781. },
  782. {
  783. title: t('Warm Startup Times'),
  784. displayType: DisplayType.TABLE,
  785. interval: '5m',
  786. queries: [
  787. {
  788. name: '',
  789. fields: ['transaction', 'p75(measurements.app_start_warm)'],
  790. conditions: 'has:measurements.app_start_warm',
  791. orderby: '',
  792. },
  793. ],
  794. widgetType: WidgetType.DISCOVER,
  795. tempId: uniqueId(),
  796. },
  797. {
  798. title: t('Cold Startup Times'),
  799. displayType: DisplayType.TABLE,
  800. interval: '5m',
  801. queries: [
  802. {
  803. name: '',
  804. fields: ['transaction', 'p75(measurements.app_start_cold)'],
  805. conditions: 'has:measurements.app_start_cold',
  806. orderby: '',
  807. },
  808. ],
  809. widgetType: WidgetType.DISCOVER,
  810. tempId: uniqueId(),
  811. },
  812. {
  813. title: t('Throughput Over Time'),
  814. displayType: DisplayType.LINE,
  815. interval: '5m',
  816. queries: [
  817. {
  818. name: '',
  819. fields: ['epm()'],
  820. conditions: '',
  821. orderby: '',
  822. },
  823. ],
  824. widgetType: WidgetType.DISCOVER,
  825. tempId: uniqueId(),
  826. },
  827. {
  828. title: t('Frozen Frames Over Time'),
  829. displayType: DisplayType.BIG_NUMBER,
  830. interval: '5m',
  831. queries: [
  832. {
  833. name: '',
  834. fields: ['p75(measurements.frames_frozen_rate)'],
  835. conditions: '',
  836. orderby: '',
  837. },
  838. ],
  839. widgetType: WidgetType.DISCOVER,
  840. tempId: uniqueId(),
  841. },
  842. {
  843. title: t('Frozen Frames Rate'),
  844. displayType: DisplayType.TABLE,
  845. interval: '5m',
  846. queries: [
  847. {
  848. name: '',
  849. fields: ['transaction', 'p75(measurements.frames_frozen_rate)'],
  850. conditions: 'has:measurements.frames_frozen_rate',
  851. orderby: '-p75_measurements_frames_frozen_rate',
  852. },
  853. ],
  854. widgetType: WidgetType.DISCOVER,
  855. tempId: uniqueId(),
  856. },
  857. ],
  858. },
  859. ];
  860. export const DISPLAY_TYPE_CHOICES = [
  861. {label: t('Area Chart'), value: 'area'},
  862. {label: t('Bar Chart'), value: 'bar'},
  863. {label: t('Line Chart'), value: 'line'},
  864. {label: t('Table'), value: 'table'},
  865. {label: t('World Map'), value: 'world_map'},
  866. {label: t('Big Number'), value: 'big_number'},
  867. {label: t('Top 5 Events'), value: 'top_n'},
  868. ];
  869. export const INTERVAL_CHOICES = [
  870. {label: t('1 Minute'), value: '1m'},
  871. {label: t('5 Minutes'), value: '5m'},
  872. {label: t('15 Minutes'), value: '15m'},
  873. {label: t('30 Minutes'), value: '30m'},
  874. {label: t('1 Hour'), value: '1h'},
  875. {label: t('1 Day'), value: '1d'},
  876. ];
  877. export const DEFAULT_STATS_PERIOD = '24h';