constants.tsx 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. import type {AggregationOutputType} from 'sentry/utils/discover/fields';
  2. import {SpanIndexedField, SpanMetricsField} from 'sentry/views/insights/types';
  3. // This constant is to be used as an arg for `getInterval`.
  4. // 'metrics' fidelity is intended to match the granularities of stored metrics.
  5. // This gives us the best/highest fidelity of data for minimum amount of work (don't need to merge buckets).
  6. export const STARFISH_CHART_INTERVAL_FIDELITY = 'metrics';
  7. export const STARFISH_FIELDS: Record<string, {outputType: AggregationOutputType}> = {
  8. [SpanMetricsField.SPAN_DURATION]: {
  9. outputType: 'duration',
  10. },
  11. [SpanMetricsField.SPAN_SELF_TIME]: {
  12. outputType: 'duration',
  13. },
  14. [SpanMetricsField.HTTP_RESPONSE_TRANSFER_SIZE]: {
  15. outputType: 'size',
  16. },
  17. [SpanMetricsField.HTTP_DECODED_RESPONSE_CONTENT_LENGTH]: {
  18. outputType: 'size',
  19. },
  20. [SpanMetricsField.HTTP_RESPONSE_CONTENT_LENGTH]: {
  21. outputType: 'size',
  22. },
  23. [SpanIndexedField.CACHE_ITEM_SIZE]: {
  24. outputType: 'size',
  25. },
  26. [SpanMetricsField.CACHE_ITEM_SIZE]: {
  27. outputType: 'size',
  28. },
  29. [SpanMetricsField.MESSAGING_MESSAGE_RECEIVE_LATENCY]: {
  30. outputType: 'duration',
  31. },
  32. };