useResourcePageQuery.ts 487 B

1234567891011
  1. import {Sort} from 'sentry/utils/discover/fields';
  2. import {useSpanTransactionMetrics} from 'sentry/views/starfish/queries/useSpanTransactionMetrics';
  3. import {SpanMetricsField} from 'sentry/views/starfish/types';
  4. const {HTTP_RESPONSE_CONTENT_LENGTH} = SpanMetricsField;
  5. export const useResourcePagesQuery = (groupId: string, {sort}: {sort: Sort}) => {
  6. return useSpanTransactionMetrics({'span.group': groupId}, [sort], undefined, [
  7. `avg(${HTTP_RESPONSE_CONTENT_LENGTH})`,
  8. ]);
  9. };