experimentConfig.tsx 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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: 'ProjectCreationForAllExperiment',
  28. type: ExperimentType.ORGANIZATION,
  29. parameter: 'exposed',
  30. assignments: [0, 1],
  31. },
  32. ] as const;
  33. export const experimentConfig = experimentList.reduce(
  34. (acc, exp) => ({...acc, [exp.key]: exp}),
  35. {}
  36. ) as Experiments;