Skip to content

feat(platforms): Add Astro as a platform (frontend) #58156

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

Merged
merged 3 commits into from
Oct 19, 2023
Merged
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
6 changes: 6 additions & 0 deletions fixtures/integration-docs/_platforms.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,12 @@
"id": "javascript-angularjs",
"name": "AngularJS"
},
{
"link": "https://docs.sentry.io/platforms/javascript/guides/astro/",
"type": "framework",
"id": "javascript-astro",
"name": "Astro"
},
{
"link": "https://docs.getsentry.com/clients/javascript/integrations/backbone/",
"type": "framework",
Expand Down
6 changes: 6 additions & 0 deletions fixtures/integration-docs/javascript-astro.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"html": "<div class=\"section\" id=\"installation\"></div>\n",
"link": "https://docs.sentry.io/platforms/javascript/guides/astro/",
"id": "javascript-astro",
"name": "Astro"
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,5 @@ export const sourceMapSdkDocsMap: Record<string, string> = {
'sentry.javascript.svelte': 'svelte',
'sentry.javascript.sveltekit': 'sveltekit',
'sentry.javascript.react-native': 'react-native',
'sentry.javascript.atro': 'astro',
};
1 change: 1 addition & 0 deletions static/app/components/events/interfaces/spans/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -668,6 +668,7 @@ export function isEventFromBrowserJavaScriptSDK(
'sentry.javascript.remix',
'sentry.javascript.svelte',
'sentry.javascript.sveltekit',
'sentry.javascript.astro',
].includes(sdkName.toLowerCase());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export const topJavascriptFrameworks = [
'javascript-svelte',
'javascript-sveltekit',
'javascript-remix',
'javascript-astro',
];

const topPythonFrameworks = [
Expand Down
4 changes: 4 additions & 0 deletions static/app/data/platformCategories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export const frontend: PlatformKey[] = [
'javascript',
'javascript-angular',
'javascript-angularjs',
'javascript-astro',
'javascript-backbone',
'javascript-ember',
'javascript-gatsby',
Expand Down Expand Up @@ -245,6 +246,7 @@ export const releaseHealth: PlatformKey[] = [
'javascript-react',
'javascript-angular',
'javascript-angularjs',
'javascript-astro',
'javascript-backbone',
'javascript-ember',
'javascript-gatsby',
Expand Down Expand Up @@ -296,6 +298,7 @@ export const replayPlatforms: readonly PlatformKey[] = [
'electron',
'javascript-angular',
// 'javascript-angularjs', // Unsupported, angularjs requires the v6.x core SDK
'javascript-astro',
'javascript-backbone',
'javascript-capacitor',
'javascript-electron',
Expand All @@ -320,6 +323,7 @@ export const replayOnboardingPlatforms: readonly PlatformKey[] = [
'capacitor',
'electron',
'javascript-angular',
'javascript-astro',
// 'javascript-angularjs', // Unsupported, angularjs requires the v6.x core SDK
// 'javascript-backbone', // No docs yet
'javascript-capacitor',
Expand Down
8 changes: 8 additions & 0 deletions static/app/data/platforms.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,14 @@ const platforms: PlatformIntegration[] = [
language: 'javascript',
link: 'https://docs.sentry.io/platforms/javascript/guides/angular/',
},
// TODO: comment back in when we have a getting-started page for Astro
// {
// id: 'javascript-astro',
// name: 'Astro',
// type: 'framework',
// language: 'javascript',
// link: 'https://docs.sentry.io/platforms/javascript/guides/astro/',
// },
{
id: 'javascript-ember',
name: 'Ember',
Expand Down
1 change: 1 addition & 0 deletions static/app/icons/icons.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ const platformToIcon = {
javascript: 'javascript',
'javascript-angular': 'angularjs',
'javascript-angularjs': 'angularjs',
'javascript-astro': 'astro',
'javascript-backbone': 'backbone',
'javascript-browser': 'javascript',
'javascript-capacitor': 'capacitor',
Expand Down
1 change: 1 addition & 0 deletions static/app/types/project.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ export type PlatformKey =
| 'javascript'
| 'javascript-angular'
| 'javascript-angularjs'
| 'javascript-astro'
| 'javascript-backbone'
| 'javascript-browser'
| 'javascript-capacitor'
Expand Down