experimentConfig.tsx 974 B

12345678910111213141516171819202122232425262728293031323334353637
  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. assignments: number[] | string[];
  15. key: string;
  16. parameter: string;
  17. type: ExperimentType;
  18. }[] = [
  19. {
  20. key: 'OnboardingNewFooterExperiment',
  21. type: ExperimentType.Organization,
  22. parameter: 'scenario',
  23. assignments: ['baseline', 'variant1', 'variant2'],
  24. },
  25. {
  26. key: 'APMSidebarExperiment',
  27. type: ExperimentType.Organization,
  28. parameter: 'exposed',
  29. assignments: [0, 1],
  30. },
  31. ];
  32. export const experimentConfig = experimentList.reduce(
  33. (acc, exp) => ({...acc, [exp.key]: exp}),
  34. {}
  35. ) as Experiments;