settings.ts 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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 DATA_TYPE = t('Query');
  15. export const DATA_TYPE_PLURAL = t('Queries');
  16. export const BASE_URL = 'database';
  17. export const BASE_FILTERS = {
  18. 'span.module': ModuleName.DB,
  19. has: 'span.description',
  20. };
  21. export const MIN_SDK_VERSION_BY_PLATFORM: {[platform: string]: string} = {
  22. 'sentry.python': '1.29.2',
  23. 'sentry.javascript': '7.63.0',
  24. 'sentry.laravel': '3.8.0',
  25. 'sentry.cocoa': '8.11.0',
  26. 'sentry.java': '6.29.0',
  27. 'sentry.ruby': '5.11.0',
  28. 'sentry.dotnet': '3.39.0',
  29. 'sentry.symfony': '4.11.0',
  30. 'sentry.android': '6.30.0',
  31. };
  32. export const DEFAULT_DURATION_AGGREGATE: Aggregate = 'avg';
  33. export const CHART_HEIGHT = 160;
  34. export const COUNTER_GRANULARITIES = new GranularityLadder([
  35. [SIXTY_DAYS, '1d'],
  36. [THIRTY_DAYS, '12h'],
  37. [TWO_WEEKS, '4h'],
  38. [TWENTY_FOUR_HOURS, '30m'],
  39. [SIX_HOURS, '5m'],
  40. [ONE_HOUR, '1m'],
  41. [0, '1m'],
  42. ]);
  43. export const DISTRIBUTION_GRANULARITIES = new GranularityLadder([
  44. [TWO_WEEKS, '1d'],
  45. [FORTY_EIGHT_HOURS, '1h'],
  46. [TWENTY_FOUR_HOURS, '30m'],
  47. [SIX_HOURS, '5m'],
  48. [ONE_HOUR, '1m'],
  49. [0, '1m'],
  50. ]);
  51. export const MODULE_DESCRIPTION = t(
  52. 'Investigate the performance of database queries and get the information necessary to improve them.'
  53. );
  54. export const MODULE_DOC_LINK = 'https://docs.sentry.io/product/insights/queries/';