Browse Source

ref(product-selection): Remove A/B test experiment (#47813)

Priscila Oliveira 1 year ago
parent
commit
1305f9473b
2 changed files with 13 additions and 54 deletions
  1. 0 6
      static/app/data/experimentConfig.tsx
  2. 13 48
      static/app/views/onboarding/setupDocs.tsx

+ 0 - 6
static/app/data/experimentConfig.tsx

@@ -12,12 +12,6 @@ export const unassignedValue = -1;
  * Frontend experiment configuration object
  */
 export const experimentList = [
-  {
-    key: 'OnboardingProductSelectionExperiment',
-    type: ExperimentType.Organization,
-    parameter: 'scenario',
-    assignments: ['baseline', 'variant1', 'variant2'],
-  },
   {
     key: 'OnboardingNewFooterExperiment',
     type: ExperimentType.Organization,

+ 13 - 48
static/app/views/onboarding/setupDocs.tsx

@@ -87,36 +87,17 @@ export function ProjectDocsReact({
   projectSlug: Project['slug'];
   newOrg?: boolean;
 }) {
-  const {
-    experimentAssignment: productSelectionAssignment,
-    logExperiment: productSelectionLogExperiment,
-  } = useExperiment('OnboardingProductSelectionExperiment', {
-    logExperimentOnMount: false,
-  });
-
-  // This is an experiment we are doing with react.
-  // In this experiment we let the user choose which Sentry product he would like to have in his `Sentry.Init()`
-  // and the docs will reflect that.
   const loadPlatform = useMemo(() => {
     const products = location.query.product ?? [];
-    return newOrg && productSelectionAssignment === 'baseline'
-      ? 'javascript-react'
-      : products.includes(PRODUCT.PERFORMANCE_MONITORING) &&
-        products.includes(PRODUCT.SESSION_REPLAY)
+    return products.includes(PRODUCT.PERFORMANCE_MONITORING) &&
+      products.includes(PRODUCT.SESSION_REPLAY)
       ? ReactDocVariant.ErrorMonitoringPerformanceAndReplay
       : products.includes(PRODUCT.PERFORMANCE_MONITORING)
       ? ReactDocVariant.ErrorMonitoringAndPerformance
       : products.includes(PRODUCT.SESSION_REPLAY)
       ? ReactDocVariant.ErrorMonitoringAndSessionReplay
       : ReactDocVariant.ErrorMonitoring;
-  }, [location.query.product, productSelectionAssignment, newOrg]);
-
-  useEffect(() => {
-    if (!newOrg) {
-      return;
-    }
-    productSelectionLogExperiment();
-  }, [productSelectionLogExperiment, newOrg]);
+  }, [location.query.product]);
 
   const {data, isLoading, isError, refetch} = useApiQuery<PlatformDoc>(
     [`/projects/${organization.slug}/${projectSlug}/docs/${loadPlatform}/`],
@@ -128,34 +109,18 @@ export function ProjectDocsReact({
 
   return (
     <Fragment>
-      {newOrg ? (
-        <Fragment>
-          <SetupIntroduction
-            stepHeaderText={t(
-              'Configure %s SDK',
-              platforms.find(p => p.id === 'javascript-react')?.name ?? ''
-            )}
-            platform="javascript-react"
-          />
-          {productSelectionAssignment === 'variant1' ? (
-            <ProductSelection
-              defaultSelectedProducts={[
-                PRODUCT.PERFORMANCE_MONITORING,
-                PRODUCT.SESSION_REPLAY,
-              ]}
-            />
-          ) : productSelectionAssignment === 'variant2' ? (
-            <ProductSelection />
-          ) : null}
-        </Fragment>
-      ) : (
-        <ProductSelection
-          defaultSelectedProducts={[
-            PRODUCT.PERFORMANCE_MONITORING,
-            PRODUCT.SESSION_REPLAY,
-          ]}
+      {newOrg && (
+        <SetupIntroduction
+          stepHeaderText={t(
+            'Configure %s SDK',
+            platforms.find(p => p.id === 'javascript-react')?.name ?? ''
+          )}
+          platform="javascript-react"
         />
       )}
+      <ProductSelection
+        defaultSelectedProducts={[PRODUCT.PERFORMANCE_MONITORING, PRODUCT.SESSION_REPLAY]}
+      />
       {isLoading ? (
         <LoadingIndicator />
       ) : isError ? (