experimentConfig.tsx 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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: 'MetricAlertBannerExperiment',
  16. type: ExperimentType.Organization,
  17. parameter: 'exposed',
  18. assignments: [0, 1],
  19. },
  20. {
  21. key: 'MetricAlertPresetExperiment',
  22. type: ExperimentType.Organization,
  23. parameter: 'exposed',
  24. assignments: [0, 1],
  25. },
  26. {
  27. key: 'VitalsAlertExperiment',
  28. type: ExperimentType.Organization,
  29. parameter: 'exposed',
  30. assignments: [0, 1],
  31. },
  32. {
  33. key: 'MetricAlertOnProjectCreationExperiment',
  34. type: ExperimentType.Organization,
  35. parameter: 'exposed',
  36. assignments: [0, 1],
  37. },
  38. {
  39. key: 'OnboardingHighlightWizardExperiment',
  40. type: ExperimentType.Organization,
  41. parameter: 'exposed',
  42. assignments: [0, 1],
  43. },
  44. ] as const;
  45. export const experimentConfig = experimentList.reduce(
  46. (acc, exp) => ({...acc, [exp.key]: exp}),
  47. {}
  48. ) as Experiments;