diff --git a/src/sentry/models/project.py b/src/sentry/models/project.py index 7c78b0ed2132f0..13440e1ee8d0d1 100644 --- a/src/sentry/models/project.py +++ b/src/sentry/models/project.py @@ -66,6 +66,7 @@ "apple-macos", "bun", "capacitor", + "convex", "cordova", "dart", "deno", diff --git a/src/sentry/utils/platform_categories.py b/src/sentry/utils/platform_categories.py index 241a5e7b83c7a6..e722f6cee5db5f 100644 --- a/src/sentry/utils/platform_categories.py +++ b/src/sentry/utils/platform_categories.py @@ -112,6 +112,7 @@ # Mirrors `const serverless` in sentry/static/app/data/platformCategories.tsx # When changing this file, make sure to keep sentry/static/app/data/platformCategories.tsx in sync. SERVERLESS = { + "convex", "dotnet-awslambda", "dotnet-gcpfunctions", "node-awslambda", diff --git a/static/app/data/platformCategories.tsx b/static/app/data/platformCategories.tsx index 8b7ce64e37454e..cbac6b791ab26f 100644 --- a/static/app/data/platformCategories.tsx +++ b/static/app/data/platformCategories.tsx @@ -117,6 +117,7 @@ export const backend: PlatformKey[] = [ // Mirrors `SERVERLESS` in src/sentry/utils/platform_categories.py // When changing this file, make sure to keep src/sentry/utils/platform_categories.py in sync. export const serverless: PlatformKey[] = [ + 'convex', 'dotnet-awslambda', 'dotnet-gcpfunctions', 'node-awslambda', diff --git a/static/app/data/platformPickerCategories.tsx b/static/app/data/platformPickerCategories.tsx index e514b836c8f55c..ebcc356ef3709d 100644 --- a/static/app/data/platformPickerCategories.tsx +++ b/static/app/data/platformPickerCategories.tsx @@ -134,6 +134,7 @@ const desktop: Set = new Set([ ]); const serverless: Set = new Set([ + 'convex', 'dotnet-awslambda', 'dotnet-gcpfunctions', 'node-awslambda', diff --git a/static/app/data/platforms.tsx b/static/app/data/platforms.tsx index 7b429519c5f21a..79cbb3b6bba5ba 100644 --- a/static/app/data/platforms.tsx +++ b/static/app/data/platforms.tsx @@ -46,6 +46,13 @@ export const platforms: PlatformIntegration[] = [ language: 'capacitor', link: 'https://docs.sentry.io/platforms/javascript/guides/capacitor/', }, + { + id: 'convex', + name: 'Convex', + type: 'language', + language: 'convex', + link: 'https://docs.sentry.io/platforms/javascript/guides/convex/', + }, { id: 'cordova', name: 'Cordova', diff --git a/static/app/gettingStartedDocs/convex/convex.spec.tsx b/static/app/gettingStartedDocs/convex/convex.spec.tsx new file mode 100644 index 00000000000000..f07e671621adba --- /dev/null +++ b/static/app/gettingStartedDocs/convex/convex.spec.tsx @@ -0,0 +1,14 @@ +import {renderWithOnboardingLayout} from 'sentry-test/onboarding/renderWithOnboardingLayout'; +import {screen} from 'sentry-test/reactTestingLibrary'; + +import docs from './convex'; + +describe('convex onboarding docs', function () { + it('renders docs correctly', function () { + renderWithOnboardingLayout(docs); + + // Renders main headings + expect(screen.getByRole('heading', {name: 'Install'})).toBeInTheDocument(); + expect(screen.getByRole('heading', {name: 'Verify'})).toBeInTheDocument(); + }); +}); diff --git a/static/app/gettingStartedDocs/convex/convex.tsx b/static/app/gettingStartedDocs/convex/convex.tsx new file mode 100644 index 00000000000000..fac398691477ff --- /dev/null +++ b/static/app/gettingStartedDocs/convex/convex.tsx @@ -0,0 +1,62 @@ +import {Fragment} from 'react'; + +import ExternalLink from 'sentry/components/links/externalLink'; +import {StepType} from 'sentry/components/onboarding/gettingStartedDoc/step'; +import type { + Docs, + OnboardingConfig, +} from 'sentry/components/onboarding/gettingStartedDoc/types'; +import {t, tct} from 'sentry/locale'; + +const failingAction = ` +export const userError = action(async () => { + throw new Error("I failed you!"); +}); +`; + +const onboarding: OnboardingConfig = { + install: () => [ + { + type: StepType.INSTALL, + description: tct( + 'Set up Sentry in your Convex project [link:deployment settings].', + { + link: ( + + ), + } + ), + configurations: [], + }, + ], + configure: () => [], + verify: () => [ + { + type: StepType.VERIFY, + description: ( + + {t( + 'One way to verify your setup is by calling an action that throws intentionally.' + )} +

{t('Calling an undefined function will throw an exception:')}

+
+ ), + configurations: [ + { + language: 'javascript', + code: failingAction, + }, + { + language: 'bash', + code: 'npx convex run myModule:userError', + }, + ], + }, + ], +}; + +const docs: Docs = { + onboarding, +}; + +export default docs; diff --git a/static/app/types/project.tsx b/static/app/types/project.tsx index fde29ccca41180..e8bdafc06ca39f 100644 --- a/static/app/types/project.tsx +++ b/static/app/types/project.tsx @@ -155,6 +155,7 @@ export type PlatformKey = | 'cocoa' | 'cocoa-objc' | 'cocoa-swift' + | 'convex' | 'cordova' | 'csharp' | 'csharp-aspnetcore'