Skip to content

Add Convex to onboarding #67666

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/sentry/models/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
"apple-macos",
"bun",
"capacitor",
"convex",
"cordova",
"dart",
"deno",
Expand Down
1 change: 1 addition & 0 deletions src/sentry/utils/platform_categories.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions static/app/data/platformCategories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
1 change: 1 addition & 0 deletions static/app/data/platformPickerCategories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ const desktop: Set<PlatformKey> = new Set([
]);

const serverless: Set<PlatformKey> = new Set([
'convex',
'dotnet-awslambda',
'dotnet-gcpfunctions',
'node-awslambda',
Expand Down
7 changes: 7 additions & 0 deletions static/app/data/platforms.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
14 changes: 14 additions & 0 deletions static/app/gettingStartedDocs/convex/convex.spec.tsx
Original file line number Diff line number Diff line change
@@ -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();
});
});
62 changes: 62 additions & 0 deletions static/app/gettingStartedDocs/convex/convex.tsx
Original file line number Diff line number Diff line change
@@ -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: (
<ExternalLink href="https://docs.convex.dev/production/integrations/exception-reporting#configuring-sentry" />
),
}
),
configurations: [],
},
],
configure: () => [],
verify: () => [
{
type: StepType.VERIFY,
description: (
<Fragment>
{t(
'One way to verify your setup is by calling an action that throws intentionally.'
)}
<p>{t('Calling an undefined function will throw an exception:')}</p>
</Fragment>
),
configurations: [
{
language: 'javascript',
code: failingAction,
},
{
language: 'bash',
code: 'npx convex run myModule:userError',
},
],
},
],
};

const docs: Docs = {
onboarding,
};

export default docs;
1 change: 1 addition & 0 deletions static/app/types/project.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ export type PlatformKey =
| 'cocoa'
| 'cocoa-objc'
| 'cocoa-swift'
| 'convex'
| 'cordova'
| 'csharp'
| 'csharp-aspnetcore'
Expand Down
Loading