utils.ts 750 B

123456789101112131415161718192021222324252627282930313233
  1. import type {Query} from 'history';
  2. import type {DomainView} from 'sentry/views/insights/pages/useFilters';
  3. import {getTransactionSummaryBaseUrl} from 'sentry/views/performance/transactionSummary/utils';
  4. export function replaysRouteWithQuery({
  5. orgSlug,
  6. transaction,
  7. projectID,
  8. query,
  9. view,
  10. }: {
  11. orgSlug: string;
  12. query: Query;
  13. transaction: string;
  14. projectID?: string | string[];
  15. view?: DomainView;
  16. }) {
  17. const pathname = `${getTransactionSummaryBaseUrl(orgSlug, view)}/replays/`;
  18. return {
  19. pathname,
  20. query: {
  21. transaction,
  22. project: projectID,
  23. environment: query.environment,
  24. statsPeriod: query.statsPeriod,
  25. start: query.start,
  26. end: query.end,
  27. query: query.query,
  28. },
  29. };
  30. }