constants.tsx 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. import {t} from 'sentry/locale';
  2. import type {AggregationOutputType} from 'sentry/utils/discover/fields';
  3. import {type FieldDefinition, FieldKind, FieldValueType} from 'sentry/utils/fields';
  4. import {SpanFunction} from 'sentry/views/insights/types';
  5. export const STARFISH_AGGREGATION_FIELDS: Record<
  6. SpanFunction,
  7. FieldDefinition & {defaultOutputType: AggregationOutputType}
  8. > = {
  9. [SpanFunction.SPS]: {
  10. desc: t('Spans per second'),
  11. kind: FieldKind.FUNCTION,
  12. defaultOutputType: 'number',
  13. valueType: FieldValueType.NUMBER,
  14. },
  15. [SpanFunction.SPM]: {
  16. desc: t('Spans per minute'),
  17. kind: FieldKind.FUNCTION,
  18. defaultOutputType: 'number',
  19. valueType: FieldValueType.NUMBER,
  20. },
  21. [SpanFunction.TIME_SPENT_PERCENTAGE]: {
  22. desc: t('Span time spent percentage'),
  23. defaultOutputType: 'percentage',
  24. kind: FieldKind.FUNCTION,
  25. valueType: FieldValueType.NUMBER,
  26. },
  27. [SpanFunction.HTTP_ERROR_COUNT]: {
  28. desc: t('Count of 5XX http errors'),
  29. defaultOutputType: 'integer',
  30. kind: FieldKind.FUNCTION,
  31. valueType: FieldValueType.NUMBER,
  32. },
  33. [SpanFunction.HTTP_RESPONSE_RATE]: {
  34. desc: t('Percentage of HTTP responses by code'),
  35. defaultOutputType: 'percentage',
  36. kind: FieldKind.FUNCTION,
  37. valueType: FieldValueType.NUMBER,
  38. },
  39. [SpanFunction.CACHE_HIT_RATE]: {
  40. desc: t('Percentage of cache hits'),
  41. defaultOutputType: 'percentage',
  42. kind: FieldKind.FUNCTION,
  43. valueType: FieldValueType.NUMBER,
  44. },
  45. [SpanFunction.CACHE_MISS_RATE]: {
  46. desc: t('Percentage of cache misses'),
  47. defaultOutputType: 'percentage',
  48. kind: FieldKind.FUNCTION,
  49. valueType: FieldValueType.NUMBER,
  50. },
  51. [SpanFunction.COUNT_OP]: {
  52. desc: t('Count of spans with matching operation'),
  53. defaultOutputType: 'integer',
  54. kind: FieldKind.FUNCTION,
  55. valueType: FieldValueType.NUMBER,
  56. },
  57. [SpanFunction.TRACE_STATUS_RATE]: {
  58. desc: t('Percentage of spans with matching trace status'),
  59. defaultOutputType: 'percentage',
  60. kind: FieldKind.FUNCTION,
  61. valueType: FieldValueType.NUMBER,
  62. },
  63. };