settings.ts 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. import {
  2. FORTY_EIGHT_HOURS,
  3. GranularityLadder,
  4. ONE_HOUR,
  5. SIX_HOURS,
  6. SIXTY_DAYS,
  7. THIRTY_DAYS,
  8. TWENTY_FOUR_HOURS,
  9. TWO_WEEKS,
  10. } from 'sentry/components/charts/utils';
  11. import {t} from 'sentry/locale';
  12. import {type Aggregate, ModuleName} from 'sentry/views/insights/types';
  13. export const MODULE_TITLE = t('Queries');
  14. export const BASE_URL = 'database';
  15. export const BASE_FILTERS = {
  16. 'span.module': ModuleName.DB,
  17. has: 'span.description',
  18. };
  19. export const MIN_SDK_VERSION_BY_PLATFORM: {[platform: string]: string} = {
  20. 'sentry.python': '1.29.2',
  21. 'sentry.javascript': '7.63.0',
  22. 'sentry.laravel': '3.8.0',
  23. 'sentry.cocoa': '8.11.0',
  24. 'sentry.java': '6.29.0',
  25. 'sentry.ruby': '5.11.0',
  26. 'sentry.dotnet': '3.39.0',
  27. 'sentry.symfony': '4.11.0',
  28. 'sentry.android': '6.30.0',
  29. };
  30. export const DEFAULT_DURATION_AGGREGATE: Aggregate = 'avg';
  31. export const CHART_HEIGHT = 160;
  32. export const COUNTER_GRANULARITIES = new GranularityLadder([
  33. [SIXTY_DAYS, '1d'],
  34. [THIRTY_DAYS, '12h'],
  35. [TWO_WEEKS, '4h'],
  36. [TWENTY_FOUR_HOURS, '30m'],
  37. [SIX_HOURS, '5m'],
  38. [ONE_HOUR, '1m'],
  39. [0, '1m'],
  40. ]);
  41. export const DISTRIBUTION_GRANULARITIES = new GranularityLadder([
  42. [TWO_WEEKS, '1d'],
  43. [FORTY_EIGHT_HOURS, '1h'],
  44. [TWENTY_FOUR_HOURS, '30m'],
  45. [SIX_HOURS, '5m'],
  46. [ONE_HOUR, '1m'],
  47. [0, '1m'],
  48. ]);
  49. export const MODULE_DESCRIPTION = t(
  50. 'Investigate the performance of database queries and get the information necessary to improve them.'
  51. );
  52. export const MODULE_DOC_LINK = 'https://docs.sentry.io/product/insights/queries/';