experimentConfig.tsx 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. import {Experiments, ExperimentType} from 'sentry/types/experiments';
  2. /**
  3. * This is the value an experiment will have when the unit of assignment
  4. * (organization, user, etc) is not part of any experiment group.
  5. *
  6. * This likely indicates they should see nothing, or the original version of
  7. * what's being tested.
  8. */
  9. export const unassignedValue = -1;
  10. /**
  11. * Frontend experiment configuration object
  12. */
  13. export const experimentList = [
  14. {
  15. key: 'OnboardingNewFooterExperiment',
  16. type: ExperimentType.ORGANIZATION,
  17. parameter: 'scenario',
  18. assignments: ['baseline', 'variant1', 'variant2'],
  19. },
  20. {
  21. key: 'ExtendTrialByInvitingMemberExperiment',
  22. type: ExperimentType.ORGANIZATION,
  23. parameter: 'exposed',
  24. assignments: [0, 1],
  25. },
  26. {
  27. key: 'ProjectCreationForAllExperimentV2',
  28. type: ExperimentType.ORGANIZATION,
  29. parameter: 'exposed',
  30. assignments: [0, 1],
  31. },
  32. {
  33. key: 'PrioritySortExperiment',
  34. type: ExperimentType.USER,
  35. parameter: 'variant',
  36. assignments: ['baseline', 'variant1', 'variant2'],
  37. },
  38. ] as const;
  39. export const experimentConfig = experimentList.reduce(
  40. (acc, exp) => ({...acc, [exp.key]: exp}),
  41. {}
  42. ) as Experiments;