settings.ts 1.5 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/starfish/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_INTERVAL = '10m';
  31. export const DEFAULT_DURATION_AGGREGATE: Aggregate = 'avg';
  32. export const CHART_HEIGHT = 160;
  33. export const COUNTER_GRANULARITIES = new GranularityLadder([
  34. [SIXTY_DAYS, '1d'],
  35. [THIRTY_DAYS, '12h'],
  36. [TWO_WEEKS, '4h'],
  37. [TWENTY_FOUR_HOURS, '30m'],
  38. [SIX_HOURS, '5m'],
  39. [ONE_HOUR, '1m'],
  40. [0, '1m'],
  41. ]);
  42. export const DISTRIBUTION_GRANULARITIES = new GranularityLadder([
  43. [TWO_WEEKS, '1d'],
  44. [FORTY_EIGHT_HOURS, '1h'],
  45. [TWENTY_FOUR_HOURS, '30m'],
  46. [SIX_HOURS, '5m'],
  47. [ONE_HOUR, '1m'],
  48. [0, '1m'],
  49. ]);
  50. export const MODULE_DESCRIPTION = t(
  51. 'Investigate the performance of database queries and get the information necessary to improve them.'
  52. );
  53. export const MODULE_DOC_LINK = 'https://docs.sentry.io/product/insights/queries/';