Browse Source

feat(profiling): Add resources for profiling issues (#46341)

Pierre Massat 1 year ago
parent
commit
765fc93398
1 changed files with 29 additions and 1 deletions
  1. 29 1
      static/app/utils/issueTypeConfig/profileConfig.tsx

+ 29 - 1
static/app/utils/issueTypeConfig/profileConfig.tsx

@@ -36,13 +36,41 @@ const profileConfig: IssueCategoryConfigMapping = {
       ),
       links: [
         {
-          text: t('File IO on Main Thread'),
+          text: t('File I/O on Main Thread'),
           link: 'https://docs.sentry.io/product/issues/issue-details/performance-issues/main-thread-io/',
         },
       ],
       linksByPlatform: {},
     },
   },
+  [IssueType.PROFILE_JSON_DECODE_MAIN_THREAD]: {
+    resources: {
+      description: t(
+        'Decoding a JSON blob into a data structure can be a long running operation, especially for large blobs, and can cause slow app performance and UI jank while scrolling. To learn more about how to fix calls that block the main thread, check out these resources:'
+      ),
+      links: [
+        {
+          text: t('JSON Decode on Main Thread'),
+          link: 'https://docs.sentry.io/product/issues/issue-details/performance-issues/json-decoding-main-thread/',
+        },
+      ],
+      linksByPlatform: {},
+    },
+  },
+  [IssueType.PROFILE_IMAGE_DECODE_MAIN_THREAD]: {
+    resources: {
+      description: t(
+        'Decoding a compressed image from a format such as JPEG or PNG into a bitmap can be a long running operation, especially for large images, and can cause slow app performance and UI jank while scrolling. To learn more about how to fix calls that block the main thread, check out these resources:'
+      ),
+      links: [
+        {
+          text: t('Image Decode on Main Thread'),
+          link: 'https://docs.sentry.io/product/issues/issue-details/performance-issues/image-decoding-main-thread/',
+        },
+      ],
+      linksByPlatform: {},
+    },
+  },
 };
 
 export default profileConfig;