Browse Source

feat(perf-issues): Add Slow DB Span Admin Options (#43360)

Ash Anand 2 years ago
parent
commit
54ddb1ae6f
2 changed files with 43 additions and 0 deletions
  1. 11 0
      static/app/views/admin/adminSettings.tsx
  2. 32 0
      static/app/views/admin/options.tsx

+ 11 - 0
static/app/views/admin/adminSettings.tsx

@@ -34,6 +34,10 @@ const optionsAvailable = [
   'performance.issues.compressed_assets.ea-rollout',
   'performance.issues.compressed_assets.ga-rollout',
   'performance.issues.file_io_main_thread.problem-creation',
+  'performance.issues.slow_span.problem-creation',
+  'performance.issues.slow_span.la-rollout',
+  'performance.issues.slow_span.ea-rollout',
+  'performance.issues.slow_span.ga-rollout',
 ];
 
 type Field = ReturnType<typeof getOption>;
@@ -139,6 +143,13 @@ export default class AdminSettings extends AsyncView<{}, State> {
               <PanelHeader>Performance Issues - File IO on Main Thread</PanelHeader>
               {fields['performance.issues.file_io_main_thread.problem-creation']}
             </Panel>
+            <Panel>
+              <PanelHeader>Performance Issues - Slow DB Span Detector</PanelHeader>
+              {fields['performance.issues.slow_span.problem-creation']}
+              {fields['performance.issues.slow_span.la-rollout']}
+              {fields['performance.issues.slow_span.ea-rollout']}
+              {fields['performance.issues.slow_span.ga-rollout']}
+            </Panel>
           </Feature>
         </Form>
       </div>

+ 32 - 0
static/app/views/admin/options.tsx

@@ -279,6 +279,38 @@ const performanceOptionDefinitions: Field[] = [
     ),
     ...HIGH_THROUGHPUT_RATE_OPTION,
   },
+  {
+    key: 'performance.issues.slow_span.problem-creation',
+    label: t('Problem Creation Rate'),
+    help: t(
+      'Controls the overall rate at which performance problems are detected by the slow DB span detector.'
+    ),
+    ...HIGH_THROUGHPUT_RATE_OPTION,
+  },
+  {
+    key: 'performance.issues.slow_span.la-rollout',
+    label: t('Limited Availability Detection Rate'),
+    help: t(
+      'Controls the rate at which performance problems are detected by the slow DB span detector for LA organizations.'
+    ),
+    ...HIGH_THROUGHPUT_RATE_OPTION,
+  },
+  {
+    key: 'performance.issues.slow_span.ea-rollout',
+    label: t('Early Adopter Detection Rate'),
+    help: t(
+      'Controls the rate at which performance problems are detected by the slow DB span detector for EA organizations.'
+    ),
+    ...HIGH_THROUGHPUT_RATE_OPTION,
+  },
+  {
+    key: 'performance.issues.slow_span.ga-rollout',
+    label: t('General Availability Detection Rate'),
+    help: t(
+      'Controls the rate at which performance problems are detected by the slow DB span detector for GA organizations.'
+    ),
+    ...HIGH_THROUGHPUT_RATE_OPTION,
+  },
 ];
 
 // This are ordered based on their display order visually