diff --git a/src/analyticsTypes.ts b/src/analyticsTypes.ts index c03d6f9b..230ed42c 100644 --- a/src/analyticsTypes.ts +++ b/src/analyticsTypes.ts @@ -8,24 +8,40 @@ export enum AnalyticsChannels { AtlascodeUiErrors = 'atlascode.ui.errors', } +/** + * Descriptions of the different pages that the extension can render as webviews. + * These appear in error reports, so it's best if they are verbose and descriptive. + * + * Values typically follow the pattern of `::[?product]:` + * + * Versions so far: + * - v1: (legacy) Webviews based on AbstractReactWebview + * - v2: (legacy) Webviews based on the WebviewController/WebviewControllerFactory architecture + */ export enum AnalyticsView { - OnboardingPage = 'onboarding', - SettingsPage = 'settings', - WelcomePage = 'welcome', + // v1 + + CreateJiraIssuePage = 'page:v1:jira:createIssue', + JiraIssuePage = 'page:v1:jira:issue', + OldStartWorkPage = 'page:v1:bitbucket:startWork', + + // v2 + + OnboardingPage = 'page:v2:onboarding', + SettingsPage = 'page:v2:settings', + WelcomePage = 'page:v2:welcome', - BitbucketIssuePage = 'bitbucketIssue', - PullRequestPage = 'pullRequest', + BitbucketIssuePage = 'page:v2:bitbucket:issue', + CreateBitbucketIssuePage = 'page:v2:bitbucket:createIssue', - CreateBitbucketIssuePage = 'createBitbucketIssue', - CreatePullRequestPage = 'createPullRequest', + PullRequestPage = 'page:v2:bitbucket:pullRequest', + CreatePullRequestPage = 'page:v2:bitbucket:createPullRequest', - CreateJiraIssuePage = 'createJiraIssue', - JiraIssuePage = 'jiraIssue', + PipelineSummaryPage = 'page:v2:bitbucket:pipeline', - PipelineSummaryPage = 'pipelineSummary', + StartWorkPage = 'page:v2:jira:startWork', - StartWorkPage = 'startWork', - OldStartWorkPage = 'oldStartWork', + // Reserved for future use Other = 'other', } diff --git a/src/react/atlascode/common/ErrorBoundary.tsx b/src/react/atlascode/common/ErrorBoundary.tsx index db70cfd7..c56b4c9c 100644 --- a/src/react/atlascode/common/ErrorBoundary.tsx +++ b/src/react/atlascode/common/ErrorBoundary.tsx @@ -4,7 +4,10 @@ import { AnalyticsErrorBoundary, AnalyticsListener, UIAnalyticsEvent } from '@at import { CommonActionType } from 'src/lib/ipc/fromUI/common'; import { AnalyticsChannels, UIAnalyticsContext } from 'src/analyticsTypes'; -const STACK_LIMIT = 150; +// Maximum limit for the simplified stack trace +// We're using a high value deliberately for now, but it's arbitrary and can be changed in the future +const STACK_LIMIT = 1500; + const COMPONENT_GLOBAL = 'global'; export type AtlascodeErrorBoundaryProps = {