Skip to content

Commit c73b8ff

Browse files
committed
Add Convex to onboarding
https://www.convex.dev/ is a backend-as-a-service that can run serverless functions. Sentry integration for exception reporting comes out of the box via a configuration.
1 parent b0f7dc6 commit c73b8ff

File tree

8 files changed

+74
-0
lines changed

8 files changed

+74
-0
lines changed

src/sentry/models/project.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666
"apple-macos",
6767
"bun",
6868
"capacitor",
69+
"convex",
6970
"cordova",
7071
"dart",
7172
"deno",

src/sentry/utils/platform_categories.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@
112112
# Mirrors `const serverless` in sentry/static/app/data/platformCategories.tsx
113113
# When changing this file, make sure to keep sentry/static/app/data/platformCategories.tsx in sync.
114114
SERVERLESS = {
115+
"convex",
115116
"dotnet-awslambda",
116117
"dotnet-gcpfunctions",
117118
"node-awslambda",

static/app/data/platformCategories.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ export const backend: PlatformKey[] = [
117117
// Mirrors `SERVERLESS` in src/sentry/utils/platform_categories.py
118118
// When changing this file, make sure to keep src/sentry/utils/platform_categories.py in sync.
119119
export const serverless: PlatformKey[] = [
120+
'convex',
120121
'dotnet-awslambda',
121122
'dotnet-gcpfunctions',
122123
'node-awslambda',

static/app/data/platformPickerCategories.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ const desktop: Set<PlatformKey> = new Set([
134134
]);
135135

136136
const serverless: Set<PlatformKey> = new Set([
137+
'convex',
137138
'dotnet-awslambda',
138139
'dotnet-gcpfunctions',
139140
'node-awslambda',

static/app/data/platforms.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,13 @@ export const platforms: PlatformIntegration[] = [
4646
language: 'capacitor',
4747
link: 'https://docs.sentry.io/platforms/javascript/guides/capacitor/',
4848
},
49+
{
50+
id: 'convex',
51+
name: 'Convex',
52+
type: 'language',
53+
language: 'convex',
54+
link: 'https://docs.sentry.io/platforms/javascript/guides/convex/',
55+
},
4956
{
5057
id: 'cordova',
5158
name: 'Cordova',

static/app/gettingStartedDocs/convex/convex.spec.tsx

Whitespace-only changes.
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
import {Fragment} from 'react';
2+
3+
import ExternalLink from 'sentry/components/links/externalLink';
4+
import {StepType} from 'sentry/components/onboarding/gettingStartedDoc/step';
5+
import type {
6+
Docs,
7+
OnboardingConfig,
8+
} from 'sentry/components/onboarding/gettingStartedDoc/types';
9+
import {t, tct} from 'sentry/locale';
10+
11+
const failingAction = `
12+
export const userError = action(async () => {
13+
throw new Error("I failed you!");
14+
});
15+
`;
16+
17+
const onboarding: OnboardingConfig = {
18+
install: () => [
19+
{
20+
type: StepType.INSTALL,
21+
description: tct(
22+
'Set up Sentry in your Convex project [link:deployment settings].',
23+
{
24+
link: (
25+
<ExternalLink href="https://docs.convex.dev/production/integrations/exception-reporting#configuring-sentry" />
26+
),
27+
}
28+
),
29+
configurations: [],
30+
},
31+
],
32+
configure: () => [],
33+
verify: () => [
34+
{
35+
type: StepType.VERIFY,
36+
description: (
37+
<Fragment>
38+
{t(
39+
'One way to verify your setup is by calling an action that throws intentionally.'
40+
)}
41+
<p>{t('Calling an undefined function will throw an exception:')}</p>
42+
</Fragment>
43+
),
44+
configurations: [
45+
{
46+
language: 'javascript',
47+
code: failingAction,
48+
},
49+
{
50+
language: 'bash',
51+
code: 'npx convex run myModule:userError',
52+
},
53+
],
54+
},
55+
],
56+
};
57+
58+
const docs: Docs = {
59+
onboarding,
60+
};
61+
62+
export default docs;

static/app/types/project.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ export type PlatformKey =
155155
| 'cocoa'
156156
| 'cocoa-objc'
157157
| 'cocoa-swift'
158+
| 'convex'
158159
| 'cordova'
159160
| 'csharp'
160161
| 'csharp-aspnetcore'

0 commit comments

Comments
 (0)