diff --git a/docs/platforms/javascript/common/best-practices/web-workers.mdx b/docs/platforms/javascript/common/best-practices/web-workers.mdx index 68fd393e67da5..3f4fa295bc47c 100644 --- a/docs/platforms/javascript/common/best-practices/web-workers.mdx +++ b/docs/platforms/javascript/common/best-practices/web-workers.mdx @@ -14,6 +14,8 @@ notSupported: - javascript.nextjs - javascript.nuxt - javascript.react + - javascript.solid + - javascript.solidstart - javascript.vue - javascript.wasm - javascript.node diff --git a/docs/platforms/javascript/common/configuration/application-not-responding.mdx b/docs/platforms/javascript/common/configuration/application-not-responding.mdx index ac2abed17f41b..7ae5315f3e783 100644 --- a/docs/platforms/javascript/common/configuration/application-not-responding.mdx +++ b/docs/platforms/javascript/common/configuration/application-not-responding.mdx @@ -16,6 +16,7 @@ supported: - javascript.electron - javascript.nextjs - javascript.nuxt + - javascript.solidstart - javascript.sveltekit - javascript.remix - javascript.astro diff --git a/docs/platforms/javascript/common/configuration/integrations/anr.mdx b/docs/platforms/javascript/common/configuration/integrations/anr.mdx index a1ecb7e040ae0..048259e33edb2 100644 --- a/docs/platforms/javascript/common/configuration/integrations/anr.mdx +++ b/docs/platforms/javascript/common/configuration/integrations/anr.mdx @@ -15,6 +15,7 @@ supported: - javascript.electron - javascript.nextjs - javascript.nuxt + - javascript.solidstart - javascript.sveltekit - javascript.remix - javascript.astro diff --git a/docs/platforms/javascript/common/configuration/integrations/console.mdx b/docs/platforms/javascript/common/configuration/integrations/console.mdx index 005a16cfa04fc..fd860e6763bc8 100644 --- a/docs/platforms/javascript/common/configuration/integrations/console.mdx +++ b/docs/platforms/javascript/common/configuration/integrations/console.mdx @@ -15,6 +15,7 @@ supported: - javascript.electron - javascript.nextjs - javascript.nuxt + - javascript.solidstart - javascript.sveltekit - javascript.remix - javascript.astro diff --git a/docs/platforms/javascript/common/configuration/integrations/graphql.mdx b/docs/platforms/javascript/common/configuration/integrations/graphql.mdx index 46ebb01996a5d..4c01c70b4231e 100644 --- a/docs/platforms/javascript/common/configuration/integrations/graphql.mdx +++ b/docs/platforms/javascript/common/configuration/integrations/graphql.mdx @@ -15,6 +15,7 @@ supported: - javascript.electron - javascript.nextjs - javascript.nuxt + - javascript.solidstart - javascript.sveltekit - javascript.remix - javascript.astro diff --git a/docs/platforms/javascript/common/configuration/integrations/http.mdx b/docs/platforms/javascript/common/configuration/integrations/http.mdx index df4db8c6ba7bd..d0606b49dc02d 100644 --- a/docs/platforms/javascript/common/configuration/integrations/http.mdx +++ b/docs/platforms/javascript/common/configuration/integrations/http.mdx @@ -15,6 +15,7 @@ supported: - javascript.electron - javascript.nextjs - javascript.nuxt + - javascript.solidstart - javascript.sveltekit - javascript.remix - javascript.astro diff --git a/docs/platforms/javascript/common/configuration/integrations/localvariables.mdx b/docs/platforms/javascript/common/configuration/integrations/localvariables.mdx index 785fa4876bafe..587d68e0fb042 100644 --- a/docs/platforms/javascript/common/configuration/integrations/localvariables.mdx +++ b/docs/platforms/javascript/common/configuration/integrations/localvariables.mdx @@ -15,6 +15,7 @@ supported: - javascript.electron - javascript.nextjs - javascript.nuxt + - javascript.solidstart - javascript.sveltekit - javascript.remix - javascript.astro diff --git a/docs/platforms/javascript/common/configuration/integrations/modules.mdx b/docs/platforms/javascript/common/configuration/integrations/modules.mdx index db4d298c103b0..27c07920461b8 100644 --- a/docs/platforms/javascript/common/configuration/integrations/modules.mdx +++ b/docs/platforms/javascript/common/configuration/integrations/modules.mdx @@ -15,6 +15,7 @@ supported: - javascript.electron - javascript.nextjs - javascript.nuxt + - javascript.solidstart - javascript.sveltekit - javascript.remix - javascript.astro diff --git a/docs/platforms/javascript/common/configuration/integrations/mongo.mdx b/docs/platforms/javascript/common/configuration/integrations/mongo.mdx index 6a0372a195aa2..8c8d9e13ae5f4 100644 --- a/docs/platforms/javascript/common/configuration/integrations/mongo.mdx +++ b/docs/platforms/javascript/common/configuration/integrations/mongo.mdx @@ -15,6 +15,7 @@ supported: - javascript.electron - javascript.nextjs - javascript.nuxt + - javascript.solidstart - javascript.sveltekit - javascript.remix - javascript.astro diff --git a/docs/platforms/javascript/common/configuration/integrations/mysql.mdx b/docs/platforms/javascript/common/configuration/integrations/mysql.mdx index d93f52af10b26..2af3871bf3d73 100644 --- a/docs/platforms/javascript/common/configuration/integrations/mysql.mdx +++ b/docs/platforms/javascript/common/configuration/integrations/mysql.mdx @@ -15,6 +15,7 @@ supported: - javascript.electron - javascript.nextjs - javascript.nuxt + - javascript.solidstart - javascript.sveltekit - javascript.remix - javascript.astro diff --git a/docs/platforms/javascript/common/configuration/integrations/mysql2.mdx b/docs/platforms/javascript/common/configuration/integrations/mysql2.mdx index dd233c594ad98..43f165716456d 100644 --- a/docs/platforms/javascript/common/configuration/integrations/mysql2.mdx +++ b/docs/platforms/javascript/common/configuration/integrations/mysql2.mdx @@ -15,6 +15,7 @@ supported: - javascript.electron - javascript.nextjs - javascript.nuxt + - javascript.solidstart - javascript.sveltekit - javascript.remix - javascript.astro diff --git a/docs/platforms/javascript/common/configuration/integrations/nodecontext.mdx b/docs/platforms/javascript/common/configuration/integrations/nodecontext.mdx index 398bc0068acd7..46a48eb9c4764 100644 --- a/docs/platforms/javascript/common/configuration/integrations/nodecontext.mdx +++ b/docs/platforms/javascript/common/configuration/integrations/nodecontext.mdx @@ -15,6 +15,7 @@ supported: - javascript.electron - javascript.nextjs - javascript.nuxt + - javascript.solidstart - javascript.sveltekit - javascript.remix - javascript.astro diff --git a/docs/platforms/javascript/common/configuration/integrations/nodefetch.mdx b/docs/platforms/javascript/common/configuration/integrations/nodefetch.mdx index 3fc39ab40da21..daeda95213ab1 100644 --- a/docs/platforms/javascript/common/configuration/integrations/nodefetch.mdx +++ b/docs/platforms/javascript/common/configuration/integrations/nodefetch.mdx @@ -15,6 +15,7 @@ supported: - javascript.electron - javascript.nextjs - javascript.nuxt + - javascript.solidstart - javascript.sveltekit - javascript.remix - javascript.astro diff --git a/docs/platforms/javascript/common/configuration/integrations/nodeprofiling.mdx b/docs/platforms/javascript/common/configuration/integrations/nodeprofiling.mdx index 60936f7c19601..f9f190386ad9c 100644 --- a/docs/platforms/javascript/common/configuration/integrations/nodeprofiling.mdx +++ b/docs/platforms/javascript/common/configuration/integrations/nodeprofiling.mdx @@ -15,6 +15,7 @@ supported: - javascript.electron - javascript.nextjs - javascript.nuxt + - javascript.solidstart - javascript.sveltekit - javascript.remix - javascript.astro diff --git a/docs/platforms/javascript/common/configuration/integrations/onuncaughtexception.mdx b/docs/platforms/javascript/common/configuration/integrations/onuncaughtexception.mdx index f3b323b13d8eb..33b1ab28e8af4 100644 --- a/docs/platforms/javascript/common/configuration/integrations/onuncaughtexception.mdx +++ b/docs/platforms/javascript/common/configuration/integrations/onuncaughtexception.mdx @@ -15,6 +15,7 @@ supported: - javascript.electron - javascript.nextjs - javascript.nuxt + - javascript.solidstart - javascript.sveltekit - javascript.remix - javascript.astro diff --git a/docs/platforms/javascript/common/configuration/integrations/postgres.mdx b/docs/platforms/javascript/common/configuration/integrations/postgres.mdx index a628427496054..deee6ef109880 100644 --- a/docs/platforms/javascript/common/configuration/integrations/postgres.mdx +++ b/docs/platforms/javascript/common/configuration/integrations/postgres.mdx @@ -15,6 +15,7 @@ supported: - javascript.electron - javascript.nextjs - javascript.nuxt + - javascript.solidstart - javascript.sveltekit - javascript.remix - javascript.astro diff --git a/docs/platforms/javascript/common/configuration/integrations/prisma.mdx b/docs/platforms/javascript/common/configuration/integrations/prisma.mdx index 4771783859f40..824bcfd580cef 100644 --- a/docs/platforms/javascript/common/configuration/integrations/prisma.mdx +++ b/docs/platforms/javascript/common/configuration/integrations/prisma.mdx @@ -14,6 +14,7 @@ supported: - javascript.nestjs - javascript.nextjs - javascript.nuxt + - javascript.solidstart - javascript.sveltekit - javascript.remix - javascript.astro diff --git a/docs/platforms/javascript/common/configuration/integrations/redis.mdx b/docs/platforms/javascript/common/configuration/integrations/redis.mdx index 1025ea324a3b0..4fede8c84df54 100644 --- a/docs/platforms/javascript/common/configuration/integrations/redis.mdx +++ b/docs/platforms/javascript/common/configuration/integrations/redis.mdx @@ -15,6 +15,7 @@ supported: - javascript.electron - javascript.nextjs - javascript.nuxt + - javascript.solidstart - javascript.sveltekit - javascript.remix - javascript.astro diff --git a/docs/platforms/javascript/common/configuration/integrations/requestdata.mdx b/docs/platforms/javascript/common/configuration/integrations/requestdata.mdx index 538d76b24fefb..0e7b6ccbe9113 100644 --- a/docs/platforms/javascript/common/configuration/integrations/requestdata.mdx +++ b/docs/platforms/javascript/common/configuration/integrations/requestdata.mdx @@ -16,6 +16,7 @@ supported: - javascript.nestjs - javascript.nextjs - javascript.nuxt + - javascript.solidstart - javascript.sveltekit - javascript.remix - javascript.astro diff --git a/docs/platforms/javascript/common/configuration/integrations/trpc.mdx b/docs/platforms/javascript/common/configuration/integrations/trpc.mdx index 5c65937802d8c..22d27f7f72722 100644 --- a/docs/platforms/javascript/common/configuration/integrations/trpc.mdx +++ b/docs/platforms/javascript/common/configuration/integrations/trpc.mdx @@ -15,6 +15,7 @@ supported: - javascript.electron - javascript.nextjs - javascript.nuxt + - javascript.solidstart - javascript.sveltekit - javascript.remix - javascript.astro diff --git a/docs/platforms/javascript/common/configuration/integrations/unhandledrejection.mdx b/docs/platforms/javascript/common/configuration/integrations/unhandledrejection.mdx index 84ee7f802f82a..30f3cd73df403 100644 --- a/docs/platforms/javascript/common/configuration/integrations/unhandledrejection.mdx +++ b/docs/platforms/javascript/common/configuration/integrations/unhandledrejection.mdx @@ -15,6 +15,7 @@ supported: - javascript.electron - javascript.nextjs - javascript.nuxt + - javascript.solidstart - javascript.sveltekit - javascript.remix - javascript.astro diff --git a/docs/platforms/javascript/common/configuration/tree-shaking.mdx b/docs/platforms/javascript/common/configuration/tree-shaking.mdx index ad1af3f9e846c..ac89d6049d938 100644 --- a/docs/platforms/javascript/common/configuration/tree-shaking.mdx +++ b/docs/platforms/javascript/common/configuration/tree-shaking.mdx @@ -27,7 +27,7 @@ The Sentry SDK ships with code that is not strictly required for it to collect y you use certain features. - + ### Tree Shaking With Sentry Bundler Plugins @@ -144,7 +144,7 @@ Replacing this flag with `true` will tree shake any SDK code that's related to t - + ### Tree Shaking With Webpack @@ -191,7 +191,7 @@ module.exports = { - + ### Tree Shaking With Rollup diff --git a/docs/platforms/javascript/common/index.mdx b/docs/platforms/javascript/common/index.mdx index 067c5d7745b13..bd89f12cad659 100644 --- a/docs/platforms/javascript/common/index.mdx +++ b/docs/platforms/javascript/common/index.mdx @@ -43,7 +43,7 @@ If you prefer to follow video instructions, see [How to Install the Sentry Next. - + ## Features @@ -63,7 +63,7 @@ Select which Sentry features you'd like to install in addition to Error Monitori - + In addition to capturing errors, you can monitor interactions between multiple services or applications by [enabling tracing](/concepts/key-terms/tracing/). You can also collect and analyze performance profiles from real users with [profiling](/product/explore/profiling/). diff --git a/docs/platforms/javascript/common/install/index.mdx b/docs/platforms/javascript/common/install/index.mdx index d1ad800fb5d0d..310eb6c885752 100644 --- a/docs/platforms/javascript/common/install/index.mdx +++ b/docs/platforms/javascript/common/install/index.mdx @@ -19,6 +19,7 @@ notSupported: - javascript.wasm - javascript.remix - javascript.solid + - javascript.solidstart - javascript.svelte - javascript.sveltekit - javascript.aws-lambda diff --git a/docs/platforms/javascript/common/install/npm.mdx b/docs/platforms/javascript/common/install/npm.mdx index c4eb9d6678e73..6e55840629422 100644 --- a/docs/platforms/javascript/common/install/npm.mdx +++ b/docs/platforms/javascript/common/install/npm.mdx @@ -18,6 +18,8 @@ notSupported: - javascript.vue - javascript.wasm - javascript.remix + - javascript.solid + - javascript.solidstart - javascript.svelte - javascript.sveltekit - javascript.node diff --git a/docs/platforms/javascript/common/opentelemetry/custom-setup.mdx b/docs/platforms/javascript/common/opentelemetry/custom-setup.mdx index e5f30b1a50d71..289cfad3bbdc3 100644 --- a/docs/platforms/javascript/common/opentelemetry/custom-setup.mdx +++ b/docs/platforms/javascript/common/opentelemetry/custom-setup.mdx @@ -14,6 +14,7 @@ supported: - javascript.koa - javascript.nestjs - javascript.nuxt + - javascript.solidstart - javascript.sveltekit - javascript.astro - javascript.remix diff --git a/docs/platforms/javascript/common/opentelemetry/index.mdx b/docs/platforms/javascript/common/opentelemetry/index.mdx index 97e7ab51821a8..38e6d0b41a302 100644 --- a/docs/platforms/javascript/common/opentelemetry/index.mdx +++ b/docs/platforms/javascript/common/opentelemetry/index.mdx @@ -15,6 +15,7 @@ supported: - javascript.koa - javascript.nestjs - javascript.nuxt + - javascript.solidstart - javascript.sveltekit - javascript.astro - javascript.remix diff --git a/docs/platforms/javascript/common/opentelemetry/using-opentelemetry-apis.mdx b/docs/platforms/javascript/common/opentelemetry/using-opentelemetry-apis.mdx index 86349d4c5f2db..18272673172e0 100644 --- a/docs/platforms/javascript/common/opentelemetry/using-opentelemetry-apis.mdx +++ b/docs/platforms/javascript/common/opentelemetry/using-opentelemetry-apis.mdx @@ -14,6 +14,7 @@ supported: - javascript.koa - javascript.nestjs - javascript.nuxt + - javascript.solidstart - javascript.sveltekit - javascript.astro - javascript.remix diff --git a/docs/platforms/javascript/common/sourcemaps/uploading/cli.mdx b/docs/platforms/javascript/common/sourcemaps/uploading/cli.mdx index fe7d301b7296e..03ee5b762081b 100644 --- a/docs/platforms/javascript/common/sourcemaps/uploading/cli.mdx +++ b/docs/platforms/javascript/common/sourcemaps/uploading/cli.mdx @@ -5,6 +5,7 @@ sidebar_order: 6 notSupported: - javascript.nextjs - javascript.remix + - javascript.solidstart - javascript.sveltekit - javascript.astro - javascript.nuxt diff --git a/docs/platforms/javascript/common/sourcemaps/uploading/index.mdx b/docs/platforms/javascript/common/sourcemaps/uploading/index.mdx index 3c25c12860b1a..d83b6f7479cb3 100644 --- a/docs/platforms/javascript/common/sourcemaps/uploading/index.mdx +++ b/docs/platforms/javascript/common/sourcemaps/uploading/index.mdx @@ -5,6 +5,7 @@ sidebar_order: 1 notSupported: - javascript.nextjs - javascript.remix + - javascript.solidstart - javascript.sveltekit - javascript.astro - javascript.nuxt diff --git a/docs/platforms/javascript/common/tracing/instrumentation/custom-instrumentation/caches-module.mdx b/docs/platforms/javascript/common/tracing/instrumentation/custom-instrumentation/caches-module.mdx index 1ce90e4068bde..915d835a463c3 100644 --- a/docs/platforms/javascript/common/tracing/instrumentation/custom-instrumentation/caches-module.mdx +++ b/docs/platforms/javascript/common/tracing/instrumentation/custom-instrumentation/caches-module.mdx @@ -18,6 +18,7 @@ supported: - javascript.nextjs - javascript.nuxt - javascript.astro + - javascript.solidstart - javascript.sveltekit - javascript.remix --- diff --git a/docs/platforms/javascript/common/tracing/instrumentation/custom-instrumentation/queues-module.mdx b/docs/platforms/javascript/common/tracing/instrumentation/custom-instrumentation/queues-module.mdx index 99d48549e1aeb..b5662015516e3 100644 --- a/docs/platforms/javascript/common/tracing/instrumentation/custom-instrumentation/queues-module.mdx +++ b/docs/platforms/javascript/common/tracing/instrumentation/custom-instrumentation/queues-module.mdx @@ -18,6 +18,7 @@ supported: - javascript.nextjs - javascript.nuxt - javascript.astro + - javascript.solidstart - javascript.sveltekit - javascript.remix --- diff --git a/docs/platforms/javascript/guides/solid/features/error-boundary.mdx b/docs/platforms/javascript/guides/solid/features/error-boundary.mdx index 093d620943d4c..9263fd7ef2d1c 100644 --- a/docs/platforms/javascript/guides/solid/features/error-boundary.mdx +++ b/docs/platforms/javascript/guides/solid/features/error-boundary.mdx @@ -3,32 +3,23 @@ title: Solid Error Boundary description: "Learn how to wrap Solid error boundaries to automatically capture errors." --- -The Solid SDK exports a function to wrap the native Solid error boundary component to automatically capture exceptions +The Sentry SDK exports a function to wrap the native Solid error boundary component to automatically capture exceptions from inside a component tree and render a fallback component. Wrap the native Solid `ErrorBoundary` component with `Sentry.withSentryErrorBoundary`. - - ```jsx import * as Sentry from "@sentry/solid"; import { ErrorBoundary } from "solid-js"; -import App from "./app"; - -Sentry.init({ - dsn: "__PUBLIC_DSN__", - tracesSampleRate: 1.0, // Capture 100% of the transactions -}); // Wrap Solid"s ErrorBoundary to automatically capture exceptions const SentryErrorBoundary = Sentry.withSentryErrorBoundary(ErrorBoundary); -render( - () => ( +export default function SomeComponent() { + return (
Error: {err.message}
}> - +
Some Component
- ), - document.getElementById("root"), -); + ); +} ``` diff --git a/docs/platforms/javascript/guides/solid/features/index.mdx b/docs/platforms/javascript/guides/solid/features/index.mdx index 9986c2e3a0e8c..cf6d8269e2a13 100644 --- a/docs/platforms/javascript/guides/solid/features/index.mdx +++ b/docs/platforms/javascript/guides/solid/features/index.mdx @@ -6,9 +6,9 @@ description: "Learn how Sentry's Solid SDK exposes features for first class inte This SDK is considered **experimental and in an alpha state**. It may experience breaking changes. Please reach out on - [GitHub](https://github.com/getsentry/sentry-javascript/issues/new/choose) if you have any feedback or concerns. This - SDK currently only supports [Solid](https://www.solidjs.com/) and is not yet officially compatible with - [Solid Start](https://start.solidjs.com/). + [GitHub](https://github.com/getsentry/sentry-javascript/issues/new/choose) if you have any feedback or concerns. + This SDK is for [Solid](https://www.solidjs.com/), for [SolidStart](https://start.solidjs.com/) see our + [SolidStart SDK](/platforms/javascript/guides/solidstart). diff --git a/docs/platforms/javascript/guides/solid/features/solid-router.mdx b/docs/platforms/javascript/guides/solid/features/solid-router.mdx index bc85b752768c3..50e361e869c2c 100644 --- a/docs/platforms/javascript/guides/solid/features/solid-router.mdx +++ b/docs/platforms/javascript/guides/solid/features/solid-router.mdx @@ -7,7 +7,7 @@ description: "Learn about Sentry's Solid Router integration." The routing instrumentation supports [Solid Router](https://docs.solidjs.com/solid-router) 0.13.4 and up. -The Solid SDK provides a routing instrumentation for Solid Router to create navigation spans to ensure +The Sentry SDK provides a routing instrumentation for Solid Router to create navigation spans to ensure you collect meaningful performance data about the health of your page loads and associated requests. To get started, import `solidRouterBrowserTracingIntegration` from `@sentry/solid/solidrouter` and add it to `Sentry.init` diff --git a/docs/platforms/javascript/guides/solidstart/config.yml b/docs/platforms/javascript/guides/solidstart/config.yml new file mode 100644 index 0000000000000..cff1462d26491 --- /dev/null +++ b/docs/platforms/javascript/guides/solidstart/config.yml @@ -0,0 +1,6 @@ +title: SolidStart +description: SolidStart is a framework for full-stack web apps and websites. Learn how to set it up with Sentry. +sdk: sentry.javascript.solidstart +categories: + - browser + - server diff --git a/docs/platforms/javascript/guides/solidstart/features/error-boundary.mdx b/docs/platforms/javascript/guides/solidstart/features/error-boundary.mdx new file mode 100644 index 0000000000000..16f1dce83989a --- /dev/null +++ b/docs/platforms/javascript/guides/solidstart/features/error-boundary.mdx @@ -0,0 +1,25 @@ +--- +title: Solid Error Boundary +description: "Learn how to wrap Solid error boundaries to automatically capture errors." +--- + +The Sentry SDK exports a function to wrap the native Solid error boundary component to automatically capture exceptions +from inside a component tree and render a fallback component. + +Wrap the native Solid `ErrorBoundary` component with `Sentry.withSentryErrorBoundary`. + +```jsx +import * as Sentry from "@sentry/solidstart"; +import { ErrorBoundary } from "solid-js"; + +// Wrap Solid"s ErrorBoundary to automatically capture exceptions +const SentryErrorBoundary = Sentry.withSentryErrorBoundary(ErrorBoundary); + +export default function SomeComponent() { + return ( +
Error: {err.message}
}> +
Some Component
+
+ ); +} +``` diff --git a/docs/platforms/javascript/guides/solidstart/features/index.mdx b/docs/platforms/javascript/guides/solidstart/features/index.mdx new file mode 100644 index 0000000000000..a4d2c0318d464 --- /dev/null +++ b/docs/platforms/javascript/guides/solidstart/features/index.mdx @@ -0,0 +1,15 @@ +--- +title: SolidStart Features +description: "Learn how Sentry's SolidStart SDK exposes features for first class integration with Solid." +--- + + + + This SDK is considered **experimental and in an alpha state**. It may experience breaking changes. Please reach out on + [GitHub](https://github.com/getsentry/sentry-javascript/issues/new/choose) if you have any feedback or concerns. + + + +The Sentry SolidStart SDK offers Solid-specific features for first class integration with the framework. + + diff --git a/docs/platforms/javascript/guides/solidstart/features/middleware.mdx b/docs/platforms/javascript/guides/solidstart/features/middleware.mdx new file mode 100644 index 0000000000000..feb69bae2b524 --- /dev/null +++ b/docs/platforms/javascript/guides/solidstart/features/middleware.mdx @@ -0,0 +1,31 @@ +--- +title: Solid Middleware +description: "Learn about Sentry's middleware for better instrumentation." +--- + +The Sentry middleware enhances the data collected by Sentry on the server side by enabling distributed tracing between the client and server. + +Add the Sentry middleware to your `middleware.ts` file. If you don't have a `middleware.ts` file yet, create one: + +```typescript {filename:middleware.ts} +import { sentryBeforeResponseMiddleware } from '@sentry/solidstart/middleware'; +import { createMiddleware } from '@solidjs/start/middleware'; + +export default createMiddleware({ + onBeforeResponse: [ + sentryBeforeResponseMiddleware(), + // Add your other middleware handlers after `sentryBeforeResponseMiddleware` + ], +}); +``` + +And specify `middleware.ts` in `app.config.ts`: + +```typescript {filename:app.config.ts} +import { defineConfig } from '@solidjs/start/config'; + +export default defineConfig({ + // ... + middleware: './src/middleware.ts', +}); +``` diff --git a/docs/platforms/javascript/guides/solidstart/features/solid-router.mdx b/docs/platforms/javascript/guides/solidstart/features/solid-router.mdx new file mode 100644 index 0000000000000..d8e7d5e49eb59 --- /dev/null +++ b/docs/platforms/javascript/guides/solidstart/features/solid-router.mdx @@ -0,0 +1,34 @@ +--- +title: Solid Router +description: "Learn about Sentry's Solid Router integration." +--- + + + The routing instrumentation supports [Solid Router](https://docs.solidjs.com/solid-router) 0.13.4 and up. + + +The Sentry SDK provides a routing instrumentation for Solid Router to create navigation spans to ensure +you collect meaningful performance data about the health of your page loads and associated requests. + +To get started, import `solidRouterBrowserTracingIntegration` from `@sentry/solidstart/solidrouter` and add it to `Sentry.init` +instead of the regular `Sentry.browserTracingIntegration` to enable performance tracing. + +Import `withSentryRouterRouting` from `@sentry/solidstart/solidrouter` and use it to wrap `Router`, `MemoryRouter` or `HashRouter` from `@solidjs/router`. +This creates a higher order component, which will enable Sentry to reach your router context. + +```jsx +import { withSentryRouterRouting } from '@sentry/solidstart/solidrouter'; +import { Router } from "@solidjs/router"; +import { FileRoutes } from "@solidjs/start/router"; + +// Wrap Solid Router to collect meaningful performance data on route changes +const SentryRouter = withSentryRouterRouting(Router); + +export default function App() { + return ( + + + + ) +} +``` diff --git a/platform-includes/capture-error/javascript.solid.mdx b/platform-includes/capture-error/javascript.solid.mdx new file mode 100644 index 0000000000000..52ac9f30af871 --- /dev/null +++ b/platform-includes/capture-error/javascript.solid.mdx @@ -0,0 +1,11 @@ +You can pass an `Error` object to `captureException()` to get it captured as an event. It's also possible to pass non-`Error` objects and strings, but be aware that the resulting events in Sentry may be missing a stack trace. + +```javascript +import * as Sentry from "@sentry/solid"; + +try { + aFunctionThatMightFail(); +} catch (err) { + Sentry.captureException(err); +} +``` diff --git a/platform-includes/capture-error/javascript.solidstart.mdx b/platform-includes/capture-error/javascript.solidstart.mdx new file mode 100644 index 0000000000000..edd11afe0fcc2 --- /dev/null +++ b/platform-includes/capture-error/javascript.solidstart.mdx @@ -0,0 +1,11 @@ +You can pass an `Error` object to `captureException()` to get it captured as an event. It's also possible to pass non-`Error` objects and strings, but be aware that the resulting events in Sentry may be missing a stack trace. + +```javascript +import * as Sentry from "@sentry/solidstart"; + +try { + aFunctionThatMightFail(); +} catch (err) { + Sentry.captureException(err); +} +``` diff --git a/platform-includes/configuration/integrations/javascript.solidstart.mdx b/platform-includes/configuration/integrations/javascript.solidstart.mdx new file mode 100644 index 0000000000000..387999c4595fb --- /dev/null +++ b/platform-includes/configuration/integrations/javascript.solidstart.mdx @@ -0,0 +1,64 @@ +The SolidStart SDK initializes the SDK in two runtimes: Browser and Node.js. +However, it's important to note that not all integrations are compatible with all of these runtimes. + +Depending on whether an integration enhances the functionality of a particular runtime, such as the `BrowserTracing` integration for the browser runtime or the `RequestData` integration for the Node.js runtime, you can only include these integrations in their respective configuration files: + +- For the browser runtime integrations, add integrations to `Sentry.init` in `entry..client.config.(js|ts)` +- For the Node.js runtime integrations, add integrations to `Sentry.init` in `instrument.server.mjs` + +### Common Integrations + +| | **Auto Enabled** | **Errors** | **Performance** | **Additional Context** | +| --------------------------------------------------- | :--------------: | :--------: | :-------------: | :--------------------: | +| [`dedupeIntegration`](./dedupe) | ✓ | ✓ | | | +| [`functionToStringIntegration`](./functiontostring) | ✓ | | | | +| [`inboundFiltersIntegration`](./inboundfilters) | ✓ | ✓ | | | +| [`linkedErrorsIntegration`](./linkederrors) | ✓ | ✓ | | | +| [`captureConsoleIntegration`](./captureconsole) | | | | ✓ | +| [`debugIntegration`](./debug) | | | | | +| [`extraErrorDataIntegration`](./extraerrordata) | | | | ✓ | +| [`rewriteFramesIntegration`](./rewriteframes) | | ✓ | | | +| [`sessionTimingIntegration`](./sessiontiming) | | | | ✓ | + +### Browser Integrations + +| | **Auto Enabled** | **Errors** | **Performance** | **Replay** | **Additional Context** | +| ----------------------------------------------------- | :--------------: | :--------: | :-------------: | :--------: | :--------------------: | +| [`breadcrumbsIntegration`](./breadcrumbs) | ✓ | | | | ✓ | +| [`browserApiErrorsIntegration`](./browserapierrors) | ✓ | ✓ | | | | +| [`browserTracingIntegration`](./browsertracing) | ✓ | | ✓ | | ✓ | +| [`globalHandlersIntegration`](./globalhandlers) | ✓ | ✓ | | | | +| [`httpContextIntegration`](./httpcontext) | ✓ | | | | ✓ | +| [`browserProfilingIntegration`](./browserprofiling) | | | ✓ | | | +| [`contextLinesIntegration`](./contextlines) | | ✓ | | | | +| [`httpClientIntegration`](./httpclient) | | ✓ | | | | +| [`moduleMetadataIntegration`](./modulemetadata) | | | | | ✓ | +| [`replayIntegration`](./replay) | | | | ✓ | ✓ | +| [`replayCanvasIntegration`](./replaycanvas) | | | | ✓ | | +| [`reportingObserverIntegration`](./reportingobserver) | | ✓ | | | | + +### Node.js Integrations + +| | **Auto Enabled** | **Errors** | **Performance** | **Additional Context** | +| --------------------------------------------------------- | :--------------: | :--------: | :-------------: | :--------------------: | +| [`consoleIntegration`](./console) | ✓ | | | ✓ | +| [`contextLinesIntegration`](./contextlines) | ✓ | ✓ | | | +| [`httpIntegration`](./http) | ✓ | ✓ | ✓ | ✓ | +| [`graphqlIntegration`](./graphql) | ✓ | | ✓ | | +| [`modulesIntegration`](./modules) | ✓ | | | ✓ | +| [`mongoIntegration`](./mongo) | ✓ | | ✓ | | +| [`mongooseIntegration`](./mongoose) | ✓ | | ✓ | | +| [`mysqlIntegration`](./mysql) | ✓ | | ✓ | | +| [`mysql2Integration`](./mysql2) | ✓ | | ✓ | | +| [`nodeContextIntegration`](./nodecontext) | ✓ | | | ✓ | +| [`nativeNodeFetchIntegration`](./nodefetch) | ✓ | | ✓ | ✓ | +| [`onUncaughtExceptionIntegration`](./onuncaughtexception) | ✓ | ✓ | | | +| [`onUnhandledRejectionIntegration`](./unhandledrejection) | ✓ | ✓ | | | +| [`postgresIntegration`](./postgres) | ✓ | | ✓ | | +| [`prismaIntegration`](./prisma) | | | ✓ | | +| [`redisIntegration`](./redis) | ✓ | | ✓ | | +| [`requestDataIntegration`](./requestdata) | ✓ | | ✓ | | +| [`anrIntegration`](./anr) | | ✓ | | | +| [`localVariablesIntegration`](./localvariables) | | ✓ | | | +| [`nodeProfilingIntegration`](./nodeprofiling) | | | ✓ | | +| [`trpcMiddleware`](./trpc) | | ✓ | ✓ | ✓ | diff --git a/platform-includes/distributed-tracing/how-to-use/javascript.solidstart.mdx b/platform-includes/distributed-tracing/how-to-use/javascript.solidstart.mdx new file mode 100644 index 0000000000000..eba37ae021768 --- /dev/null +++ b/platform-includes/distributed-tracing/how-to-use/javascript.solidstart.mdx @@ -0,0 +1,37 @@ +To set up distributed tracing, use Sentry's middleware to inject tracing information into meta tags. + +Create or modify the `middleware.ts` file and import and add `sentryBeforeResponseMiddleware` + +```typescript {filename: middleware.ts} +import { sentryBeforeResponseMiddleware } from '@sentry/solidstart/middleware'; +import { createMiddleware } from '@solidjs/start/middleware'; + +export default createMiddleware({ + onBeforeResponse: [ + sentryBeforeResponseMiddleware(), + // Add your other middleware handlers after `sentryBeforeResponseMiddleware` + ], +}); +```` + +If you didn't use a middleware before, don't forget to specify it in `app.config.ts` + +```typescript {filename: app.config.ts} +import { defineConfig } from '@solidjs/start/config'; + +export default defineConfig({ + // ... + middleware: './src/middleware.ts', +}); +``` + +To get around possible [Browser CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) issues, you should define `tracePropagationTargets` for client-side. + +```javascript +// hooks.client.js +Sentry.init({ + dsn: "___PUBLIC_DSN___", + integrations: [Sentry.solidRouterBrowserTracingIntegration()], + tracePropagationTargets: ["https://myproject.org", /^\/api\//], +}); +``` diff --git a/platform-includes/enriching-events/import/javascript.solidstart.mdx b/platform-includes/enriching-events/import/javascript.solidstart.mdx new file mode 100644 index 0000000000000..a99d29af0bbed --- /dev/null +++ b/platform-includes/enriching-events/import/javascript.solidstart.mdx @@ -0,0 +1,3 @@ +```javascript +import * as Sentry from "@sentry/solidstart"; +``` diff --git a/platform-includes/getting-started-config/javascript.solidstart.mdx b/platform-includes/getting-started-config/javascript.solidstart.mdx new file mode 100644 index 0000000000000..49fc4871b32b3 --- /dev/null +++ b/platform-includes/getting-started-config/javascript.solidstart.mdx @@ -0,0 +1,102 @@ +To set up the Sentry SDK initialize it in the client and server. + +### Client-side Setup + +Initialize the Sentry SDK in your `entry-client.tsx` file. + +If you're using Solid Router, add the `solidRouterBrowserTracingIntegration` to collect meaningful performance data about the health of your page loads and associated requests. + + + +```jsx {filename:entry-client.tsx} +import * as Sentry from '@sentry/solidstart'; +import { solidRouterBrowserTracingIntegration } from '@sentry/solidstart/solidrouter'; +import { mount, StartClient } from '@solidjs/start/client'; + +Sentry.init({ + dsn: '__PUBLIC_DSN__', + integrations: [solidRouterBrowserTracingIntegration()], + tracesSampleRate: 1.0, // Capture 100% of the transactions +}); + +mount(() => , document.getElementById('app')); +``` + +### Server-side Setup + +Create an instrument file `instrument.server.mjs` and initialize the Sentry SDK. + + + +```javascript {filename:instrument.server.mjs} +import * as Sentry from '@sentry/solidstart'; + +Sentry.init({ + dsn: '__PUBLIC_DSN__', + tracesSampleRate: 1.0, // Capture 100% of the transactions +}); +``` + +### Instrumentation + +Complete the setup by adding the Sentry middleware to your `middleware.ts` file. If you don't have a `middleware.ts` file yet, create one: + +```typescript {filename:middleware.ts} +import { sentryBeforeResponseMiddleware } from '@sentry/solidstart/middleware'; +import { createMiddleware } from '@solidjs/start/middleware'; + +export default createMiddleware({ + onBeforeResponse: [ + sentryBeforeResponseMiddleware(), + // Add your other middleware handlers after `sentryBeforeResponseMiddleware` + ], +}); +``` + +And specify `middleware.ts` in `app.config.ts`: + +```typescript {filename:app.config.ts} +import { defineConfig } from '@solidjs/start/config'; + +export default defineConfig({ + // ... + middleware: './src/middleware.ts', +}); +``` + +The Sentry middleware enhances the data collected by Sentry on the server side by enabling distributed tracing between the client and server. + +If you previously added the `solidRouterBrowserTracingIntegration` integration in `entry-client.tsx`, wrap your Solid Router with `withSentryRouterRouting`. +This creates a higher order component, which will enable Sentry to collect navigation spans. + +```tsx {filename:app.tsx} +import { Router } from "@solidjs/router"; +import { FileRoutes } from "@solidjs/start/router"; +import { withSentryRouterRouting } from '@sentry/solidstart/solidrouter' + +const SentryRouter = withSentryRouterRouting(Router) + +export default function App() { + return ( + + + + ); +} +``` + +### Run your application + +Add an `--import` flag to the `NODE_OPTIONS` environment variable wherever you run your application. + +```bash {tabTitle: npm} +NODE_OPTIONS='--import=./src/instrument.server.mjs npm start +``` + +```bash {tabTitle: yarn} +NODE_OPTIONS='--import=./src/instrument.server.mjs yarn start +``` + +```bash {tabTitle: pnpm} +NODE_OPTIONS='--import=./src/instrument.server.mjs pnpm start +``` diff --git a/platform-includes/getting-started-install/javascript.solidstart.mdx b/platform-includes/getting-started-install/javascript.solidstart.mdx new file mode 100644 index 0000000000000..da81645c3c07b --- /dev/null +++ b/platform-includes/getting-started-install/javascript.solidstart.mdx @@ -0,0 +1,11 @@ +```bash {tabTitle:npm} +npm install @sentry/solidstart --save +``` + +```bash {tabTitle:yarn} +yarn add @sentry/solidstart +``` + +```bash {tabTitle:pnpm} +pnpm add @sentry/solidstart +``` diff --git a/platform-includes/getting-started-primer/javascript.solidstart.mdx b/platform-includes/getting-started-primer/javascript.solidstart.mdx new file mode 100644 index 0000000000000..fa793c6a02b4b --- /dev/null +++ b/platform-includes/getting-started-primer/javascript.solidstart.mdx @@ -0,0 +1,4 @@ + + This SDK is considered **experimental and in an alpha state**. It may experience breaking changes. Please reach out on + [GitHub](https://github.com/getsentry/sentry-javascript/issues/new/choose) if you have any feedback or concerns. + diff --git a/platform-includes/getting-started-sourcemaps/javascript.solidstart.mdx b/platform-includes/getting-started-sourcemaps/javascript.solidstart.mdx new file mode 100644 index 0000000000000..c9d582346b284 --- /dev/null +++ b/platform-includes/getting-started-sourcemaps/javascript.solidstart.mdx @@ -0,0 +1,53 @@ +## Add Readable Stack Traces to Errors + +To generate and upload source maps of your Solid Start app use our Vite bundler plugin. + +### Install + +```bash {tabTitle:npm} +npm install --save-dev @sentry/vite-plugin +``` + +```bash {tabTitle:yarn} +yarn add --dev @sentry/vite-plugin +``` + +```bash {tabTitle:pnpm} +pnpm add --save-dev @sentry/vite-plugin +``` + +### Config + +To get readable stack traces in your production builds, set the `SENTRY_AUTH_TOKEN` environment variable in your build environment. You can also add the environment variable to a `.env.sentry-build-plugin` file in the root of your project. + + + +```bash {filename:.env.sentry-build-plugin} +SENTRY_ORG="___ORG_SLUG___" +SENTRY_PROJECT="___PROJECT_SLUG___" +SENTRY_AUTH_TOKEN="___ORG_AUTH_TOKEN___" +``` + +Finally, add the plugin in `app.config.ts` and enable sourcemaps. + +```TypeScript {filename:app.config.ts} +import { defineConfig } from '@solidjs/start/config'; +import { sentryVitePlugin } from '@sentry/vite-plugin'; + +export default defineConfig({ + // rest of your config + // ... + vite: { + build: { + sourcemap: true, + }, + plugins: [ + sentryVitePlugin({ + org: process.env.SENTRY_ORG, + project: process.env.SENTRY_PROJECT, + authToken: process.env.SENTRY_AUTH_TOKEN, + }), + ], + }, +}); +``` diff --git a/platform-includes/getting-started-verify/javascript.solidstart.mdx b/platform-includes/getting-started-verify/javascript.solidstart.mdx new file mode 100644 index 0000000000000..3665854c85795 --- /dev/null +++ b/platform-includes/getting-started-verify/javascript.solidstart.mdx @@ -0,0 +1,12 @@ +```javascript + +``` + +This snippet adds a button that throws an error in a Solid component. diff --git a/platform-includes/sourcemaps/overview/javascript.solidstart.mdx b/platform-includes/sourcemaps/overview/javascript.solidstart.mdx new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/platform-includes/sourcemaps/primer/javascript.solidstart.mdx b/platform-includes/sourcemaps/primer/javascript.solidstart.mdx new file mode 100644 index 0000000000000..600fa6d5875f3 --- /dev/null +++ b/platform-includes/sourcemaps/primer/javascript.solidstart.mdx @@ -0,0 +1,3 @@ +To generate and upload source maps of your Solid Start app use the [Sentry Vite Plugin](https://www.npmjs.com/package/@sentry/vite-plugin/v/2.14.2). + +See the [Manual Configuration](../#add-readable-stack-traces-to-errors) page and the Sentry [Vite documentation](https://www.npmjs.com/package/@sentry/vite-plugin/v/2.14.2#configuration) for more details. diff --git a/src/components/platformIcon.tsx b/src/components/platformIcon.tsx index b37a73bfe13ea..0540e83373904 100644 --- a/src/components/platformIcon.tsx +++ b/src/components/platformIcon.tsx @@ -113,6 +113,7 @@ import ServerlessSVG from 'platformicons/svg/serverless.svg'; import SidekiqSVG from 'platformicons/svg/sidekiq.svg'; import SinatraSVG from 'platformicons/svg/sinatra.svg'; import SolidSVG from 'platformicons/svg/solid.svg'; +import SolidStartSVG from 'platformicons/svg/solidstart.svg'; import SpringSVG from 'platformicons/svg/spring.svg'; import SpringbootSVG from 'platformicons/svg/springboot.svg'; import SqlSVG from 'platformicons/svg/sql.svg'; @@ -248,6 +249,7 @@ import ServerlessSVGLarge from 'platformicons/svg_80x80/serverless.svg'; import SidekiqSVGLarge from 'platformicons/svg_80x80/sidekiq.svg'; import SinatraSVGLarge from 'platformicons/svg_80x80/sinatra.svg'; import SolidSVGLarge from 'platformicons/svg_80x80/solid.svg'; +import SolidStartSVGLarge from 'platformicons/svg_80x80/solidstart.svg'; import SpringSVGLarge from 'platformicons/svg_80x80/spring.svg'; import SpringbootSVGLarge from 'platformicons/svg_80x80/springboot.svg'; import SqlSVGLarge from 'platformicons/svg_80x80/sql.svg'; @@ -727,6 +729,10 @@ const formatToSVG = { sm: SolidSVG, lg: SolidSVGLarge, }, + solidstart: { + sm: SolidStartSVG, + lg: SolidStartSVGLarge, + }, spring: { sm: SpringSVG, lg: SpringSVGLarge, @@ -898,6 +904,7 @@ export const PLATFORM_TO_ICON = { 'javascript-react': 'react', 'javascript-remix': 'remix', 'javascript-solid': 'solid', + 'javascript-solidstart': 'solidstart', 'javascript-svelte': 'svelte', 'javascript-sveltekit': 'svelte', 'javascript-vue': 'vue',