diff --git a/AGENTS.md b/AGENTS.md
index 0c692c1be4f92..59c476228384a 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -98,6 +98,7 @@ When writing requirements in `develop-docs/`:
- **ALWAYS** run `/brand-guidelines` to audit any user-facing content before committing. See `.agents/skills/brand-guidelines/SKILL.md`
- Use `docs-review` skill for Sentry style and voice review. See `.claude/skills/docs-review/SKILL.md`
- Use `technical-docs` skill when writing or reviewing SDK documentation. See `.claude/skills/technical-docs/SKILL.md`
+- Quick starts set `runtime` (for example `node` or `cloudflare`) in their frontmatter. Add `` to a quick start to link the quick starts of the same guide for the other runtimes
## LLM-Friendly MD Exports
diff --git a/docs/platforms/javascript/common/troubleshooting/index.mdx b/docs/platforms/javascript/common/troubleshooting/index.mdx
index 1fb9a9adef7e9..e97f66b03a2b2 100644
--- a/docs/platforms/javascript/common/troubleshooting/index.mdx
+++ b/docs/platforms/javascript/common/troubleshooting/index.mdx
@@ -636,7 +636,7 @@ Learn more about fixing these caching issues in the
+
## Prerequisites
You need:
@@ -88,20 +93,6 @@ export const onRequest = [
## Install
-
-
-
-
-
+
diff --git a/docs/platforms/javascript/guides/astro/index.mdx b/docs/platforms/javascript/guides/astro/index.mdx
index 85729298541b1..d66ae5d89c858 100644
--- a/docs/platforms/javascript/guides/astro/index.mdx
+++ b/docs/platforms/javascript/guides/astro/index.mdx
@@ -5,8 +5,11 @@ sdk: sentry.javascript.astro
categories:
- browser
- server
+runtime: node
---
+
+
## Prerequisites
You need:
@@ -18,7 +21,7 @@ You need:
-This SDK currently only works on Node runtimes, such as Node adapter or Vercel with Lambda functions. If you use Cloudflare Workers or Cloudflare Pages, refer to our [Astro on Cloudflare guide](/platforms/javascript/guides/cloudflare/frameworks/astro/). Other non-Node runtimes, like Vercel's Edge runtime, are currently **not supported**.
+This SDK currently only works on Node runtimes, such as Node adapter or Vercel with Lambda functions. If you use Cloudflare Workers or Cloudflare Pages, refer to our [Astro on Cloudflare guide](/platforms/javascript/guides/astro/cloudflare/). Other non-Node runtimes, like Vercel's Edge runtime, are currently **not supported**.
diff --git a/docs/platforms/javascript/guides/cloudflare/frameworks/hono.mdx b/docs/platforms/javascript/guides/cloudflare/frameworks/hono.mdx
deleted file mode 100644
index 6a7df59814d50..0000000000000
--- a/docs/platforms/javascript/guides/cloudflare/frameworks/hono.mdx
+++ /dev/null
@@ -1,70 +0,0 @@
----
-title: Hono on Cloudflare
-description: "Learn how to instrument your Hono app on Cloudflare Workers with Sentry."
----
-
-Hono has its own dedicated SDK (`@sentry/hono`) with first-class support for Cloudflare Workers, Node.js, Bun, and Deno. It works as Hono middleware, so you can drop it into an existing app.
-
-## Install
-
-Install `@sentry/hono` together with `@sentry/cloudflare`. The runtime package is a peer dependency that you never import directly, but it must be present and its version must match `@sentry/hono`.
-
-```bash {tabTitle:npm}
-npm install @sentry/hono @sentry/cloudflare
-```
-
-```bash {tabTitle:yarn}
-yarn add @sentry/hono @sentry/cloudflare
-```
-
-```bash {tabTitle:pnpm}
-pnpm add @sentry/hono @sentry/cloudflare
-```
-
-## Configure
-
-The SDK needs `AsyncLocalStorage`, so set the `nodejs_compat` compatibility flag and a `compatibility_date` of `2024-09-23` or later in your Wrangler configuration:
-
-```jsonc {tabTitle:JSON} {filename:wrangler.jsonc}
-{
- // Set this to today's date
- "compatibility_date": "{{@inject new Date().toISOString().slice(0, 10) }}",
- "compatibility_flags": ["nodejs_compat"],
-}
-```
-
-```toml {tabTitle:Toml} {filename:wrangler.toml}
-# Set this to today's date
-compatibility_date = "{{@inject new Date().toISOString().slice(0, 10) }}"
-compatibility_flags = ["nodejs_compat"]
-```
-
-Add the `sentry()` middleware as early as possible in your Hono app, before any route that you want covered:
-
-```typescript {filename:index.ts}
-import { Hono } from "hono";
-import { sentry } from "@sentry/hono/cloudflare";
-
-const app = new Hono();
-
-app.use(
- sentry(app, {
- dsn: "___PUBLIC_DSN___",
-
- // Set tracesSampleRate to 1.0 to capture 100% of spans for tracing.
- tracesSampleRate: 1.0,
- })
-);
-
-// Your routes here
-
-export default app;
-```
-
-To read the DSN from a Worker binding, pass a callback instead of a plain options object. The callback receives the Worker `env`:
-
-```typescript {filename:index.ts}
-app.use(sentry(app, (env) => ({ dsn: env.SENTRY_DSN })));
-```
-
-For the full setup, including verification and the other runtimes, see the **[Hono Quick Start Guide](/platforms/javascript/guides/hono/)**.
diff --git a/docs/platforms/javascript/guides/cloudflare/frameworks/index.mdx b/docs/platforms/javascript/guides/cloudflare/frameworks/index.mdx
deleted file mode 100644
index 91bb3bbe66db2..0000000000000
--- a/docs/platforms/javascript/guides/cloudflare/frameworks/index.mdx
+++ /dev/null
@@ -1,8 +0,0 @@
----
-title: Frameworks on Cloudflare
-description: "Learn how to set up the Cloudflare SDK with popular frameworks like Astro, SvelteKit, and Remix."
----
-
-You can use the Sentry Cloudflare SDK in combination with Sentry meta-framework SDKs like SvelteKit or Remix to instrument your Cloudflare Pages applications that use these frameworks.
-
-
diff --git a/docs/platforms/javascript/guides/cloudflare/frameworks/nextjs.mdx b/docs/platforms/javascript/guides/cloudflare/frameworks/nextjs.mdx
deleted file mode 100644
index 6d4f78393a76a..0000000000000
--- a/docs/platforms/javascript/guides/cloudflare/frameworks/nextjs.mdx
+++ /dev/null
@@ -1,127 +0,0 @@
----
-title: Next.js on Cloudflare
-description: "Learn how to configure Sentry for your Next.js application deployed on Cloudflare Workers."
----
-
-The Sentry Next.js SDK supports Next.js applications deployed on Cloudflare Workers, but requires additional configuration to run in this environment.
-
-## Prerequisites
-
-Before you begin, make sure you have:
-
-- A Sentry [account](https://sentry.io/signup/) and [project](/product/projects/)
-- A [Cloudflare Workers project](https://dash.cloudflare.com/workers/overview)
-- A Next.js application configured for Cloudflare Workers with [OpenNext](https://opennext.js.org/cloudflare) or [vinext](https://github.com/cloudflare/vinext)
-- The Sentry SDK [installed and configured](/platforms/javascript/guides/nextjs/) in your Next.js application
-
-
- If you haven't deployed a Next.js app to Cloudflare Workers before, follow
- Cloudflare's [Next.js deployment
- guide](https://developers.cloudflare.com/workers/framework-guides/web-apps/nextjs/)
- to get started.
-
-
-## Configure Wrangler
-
-Once you've set up Sentry in your Next.js application following the [installation guide](/platforms/javascript/guides/nextjs/), you'll need to configure [Wrangler](https://developers.cloudflare.com/workers/wrangler/) with the required compatibility settings.
-
-First, add the `nodejs_compat` [compatibility flag](https://developers.cloudflare.com/workers/runtime-apis/nodejs/) to configure the Cloudflare Workers runtime to provide the Node.js APIs required by the Sentry SDK.
-
-```json {tabTitle:wrangler.jsonc}
-{
- "compatibility_flags": ["nodejs_compat"]
-}
-```
-
-```toml {tabTitle:wrangler.toml}
-compatibility_flags = ["nodejs_compat"]
-```
-
-Then, set the [compatibility date](https://developers.cloudflare.com/workers/configuration/compatibility-dates/) to `2025-08-16` or later. This is required to introduce `https.request` to the Cloudflare Workers runtime, which the Sentry SDK needs to send data.
-
-Your final configuration should look like this:
-
-```json {tabTitle:wrangler.jsonc}
-{
- "compatibility_flags": ["nodejs_compat"],
- "compatibility_date": "2025-08-16"
-}
-```
-
-```toml {tabTitle:wrangler.toml}
-compatibility_flags = ["nodejs_compat"]
-compatibility_date = "2025-08-16"
-```
-
-## Wrap the Worker Entry
-
-
-
-If you build your app with vinext, skip to [Wrap the Worker Entry With vinext](#wrap-the-worker-entry-with-vinext).
-
-On Cloudflare Workers, your Next.js app runs inside the Worker entry that OpenNext generates (`.open-next/worker.js`). Wrap this entry with `withSentry` from `@sentry/nextjs/cloudflare` to get the same Next.js spans as on Node.js, plus Cloudflare data such as spans for D1 queries. Each request gets one `http.server` span with the name of the Next.js route, and the Next.js spans become its children.
-
-`@sentry/nextjs` depends on `@sentry/cloudflare`, so you don't need to install another package.
-
-First, create a [custom Worker](https://opennext.js.org/cloudflare/howtos/custom-worker) that imports the handler of OpenNext and wraps it with `withSentry`. Pass your Sentry options to `withSentry`:
-
-```typescript {filename:worker.ts}
-import * as Sentry from "@sentry/nextjs/cloudflare";
-// @ts-ignore `.open-next/worker.js` is generated at build time
-import handler from "./.open-next/worker.js";
-
-// Re-export the Durable Objects your app uses, for example for the DO Queue and DO Tag Cache of OpenNext
-// @ts-ignore `.open-next/worker.js` is generated at build time
-export { DOQueueHandler, DOShardedTagCache } from "./.open-next/worker.js";
-
-export default Sentry.withSentry(
- () => ({
- dsn: "___PUBLIC_DSN___",
-
- // Set tracesSampleRate to 1.0 to capture 100% of spans for tracing.
- // Learn more at
- // https://docs.sentry.io/platforms/javascript/guides/cloudflare/configuration/options/#tracesSampleRate
- tracesSampleRate: 1.0,
- }),
- handler
-);
-```
-
-Then, point `main` in your Wrangler configuration to this file:
-
-```json {tabTitle:wrangler.jsonc}
-{
- "main": "./worker.ts"
-}
-```
-
-```toml {tabTitle:wrangler.toml}
-main = "./worker.ts"
-```
-
-### Wrap the Worker Entry With vinext
-
-
-
-With [vinext](https://github.com/cloudflare/vinext), you don't need a custom Worker. Add the Sentry Vite plugin to your Vite config, and it wraps your Worker entry with `withSentry` from `@sentry/nextjs/cloudflare` automatically.
-
-### Server and Edge Configuration in the Worker
-
-In the Worker, `withSentry` creates the Sentry client. `Sentry.init()` in `sentry.server.config.ts` and `sentry.edge.config.ts` still runs, but it creates no client and only applies the `release` option. Set all other options in `withSentry`.
-
-On Workers, these two files are optional. Keep them if you use `next dev`, which runs on Node.js and doesn't use the Worker entry. They also pass on the release that `withSentryConfig` sets at build time.
-
-Keep `instrumentation.ts`, because Next.js reports server errors, for example from Server Components and route handlers, through its `onRequestError` hook.
-
-The SDK takes the release from the first of these sources that has a value:
-
-1. The `release` option of `withSentry`
-2. The `SENTRY_RELEASE` environment variable
-3. The ID of the `CF_VERSION_METADATA` binding
-4. The `release` option of `Sentry.init()` in `sentry.server.config.ts` or `sentry.edge.config.ts`, or else the release that `withSentryConfig` sets at build time
-
-On Node.js, the build release comes before `SENTRY_RELEASE`.
-
-## Deploy
-
-Build and deploy your Next.js application to Cloudflare Workers. You should start seeing error events, traces, and logs appear in Sentry.
diff --git a/docs/platforms/javascript/guides/cloudflare/frameworks/nuxt.mdx b/docs/platforms/javascript/guides/cloudflare/frameworks/nuxt.mdx
deleted file mode 100644
index 3b3444b1cf8a7..0000000000000
--- a/docs/platforms/javascript/guides/cloudflare/frameworks/nuxt.mdx
+++ /dev/null
@@ -1,11 +0,0 @@
----
-title: Nuxt on Cloudflare
-description: "Learn how to instrument your Nuxt app on Cloudflare Workers and Pages and capture your first errors with Sentry."
----
-
-This guide will show you how to set up the SDK with Nitro's `cloudflare_module` (or their deprecated `cloudflare-pages`) deployment preset.
-
-
diff --git a/docs/platforms/javascript/guides/cloudflare/frameworks/tanstack-start.mdx b/docs/platforms/javascript/guides/cloudflare/frameworks/tanstack-start.mdx
deleted file mode 100644
index 11fb6d6d40330..0000000000000
--- a/docs/platforms/javascript/guides/cloudflare/frameworks/tanstack-start.mdx
+++ /dev/null
@@ -1,232 +0,0 @@
----
-title: TanStack Start on Cloudflare
-description: "Learn how to instrument your TanStack Start app on Cloudflare Workers and capture your first errors with Sentry."
----
-
-
-
-
-
-This guide is for TanStack Start deployed to **Cloudflare Workers** using the `@cloudflare/vite-plugin`. For Node.js-based deployments, see our [TanStack Start guide](/platforms/javascript/guides/tanstackstart-react/).
-
-
-
-
-
-## Install
-
-Choose the features you want to configure, and this guide will show you how:
-
-
-
-
-
-### Install the Sentry SDK
-
-Run the command for your preferred package manager to add the Sentry SDK to your application:
-
-
-
-## Configure
-
-When deploying TanStack Start to Cloudflare Workers, you need to wrap the server entry point with `Sentry.withSentry` from `@sentry/cloudflare`. TanStack Start allows you to create a custom server entry file for this purpose.
-
-### Wrangler Configuration
-
-
-
-### Create a Custom Server Entry
-
-Create a `src/server.ts` file that wraps the TanStack Start handler with Sentry.
-
-Use `wrapFetchWithSentry` from `@sentry/tanstackstart-react` to instrument TanStack Start server functions with tracing.
-
-
-
-Due to type differences between TanStack Start and Cloudflare Workers, you'll need to add a `// @ts-expect-error` comment as shown in the example. This is expected and doesn't affect functionality.
-
-
-
-```typescript {filename:src/server.ts}
-import * as Sentry from "@sentry/cloudflare";
-import { wrapFetchWithSentry } from "@sentry/tanstackstart-react";
-import handler from "@tanstack/react-start/server-entry";
-
-export default Sentry.withSentry(
- () => ({
- dsn: "___PUBLIC_DSN___",
-
- // ___PRODUCT_OPTION_START___ performance
-
- // Set tracesSampleRate to 1.0 to capture 100% of spans for tracing.
- tracesSampleRate: 1.0,
- // ___PRODUCT_OPTION_END___ performance
- }),
- // @ts-expect-error - handler is not typed as a Cloudflare handler
- wrapFetchWithSentry(handler)
-);
-```
-
-### Update Wrangler Configuration
-
-Update your `wrangler.jsonc` (or `wrangler.toml`) to use your custom server entry:
-
-```json {diff} {filename:wrangler.jsonc}
- {
- "name": "my-tanstack-app",
-+ "main": "src/server.ts",
- // ... rest of config
- }
-```
-
-### Configure Client-Side Sentry
-
-Initialize Sentry in your `src/router.tsx` file for client-side error tracking:
-
-```tsx {diff} {filename:src/router.tsx}
-+import * as Sentry from "@sentry/tanstackstart-react";
- import { createRouter } from '@tanstack/react-router'
-
-export const getRouter = () => {
- const router = createRouter();
-
-+ if (!router.isServer) {
-+ Sentry.init({
-+ dsn: "___PUBLIC_DSN___",
-+
-+ integrations: [
-+ // ___PRODUCT_OPTION_START___ performance
-+ Sentry.tanstackRouterBrowserTracingIntegration(router),
-+ // ___PRODUCT_OPTION_END___ performance
-+ // ___PRODUCT_OPTION_START___ session-replay
-+ Sentry.replayIntegration(),
-+ // ___PRODUCT_OPTION_END___ session-replay
-+ // ___PRODUCT_OPTION_START___ user-feedback
-+ Sentry.feedbackIntegration({
-+ // Additional SDK configuration goes in here, for example:
-+ colorScheme: "system",
-+ }),
-+ // ___PRODUCT_OPTION_END___ user-feedback
-+ ],
-+ // ___PRODUCT_OPTION_START___ performance
-+
-+ // Set tracesSampleRate to 1.0 to capture 100% of spans for tracing.
-+ tracesSampleRate: 1.0,
-+ // ___PRODUCT_OPTION_END___ performance
-+ // ___PRODUCT_OPTION_START___ session-replay
-+
-+ // Capture Replay for 10% of all sessions,
-+ // plus for 100% of sessions with an error.
-+ replaysSessionSampleRate: 0.1,
-+ replaysOnErrorSampleRate: 1.0,
-+ // ___PRODUCT_OPTION_END___ session-replay
-+ });
-+ }
-
- return router;
-}
-```
-
-### Capture Server-Side Errors
-
-To capture server-side errors from HTTP requests and server function calls, add Sentry's global middlewares to `createStart()` in your `src/start.ts` file.
-
-The Sentry middleware should be the first middleware in the arrays to ensure all errors are captured.
-
-
- SSR rendering exceptions are not captured by the middleware. Use
- `captureException` to manually capture those errors.
-
-
-```tsx {filename:src/start.ts}
-import {
- sentryGlobalFunctionMiddleware,
- sentryGlobalRequestMiddleware,
-} from "@sentry/tanstackstart-react";
-import { createStart } from "@tanstack/react-start";
-
-export const startInstance = createStart(() => {
- return {
- requestMiddleware: [sentryGlobalRequestMiddleware],
- functionMiddleware: [sentryGlobalFunctionMiddleware],
- };
-});
-```
-
-### Add Readable Stack Traces With Source Maps (Optional)
-
-
-
-### Control the Data You Send to Sentry (Optional)
-
-
-
-## Verify Your Setup
-
-To verify Sentry is capturing errors, add a test button to one of your pages:
-
-```tsx
-
-```
-
-Run your app with `wrangler dev` (or through your Vite build with Cloudflare plugin), click the button, and check your Sentry project for the error.
-
-
-
-
-
-
-
-
-
-### View Captured Data in Sentry
-
-Now, head over to your project on [Sentry.io](https://sentry.io/) to view the collected data (it takes a couple of moments for the data to appear).
-
-
-
-## Next Steps
-
-At this point, you should have integrated Sentry and should already be sending data to your Sentry project.
-
-Now's a good time to customize your setup and look into more advanced topics. Our next recommended steps for you are:
-
-- Explore [practical guides](/get-started/guides/) on what to monitor, log, track, and investigate after setup
-- Learn how to [manually capture errors](/platforms/javascript/guides/cloudflare/usage/)
-- Continue to [customize your configuration](/platforms/javascript/guides/cloudflare/configuration/)
-- Make use of [Cloudflare-specific features](/platforms/javascript/guides/cloudflare/features/)
-- Get familiar with [Sentry's product features](/product/) like tracing, insights, and alerts
-
-
-
-- Check out setup instructions for other popular [frameworks on Cloudflare](/platforms/javascript/guides/cloudflare/frameworks/)
-- Find various support topics in troubleshooting
-- [Get support](https://www.sentry.help/en/)
-
-
-
-
diff --git a/docs/platforms/javascript/guides/cloudflare/index.mdx b/docs/platforms/javascript/guides/cloudflare/index.mdx
index 76049c2c54552..51632e610ec6b 100644
--- a/docs/platforms/javascript/guides/cloudflare/index.mdx
+++ b/docs/platforms/javascript/guides/cloudflare/index.mdx
@@ -14,14 +14,14 @@ This guide covers Cloudflare Workers. If you're deploying a Cloudflare Pages app
If you're using any of the listed frameworks, follow their specific setup instructions:
-- **[Astro](/platforms/javascript/guides/cloudflare/frameworks/astro/)**
-- **[Hono](/platforms/javascript/guides/hono/)** (with @sentry/hono)
-- **[Hydrogen](/platforms/javascript/guides/cloudflare/frameworks/hydrogen-react-router/)**
-- **[Next.js](/platforms/javascript/guides/cloudflare/frameworks/nextjs/)**
-- **[Nuxt](/platforms/javascript/guides/cloudflare/frameworks/nuxt/)**
-- **[Remix](/platforms/javascript/guides/cloudflare/frameworks/remix/)**
-- **[SvelteKit](/platforms/javascript/guides/cloudflare/frameworks/sveltekit/)**
-- **[TanStack Start](/platforms/javascript/guides/cloudflare/frameworks/tanstack-start/)**
+- **[Astro](/platforms/javascript/guides/astro/cloudflare/)**
+- **[Hono](/platforms/javascript/guides/hono/cloudflare/)** (with @sentry/hono)
+- **[Hydrogen](/platforms/javascript/guides/react-router/hydrogen/)**
+- **[Next.js](/platforms/javascript/guides/nextjs/cloudflare/)**
+- **[Nuxt](/platforms/javascript/guides/nuxt/cloudflare/)**
+- **[Remix](/platforms/javascript/guides/remix/cloudflare/)**
+- **[SvelteKit](/platforms/javascript/guides/sveltekit/cloudflare/)**
+- **[TanStack Start](/platforms/javascript/guides/tanstackstart-react/cloudflare/)**
The Cloudflare Workers runtime has some platform-specific limitations that
@@ -178,7 +178,7 @@ At this point, you should have integrated Sentry into your Cloudflare Worker. He
-- Check out setup instructions for popular [frameworks on Cloudflare](/platforms/javascript/guides/cloudflare/frameworks/)
+- Using a framework? Follow its setup instructions, linked at the top of this page
- Find various support topics in troubleshooting
- [Get support](https://www.sentry.help/en/)
diff --git a/docs/platforms/javascript/guides/hono/cloudflare.mdx b/docs/platforms/javascript/guides/hono/cloudflare.mdx
new file mode 100644
index 0000000000000..4837d98606290
--- /dev/null
+++ b/docs/platforms/javascript/guides/hono/cloudflare.mdx
@@ -0,0 +1,168 @@
+---
+title: Hono on Cloudflare
+sidebar_title: Quick Start (Cloudflare)
+sidebar_order: 0.5
+description: "Learn how to set up Sentry in your Hono app on Cloudflare Workers and capture your first errors."
+runtime: cloudflare
+---
+
+The `@sentry/hono` SDK works as Hono middleware, so you can drop it into your existing Cloudflare Workers app. For Node.js, Bun, and Deno, see the [Hono quick start](/platforms/javascript/guides/hono/).
+
+
+
+
+
+## Install
+
+### Install the Sentry SDK
+
+Install `@sentry/hono` together with `@sentry/cloudflare`. The runtime package is a peer dependency that you never import directly, but it must be present and its version must match `@sentry/hono`.
+
+```bash {tabTitle:npm}
+npm install @sentry/hono @sentry/cloudflare
+```
+
+```bash {tabTitle:yarn}
+yarn add @sentry/hono @sentry/cloudflare
+```
+
+```bash {tabTitle:pnpm}
+pnpm add @sentry/hono @sentry/cloudflare
+```
+
+## Configure
+
+**Error Monitoring** starts working as soon as you add the `sentry()` middleware. **Logs** and **Application Metrics** need no extra configuration, and you'll learn how to send them in steps [#3](#send-logs) and [#4](#send-application-metrics-).
+This guide also enables **Tracing**.
+
+
+
+### Configure Wrangler
+
+The SDK needs `AsyncLocalStorage`, so set the `nodejs_compat` compatibility flag and a `compatibility_date` of `2024-09-23` or later in your Wrangler configuration:
+
+```jsonc {tabTitle:JSON} {filename:wrangler.jsonc}
+{
+ // Set this to today's date
+ "compatibility_date": "{{@inject new Date().toISOString().slice(0, 10) }}",
+ "compatibility_flags": ["nodejs_compat"],
+}
+```
+
+```toml {tabTitle:Toml} {filename:wrangler.toml}
+# Set this to today's date
+compatibility_date = "{{@inject new Date().toISOString().slice(0, 10) }}"
+compatibility_flags = ["nodejs_compat"]
+```
+
+### Add the Sentry Middleware
+
+Add the `sentry()` middleware as early as possible in your Hono app, before any route that you want covered.
+
+The snippet also turns on:
+
+- Tracing: via `tracesSampleRate`
+
+Don't need a feature? Remove its integration and options from the snippet.
+
+```typescript {filename:index.ts}
+import { Hono } from "hono";
+import { sentry } from "@sentry/hono/cloudflare";
+
+const app = new Hono();
+
+app.use(
+ sentry(app, {
+ dsn: "___PUBLIC_DSN___",
+
+ // Enables Tracing.
+ // Set to 1.0 to capture 100% of spans for tracing.
+ // We recommend reducing this value in production.
+ tracesSampleRate: 1.0,
+ })
+);
+
+// Your routes here
+
+export default app;
+```
+
+
+
+To read the DSN from a Worker binding, for example a secret, pass a callback instead of a plain options object. The callback receives the Worker `env`:
+
+```typescript {filename:index.ts}
+import { Hono } from "hono";
+import { sentry } from "@sentry/hono/cloudflare";
+
+type Bindings = { SENTRY_DSN: string };
+
+const app = new Hono<{ Bindings: Bindings }>();
+
+app.use(sentry(app, (env) => ({ dsn: env.SENTRY_DSN })));
+
+export default app;
+```
+
+
+
+### Report Unhandled Exceptions
+
+By default, Sentry captures exceptions from Hono's `onError` handler, excluding errors with 3xx or 4xx status codes. No additional configuration is needed for this.
+
+To control which errors are captured, use the `shouldHandleError` option.
+
+### Add Readable Stack Traces With Source Maps
+
+
+
+### Control the Data You Send to Sentry
+
+
+
+## Send Logs
+
+
+
+If you already use `console`, capture those calls as Sentry Logs with `consoleLoggingIntegration`.
+
+## Send Application Metrics
+
+
+
+## Verify Your Setup
+
+Let's test your setup and confirm that Sentry is working correctly and sending data to your Sentry project.
+
+Add a test route to your Hono app that throws an error, then request `/debug-sentry` to trigger it:
+
+```typescript
+app.get("/debug-sentry", () => {
+ throw new Error("Sentry Test Error");
+});
+```
+
+### View Captured Data in Sentry
+
+Now, head over to your project on [Sentry.io](https://sentry.io/) to view the collected data (it takes a couple of moments for the data to appear).
+
+
+
+## Next Steps
+
+At this point, you should have integrated Sentry into your Hono application on Cloudflare Workers. Here's what to explore next:
+
+- Explore [practical guides](/get-started/guides/) on what to monitor, log, track, and investigate after setup
+- Explore Hono-specific features like custom error filtering
+
+
+
+- Find various topics in [Cloudflare troubleshooting](/platforms/javascript/guides/cloudflare/troubleshooting/)
+- [Get support](https://www.sentry.help/en/)
+
+
+
+
diff --git a/docs/platforms/javascript/guides/nextjs/best-practices/deploying-on-cloudflare.mdx b/docs/platforms/javascript/guides/nextjs/best-practices/deploying-on-cloudflare.mdx
deleted file mode 100644
index 2fc24a8629806..0000000000000
--- a/docs/platforms/javascript/guides/nextjs/best-practices/deploying-on-cloudflare.mdx
+++ /dev/null
@@ -1,7 +0,0 @@
----
-title: Deploying on Cloudflare Workers
-description: "Learn how to configure Sentry for your Next.js application deployed on Cloudflare Workers."
-sidebar_section: configuration
----
-
-For instructions on deploying your Next.js application with Sentry on Cloudflare Workers, see the [Next.js on Cloudflare](/platforms/javascript/guides/cloudflare/frameworks/nextjs/) guide.
diff --git a/docs/platforms/javascript/guides/nextjs/cloudflare.mdx b/docs/platforms/javascript/guides/nextjs/cloudflare.mdx
new file mode 100644
index 0000000000000..1b267492b90e0
--- /dev/null
+++ b/docs/platforms/javascript/guides/nextjs/cloudflare.mdx
@@ -0,0 +1,11 @@
+---
+title: Next.js on Cloudflare
+sidebar_title: Quick Start (Cloudflare)
+sidebar_order: 0.5
+description: "Learn how to set up Sentry in your Next.js application deployed on Cloudflare Workers and capture your first errors."
+runtime: cloudflare
+---
+
+
+
+
diff --git a/docs/platforms/javascript/guides/nextjs/index.mdx b/docs/platforms/javascript/guides/nextjs/index.mdx
index 71fff4aae652d..e39aa72da0fa8 100644
--- a/docs/platforms/javascript/guides/nextjs/index.mdx
+++ b/docs/platforms/javascript/guides/nextjs/index.mdx
@@ -5,256 +5,11 @@ sdk: sentry.javascript.nextjs
categories:
- browser
- server
+runtime: node
---
-
+
-
-
-## Install
-
-### Run the Installation Wizard
-
-Run the Sentry wizard to automatically install the SDK and configure Sentry in your Next.js application:
-
-```bash
-npx @sentry/wizard@latest -i nextjs
-```
-
-The wizard asks whether you want to enable **Tracing** and **Session Replay**, route browser requests through your server to avoid ad blockers, and create an example page. To match the configuration in this guide, answer **Yes** to each.
-
-Prefer to set things up yourself? Check out the [Manual Setup](/platforms/javascript/guides/nextjs/manual-setup/) guide.
-
-## Configure
-
-**Error Monitoring** starts working as soon as you call `Sentry.init()`. **Logs** and **Application Metrics** need no extra configuration, and you'll learn how to send them in steps [#3](#send-logs) and [#4](#send-application-metrics-).
-This guide also enables **Tracing**, **Session Replay**, and **User Feedback**.
-
-
-
-### Initialize the SDK
-
-Next.js runs code in different environments, so the wizard creates a separate initialization file for each in your project's root directory (or `src` folder):
-
-- `instrumentation-client.ts`: runs in the browser
-- `sentry.server.config.ts`: runs in the Node.js runtime
-- `sentry.edge.config.ts`: runs in the Edge runtime
-
-Use the tabs in the code box below to view each file.
-
-The snippets also turn on:
-
-- Tracing: via `tracesSampleRate` in all three files
-- Session Replay: via `replayIntegration()`, sampled with `replaysSessionSampleRate` and `replaysOnErrorSampleRate`
-- User Feedback: via `feedbackIntegration()`. The wizard doesn't add this integration, so add it to `instrumentation-client.ts` yourself.
-
-Don't need a feature? Remove its integration and options from the snippets.
-
-```typescript {tabTitle:Client} {mdExpandTabs} {filename:instrumentation-client.ts}
-import * as Sentry from "@sentry/nextjs";
-
-Sentry.init({
- dsn: "___PUBLIC_DSN___",
- integrations: [
- // enables Session Replay
- Sentry.replayIntegration(),
- // enables User Feedback
- Sentry.feedbackIntegration({
- // Additional integration configuration goes in here
- colorScheme: "system",
- }),
- ],
-
- // Enables Tracing.
- // Set to 1.0 to capture 100% of spans for tracing.
- // We recommend reducing this value in production.
- tracesSampleRate: 1.0,
-
- // Capture replays for 10% of all sessions,
- // plus for 100% of sessions with an error
- // Requires Sentry.replayIntegration()
- replaysSessionSampleRate: 0.1,
- replaysOnErrorSampleRate: 1.0,
-});
-
-// Instruments client-side navigations
-export const onRouterTransitionStart = Sentry.captureRouterTransitionStart;
-```
-
-```typescript {tabTitle:Server} {filename:sentry.server.config.ts}
-import * as Sentry from "@sentry/nextjs";
-
-Sentry.init({
- dsn: "___PUBLIC_DSN___",
-
- // Enables Tracing.
- // Set to 1.0 to capture 100% of spans for tracing.
- // We recommend reducing this value in production.
- tracesSampleRate: 1.0,
-});
-```
-
-```typescript {tabTitle:Edge} {filename:sentry.edge.config.ts}
-import * as Sentry from "@sentry/nextjs";
-
-Sentry.init({
- dsn: "___PUBLIC_DSN___",
-
- // Enables Tracing.
- // Set to 1.0 to capture 100% of spans for tracing.
- // We recommend reducing this value in production.
- tracesSampleRate: 1.0,
-});
-```
-
-### Register the Server-Side Configuration
-
-The wizard creates a [Next.js instrumentation file](https://nextjs.org/docs/app/guides/instrumentation) named `instrumentation.ts`. It loads your server and edge configurations, and exports `onRequestError` to capture errors from Server Components, route handlers, and middleware.
-
-```typescript {filename:instrumentation.ts}
-import * as Sentry from "@sentry/nextjs";
-
-export async function register() {
- if (process.env.NEXT_RUNTIME === "nodejs") {
- await import("./sentry.server.config");
- }
-
- if (process.env.NEXT_RUNTIME === "edge") {
- await import("./sentry.edge.config");
- }
-}
-
-export const onRequestError = Sentry.captureRequestError;
-```
-
-### Capture React Render Errors
-
-If you use the App Router, the wizard adds Sentry to `app/global-error.tsx` to capture React rendering errors. If you use the Pages Router, it adds Sentry to `pages/_error.tsx` instead.
-
-
-
-### Apply Instrumentation to Your App
-
-The wizard wraps your Next.js configuration with `withSentryConfig`. This instruments your app at build time, uploads source maps, and, if you said yes in the wizard, routes browser requests to Sentry through your server to avoid ad blockers.
-
-To forward only the request body to Sentry, add a tunnel route handler (SDK version `10.77.1` and later on v10, `11.9.0` and later on v11). Use the handler if Vercel Deployment Protection or another login protects your app.
-Learn more about the [`tunnelRoute` option](/platforms/javascript/guides/nextjs/configuration/build/#tunnelRoute).
-
-```typescript {filename:next.config.ts}
-import type { NextConfig } from "next";
-import { withSentryConfig } from "@sentry/nextjs/config";
-
-const nextConfig: NextConfig = {
- // Your existing Next.js configuration
-};
-
-export default withSentryConfig(nextConfig, {
- org: "___ORG_SLUG___",
- project: "___PROJECT_SLUG___",
-
- // Only print logs for uploading source maps in CI
- silent: !process.env.CI,
-
- // Upload a larger set of source maps for prettier stack traces (increases build time)
- widenClientFileUpload: true,
-
- // Route browser requests to Sentry through a Next.js rewrite to avoid ad blockers.
- // This can increase your server load as well as your hosting bill.
- tunnelRoute: "/monitoring",
-});
-```
-
-### Add Readable Stack Traces With Source Maps
-
-The wizard stores your auth token in `.env.sentry-build-plugin` and adds the file to `.gitignore`. The Sentry build plugin uses this token to upload source maps when you build your app locally.
-
-For CI/CD builds, set the `SENTRY_AUTH_TOKEN` environment variable in your build system instead.
-
-
-
-```bash {filename:.env.sentry-build-plugin}
-SENTRY_AUTH_TOKEN=___ORG_AUTH_TOKEN___
-```
-
-### Control the Data You Send to Sentry
-
-
-
-## Send Logs
-
-
-
-If you're already logging with another library, use an integration to capture those logs as Sentry Logs automatically:
-
-- `consoleLoggingIntegration` for `console` calls
-- Consola
-- Pino
-- Winston
-
-## Send Application Metrics
-
-
-
-In the Node.js runtime, `nodeRuntimeMetricsIntegration` also collects runtime health metrics automatically.
-
-## Verify Your Setup
-
-Let's test your setup and confirm that Sentry is working correctly and sending data to your Sentry project.
-
-The wizard created an example page that sends a test error from both your frontend and your backend:
-
-1. Start your development server:
-
- ```bash
- npm run dev
- ```
-
-2. Open [localhost:3000/sentry-example-page](http://localhost:3000/sentry-example-page) in your browser.
-3. Click **Throw Sample Error**.
-
-If you skipped the example page, add a test button to one of your pages instead. Clicking it will trigger an error for Sentry to capture.
-
-```tsx {filename:app/page.tsx}
-"use client";
-
-export default function Page() {
- return (
-
- );
-}
-```
-
-
-
-### View Captured Data in Sentry
-
-Now, head over to your project on [Sentry.io](https://sentry.io/) to view the collected data (it takes a couple of moments for the data to appear).
-
-
-
-## Next Steps
-
-At this point, you should have integrated Sentry into your Next.js application. Here's what to explore next:
-
-- Explore [practical guides](/get-started/guides/) on what to monitor, log, track, and investigate after setup
-- Set up Agent Tracing to monitor agents built with the Vercel AI SDK, LangChain, and more
-- Set up tunneling to avoid ad blockers blocking Sentry events, if you didn't enable it in the wizard
-
-
-
-- If you encountered issues with our installation wizard, try [setting up Sentry manually](/platforms/javascript/guides/nextjs/manual-setup/)
-- Find various topics in Troubleshooting
-- [Get support](https://www.sentry.help/en/)
-
-
-
-
+
diff --git a/docs/platforms/javascript/guides/nuxt/cloudflare.mdx b/docs/platforms/javascript/guides/nuxt/cloudflare.mdx
new file mode 100644
index 0000000000000..bbfaf817636e2
--- /dev/null
+++ b/docs/platforms/javascript/guides/nuxt/cloudflare.mdx
@@ -0,0 +1,13 @@
+---
+title: Nuxt on Cloudflare
+sidebar_title: Quick Start (Cloudflare)
+sidebar_order: 0.5
+description: "Learn how to instrument your Nuxt app on Cloudflare Workers and Pages and capture your first errors with Sentry."
+runtime: cloudflare
+---
+
+This guide shows how to set up the SDK with Nitro's `cloudflare_module` deployment preset, or with the deprecated `cloudflare-pages` preset.
+
+
+
+
diff --git a/docs/platforms/javascript/guides/nuxt/features/nitro-deployment-presets.mdx b/docs/platforms/javascript/guides/nuxt/features/nitro-deployment-presets.mdx
index 945f878d90816..ca23844d62a0d 100644
--- a/docs/platforms/javascript/guides/nuxt/features/nitro-deployment-presets.mdx
+++ b/docs/platforms/javascript/guides/nuxt/features/nitro-deployment-presets.mdx
@@ -8,4 +8,4 @@ The Sentry Nuxt SDK provides support for different Nitro deployment presets, mos
## Cloudflare Pages
-Using the Cloudflare Nitro plugin of Sentry enables Sentry monitoring on Cloudflare Workers and Pages. Go and see the [Cloudflare Nitro plugin documentation](/platforms/javascript/guides/cloudflare/frameworks/nuxt/).
+Using the Cloudflare Nitro plugin of Sentry enables Sentry monitoring on Cloudflare Workers and Pages. Go and see the [Cloudflare Nitro plugin documentation](/platforms/javascript/guides/nuxt/cloudflare/).
diff --git a/docs/platforms/javascript/guides/nuxt/index.mdx b/docs/platforms/javascript/guides/nuxt/index.mdx
index 0fd2306ca119c..ae2dadcedf2cc 100644
--- a/docs/platforms/javascript/guides/nuxt/index.mdx
+++ b/docs/platforms/javascript/guides/nuxt/index.mdx
@@ -5,108 +5,9 @@ sdk: sentry.javascript.nuxt
categories:
- browser
- server
+runtime: node
---
-
+
-
-
-## Install
-
-
-
-
-
-
-
-
-
-## Avoid Ad Blockers With Tunneling (Optional)
-
-
-
-## Control the Data You Send to Sentry (Optional)
-
-
-
-## Verify Your Setup
-
-The `sentry init` command checks the integration files it creates or modifies before it finishes. To confirm runtime events are reaching Sentry, start your Nuxt app, exercise the parts of your app that should send events, and then check your Sentry project.
-
-If you used the Nuxt installation wizard instead, you can also verify your setup with the example page or component it creates.
-
-
-The wizard creates a `SentryErrorButton` component when it fails to add an example page to your project. This usually happens if you don't have a `app.vue` file or if that file does not contain the `NuxtPage` component. To verify your setup, follow these steps before continuing with the next section, "View Captured Data in Sentry":
-
-1. Add the `SentryErrorButton` component to a page and open it in your browser. For most Nuxt applications, this will be at localhost.
-2. Click the "Throw Sample Error" button, which triggers an error and starts a performance trace on the client side.
-
-To test the server side as well, refer to the "Verify" section in the [Manual setup guide](/platforms/javascript/guides/nuxt/manual-setup/).
-
-
-
-To test Sentry, you can run your Nuxt application in either production or development mode.
-We **recommend testing in production mode** as it most closely resembles your deployed application's environment.
-
-The SDK bundles `sentry.server.config.ts` into the Nitro server build and initializes Sentry when the server starts. To learn more, see Server-Side Installation.
-
-### Run in Production Mode (Recommended)
-
-Build your project with `nuxi build`, then start the server.
-
-```bash
-# Start your app after building your project with `nuxi build`
-node .output/server/index.mjs
-```
-
-### Run in Development Mode
-
-Sentry also monitors the server side during development. Start the dev server as usual.
-
-Spans from some libraries, such as database clients, can be missing in development mode.
-Errors and request traces always work. To learn more, see Development Mode.
-
-```bash
-nuxt dev
-```
-
-If you used the Nuxt installation wizard, after building and running your project:
-
-1. Open the example page `/sentry-example-page` in your browser. For most Nuxt applications, this will be at localhost.
-2. Click the "Throw sample error" button. This triggers two errors:
- - a frontend error
- - an error within the API route
-
-Sentry captures both of these errors for you. Additionally, the button click starts a performance trace to measure the time it takes for the API request to complete.
-
-
-
-### View Captured Data in Sentry
-
-Now, head over to your project on [Sentry.io](https://sentry.io/) to view the collected data (it takes a couple of moments for the data to appear).
-
-
-
-
-
-## Next Steps
-
-At this point, you should have integrated Sentry into your Nuxt application and should already be sending error and performance data to your Sentry project.
-
-Now's a good time to customize your setup and look into more advanced topics. Our next recommended steps for you are:
-
-- Explore [practical guides](/get-started/guides/) on what to monitor, log, track, and investigate after setup
-- Learn how to [manually capture errors](/platforms/javascript/guides/nuxt/usage/)
-- Continue to [customize your configuration](/platforms/javascript/guides/nuxt/configuration/)
-- Get familiar with [Sentry's product features](/product/) like tracing, insights, and alerts
-- Learn how to [track your Vue components or your Pinia store](/platforms/javascript/guides/nuxt/features/)
-- Learn how to [add support for different Nitro deployment presets](/platforms/javascript/guides/nuxt/features/nitro-deployment-presets/) (like Cloudflare)
-
-
-
-- If you encountered issues with our installation wizard, try [setting up Sentry manually](/platforms/javascript/guides/nuxt/manual-setup/)
-- [Get support](https://www.sentry.help/en/)
-
-
-
-
+
diff --git a/docs/platforms/javascript/guides/nuxt/install/index.mdx b/docs/platforms/javascript/guides/nuxt/install/index.mdx
index 298c08d02db09..4f11e711aea48 100644
--- a/docs/platforms/javascript/guides/nuxt/install/index.mdx
+++ b/docs/platforms/javascript/guides/nuxt/install/index.mdx
@@ -38,7 +38,7 @@ The SDK doesn't initialize Sentry while Nitro prerenders your pages at build tim
### Cloudflare
-With a Cloudflare Nitro preset, the SDK doesn't use `sentry.server.config.ts`. Set up the SDK with the [Cloudflare Nitro plugin](/platforms/javascript/guides/cloudflare/frameworks/nuxt/) instead.
+With a Cloudflare Nitro preset, the SDK doesn't use `sentry.server.config.ts`. Set up the SDK with the [Cloudflare Nitro plugin](/platforms/javascript/guides/nuxt/cloudflare/) instead.
## Upgrade to SDK Version 11
diff --git a/docs/platforms/javascript/guides/cloudflare/frameworks/hydrogen-react-router.mdx b/docs/platforms/javascript/guides/react-router/hydrogen.mdx
similarity index 63%
rename from docs/platforms/javascript/guides/cloudflare/frameworks/hydrogen-react-router.mdx
rename to docs/platforms/javascript/guides/react-router/hydrogen.mdx
index fad55e7a83325..152bdb9b09459 100644
--- a/docs/platforms/javascript/guides/cloudflare/frameworks/hydrogen-react-router.mdx
+++ b/docs/platforms/javascript/guides/react-router/hydrogen.mdx
@@ -1,11 +1,14 @@
---
title: Hydrogen with React Router
+h1_title: Hydrogen with React Router
+sidebar_title: Quick Start (Hydrogen)
+sidebar_order: 0.5
description: Learn how to instrument your Hydrogen app on Shopify Oxygen and capture your first errors and traces.
---
-This guide applies to Hydrogen versions **2025.5.0 and later** that use React Router 7 (framework mode). For older versions of Hydrogen that use Remix v2, see our [Remix on Cloudflare guide](/platforms/javascript/guides/cloudflare/frameworks/hydrogen-remix/).
+This guide applies to Hydrogen versions **2025.5.0 and later** that use React Router 7 (framework mode). For older versions of Hydrogen that use Remix v2, see the [Hydrogen with Remix guide](/platforms/javascript/guides/remix/hydrogen/).
@@ -20,19 +23,6 @@ You need:
## Install
-Choose the features you want to configure, and this guide will show you how:
-
-
-
-
-
### Install the Sentry SDK
Run the command for your preferred package manager to add the React Router and Cloudflare SDK:
@@ -51,10 +41,23 @@ pnpm add @sentry/react-router @sentry/cloudflare
## Configure
-### Configure Client-side Sentry
+**Error Monitoring** starts working as soon as you call `Sentry.init()`. **Logs** and **Application Metrics** need no extra configuration, and you'll learn how to send them in steps [#3](#send-logs) and [#4](#send-application-metrics-).
+This guide also enables **Tracing**, **Session Replay**, and **User Feedback**.
+
+
+
+### Configure Client-Side Sentry
Initialize Sentry in your `entry.client.tsx` file.
+The snippet also turns on:
+
+- Tracing: via `tracesSampleRate` and `reactRouterTracingIntegration()`
+- Session Replay: via `replayIntegration()`, sampled with `replaysSessionSampleRate` and `replaysOnErrorSampleRate`
+- User Feedback: via `feedbackIntegration()`
+
+Don't need a feature? Remove its integration and options from the snippet.
+
The `sentryOnError` handler integrates with React Router's [`onError` hook](https://reactrouter.com/how-to/error-reporting) to automatically capture and report client-side errors to Sentry.
```tsx {filename: app/entry.client.tsx}
@@ -67,42 +70,27 @@ Sentry.init({
dsn: "___PUBLIC_DSN___",
integrations: [
- // ___PRODUCT_OPTION_START___ performance
- // Registers and configures the Tracing integration,
- // which automatically instruments your application to monitor its
- // performance, including custom React Router routing instrumentation
+ // enables automatic instrumentation, including React Router navigations
Sentry.reactRouterTracingIntegration(),
- // ___PRODUCT_OPTION_END___ performance
- // ___PRODUCT_OPTION_START___ session-replay
- // Registers the Replay integration,
- // which automatically captures Session Replays
+ // enables Session Replay
Sentry.replayIntegration(),
- // ___PRODUCT_OPTION_END___ session-replay
- // ___PRODUCT_OPTION_START___ user-feedback
+ // enables User Feedback
Sentry.feedbackIntegration({
- // Additional SDK configuration goes in here, for example:
+ // Additional integration configuration goes in here
colorScheme: "system",
}),
- // ___PRODUCT_OPTION_END___ user-feedback
],
- // ___PRODUCT_OPTION_START___ performance
- // Set tracesSampleRate to 1.0 to capture 100%
- // of transactions for tracing.
- // We recommend adjusting this value in production
- // Learn more at
- // https://docs.sentry.io/platforms/javascript/guides/react-router/configuration/options/#traces-sample-rate
+ // Enables Tracing.
+ // Set to 1.0 to capture 100% of spans for tracing.
+ // We recommend reducing this value in production.
tracesSampleRate: 1.0,
- // ___PRODUCT_OPTION_END___ performance
- // ___PRODUCT_OPTION_START___ session-replay
- // Capture Replay for 10% of all sessions,
- // plus 100% of sessions with an error
- // Learn more at
- // https://docs.sentry.io/platforms/javascript/guides/react-router/session-replay/configuration/#general-integration-configuration
+ // Capture replays for 10% of all sessions,
+ // plus for 100% of sessions with an error
+ // Requires Sentry.replayIntegration()
replaysSessionSampleRate: 0.1,
replaysOnErrorSampleRate: 1.0,
- // ___PRODUCT_OPTION_END___ session-replay
});
startTransition(() => {
@@ -115,9 +103,15 @@ startTransition(() => {
});
```
-### Configure Server-side Sentry
+### Configure Server-Side Sentry
-First, create an `instrument.server.mjs` file to initialize Sentry on the server:
+First, create an `instrument.server.mjs` file to initialize Sentry on the server.
+
+The snippets in this step also turn on:
+
+- Tracing: via `tracesSampleRate`
+
+Don't need a feature? Remove its options from the snippets.
```js {filename:instrument.server.mjs}
import * as Sentry from "@sentry/react-router";
@@ -125,15 +119,10 @@ import * as Sentry from "@sentry/react-router";
Sentry.init({
dsn: "___PUBLIC_DSN___",
- // ___PRODUCT_OPTION_START___ performance
-
- // Set tracesSampleRate to 1.0 to capture 100%
- // of transactions for tracing.
- // We recommend adjusting this value in production
- // Learn more at
- // https://docs.sentry.io/platforms/javascript/guides/react-router/configuration/options/#tracesSampleRate
+ // Enables Tracing.
+ // Set to 1.0 to capture 100% of spans for tracing.
+ // We recommend reducing this value in production.
tracesSampleRate: 1.0,
- // ___PRODUCT_OPTION_END___ performance
});
```
@@ -141,7 +130,7 @@ Next, update your `server.ts` file to use the `wrapRequestHandler` method from t
-On Shopify Oxygen, never import anything directly from `@sentry/cloudflare`. Only use the `@sentry/cloudflare/request` subpath import shown below. All other imports (for example, `import * as Sentry from "@sentry/cloudflare"`) will break your app on Oxygen — use `@sentry/react-router/cloudflare` for everything else.
+On Shopify Oxygen, never import anything directly from `@sentry/cloudflare`. Only use the `@sentry/cloudflare/request` subpath import shown below. All other imports (for example, `import * as Sentry from "@sentry/cloudflare"`) will break your app on Oxygen. Use `@sentry/react-router/cloudflare` for everything else.
@@ -168,9 +157,11 @@ export default {
{
options: {
dsn: "___PUBLIC_DSN___",
- // ___PRODUCT_OPTION_START___ performance
+
+ // Enables Tracing.
+ // Set to 1.0 to capture 100% of spans for tracing.
+ // We recommend reducing this value in production.
tracesSampleRate: 1.0,
- // ___PRODUCT_OPTION_END___ performance
},
request: request as any,
context: executionContext,
@@ -193,8 +184,6 @@ export default {
};
```
-
-
### Enable Distributed Tracing
Update your `entry.server.tsx` file to inject trace meta tags:
@@ -240,9 +229,7 @@ export const handleError: HandleErrorFunction = (error, { request }) => {
export default Sentry.wrapSentryHandleRequest(handleRequest);
```
-
-
-### Add Readable Stack Traces With Source Maps (Optional)
+### Add Readable Stack Traces With Source Maps
The stack traces in your Sentry errors probably won't look like your actual code without unminifying them. To fix this, upload your source maps to Sentry.
@@ -285,7 +272,7 @@ sentry-cli sourcemaps inject /path/to/build/dir
sentry-cli sourcemaps upload /path/to/build/dir
```
-### Control the Data You Send to Sentry (Optional)
+### Control the Data You Send to Sentry
-## Verify Your Setup
+## Send Logs
-Let's test your setup and confirm that Sentry is working correctly and sending data to your Sentry project.
+
-### Issues
-
-
+If you're already logging with `console` or Consola, you can capture those logs with our console integrations.
-To verify that Sentry captures errors and creates issues in your Sentry project, throw an error in a loader.
+## Send Application Metrics
-Next, open the `/sentry-test` route in your browser, and you should trigger an error.
+
-```tsx {filename: app/routes/sentry-test.tsx}
-import type { Route } from "./+types/sentry-test";
-
-export async function loader() {
- throw new Error("My first Sentry error!");
-}
-
-export default function SentryTestPage() {
- return
Loading this page will throw an error
;
-}
-```
-
-
-### Tracing
+## Verify Your Setup
-To test your tracing configuration, update the previous code snippet by starting a trace to measure the time it takes for the execution of your code.
+Let's test your setup and confirm that Sentry is working correctly and sending data to your Sentry project.
-Open the `/sentry-test` route in your browser. You should start a trace and trigger an error.
+Add a route with a loader that throws an error, then open `/sentry-test` in your browser to trigger it:
```tsx {filename: app/routes/sentry-test.tsx}
-import * as Sentry from "@sentry/react-router/cloudflare";
-import type { Route } from "./+types/sentry-test";
-
export async function loader() {
- return Sentry.startSpan(
- {
- op: "test",
- name: "My First Test Trace",
- },
- () => {
- throw new Error("My first Sentry error!");
- }
- );
+ throw new Error("Sentry Test Error");
}
export default function SentryTestPage() {
@@ -345,33 +306,20 @@ export default function SentryTestPage() {
}
```
-
-
-
-
-
-
-
-
-
+
### View Captured Data in Sentry
-Now, head over to your project on [Sentry.io](https://sentry.io) to view the collected data (it takes a couple of moments for the data to appear).
+Now, head over to your project on [Sentry.io](https://sentry.io/) to view the collected data (it takes a couple of moments for the data to appear).
## Next Steps
-At this point, you should have integrated Sentry into your React Router Framework application and should already be sending data to your Sentry project.
-
-Now's a good time to customize your setup and look into more advanced topics.
-Our next recommended steps for you are:
+At this point, you should have integrated Sentry into your Hydrogen application. Here's what to explore next:
- Explore [practical guides](/get-started/guides/) on what to monitor, log, track, and investigate after setup
-- Learn how to manually capture errors
-- Continue to customize your configuration
-- Get familiar with [Sentry's product features](/product/) like tracing, insights, and alerts
+- Set up tunneling to avoid ad blockers blocking Sentry events
diff --git a/docs/platforms/javascript/guides/cloudflare/frameworks/remix.mdx b/docs/platforms/javascript/guides/remix/cloudflare.mdx
similarity index 60%
rename from docs/platforms/javascript/guides/cloudflare/frameworks/remix.mdx
rename to docs/platforms/javascript/guides/remix/cloudflare.mdx
index dc987930018ab..a0a069e317e86 100644
--- a/docs/platforms/javascript/guides/cloudflare/frameworks/remix.mdx
+++ b/docs/platforms/javascript/guides/remix/cloudflare.mdx
@@ -1,29 +1,24 @@
---
title: Remix on Cloudflare
+sidebar_title: Quick Start (Cloudflare)
+sidebar_order: 0.5
description: "Learn how to instrument your Remix app on Cloudflare Workers and Pages and capture your first errors with Sentry."
+runtime: cloudflare
---
-
+
-
+Using Shopify Hydrogen? Follow the [Hydrogen with React Router](/platforms/javascript/guides/react-router/hydrogen/) guide for Hydrogen 2025.5.0 and later, or the [Hydrogen with Remix](/platforms/javascript/guides/remix/hydrogen/) guide for older versions.
-## Install
+
-Choose the features you want to configure, and this guide will show you how:
+
-
+
-
+
+
+## Install
### Install the Sentry SDK
@@ -43,9 +38,6 @@ yarn add @sentry/remix @sentry/cloudflare
pnpm add @sentry/remix @sentry/cloudflare
```
-
+
diff --git a/docs/platforms/javascript/guides/remix/frameworks/index.mdx b/docs/platforms/javascript/guides/remix/frameworks/index.mdx
deleted file mode 100644
index a72e5adcc00f7..0000000000000
--- a/docs/platforms/javascript/guides/remix/frameworks/index.mdx
+++ /dev/null
@@ -1,9 +0,0 @@
----
-title: Cloudflare SDK Guide
-description: "Learn how to set up the Remix SDK or Hydrogen with Cloudflare."
----
-
-You can use the Sentry Remix SDK to set up Sentry with frameworks like Shopify's Hydrogen. The following guides will help you get started with the Sentry Remix SDK on Cloudflare:
-
-- **[Remix on Cloudflare](/platforms/javascript/guides/cloudflare/frameworks/remix/)**
-- **[Hydrogen on Cloudflare](/platforms/javascript/guides/cloudflare/frameworks/hydrogen-react-router/)**
diff --git a/docs/platforms/javascript/guides/cloudflare/frameworks/hydrogen-remix.mdx b/docs/platforms/javascript/guides/remix/hydrogen.mdx
similarity index 94%
rename from docs/platforms/javascript/guides/cloudflare/frameworks/hydrogen-remix.mdx
rename to docs/platforms/javascript/guides/remix/hydrogen.mdx
index ef88672d0ed44..829cf6ab13a54 100644
--- a/docs/platforms/javascript/guides/cloudflare/frameworks/hydrogen-remix.mdx
+++ b/docs/platforms/javascript/guides/remix/hydrogen.mdx
@@ -1,11 +1,13 @@
---
title: Hydrogen with Remix (Legacy)
+sidebar_title: Hydrogen (Legacy)
+sidebar_order: 1.5
description: Learn how to use the Sentry Remix SDK to instrument your Hydrogen app (versions before 2025.5.0).
---
-This guide applies to Hydrogen versions **before 2025.5.0** that use Remix v2. For newer versions of Hydrogen (2025.5.0+) that use React Router 7, see the [React Router guide](/platforms/javascript/guides/cloudflare/frameworks/hydrogen-react-router/).
+This guide applies to Hydrogen versions **before 2025.5.0** that use Remix v2. For newer versions of Hydrogen (2025.5.0+) that use React Router 7, see the [Hydrogen with React Router guide](/platforms/javascript/guides/react-router/hydrogen/).
@@ -33,13 +35,13 @@ Update your `server.ts` file to use the `wrapRequestHandler` method from `@sentr
-On Shopify Oxygen, never import anything directly from `@sentry/cloudflare`. Only use the `@sentry/cloudflare/request` subpath import shown below. All other imports (for example, `import * as Sentry from "@sentry/cloudflare"`) will break your app on Oxygen — use `@sentry/remix/cloudflare` for everything else.
+On Shopify Oxygen, never import anything directly from `@sentry/cloudflare`. Only use the `@sentry/cloudflare/request` subpath import shown below. All other imports (for example, `import * as Sentry from "@sentry/cloudflare"`) will break your app on Oxygen. Use `@sentry/remix/cloudflare` for everything else.
-`wrapRequestHandler` doesn't isolate requests from each other. Scope data you set during a request, for example with `setTag` or `setUser`, can show up on events from other concurrent or later requests in the same isolate. Use `wrapRequestHandler` only on runtimes that can't enable `nodejs_compat`, such as Shopify Oxygen. For Remix on Cloudflare Workers, follow the [Remix on Cloudflare guide](/platforms/javascript/guides/cloudflare/frameworks/remix/) instead.
+`wrapRequestHandler` doesn't isolate requests from each other. Scope data you set during a request, for example with `setTag` or `setUser`, can show up on events from other concurrent or later requests in the same isolate. Use `wrapRequestHandler` only on runtimes that can't enable `nodejs_compat`, such as Shopify Oxygen. For Remix on Cloudflare Workers, follow the [Remix on Cloudflare guide](/platforms/javascript/guides/remix/cloudflare/) instead.
@@ -62,7 +64,7 @@ export default {
return wrapRequestHandler(
{
options: {
- dsn: "YOUR_DSN_HERE",
+ dsn: "___PUBLIC_DSN___",
tracesSampleRate: 1.0,
},
// Need to cast to any because this is not on cloudflare
@@ -146,7 +148,7 @@ Sentry.init({
});
```
-## Control the Data You Send to Sentry (Optional)
+## Control the Data You Send to Sentry
@@ -13,6 +14,8 @@ This guide covers Remix 2. Support for [Remix 3](https://remix.run/blog/remix-3-
+
+
diff --git a/docs/platforms/javascript/guides/cloudflare/frameworks/sveltekit.mdx b/docs/platforms/javascript/guides/sveltekit/cloudflare.mdx
similarity index 51%
rename from docs/platforms/javascript/guides/cloudflare/frameworks/sveltekit.mdx
rename to docs/platforms/javascript/guides/sveltekit/cloudflare.mdx
index 340bf50fa9f29..e49819349ac07 100644
--- a/docs/platforms/javascript/guides/cloudflare/frameworks/sveltekit.mdx
+++ b/docs/platforms/javascript/guides/sveltekit/cloudflare.mdx
@@ -1,9 +1,11 @@
---
title: SvelteKit on Cloudflare
+sidebar_title: Quick Start (Cloudflare)
+sidebar_order: 0.5
description: "Learn how to instrument your SvelteKit app on Cloudflare Workers and Pages and capture your first errors with Sentry."
+runtime: cloudflare
---
-
+
+
+
diff --git a/docs/platforms/javascript/guides/sveltekit/index.mdx b/docs/platforms/javascript/guides/sveltekit/index.mdx
index 02bb0201d9913..7036f074c30eb 100644
--- a/docs/platforms/javascript/guides/sveltekit/index.mdx
+++ b/docs/platforms/javascript/guides/sveltekit/index.mdx
@@ -5,10 +5,13 @@ sdk: sentry.javascript.sveltekit
categories:
- browser
- server
+runtime: node
---
+
+
@@ -70,7 +73,7 @@ Our next recommended steps for you are:
- Learn how to [manually capture errors](/platforms/javascript/guides/sveltekit/usage/)
- Continue to [customize your configuration](/platforms/javascript/guides/sveltekit/configuration/)
- Learn how to [manually instrument](/platforms/javascript/guides/sveltekit/apis/#load-function-instrumentation) SvelteKit-specific features
-- Learn more about [deploying SvelteKit apps to Cloudflare Pages](/platforms/javascript/guides/cloudflare/frameworks/sveltekit/)
+- Learn more about [deploying SvelteKit apps to Cloudflare Pages](/platforms/javascript/guides/sveltekit/cloudflare/)
- Get familiar with [Sentry's product features](/product/) like tracing, insights, and alerts
diff --git a/docs/platforms/javascript/guides/sveltekit/manual-setup__v10.7.0.mdx b/docs/platforms/javascript/guides/sveltekit/manual-setup__v10.7.0.mdx
index 11ff9ddc7ae5f..f83502f74828c 100644
--- a/docs/platforms/javascript/guides/sveltekit/manual-setup__v10.7.0.mdx
+++ b/docs/platforms/javascript/guides/sveltekit/manual-setup__v10.7.0.mdx
@@ -27,7 +27,7 @@ Here's an overview of the current support:
- [Adapter-vercel](https://kit.svelte.dev/docs/adapter-vercel) when used with Vercel's Node.js Lambda runtime
- [Adapter-node](https://kit.svelte.dev/docs/adapter-node)
- **Supported non-Node.js runtimes**
- - [Adapter-cloudflare](https://kit.svelte.dev/docs/adapter-cloudflare) requires [additional setup](/platforms/javascript/guides/cloudflare/frameworks/sveltekit/)
+ - [Adapter-cloudflare](https://kit.svelte.dev/docs/adapter-cloudflare) requires [additional setup](/platforms/javascript/guides/sveltekit/cloudflare/)
- **Currently not supported**
- Non-Node.js server runtimes, such as Vercel's edge runtime, are not yet supported.
- **Other adapters**
@@ -326,7 +326,7 @@ Our next recommended steps for you are:
- Learn how to [manually capture errors](/platforms/javascript/guides/sveltekit/usage/)
- Continue to [customize your configuration](/platforms/javascript/guides/sveltekit/configuration/)
- Learn how to [manually instrument](/platforms/javascript/guides/sveltekit/apis/#load-function-instrumentation) SvelteKit-specific features
-- Learn more about [deploying SvelteKit apps to Cloudflare Pages](/platforms/javascript/guides/cloudflare/frameworks/sveltekit/)
+- Learn more about [deploying SvelteKit apps to Cloudflare Pages](/platforms/javascript/guides/sveltekit/cloudflare/)
- Get familiar with [Sentry's product features](/product/) like tracing, insights, and alerts
diff --git a/docs/platforms/javascript/guides/tanstackstart-react/cloudflare.mdx b/docs/platforms/javascript/guides/tanstackstart-react/cloudflare.mdx
new file mode 100644
index 0000000000000..7ecae0805d761
--- /dev/null
+++ b/docs/platforms/javascript/guides/tanstackstart-react/cloudflare.mdx
@@ -0,0 +1,251 @@
+---
+title: TanStack Start React on Cloudflare
+sidebar_title: Quick Start (Cloudflare)
+sidebar_order: 0.5
+description: "Learn how to instrument your TanStack Start app on Cloudflare Workers and capture your first errors with Sentry."
+runtime: cloudflare
+---
+
+
+
+This guide is for TanStack Start deployed to **Cloudflare Workers** using the `@cloudflare/vite-plugin`.
+
+
+
+
+
+## Prerequisites
+
+You need:
+
+- A Sentry [account](https://sentry.io/signup/) and [project](/product/projects/)
+- A TanStack Start application that runs on Cloudflare Workers with the [Cloudflare Vite plugin](https://developers.cloudflare.com/workers/vite-plugin/)
+
+
+
+## Install
+
+### Install the Sentry SDK
+
+Run the command for your preferred package manager to add the Sentry TanStack Start and Cloudflare SDKs to your application:
+
+```bash {tabTitle:npm}
+npm install @sentry/tanstackstart-react @sentry/cloudflare --save
+```
+
+```bash {tabTitle:yarn}
+yarn add @sentry/tanstackstart-react @sentry/cloudflare
+```
+
+```bash {tabTitle:pnpm}
+pnpm add @sentry/tanstackstart-react @sentry/cloudflare
+```
+
+## Configure
+
+**Error Monitoring** starts working as soon as you configure Sentry. **Logs** and **Application Metrics** need no extra configuration, and you'll learn how to send them in steps [#3](#send-logs) and [#4](#send-application-metrics-).
+This guide also enables **Tracing**, **Session Replay**, and **User Feedback**.
+
+
+
+When deploying TanStack Start to Cloudflare Workers, you need to wrap the server entry point with `Sentry.withSentry` from `@sentry/cloudflare`. TanStack Start allows you to create a custom server entry file for this purpose.
+
+### Configure Wrangler
+
+
+
+### Create a Custom Server Entry
+
+Create a `src/server.ts` file that wraps the TanStack Start handler with Sentry.
+
+Use `wrapFetchWithSentry` from `@sentry/tanstackstart-react` to instrument TanStack Start server functions with tracing.
+
+The snippet also turns on:
+
+- Tracing: via `tracesSampleRate`
+
+Don't need a feature? Remove its integration and options from the snippet.
+
+
+
+Due to type differences between TanStack Start and Cloudflare Workers, you'll need to add a `// @ts-expect-error` comment as shown in the example. This is expected and doesn't affect functionality.
+
+
+
+```typescript {filename:src/server.ts}
+import * as Sentry from "@sentry/cloudflare";
+import { wrapFetchWithSentry } from "@sentry/tanstackstart-react";
+import handler from "@tanstack/react-start/server-entry";
+
+export default Sentry.withSentry(
+ () => ({
+ dsn: "___PUBLIC_DSN___",
+
+ // Enables Tracing.
+ // Set to 1.0 to capture 100% of spans for tracing.
+ // We recommend reducing this value in production.
+ tracesSampleRate: 1.0,
+ }),
+ // @ts-expect-error - handler is not typed as a Cloudflare handler
+ wrapFetchWithSentry(handler)
+);
+```
+
+Then, point `main` in your Wrangler configuration to this file:
+
+```json {diff} {filename:wrangler.jsonc}
+ {
+ "name": "my-tanstack-app",
++ "main": "src/server.ts",
+ // ... rest of config
+ }
+```
+
+### Configure Client-Side Sentry
+
+Initialize Sentry in your `src/router.tsx` file for client-side error tracking.
+
+The snippet also turns on:
+
+- Tracing: via `tanstackRouterBrowserTracingIntegration()` and `tracesSampleRate`
+- Session Replay: via `replayIntegration()`, sampled with `replaysSessionSampleRate` and `replaysOnErrorSampleRate`
+- User Feedback: via `feedbackIntegration()`
+
+Don't need a feature? Remove its integration and options from the snippet.
+
+```tsx {diff} {filename:src/router.tsx}
++import * as Sentry from "@sentry/tanstackstart-react";
+ import { createRouter } from '@tanstack/react-router'
+
+ export const getRouter = () => {
+ const router = createRouter();
+
++ if (!router.isServer) {
++ Sentry.init({
++ dsn: "___PUBLIC_DSN___",
++ integrations: [
++ // enables automatic instrumentation of TanStack Router navigations
++ Sentry.tanstackRouterBrowserTracingIntegration(router),
++ // enables Session Replay
++ Sentry.replayIntegration(),
++ // enables User Feedback
++ Sentry.feedbackIntegration({
++ // Additional integration configuration goes in here
++ colorScheme: "system",
++ }),
++ ],
++
++ // Enables Tracing.
++ // Set to 1.0 to capture 100% of spans for tracing.
++ // We recommend reducing this value in production.
++ tracesSampleRate: 1.0,
++
++ // Capture replays for 10% of all sessions,
++ // plus for 100% of sessions with an error
++ // Requires Sentry.replayIntegration()
++ replaysSessionSampleRate: 0.1,
++ replaysOnErrorSampleRate: 1.0,
++ });
++ }
+
+ return router;
+ }
+```
+
+### Capture Server-Side Errors
+
+To capture server-side errors from HTTP requests and server function calls, add Sentry's global middlewares to `createStart()` in your `src/start.ts` file.
+
+The Sentry middleware should be the first middleware in the arrays to ensure all errors are captured.
+
+
+ SSR rendering exceptions are not captured by the middleware. Use
+ `captureException` to manually capture those errors.
+
+
+```tsx {filename:src/start.ts}
+import {
+ sentryGlobalFunctionMiddleware,
+ sentryGlobalRequestMiddleware,
+} from "@sentry/tanstackstart-react";
+import { createStart } from "@tanstack/react-start";
+
+export const startInstance = createStart(() => {
+ return {
+ requestMiddleware: [sentryGlobalRequestMiddleware],
+ functionMiddleware: [sentryGlobalFunctionMiddleware],
+ };
+});
+```
+
+### Add Readable Stack Traces With Source Maps
+
+
+
+### Control the Data You Send to Sentry
+
+
+
+## Send Logs
+
+
+
+If you're already logging with `console` or Consola, you can capture those logs with our console integrations.
+
+## Send Application Metrics
+
+
+
+## Verify Your Setup
+
+Let's test your setup and confirm that Sentry is working correctly and sending data to your Sentry project.
+
+Add a test button to one of your pages. Clicking it will trigger an error for Sentry to capture.
+
+```tsx
+
+```
+
+Run your app with `wrangler dev` (or through your Vite build with the Cloudflare plugin), and click the button.
+
+
+
+### View Captured Data in Sentry
+
+Now, head over to your project on [Sentry.io](https://sentry.io/) to view the collected data (it takes a couple of moments for the data to appear).
+
+
+
+## Next Steps
+
+At this point, you should have integrated Sentry into your TanStack Start application on Cloudflare. Here's what to explore next:
+
+- Explore [practical guides](/get-started/guides/) on what to monitor, log, track, and investigate after setup
+- Set up tunneling to avoid ad blockers blocking Sentry events
+- Make use of [Cloudflare-specific features](/platforms/javascript/guides/cloudflare/features/)
+
+
+
+- Find various topics in [Cloudflare troubleshooting](/platforms/javascript/guides/cloudflare/troubleshooting/)
+- [Get support](https://www.sentry.help/en/)
+
+
+
+
diff --git a/docs/platforms/javascript/guides/tanstackstart-react/index.mdx b/docs/platforms/javascript/guides/tanstackstart-react/index.mdx
index 88566aa84c18e..ae3d2ff041690 100644
--- a/docs/platforms/javascript/guides/tanstackstart-react/index.mdx
+++ b/docs/platforms/javascript/guides/tanstackstart-react/index.mdx
@@ -5,6 +5,7 @@ sdk: sentry.javascript.tanstackstart-react
categories:
- server
- browser
+runtime: node
---
@@ -16,6 +17,8 @@ Please reach out on [GitHub](https://github.com/getsentry/sentry-javascript/issu
+
+
diff --git a/includes/quick-start-features-expandable-cloudflare-server.mdx b/includes/quick-start-features-expandable-cloudflare-server.mdx
new file mode 100644
index 0000000000000..c70a694ccfaf5
--- /dev/null
+++ b/includes/quick-start-features-expandable-cloudflare-server.mdx
@@ -0,0 +1,7 @@
+import { FeatureInfo } from "sentry-docs/components/featureInfo";
+
+
+
+
+
+
diff --git a/includes/quick-start-locate-data-expandable-cloudflare-server.mdx b/includes/quick-start-locate-data-expandable-cloudflare-server.mdx
new file mode 100644
index 0000000000000..0e4a5929aa4ac
--- /dev/null
+++ b/includes/quick-start-locate-data-expandable-cloudflare-server.mdx
@@ -0,0 +1,7 @@
+import { FeatureInfo } from "sentry-docs/components/featureInfo";
+
+
+
+
+
+
diff --git a/platform-includes/distributed-tracing/how-to-use/javascript.remix.mdx b/platform-includes/distributed-tracing/how-to-use/javascript.remix.mdx
index 41f2df3b033b6..ca6db1c7d0af6 100644
--- a/platform-includes/distributed-tracing/how-to-use/javascript.remix.mdx
+++ b/platform-includes/distributed-tracing/how-to-use/javascript.remix.mdx
@@ -25,7 +25,7 @@ if (serverTimingValue) {
return response;
```
-See the [Hydrogen on Cloudflare guide](/platforms/javascript/guides/cloudflare/frameworks/hydrogen-remix/#trace-propagation) for a complete example.
+See the [Hydrogen with Remix guide](/platforms/javascript/guides/remix/hydrogen/#trace-propagation) for a complete example.
diff --git a/platform-includes/getting-started-cloudflare/javascript.astro.mdx b/platform-includes/getting-started-cloudflare/javascript.astro.mdx
new file mode 100644
index 0000000000000..fa5da647cfb5d
--- /dev/null
+++ b/platform-includes/getting-started-cloudflare/javascript.astro.mdx
@@ -0,0 +1,203 @@
+### Install the Sentry SDK
+
+Install both `@sentry/astro` and `@sentry/cloudflare`:
+
+```bash {tabTitle:npm}
+npm install @sentry/astro @sentry/cloudflare
+```
+
+```bash {tabTitle:yarn}
+yarn add @sentry/astro @sentry/cloudflare
+```
+
+```bash {tabTitle:pnpm}
+pnpm add @sentry/astro @sentry/cloudflare
+```
+
+## Configure
+
+**Error Monitoring** starts working as soon as you configure Sentry. **Logs** and **Application Metrics** need no extra configuration, and you'll learn how to send them in steps [#3](#send-logs) and [#4](#send-application-metrics-).
+This guide also enables **Tracing**, **Session Replay**, and **User Feedback**.
+
+
+
+### Configure Wrangler
+
+
+
+### Configure Server-Side Sentry
+
+Astro 6 with `@astrojs/cloudflare` v13+ supports custom entry points directly from `wrangler.jsonc`. Update your wrangler configuration to point to a custom Sentry entry point:
+
+```jsonc {filename:wrangler.jsonc}
+{
+ "main": "./sentry.server.config.ts",
+ // ... other configuration
+}
+```
+
+Create a `sentry.server.config.ts` file in the root of your project that wraps the Astro Cloudflare handler with Sentry.
+
+The snippet also turns on:
+
+- Tracing: via `tracesSampleRate`
+
+Don't need a feature? Remove its integration and options from the snippet.
+
+```typescript {filename:sentry.server.config.ts}
+import * as Sentry from "@sentry/cloudflare";
+import handler from "@astrojs/cloudflare/entrypoints/server";
+
+export default Sentry.withSentry(
+ (env) => ({
+ dsn: env.SENTRY_DSN,
+
+ // Enables Tracing.
+ // Set to 1.0 to capture 100% of spans for tracing.
+ // We recommend reducing this value in production.
+ tracesSampleRate: 1.0,
+ }),
+ handler
+);
+```
+
+### Register the Sentry Integration
+
+Follow [Astro's Cloudflare deployment guide](https://docs.astro.build/en/guides/deploy/cloudflare/) if you haven't already. Then add the Sentry integration to your `astro.config.mjs` alongside the Cloudflare adapter.
+
+```javascript {filename:astro.config.mjs}
+import { defineConfig } from "astro/config";
+import cloudflare from "@astrojs/cloudflare";
+import sentry from "@sentry/astro";
+
+export default defineConfig({
+ adapter: cloudflare(),
+ integrations: [sentry()],
+});
+```
+
+### Configure Client-Side Sentry
+
+Create a `sentry.client.config.(ts|js)` file in the root of your project. In this file, import and initialize Sentry for the client.
+
+The snippet also turns on:
+
+- Tracing: via `tracesSampleRate`
+- Session Replay: via `replayIntegration()`, sampled with `replaysSessionSampleRate` and `replaysOnErrorSampleRate`
+- User Feedback: via `feedbackIntegration()`
+
+Don't need a feature? Remove its integration and options from the snippet.
+
+```javascript {filename:sentry.client.config.(ts|js)}
+import * as Sentry from "@sentry/astro";
+
+Sentry.init({
+ dsn: "___PUBLIC_DSN___",
+ integrations: [
+ // enables automatic instrumentation
+ Sentry.browserTracingIntegration(),
+ // enables Session Replay
+ Sentry.replayIntegration(),
+ // enables User Feedback
+ Sentry.feedbackIntegration({ colorScheme: "system" }),
+ ],
+
+ // Enables Tracing.
+ // Set to 1.0 to capture 100% of spans for tracing.
+ // We recommend reducing this value in production.
+ tracesSampleRate: 1.0,
+
+ // Capture replays for 10% of all sessions,
+ // plus for 100% of sessions with an error
+ // Requires Sentry.replayIntegration()
+ replaysSessionSampleRate: 0.1,
+ replaysOnErrorSampleRate: 1.0,
+});
+```
+
+### Add Readable Stack Traces With Source Maps
+
+To upload source maps for clear error stack traces, add your Sentry auth token, organization, and project slugs in the `sentry` options inside `astro.config.mjs`:
+
+```javascript {filename:astro.config.mjs}
+import { defineConfig } from "astro/config";
+import cloudflare from "@astrojs/cloudflare";
+import sentry from "@sentry/astro";
+
+export default defineConfig({
+ adapter: cloudflare(),
+ integrations: [
+ sentry({
+ org: "___ORG_SLUG___",
+ project: "___PROJECT_SLUG___",
+ // store your auth token in an environment variable
+ authToken: process.env.SENTRY_AUTH_TOKEN,
+ }),
+ ],
+});
+```
+
+To keep your auth token secure, set the `SENTRY_AUTH_TOKEN` environment variable in your build environment:
+
+
+
+```bash {filename:.env.sentry-build-plugin}
+SENTRY_AUTH_TOKEN=___ORG_AUTH_TOKEN___
+```
+
+
+
+### Control the Data You Send to Sentry
+
+
+
+## Send Logs
+
+
+
+If you're already logging with `console` or Consola, you can capture those logs with our console integrations.
+
+## Send Application Metrics
+
+
+
+## Verify Your Setup
+
+Let's test your setup and confirm that Sentry is working correctly and sending data to your Sentry project.
+
+Add this button to a page in your Astro app and click it to send a test error:
+
+```astro
+
+
+
+```
+
+
+
+### View Captured Data in Sentry
+
+Now, head over to your project on [Sentry.io](https://sentry.io/) to view the collected data (it takes a couple of moments for the data to appear).
+
+
+
+## Next Steps
+
+At this point, you should have integrated Sentry into your Astro application on Cloudflare. Here's what to explore next:
+
+- Explore [practical guides](/get-started/guides/) on what to monitor, log, track, and investigate after setup
+- Set up tunneling to avoid ad blockers blocking Sentry events
+
+
+
+- Find various topics in Troubleshooting
+- [Get support](https://www.sentry.help/en/)
+
+
diff --git a/platform-includes/getting-started-cloudflare/javascript.nextjs.mdx b/platform-includes/getting-started-cloudflare/javascript.nextjs.mdx
new file mode 100644
index 0000000000000..ed8427c5febad
--- /dev/null
+++ b/platform-includes/getting-started-cloudflare/javascript.nextjs.mdx
@@ -0,0 +1,209 @@
+## Prerequisites
+
+You need:
+
+- A Sentry [account](https://sentry.io/signup/) and [project](/product/projects/)
+- A Next.js application that runs on Cloudflare Workers with the [OpenNext Cloudflare adapter](https://opennext.js.org/cloudflare) or [vinext](https://github.com/cloudflare/vinext)
+
+
+ If you haven't deployed a Next.js app to Cloudflare Workers before, follow
+ Cloudflare's [Next.js deployment
+ guide](https://developers.cloudflare.com/workers/framework-guides/web-apps/nextjs/)
+ first.
+
+
+
+
+## Install
+
+### Run the Installation Wizard
+
+Run the Sentry wizard to automatically install the SDK and configure Sentry in your Next.js application:
+
+```bash
+npx @sentry/wizard@latest -i nextjs
+```
+
+The wizard asks whether you want to enable **Tracing** and **Session Replay**, route browser requests through your server to avoid ad blockers, and create an example page. To match the configuration in this guide, answer **Yes** to each.
+
+Prefer to set things up yourself? Check out the [Manual Setup](/platforms/javascript/guides/nextjs/manual-setup/) guide.
+
+## Configure
+
+**Error Monitoring** starts working as soon as you call `Sentry.init()`. **Logs** and **Application Metrics** need no extra configuration, and you'll learn how to send them in steps [#3](#send-logs) and [#4](#send-application-metrics-).
+This guide also enables **Tracing**, **Session Replay**, and **User Feedback**.
+
+
+
+The wizard creates the files below. On Cloudflare Workers, you set the server options in the Worker entry instead, as the [Wrap the Worker Entry](#wrap-the-worker-entry) step shows.
+
+
+
+### Configure Wrangler
+
+The SDK uses Node.js APIs that the Workers runtime only provides with the `nodejs_compat` [compatibility flag](https://developers.cloudflare.com/workers/runtime-apis/nodejs/). Set the [compatibility date](https://developers.cloudflare.com/workers/configuration/compatibility-dates/) to `2025-08-16` or later, which adds the `https.request` API that the SDK uses to send data:
+
+```jsonc {tabTitle:JSON} {filename:wrangler.jsonc}
+{
+ "compatibility_flags": ["nodejs_compat"],
+ "compatibility_date": "2025-08-16",
+}
+```
+
+```toml {tabTitle:Toml} {filename:wrangler.toml}
+compatibility_flags = ["nodejs_compat"]
+compatibility_date = "2025-08-16"
+```
+
+### Wrap the Worker Entry
+
+
+
+If you build your app with vinext, skip to [Wrap the Worker Entry With vinext](#wrap-the-worker-entry-with-vinext).
+
+On Cloudflare Workers, your Next.js app runs inside the Worker entry that OpenNext generates (`.open-next/worker.js`). Wrap this entry with `withSentry` from `@sentry/nextjs/cloudflare` to get the same Next.js spans as on Node.js, plus Cloudflare data such as spans for D1 queries. Each request gets one `http.server` span with the name of the Next.js route, and the Next.js spans become its children.
+
+`@sentry/nextjs` depends on `@sentry/cloudflare`, so you don't need to install another package.
+
+First, create a [custom Worker](https://opennext.js.org/cloudflare/howtos/custom-worker) that imports the handler of OpenNext and wraps it with `withSentry`. Pass your Sentry options to `withSentry`:
+
+```typescript {filename:worker.ts}
+import * as Sentry from "@sentry/nextjs/cloudflare";
+// @ts-ignore `.open-next/worker.js` is generated at build time
+import handler from "./.open-next/worker.js";
+
+// Re-export the Durable Objects your app uses, for example for the DO Queue and DO Tag Cache of OpenNext
+// @ts-ignore `.open-next/worker.js` is generated at build time
+export { DOQueueHandler, DOShardedTagCache } from "./.open-next/worker.js";
+
+export default Sentry.withSentry(
+ () => ({
+ dsn: "___PUBLIC_DSN___",
+
+ // Set tracesSampleRate to 1.0 to capture 100% of spans for tracing.
+ // Learn more at
+ // https://docs.sentry.io/platforms/javascript/guides/cloudflare/configuration/options/#tracesSampleRate
+ tracesSampleRate: 1.0,
+ }),
+ handler
+);
+```
+
+Then, point `main` in your Wrangler configuration to this file:
+
+```jsonc {tabTitle:JSON} {filename:wrangler.jsonc}
+{
+ "main": "./worker.ts",
+}
+```
+
+```toml {tabTitle:Toml} {filename:wrangler.toml}
+main = "./worker.ts"
+```
+
+#### Wrap the Worker Entry With vinext
+
+With [vinext](https://github.com/cloudflare/vinext), you don't need a custom Worker. Add the [Sentry Vite plugin](/platforms/javascript/guides/cloudflare/install/vite-plugin/) to your Vite config, and it wraps your Worker entry with `withSentry` from `@sentry/nextjs/cloudflare` automatically.
+
+#### Server and Edge Configuration in the Worker
+
+In the Worker, `withSentry` creates the Sentry client. `Sentry.init()` in `sentry.server.config.ts` and `sentry.edge.config.ts` still runs, but it creates no client and only applies the `release` option. Set all other options in `withSentry`.
+
+On Workers, these two files are optional. Keep them if you use `next dev`, which runs on Node.js and doesn't use the Worker entry. They also pass on the release that `withSentryConfig` sets at build time.
+
+Keep `instrumentation.ts`, because Next.js reports server errors, for example from Server Components and route handlers, through its `onRequestError` hook.
+
+The SDK takes the release from the first of these sources that has a value:
+
+1. The `release` option of `withSentry`
+2. The `SENTRY_RELEASE` environment variable
+3. The ID of the `CF_VERSION_METADATA` binding
+4. The `release` option of `Sentry.init()` in `sentry.server.config.ts` or `sentry.edge.config.ts`, or else the release that `withSentryConfig` sets at build time
+
+On Node.js, the build release comes before `SENTRY_RELEASE`.
+
+### Control the Data You Send to Sentry
+
+
+
+## Send Logs
+
+
+
+If you're already logging with `console` or Consola, use an integration to capture those logs as Sentry Logs automatically:
+
+- `consoleLoggingIntegration` for `console` calls
+- Consola
+
+## Send Application Metrics
+
+
+
+## Verify Your Setup
+
+Let's test your setup and confirm that Sentry is working correctly and sending data to your Sentry project.
+
+The wizard created an example page that sends a test error from both your frontend and your backend:
+
+1. Build your app and run it in the Workers runtime on your machine:
+
+ ```bash
+ npx opennextjs-cloudflare build && npx opennextjs-cloudflare preview
+ ```
+
+2. Open `/sentry-example-page` on the URL that the preview command prints.
+3. Click **Throw Sample Error**.
+
+If you skipped the example page, add a test button to one of your pages instead. Clicking it will trigger an error for Sentry to capture.
+
+```tsx {filename:app/page.tsx}
+"use client";
+
+export default function Page() {
+ return (
+
+ );
+}
+```
+
+
+
+### View Captured Data in Sentry
+
+Now, head over to your project on [Sentry.io](https://sentry.io/) to view the collected data (it takes a couple of moments for the data to appear).
+
+
+
+## Next Steps
+
+At this point, you should have integrated Sentry into your Next.js application on Cloudflare Workers. Here's what to explore next:
+
+- Explore [practical guides](/get-started/guides/) on what to monitor, log, track, and investigate after setup
+- [Distributed Tracing](/platforms/javascript/guides/nextjs/tracing/distributed-tracing/) to trace requests across services
+- Set up tunneling to avoid ad blockers blocking Sentry events, if you didn't enable it in the wizard
+
+
+
+- If you encountered issues with our installation wizard, try [setting up Sentry manually](/platforms/javascript/guides/nextjs/manual-setup/)
+- Find various topics in Troubleshooting
+- [Get support](https://www.sentry.help/en/)
+
+
+
+
diff --git a/platform-includes/getting-started-cloudflare/javascript.nuxt.mdx b/platform-includes/getting-started-cloudflare/javascript.nuxt.mdx
new file mode 100644
index 0000000000000..c5b416237741d
--- /dev/null
+++ b/platform-includes/getting-started-cloudflare/javascript.nuxt.mdx
@@ -0,0 +1,257 @@
+
+
+
+
+## Install
+
+### Install the Sentry SDK
+
+Run the command for your preferred package manager to add the Sentry SDK to your application:
+
+```bash {tabTitle:npm}
+npm install @sentry/nuxt --save
+```
+
+```bash {tabTitle:yarn}
+yarn add @sentry/nuxt
+```
+
+```bash {tabTitle:pnpm}
+pnpm add @sentry/nuxt
+```
+
+## Configure
+
+**Error Monitoring** starts working as soon as you configure Sentry. **Logs** and **Application Metrics** need no extra configuration, and you'll learn how to send them in steps [#3](#send-logs) and [#4](#send-application-metrics-).
+This guide also enables **Tracing**, **Session Replay**, and **User Feedback**.
+
+
+
+### Apply Instrumentation to Your App
+
+Add the Sentry Nuxt module to your `nuxt.config.ts` file:
+
+```javascript {filename:nuxt.config.ts}
+export default defineNuxtConfig({
+ modules: ["@sentry/nuxt/module"],
+});
+```
+
+### Configure Client-Side Sentry
+
+Add a `sentry.client.config.ts` file to the root of your project (this is probably the same level as the `package.json`). In this file, import and initialize Sentry, specifying any SDK options for the client.
+
+The snippet also turns on:
+
+- Tracing: via `tracesSampleRate`
+- Session Replay: via `replayIntegration()`, sampled with `replaysSessionSampleRate` and `replaysOnErrorSampleRate`
+- User Feedback: via `feedbackIntegration()`
+
+Don't need a feature? Remove its integration and options from the snippet.
+
+```javascript {filename:sentry.client.config.ts}
+import * as Sentry from "@sentry/nuxt";
+
+Sentry.init({
+ // If set up, you can use the Nuxt runtime config here
+ // dsn: useRuntimeConfig().public.sentry.dsn
+ // modify depending on your custom runtime config
+ dsn: "___PUBLIC_DSN___",
+ integrations: [
+ // enables Session Replay
+ Sentry.replayIntegration(),
+ // enables User Feedback
+ Sentry.feedbackIntegration({
+ // Additional integration configuration goes in here
+ colorScheme: "system",
+ }),
+ ],
+
+ // Enables Tracing.
+ // Set to 1.0 to capture 100% of spans for tracing.
+ // We recommend reducing this value in production.
+ tracesSampleRate: 1.0,
+
+ // Capture replays for 10% of all sessions,
+ // plus for 100% of sessions with an error
+ // Requires Sentry.replayIntegration()
+ replaysSessionSampleRate: 0.1,
+ replaysOnErrorSampleRate: 1.0,
+});
+```
+
+We recommend you store your Sentry [Data Source Name](/concepts/key-terms/dsn-explainer/) (DSN) in an environment variable and configure it via the Nuxt runtime config.
+
+This allows you to access the DSN using `useRuntimeConfig().public.sentry.dsn`.
+
+```javascript {filename:nuxt.config.ts}
+export default defineNuxtConfig({
+ modules: ["@sentry/nuxt/module"],
+ runtimeConfig: {
+ public: {
+ sentry: {
+ dsn: process.env.NUXT_PUBLIC_SENTRY_DSN, // Use a public environment variable for the DSN
+ },
+ },
+ },
+});
+```
+
+### Configure Wrangler
+
+
+
+### Add the Nitro Plugin
+
+
+ If you have an existing `sentry.server.config.ts` file, delete it, as it will
+ conflict with the Cloudflare setup.
+
+
+To enable Sentry for your Nuxt app on Cloudflare, create a new file in `server/plugins` and add the following code to it.
+
+The snippet also turns on:
+
+- Tracing: via `tracesSampleRate`
+
+Don't need a feature? Remove its integration and options from the snippet.
+
+```TypeScript {filename:server/plugins/sentry-cloudflare-plugin.ts}
+import { sentryCloudflareNitroPlugin } from '@sentry/nuxt/module/plugins'
+
+export default defineNitroPlugin(sentryCloudflareNitroPlugin({
+ dsn: '___PUBLIC_DSN___',
+
+ // Enables Tracing.
+ // Set to 1.0 to capture 100% of spans for tracing.
+ // We recommend reducing this value in production.
+ tracesSampleRate: 1.0,
+}))
+```
+
+Or, if you need access to `nitroApp`:
+
+```TypeScript {filename:server/plugins/sentry-cloudflare-plugin.ts}
+import { sentryCloudflareNitroPlugin } from '@sentry/nuxt/module/plugins'
+
+export default defineNitroPlugin(sentryCloudflareNitroPlugin((nitroApp: NitroApp) => {
+ // You can access `nitroApp` here if needed
+ return {
+ dsn: '___PUBLIC_DSN___',
+
+ // Enables Tracing.
+ // Set to 1.0 to capture 100% of spans for tracing.
+ // We recommend reducing this value in production.
+ tracesSampleRate: 1.0,
+ }
+}))
+```
+
+### Add Readable Stack Traces With Source Maps
+
+To upload source maps for clear error stack traces, add your Sentry auth token, organization, and project slugs in the `sentry` options inside your configuration file:
+
+These `sentry` options only affect the **build time** of the SDK.
+
+```javascript {filename:nuxt.config.ts} {3-10}
+export default defineNuxtConfig({
+ modules: ["@sentry/nuxt/module"],
+ sentry: {
+ org: "___ORG_SLUG___",
+ project: "___PROJECT_SLUG___",
+ // store your auth token in an environment variable
+ authToken: process.env.SENTRY_AUTH_TOKEN,
+ },
+});
+```
+
+To keep your auth token secure, always store it in an environment variable instead of directly in your files:
+
+
+
+```bash {filename:.env}
+SENTRY_AUTH_TOKEN=___ORG_AUTH_TOKEN___
+```
+
+#### Enable Client-Side Source Maps
+
+While Nuxt generates source maps on the server side by default, you need to explicitly enable client-side source maps in your Nuxt configuration.
+
+The `hidden` option enables source map generation while preventing source map reference comments that would normally appear at the end of each generated file in the build output.
+
+```javascript {filename:nuxt.config.ts} {2}
+export default defineNuxtConfig({
+ sourcemap: { client: "hidden" },
+});
+```
+
+### Control the Data You Send to Sentry
+
+
+
+## Send Logs
+
+
+
+If you're already logging with `console` or Consola, you can capture those logs with our console integrations.
+
+## Send Application Metrics
+
+
+
+## Verify Your Setup
+
+Let's test your setup and confirm that Sentry is working correctly and sending data to your Sentry project.
+
+Add a test page with a button that throws an error when you click it:
+
+```html {filename:pages/example-error.vue}
+
+
+
+
+
+```
+
+Build and deploy your app, open the page in a browser, and click the button to trigger an error.
+
+
+
+### View Captured Data in Sentry
+
+Now, head over to your project on [Sentry.io](https://sentry.io/) to view the collected data (it takes a couple of moments for the data to appear).
+
+
+
+## Next Steps
+
+At this point, you should have integrated Sentry into your Nuxt application on Cloudflare. Here's what to explore next:
+
+- Explore [practical guides](/get-started/guides/) on what to monitor, log, track, and investigate after setup
+- Set up tunneling to avoid ad blockers blocking Sentry events
+- Learn how to [track your Vue components or your Pinia store](/platforms/javascript/guides/nuxt/features/)
+
+
+
+- Find various support topics in [Cloudflare troubleshooting](/platforms/javascript/guides/cloudflare/troubleshooting/) and [Nuxt troubleshooting](/platforms/javascript/guides/nuxt/troubleshooting/)
+- [Get support](https://www.sentry.help/en/)
+
+
+
+
diff --git a/platform-includes/getting-started-cloudflare/javascript.remix.mdx b/platform-includes/getting-started-cloudflare/javascript.remix.mdx
new file mode 100644
index 0000000000000..37340e5dc69a8
--- /dev/null
+++ b/platform-includes/getting-started-cloudflare/javascript.remix.mdx
@@ -0,0 +1,343 @@
+## Configure
+
+**Error Monitoring** starts working as soon as you call `Sentry.init()`. **Logs** and **Application Metrics** need no extra configuration, and you'll learn how to send them in steps [#3](#send-logs) and [#4](#send-application-metrics-).
+This guide also enables **Tracing**, **Session Replay**, and **User Feedback**.
+
+
+
+### Configure Client-Side Sentry
+
+Create a client file `entry.client.tsx` in the `app` folder of your project if you don't have one already. In this file, import and initialize the Sentry SDK.
+
+The snippet also turns on:
+
+- Tracing: via `browserTracingIntegration()` and `tracesSampleRate`; `tracePropagationTargets` controls which API requests receive trace headers
+- Session Replay: via `replayIntegration()`, sampled with `replaysSessionSampleRate` and `replaysOnErrorSampleRate`
+- User Feedback: via `feedbackIntegration()`
+
+Don't need a feature? Remove its integration and options from the snippet.
+
+```typescript {filename:app/entry.client.tsx}
+import { useLocation, useMatches } from "@remix-run/react";
+import * as Sentry from "@sentry/remix";
+import { useEffect } from "react";
+
+Sentry.init({
+ dsn: "___PUBLIC_DSN___",
+ integrations: [
+ // enables automatic instrumentation
+ Sentry.browserTracingIntegration({
+ useEffect,
+ useLocation,
+ useMatches,
+ }),
+ // enables Session Replay
+ Sentry.replayIntegration(),
+ // enables User Feedback
+ Sentry.feedbackIntegration({
+ // Additional integration configuration goes in here
+ colorScheme: "system",
+ }),
+ ],
+
+ // Enables Tracing.
+ // Set to 1.0 to capture 100% of spans for tracing.
+ // We recommend reducing this value in production.
+ tracesSampleRate: 1.0,
+
+ // Set trace propagation targets for your API requests
+ tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/],
+
+ // Capture replays for 10% of all sessions,
+ // plus for 100% of sessions with an error
+ // Requires Sentry.replayIntegration()
+ replaysSessionSampleRate: 0.1,
+ replaysOnErrorSampleRate: 1.0,
+});
+```
+
+### Capture Errors From Your ErrorBoundary
+
+To capture errors from your [ErrorBoundary](https://remix.run/docs/en/main/route/error-boundary), define it in `root.tsx` to act as a fallback for all routes or create route-specific error boundaries in your route components.
+
+In your `ErrorBoundary` component, use `Sentry.captureRemixErrorBoundaryError` to send the captured error to Sentry:
+
+```tsx {filename:app/root.tsx}
+import { captureRemixErrorBoundaryError } from "@sentry/remix";
+
+export const ErrorBoundary = () => {
+ const error = useRouteError();
+
+ captureRemixErrorBoundaryError(error);
+
+ return
...
;
+};
+```
+
+### Wrap Your Root Component
+
+Wrap your Remix root component with `withSentry` to capture performance data:
+
+```tsx {filename:app/root.tsx}
+import {
+ Links,
+ LiveReload,
+ Meta,
+ Outlet,
+ Scripts,
+ ScrollRestoration,
+} from "@remix-run/react";
+
+import { withSentry } from "@sentry/remix";
+
+function App() {
+ return (
+
+
+
+
+
+
+
+
+
+
+
+
+ );
+}
+
+export default withSentry(App);
+```
+
+### Configure Server-Side Sentry
+
+Create a Worker entry file, for example `server.ts` in your project's root folder, and set it as `main` in your wrangler config.
+
+In this file, instrument your Remix server build with `instrumentBuild` from `@sentry/remix/cloudflare`, pass it to `createRequestHandler`, and wrap the exported handler with `Sentry.withSentry()` from `@sentry/cloudflare`. `withSentry` isolates each request, so scope data like tags and users stays on the request that set it.
+
+
+
+Don't also wrap `createRequestHandler` with `makeWrappedCreateRequestHandler`. Combined with `withSentry`, it reports every request twice, as two `http.server` transactions in two different traces.
+
+
+
+The snippet also turns on:
+
+- Tracing: via `tracesSampleRate`
+
+Don't need a feature? Remove its integration and options from the snippet.
+
+```typescript {filename:server.ts}
+import { createRequestHandler } from "@remix-run/cloudflare";
+import * as Sentry from "@sentry/cloudflare";
+import { instrumentBuild } from "@sentry/remix/cloudflare";
+// The server build produced by `remix vite:build`
+import * as remixBuild from "./build/server/index.js";
+
+const handleRequest = createRequestHandler(instrumentBuild(remixBuild));
+
+export default Sentry.withSentry(
+ (env) => ({
+ dsn: "___PUBLIC_DSN___",
+
+ // Enables Tracing.
+ // Set to 1.0 to capture 100% of spans for tracing.
+ // We recommend reducing this value in production.
+ tracesSampleRate: 1.0,
+ }),
+ {
+ async fetch(request, env, ctx) {
+ return handleRequest(request, { env, ctx });
+ },
+ }
+);
+```
+
+
+
+
+
+```javascript {filename:functions/_middleware.js}
+import * as Sentry from "@sentry/cloudflare";
+
+export const onRequest = [
+ // Make sure Sentry is the first middleware
+ Sentry.sentryPagesPlugin((context) => ({
+ dsn: "___PUBLIC_DSN___",
+
+ // Enables Tracing.
+ // Set to 1.0 to capture 100% of spans for tracing.
+ // We recommend reducing this value in production.
+ tracesSampleRate: 1.0,
+
+ // Optionally limit which action formData fields are captured.
+ // Without this option, all fields are captured.
+ captureActionFormDataKeys: {
+ key_x: true,
+ key_y: true,
+ },
+ })),
+ // Add more middlewares here
+];
+```
+
+
+
+### Capture Server-Side Errors
+
+To automatically capture server-side errors, export `sentryHandleError` as the [`handleError`](https://remix.run/docs/en/main/file-conventions/entry.server#handleerror) function from your server entry point (`entry.server.tsx`). Without this export, Remix handles errors thrown in loaders and actions itself, and Sentry doesn't receive them.
+
+
+
+Import from `@sentry/remix/cloudflare`, not from `@sentry/remix`. In a Cloudflare server build, `sentryHandleError` from `@sentry/remix` is `undefined`, and no errors are captured.
+
+
+
+```typescript {filename:app/entry.server.tsx}
+import { sentryHandleError } from "@sentry/remix/cloudflare";
+
+export const handleError = sentryHandleError;
+```
+
+### Configure Wrangler
+
+
+
+### Configure Vite
+
+Add two Sentry plugins to your `vite.config.ts`, next to the Remix plugin:
+
+- `sentryRemixVitePlugin` from `@sentry/remix/vite` parameterizes transaction names with your route patterns, for example `/users/:id`.
+- `sentryCloudflareVitePlugin` from `@sentry/cloudflare/vite` instruments supported bundled dependencies at build time, so you get spans for database clients like `mysql`. Without it, database calls produce no spans and no warning.
+
+Set `ssr.target` to `webworker` and bundle the Sentry packages and any database client you want traced with `ssr.noExternal`. Setting `noExternal: true` bundles every dependency, which works too.
+
+```typescript {filename:vite.config.ts} {2-3, 11-12, 14-17}
+import { vitePlugin as remix } from "@remix-run/dev";
+import { sentryCloudflareVitePlugin } from "@sentry/cloudflare/vite";
+import { sentryRemixVitePlugin } from "@sentry/remix/vite";
+import { defineConfig } from "vite";
+
+export default defineConfig({
+ plugins: [
+ remix({
+ // ... your Remix plugin options
+ }),
+ sentryRemixVitePlugin(),
+ sentryCloudflareVitePlugin(),
+ ],
+ ssr: {
+ target: "webworker",
+ noExternal: ["mysql", /^@sentry\//, "@opentelemetry/api"],
+ },
+});
+```
+
+Build your app with `remix vite:build`. Under Vite 6, a plain `vite build` only builds the client and skips `build/server`, without an error.
+
+```bash
+npx remix vite:build
+```
+
+### Add Readable Stack Traces With Source Maps
+
+To upload source maps for clear error stack traces, pass your Sentry organization, project, and auth token to `sentryRemixVitePlugin` from the previous step. It injects debug IDs, uploads the source maps during your production build, and deletes them from your build output afterwards.
+
+The plugin also turns on hidden source maps for you, unless you set `build.sourcemap` yourself.
+
+
+
+Check our [Source Maps documentation](/platforms/javascript/guides/remix/sourcemaps/) for
+alternative setup options.
+
+
+
+```javascript {filename:vite.config.ts} {10-16}
+import { vitePlugin as remix } from "@remix-run/dev";
+import { sentryRemixVitePlugin } from "@sentry/remix/vite";
+import { defineConfig } from "vite";
+
+export default defineConfig({
+ plugins: [
+ remix({
+ // ... your Remix plugin options
+ }),
+ sentryRemixVitePlugin({
+ // If you use environment variables,
+ // you don't need to specify these options
+ org: "___ORG_SLUG___",
+ project: "___PROJECT_SLUG___",
+ // store your auth token in an environment variable
+ authToken: process.env.SENTRY_AUTH_TOKEN,
+ }),
+ // ... other plugins
+ ],
+});
+```
+
+To keep your auth token secure, always store it in an environment variable instead of directly in your files:
+
+
+
+```bash {filename:.env}
+SENTRY_AUTH_TOKEN=___ORG_AUTH_TOKEN___
+```
+
+
+
+### Control the Data You Send to Sentry
+
+
+
+## Send Logs
+
+
+
+If you're already logging with `console` or Consola, you can capture those logs with our console integrations.
+
+## Send Application Metrics
+
+
+
+## Verify Your Setup
+
+Let's test your setup and confirm that Sentry is working correctly and sending data to your Sentry project.
+
+Add a test button to one of your pages. Open the page in a browser and click the button to trigger an error for Sentry to capture.
+
+```tsx
+
+```
+
+
+
+### View Captured Data in Sentry
+
+Now, head over to your project on [Sentry.io](https://sentry.io/) to view the collected data (it takes a couple of moments for the data to appear).
+
+
+
+## Next Steps
+
+At this point, you should have integrated Sentry into your Remix application on Cloudflare. Here's what to explore next:
+
+- Explore [practical guides](/get-started/guides/) on what to monitor, log, track, and investigate after setup
+- Set up tunneling to avoid ad blockers blocking Sentry events
+
+
+
+- Find various topics in [Remix troubleshooting](/platforms/javascript/guides/remix/troubleshooting/) and [Cloudflare troubleshooting](/platforms/javascript/guides/cloudflare/troubleshooting/)
+- [Get support](https://www.sentry.help/en/)
+
+
diff --git a/platform-includes/getting-started-cloudflare/javascript.sveltekit.mdx b/platform-includes/getting-started-cloudflare/javascript.sveltekit.mdx
new file mode 100644
index 0000000000000..3754bb05c0dcf
--- /dev/null
+++ b/platform-includes/getting-started-cloudflare/javascript.sveltekit.mdx
@@ -0,0 +1,290 @@
+## Prerequisites
+
+You need:
+
+- A Sentry [account](https://sentry.io/signup/) and [project](/product/projects/)
+- Your application up and running
+- SvelteKit version `2.0.0+` (we recommend `2.31.0` or higher for best support)
+- Vite version `4.2` or newer
+
+
+
+Version `2.31.0` of SvelteKit introduces [official support for observability and tracing](https://svelte.dev/docs/kit/observability).
+This means that Sentry can now follow the official best practice for how the SDK should be set up:
+
+- The Sentry SDK will be initialized at the correct, earliest possible time on the server, allowing for all its auto-instrumentation to work correctly.
+ This means, you will now get spans from auto instrumentation (e.g. database queries) automatically.
+- The Sentry SDK picks up spans emitted from SvelteKit directly.
+ You'll get more accurate insights into the performance of your handlers, server actions, `load`, and remote functions.
+
+SvelteKit observability is still an experimental feature in SvelteKit 2.x, but we recommend giving it a try.
+The Sentry wizard, as well as this guide, will use it as the default way of setting up the SDK.
+
+
+
+
+
+## Install
+
+### Install the Sentry SDK
+
+Run the command for your preferred package manager to add the Sentry SDK to your application:
+
+```bash {tabTitle:npm}
+npm install @sentry/sveltekit --save
+```
+
+```bash {tabTitle:yarn}
+yarn add @sentry/sveltekit
+```
+
+```bash {tabTitle:pnpm}
+pnpm add @sentry/sveltekit
+```
+
+## Configure
+
+**Error Monitoring** starts working as soon as you call `Sentry.init()`. **Logs** and **Application Metrics** need no extra configuration, and you'll learn how to send them in steps [#3](#send-logs) and [#4](#send-application-metrics-).
+This guide also enables **Tracing**, **Session Replay**, and **User Feedback**.
+
+
+
+You need to initialize and configure the Sentry SDK in three places: the client side, the server side, and your Vite config.
+
+### Configure Client-Side Sentry
+
+Create a client hooks file `src/hooks.client.(js|ts)` in your project if you don't have one already. In this file, import and initialize the Sentry SDK and add the `handleErrorWithSentry` function to the [`handleError` hook](https://svelte.dev/docs/kit/hooks#Shared-hooks-handleError).
+
+The snippet also turns on:
+
+- Tracing: via `tracesSampleRate`
+- Session Replay: via `replayIntegration()`, sampled with `replaysSessionSampleRate` and `replaysOnErrorSampleRate`
+- User Feedback: via `feedbackIntegration()`
+
+Don't need a feature? Remove its integration and options from the snippet.
+
+```javascript {filename:src/hooks.client.(js|ts)}
+import * as Sentry from "@sentry/sveltekit";
+
+Sentry.init({
+ dsn: "___PUBLIC_DSN___",
+ integrations: [
+ // enables Session Replay
+ Sentry.replayIntegration(),
+ // enables User Feedback
+ Sentry.feedbackIntegration({
+ // Additional integration configuration goes in here
+ colorScheme: "system",
+ }),
+ ],
+
+ // Enables Tracing.
+ // Set to 1.0 to capture 100% of spans for tracing.
+ // We recommend reducing this value in production.
+ tracesSampleRate: 1.0,
+
+ // Capture replays for 10% of all sessions,
+ // plus for 100% of sessions with an error
+ // Requires Sentry.replayIntegration()
+ replaysSessionSampleRate: 0.1,
+ replaysOnErrorSampleRate: 1.0,
+});
+
+const myErrorHandler = ({ error, event }) => {
+ console.error("An error occurred on the client side:", error, event);
+};
+
+export const handleError = Sentry.handleErrorWithSentry(myErrorHandler);
+
+// or alternatively, if you don't have a custom error handler:
+// export const handleError = handleErrorWithSentry();
+```
+
+### Configure Server-Side Sentry
+
+_Requires SvelteKit `2.31.0` or higher and `@sentry/sveltekit` `10.8.0` or higher._
+
+Configure server-side instrumentation and tracing. Where this config lives depends on your SvelteKit version: SvelteKit 2 uses `svelte.config.js`, while SvelteKit 3 moved it into the `sveltekit()` Vite plugin options in `vite.config.(js|ts)` instead (see [Configure Vite](#configure-vite) below). SvelteKit 3 no longer needs an instrumentation flag, so the only option to set there is `tracing`.
+
+```js {tabTitle:SvelteKit 2} {mdExpandTabs} {filename:svelte.config.js} {3-10}
+const config = {
+ kit: {
+ experimental: {
+ instrumentation: {
+ server: true,
+ },
+ tracing: {
+ server: true,
+ },
+ },
+ },
+};
+
+export default config;
+```
+
+```js {tabTitle:SvelteKit 3} {filename:vite.config.(js|ts)}
+import { sveltekit } from "@sveltejs/kit/vite";
+import { defineConfig } from "vite";
+
+export default defineConfig({
+ plugins: [
+ sveltekit({
+ tracing: {
+ server: true,
+ },
+ // ... rest of your SvelteKit config
+ }),
+ ],
+ // ... rest of your Vite config
+});
+```
+
+Create a server hooks file `src/hooks.server.(js|ts)` in your project if you don't have one already. In this file, import and initialize the Sentry SDK and add the `handleErrorWithSentry` function to the [`handleError` hook](https://svelte.dev/docs/kit/hooks#Shared-hooks-handleError) and Sentry's Cloudflare request handler to the [`handle` hook](https://kit.svelte.dev/docs/hooks#server-hooks-handle).
+
+The snippet also turns on:
+
+- Tracing: via `tracesSampleRate`
+
+Don't need a feature? Remove its integration and options from the snippet.
+
+```javascript {filename:src/hooks.server.(js|ts)}
+import {
+ handleErrorWithSentry,
+ sentryHandle,
+ initCloudflareSentryHandle,
+} from "@sentry/sveltekit";
+import { sequence } from "@sveltejs/kit/hooks";
+import * as Sentry from "@sentry/sveltekit";
+
+export const handle = sequence(
+ initCloudflareSentryHandle({
+ dsn: "___PUBLIC_DSN___",
+
+ // Enables Tracing.
+ // Set to 1.0 to capture 100% of spans for tracing.
+ // We recommend reducing this value in production.
+ tracesSampleRate: 1.0,
+ }),
+ sentryHandle()
+);
+
+const myErrorHandler = ({ error, event }) => {
+ console.error("An error occurred on the server side:", error, event);
+};
+
+export const handleError = Sentry.handleErrorWithSentry(myErrorHandler);
+// or alternatively, if you don't have a custom error handler:
+// export const handleError = handleErrorWithSentry();
+```
+
+### Configure Vite
+
+Add the `sentrySvelteKit` plugin **before** `sveltekit` in your `vite.config.(js|ts)` file to automatically upload source maps to Sentry and instrument `load` functions for tracing.
+
+```javascript {filename:vite.config.(js|ts)} {2,6}
+import { sveltekit } from "@sveltejs/kit/vite";
+import { sentrySvelteKit } from "@sentry/sveltekit/vite";
+import { defineConfig } from "vite";
+
+export default defineConfig({
+ plugins: [sentrySvelteKit(), sveltekit()],
+ // ... rest of your Vite config
+});
+```
+
+### Configure Wrangler
+
+
+
+### Add Readable Stack Traces With Source Maps
+
+To upload source maps for clear error stack traces, add your Sentry auth token, organization, and project slug in your `vite.config.(js|ts)` file:
+
+```javascript {filename:vite.config.(js|ts)} {6-11}
+import { sveltekit } from "@sveltejs/kit/vite";
+import { sentrySvelteKit } from "@sentry/sveltekit/vite";
+
+export default {
+ plugins: [
+ sentrySvelteKit({
+ org: "___ORG_SLUG___",
+ project: "___PROJECT_SLUG___",
+ // store your auth token in an environment variable
+ authToken: process.env.SENTRY_AUTH_TOKEN,
+ }),
+ sveltekit(),
+ ],
+ // ... rest of your Vite config
+};
+```
+
+To keep your auth token secure, always store it in an environment variable instead of directly in your files:
+
+
+
+```bash {filename:.env}
+SENTRY_AUTH_TOKEN=___ORG_AUTH_TOKEN___
+```
+
+
+
+### Control the Data You Send to Sentry
+
+
+
+## Send Logs
+
+
+
+If you're already logging with `console` or Consola, you can capture those logs with our console integrations.
+
+## Send Application Metrics
+
+
+
+## Verify Your Setup
+
+Let's test your setup and confirm that Sentry is working correctly and sending data to your Sentry project.
+
+Create a test page, for example at `src/routes/sentry-example/+page.svelte`, with a button that throws an error when you click it:
+
+```html {filename:src/routes/sentry-example/+page.svelte}
+
+
+
+```
+
+Open the `/sentry-example` page in your browser and click the button.
+
+
+
+### View Captured Data in Sentry
+
+Now, head over to your project on [Sentry.io](https://sentry.io/) to view the collected data (it takes a couple of moments for the data to appear).
+
+
+
+## Next Steps
+
+At this point, you should have integrated Sentry into your SvelteKit application on Cloudflare. Here's what to explore next:
+
+- Explore [practical guides](/get-started/guides/) on what to monitor, log, track, and investigate after setup
+- Set up tunneling to avoid ad blockers blocking Sentry events
+- Learn how to [manually instrument](/platforms/javascript/guides/sveltekit/apis/#load-function-instrumentation) SvelteKit-specific features
+
+
+
+- Find various support topics in [Cloudflare troubleshooting](/platforms/javascript/guides/cloudflare/troubleshooting/) and [SvelteKit troubleshooting](/platforms/javascript/guides/sveltekit/troubleshooting/)
+- [Get support](https://www.sentry.help/en/)
+
+
+
+
diff --git a/platform-includes/getting-started-complete/javascript.astro.mdx b/platform-includes/getting-started-complete/javascript.astro.mdx
index 064dff9974b45..fb3cac04de9db 100644
--- a/platform-includes/getting-started-complete/javascript.astro.mdx
+++ b/platform-includes/getting-started-complete/javascript.astro.mdx
@@ -1,5 +1,3 @@
-
-
### Install the Sentry SDK
Install and add the Sentry integration using the `astro` CLI:
@@ -34,88 +32,8 @@ pnpm add @sentry/profiling-node
-
-
-
-
-### Install the Sentry SDKs
-
-Install both `@sentry/astro` and `@sentry/cloudflare`:
-
-```bash {tabTitle:npm}
-npm install @sentry/astro @sentry/cloudflare
-```
-
-```bash {tabTitle:yarn}
-yarn add @sentry/astro @sentry/cloudflare
-```
-
-```bash {tabTitle:pnpm}
-pnpm add @sentry/astro @sentry/cloudflare
-```
-
-
-
## Configure
-
-
-### Wrangler Configuration
-
-
-
-### Configure Custom Entry Point
-
-Astro 6 with `@astrojs/cloudflare` v13+ supports custom entry points directly from `wrangler.jsonc`. Update your wrangler configuration to point to a custom Sentry entry point:
-
-```jsonc {filename:wrangler.jsonc}
-{
- "main": "./sentry.server.config.ts",
- // ... other configuration
-}
-```
-
-Create a `sentry.server.config.ts` file in the root of your project that wraps the Astro Cloudflare handler with Sentry:
-
-```typescript {filename:sentry.server.config.ts}
-import * as Sentry from "@sentry/cloudflare";
-import handler from "@astrojs/cloudflare/entrypoints/server";
-
-export default Sentry.withSentry(
- (env) => ({
- dsn: env.SENTRY_DSN,
- // ___PRODUCT_OPTION_START___ performance
- // Define how likely traces are sampled. Adjust this value in production,
- // or use tracesSampler for greater control.
- tracesSampleRate: 1.0,
- // ___PRODUCT_OPTION_END___ performance
- }),
- handler
-);
-```
-
-### Register the Sentry Integration
-
-Follow [Astro's Cloudflare deployment guide](https://docs.astro.build/en/guides/deploy/cloudflare/) if you haven't already. Then add the Sentry integration to your `astro.config.mjs` alongside the Cloudflare adapter.
-
-```javascript {filename:astro.config.mjs}
-import { defineConfig } from "astro/config";
-import cloudflare from "@astrojs/cloudflare";
-import sentry from "@sentry/astro";
-
-export default defineConfig({
- adapter: cloudflare(),
- integrations: [sentry()],
-});
-```
-
-
-
-
-
### Apply Instrumentation to Your App
Register the Sentry integration in your `astro.config.mjs` file:
@@ -129,8 +47,6 @@ export default defineConfig({
});
```
-
-
### Configure Client-side Sentry
Create a `sentry.client.config.(ts|js)` file in the root of your project. In this file, import and initialize Sentry for the client:
@@ -174,8 +90,6 @@ Sentry.init({
});
```
-
-
Sentry automatically detects configuration files named `sentry.(client|server).config.(ts|js)` in the root of your project. You can rename these files or move them to a custom folder within your project.
@@ -195,12 +109,8 @@ export default defineConfig({
-
-
### Configure Server-side Sentry
-
-
Create a `sentry.server.config.(ts|js)` file in the root of your project. In this file, import and initialize Sentry for the server:
```javascript {filename:sentry.server.config.(ts|js)}
@@ -233,27 +143,15 @@ Sentry.init({
});
```
-
-
-
-
-Server-side Sentry is already configured in your custom entry point file (`sentry.server.config.ts`) created in the previous step.
-
-
-
### Add Readable Stack Traces With Source Maps
To upload source maps for clear error stack traces, add your Sentry auth token, organization, and project slugs in the `sentry` options inside `astro.config.mjs`:
-
-
```javascript {filename:astro.config.mjs}
import { defineConfig } from "astro/config";
-import cloudflare from "@astrojs/cloudflare";
import sentry from "@sentry/astro";
export default defineConfig({
- adapter: cloudflare(),
integrations: [
sentry({
org: "___ORG_SLUG___",
@@ -265,28 +163,6 @@ export default defineConfig({
});
```
-
-
-
-
-```javascript {filename:astro.config.mjs}
-import { defineConfig } from "astro/config";
-import sentry from "@sentry/astro";
-
-export default defineConfig({
- integrations: [
- sentry({
- org: "___ORG_SLUG___",
- project: "___PROJECT_SLUG___",
- // store your auth token in an environment variable
- authToken: process.env.SENTRY_AUTH_TOKEN,
- }),
- ],
-});
-```
-
-
-
To keep your auth token secure, set the `SENTRY_AUTH_TOKEN` environment variable in your build environment:
@@ -297,14 +173,10 @@ SENTRY_AUTH_TOKEN=___ORG_AUTH_TOKEN___
-
-
### Avoid Ad Blockers With Tunneling (Optional)
-
-
### Control the Data You Send to Sentry (Optional)
@@ -394,18 +266,8 @@ To test tracing, create a custom span to measure the time it takes for the API r
Now, head over to your project on [Sentry.io](https://sentry.io) to view the collected data (it takes a couple of moments for the data to appear).
-
-
-
-
-
-
-
-
-
-
## Next Steps
At this point, you should have integrated Sentry into your Astro application and should already be sending data to your Sentry project.
@@ -413,25 +275,12 @@ At this point, you should have integrated Sentry into your Astro application and
Now's a good time to customize your setup and look into more advanced topics.
Our next recommended steps for you are:
-
-
-- Explore [practical guides](/get-started/guides/) on what to monitor, log, track, and investigate after setup
-- Continue to customize your configuration
-- Learn how to manually capture errors
-- Learn more about [deploying Astro apps to Cloudflare](/platforms/javascript/guides/cloudflare/frameworks/astro/)
-- Get familiar with [Sentry's product features](/product/) like tracing, insights, and alerts
-
-
-
-
-
- Explore [practical guides](/get-started/guides/) on what to monitor, log, track, and investigate after setup
- Continue to customize your configuration
- Learn how to manually capture errors
+- Learn more about [deploying Astro apps to Cloudflare](/platforms/javascript/guides/astro/cloudflare/)
- Get familiar with [Sentry's product features](/product/) like tracing, insights, and alerts
-
-
- Find various topics in Troubleshooting
diff --git a/platform-includes/getting-started-complete/javascript.nuxt.mdx b/platform-includes/getting-started-complete/javascript.nuxt.mdx
index 8847328ac123f..ca94d38d99c5c 100644
--- a/platform-includes/getting-started-complete/javascript.nuxt.mdx
+++ b/platform-includes/getting-started-complete/javascript.nuxt.mdx
@@ -18,18 +18,8 @@ Choose the features you want to configure, and this guide will show you how:
]}
/>
-
-
-
-
-
-
-
-
-
-
### Install the Sentry SDK
Run the command for your preferred package manager to add the Sentry SDK to your application:
@@ -122,7 +112,6 @@ export default defineNuxtConfig({
});
```
-
### Configure Server-Side Sentry
Add a `sentry.server.config.ts` file to the root of your project and initialize Sentry in it.
@@ -177,51 +166,6 @@ To learn more, see [Server-Side Installation](/platforms/javascript/guides/nuxt/
node .output/server/index.mjs
```
-
-
-
-
-### Configure Cloudflare for Sentry
-
-
-
-#### Add the Nitro Plugin
-
-
- If you have an existing `sentry.server.config.ts` file, delete it, as it will
- conflict with the Cloudflare setup.
-
-
-To enable Sentry for your Nuxt app on Cloudflare, create a new file in `server/plugins` and add the following code to it:
-
-```TypeScript {filename:server/plugins/sentry-cloudflare-plugin.ts}
-import { sentryCloudflareNitroPlugin } from '@sentry/nuxt/module/plugins'
-
-export default defineNitroPlugin(sentryCloudflareNitroPlugin({
- dsn: '___PUBLIC_DSN___',
- tracesSampleRate: 1.0,
-}))
-```
-
-Or, if you need access to `nitroApp`:
-
-```TypeScript {filename:server/plugins/sentry-cloudflare-plugin.ts}
-import { sentryCloudflareNitroPlugin } from '@sentry/nuxt/module/plugins'
-
-export default defineNitroPlugin(sentryCloudflareNitroPlugin((nitroApp: NitroApp) => {
- // You can access `nitroApp` here if needed
- return {
- dsn: '___PUBLIC_DSN___',
- tracesSampleRate: 1.0,
- }
-}))
-```
-
-
-
### Add Readable Stack Traces With Source Maps (Optional)
To upload source maps for clear error stack traces, add your Sentry auth token, organization, and project slugs in the `sentry` options inside your configuration file:
@@ -260,14 +204,12 @@ export default defineNuxtConfig({
});
```
-
### Avoid Ad Blockers With Tunneling (Optional)
-
### Control the Data You Send to Sentry (Optional)
@@ -354,18 +296,8 @@ Then update the test page by including a new button that executes a function to
-
-
-Once you have your test code in place, build and run your project.
-
-
-
-
-
Once you have your test code in place, run your project in production mode (`nuxi build`, then `node .output/server/index.mjs`) or in development mode (`nuxt dev`).
-
-
After running your project, open your test page in a browser and click the buttons.
@@ -374,25 +306,14 @@ After running your project, open your test page in a browser and click the butto
Now, head over to your project on [Sentry.io](https://sentry.io) to view the collected data (it takes a couple of moments for the data to appear).
-
-
-
-
-
-
-
-
-
-
## Next Steps
At this point, you should have integrated Sentry into your Nuxt application and should already be sending data to your Sentry project.
Now's a good time to customize your setup and look into more advanced topics. Our next recommended steps for you are:
-
- Explore [practical guides](/get-started/guides/) on what to monitor, log, track, and investigate after setup
- Learn how to [manually capture errors](/platforms/javascript/guides/nuxt/usage/)
- Continue to [customize your configuration](/platforms/javascript/guides/nuxt/configuration/)
@@ -409,22 +330,4 @@ Now's a good time to customize your setup and look into more advanced topics. Ou
-
-
-
-- Explore [practical guides](/get-started/guides/) on what to monitor, log, track, and investigate after setup
-- Learn how to [manually capture errors](/platforms/javascript/guides/nuxt/usage/)
-- Continue to [customize your configuration](/platforms/javascript/guides/nuxt/configuration/)
-- Get familiar with [Sentry's product features](/product/) like tracing, insights, and alerts
-- Learn how to [track your Vue components or your Pinia store](/platforms/javascript/guides/nuxt/features/)
-
-
-
-- Find various support topics in Cloudflare troubleshooting and [Nuxt troubleshooting](/platforms/javascript/guides/nuxt/troubleshooting/)
-- [Get support](https://www.sentry.help/en/)
-
-
-
-
-
diff --git a/platform-includes/getting-started-complete/javascript.remix.mdx b/platform-includes/getting-started-complete/javascript.remix.mdx
index d3507e2ad8fa6..db074eb1a0887 100644
--- a/platform-includes/getting-started-complete/javascript.remix.mdx
+++ b/platform-includes/getting-started-complete/javascript.remix.mdx
@@ -111,8 +111,6 @@ export default withSentry(App);
### Configure Server-Side Sentry
-
-
Create an instrumentation file `instrument.server.mjs` in your project's root folder and initialize the Sentry SDK within it:
```typescript {tabTitle:Server} {filename: instrument.server.mjs}
@@ -178,91 +176,8 @@ const app = express();
- PlatformSection>
-
-
-
-Create a Worker entry file, for example `server.ts` in your project's root folder, and set it as `main` in your wrangler config.
-
-In this file, instrument your Remix server build with `instrumentBuild` from `@sentry/remix/cloudflare`, pass it to `createRequestHandler`, and wrap the exported handler with `Sentry.withSentry()` from `@sentry/cloudflare`. `withSentry` isolates each request, so scope data like tags and users stays on the request that set it.
-
-
-
-Don't also wrap `createRequestHandler` with `makeWrappedCreateRequestHandler`. Combined with `withSentry`, it reports every request twice, as two `http.server` transactions in two different traces.
-
-
-
-```typescript {filename:server.ts}
-import { createRequestHandler } from "@remix-run/cloudflare";
-import * as Sentry from "@sentry/cloudflare";
-import { instrumentBuild } from "@sentry/remix/cloudflare";
-// The server build produced by `remix vite:build`
-import * as remixBuild from "./build/server/index.js";
-
-const handleRequest = createRequestHandler(instrumentBuild(remixBuild));
-
-export default Sentry.withSentry(
- (env) => ({
- dsn: "___PUBLIC_DSN___",
- // ___PRODUCT_OPTION_START___ performance
-
- // Set tracesSampleRate to 1.0 to capture 100%
- // of transactions for tracing.
- // We recommend adjusting this value in production
- // Learn more at
- // https://docs.sentry.io/platforms/javascript/configuration/options/#traces-sample-rate
- tracesSampleRate: 1.0,
- // ___PRODUCT_OPTION_END___ performance
- }),
- {
- async fetch(request, env, ctx) {
- return handleRequest(request, { env, ctx });
- },
- }
-);
-```
-
-
-
-
-
-```javascript {filename:functions/_middleware.js}
-import * as Sentry from "@sentry/cloudflare";
-
-export const onRequest = [
- // Make sure Sentry is the first middleware
- Sentry.sentryPagesPlugin((context) => ({
- dsn: "___PUBLIC_DSN___",
-
- // ___PRODUCT_OPTION_START___ performance
-
- // Set tracesSampleRate to 1.0 to capture 100%
- // of transactions for tracing.
- // We recommend adjusting this value in production
- // Learn more at
- // https://docs.sentry.io/platforms/javascript/configuration/options/#traces-sample-rate
- tracesSampleRate: 1.0,
- // ___PRODUCT_OPTION_END___ performance
-
- // Optionally limit which action formData fields are captured.
- // Without this option, all fields are captured.
- captureActionFormDataKeys: {
- key_x: true,
- key_y: true,
- },
- })),
- // Add more middlewares here
-];
-```
-
-
-
- PlatformSection>
-
### Capture Server-Side Errors
-
-
To automatically capture server-side errors, export a [`handleError`](https://remix.run/docs/en/main/file-conventions/entry.server#handleerror) function from your server entry point (`entry.server.tsx`). Choose one of the two options:
- Wrap your custom error handler with `wrapHandleErrorWithSentry`.
@@ -290,41 +205,8 @@ import * as Sentry from "@sentry/remix";
export const handleError = Sentry.sentryHandleError;
```
-
-
-
-
-To automatically capture server-side errors, export `sentryHandleError` as the [`handleError`](https://remix.run/docs/en/main/file-conventions/entry.server#handleerror) function from your server entry point (`entry.server.tsx`). Without this export, Remix handles errors thrown in loaders and actions itself, and Sentry doesn't receive them.
-
-
-
-Import from `@sentry/remix/cloudflare`, not from `@sentry/remix`. In a Cloudflare server build, `sentryHandleError` from `@sentry/remix` is `undefined`, and no errors are captured.
-
-
-
-```typescript {filename: entry.server.tsx}
-import { sentryHandleError } from "@sentry/remix/cloudflare";
-
-export const handleError = sentryHandleError;
-```
-
-
-
-
-
-### Configure Cloudflare for Sentry
-
-
-
- PlatformSection>
-
### Configure Vite
-
-
Add `sentryRemixVitePlugin` from `@sentry/remix/vite` to your `vite.config.ts`. The plugin:
- Parameterizes client-side transaction names with your route patterns, for example `/users/:id`.
@@ -351,46 +233,6 @@ export default defineConfig({
});
```
-
-
-
-
-Add two Sentry plugins to your `vite.config.ts`, next to the Remix plugin:
-
-- `sentryRemixVitePlugin` from `@sentry/remix/vite` parameterizes transaction names with your route patterns, for example `/users/:id`.
-- `sentryCloudflareVitePlugin` from `@sentry/cloudflare/vite` instruments supported bundled dependencies at build time, so you get spans for database clients like `mysql`. Without it, database calls produce no spans and no warning.
-
-Set `ssr.target` to `webworker` and bundle the Sentry packages and any database client you want traced with `ssr.noExternal`. Setting `noExternal: true` bundles every dependency, which works too.
-
-```typescript {filename:vite.config.ts} {2-3, 11-12, 14-17}
-import { vitePlugin as remix } from "@remix-run/dev";
-import { sentryCloudflareVitePlugin } from "@sentry/cloudflare/vite";
-import { sentryRemixVitePlugin } from "@sentry/remix/vite";
-import { defineConfig } from "vite";
-
-export default defineConfig({
- plugins: [
- remix({
- // ... your Remix plugin options
- }),
- sentryRemixVitePlugin(),
- sentryCloudflareVitePlugin(),
- ],
- ssr: {
- target: "webworker",
- noExternal: ["mysql", /^@sentry\//, "@opentelemetry/api"],
- },
-});
-```
-
-Build your app with `remix vite:build`. Under Vite 6, a plain `vite build` only builds the client and skips `build/server`, without an error.
-
-```bash
-npx remix vite:build
-```
-
-
-
### Add Readable Stack Traces With Source Maps (Optional)
To upload source maps for clear error stack traces, pass your Sentry organization, project, and auth token to `sentryRemixVitePlugin` from the previous step. It injects debug IDs, uploads the source maps during your production build, and deletes them from your build output afterwards.
@@ -437,13 +279,10 @@ SENTRY_AUTH_TOKEN=___ORG_AUTH_TOKEN___
-
### Avoid Ad Blockers With Tunneling (Optional)
-
-
### Control the Data You Send to Sentry (Optional)
@@ -519,17 +358,8 @@ Open the page in a browser and click the button to trigger the frontend error an
Now, head over to your project on [Sentry.io](https://sentry.io) to view the collected data (it takes a couple of moments for the data to appear).
-
-
-
-
-
-
-
-
-
## Next Steps
At this point, you should have integrated Sentry into your Remix application and should already be sending error and performance data to your Sentry project.
@@ -541,7 +371,6 @@ Now's a good time to customize your setup and look into more advanced topics. Ou
- Continue to customize your configuration
- Get familiar with [Sentry's product features](/product/) like tracing, insights, and alerts
-
- If you encountered issues with the manual setup, try our installation wizard
@@ -549,14 +378,3 @@ Now's a good time to customize your setup and look into more advanced topics. Ou
- [Get support](https://www.sentry.help/en/)
-
-
-
-
-
-- If you encountered issues with the manual setup, try our installation wizard
-- Find various support topics in Cloudflare troubleshooting and [Remix troubleshooting](/platforms/javascript/guides/remix/troubleshooting/)
-- [Get support](https://www.sentry.help/en/)
-
-
-
diff --git a/platform-includes/getting-started-complete/javascript.sveltekit.mdx b/platform-includes/getting-started-complete/javascript.sveltekit.mdx
index c37251053054d..52fc145582743 100644
--- a/platform-includes/getting-started-complete/javascript.sveltekit.mdx
+++ b/platform-includes/getting-started-complete/javascript.sveltekit.mdx
@@ -20,18 +20,12 @@ This means that Sentry can now follow the official best practice for how the SDK
SvelteKit observability is still an experimental feature in SvelteKit 2.x, but we recommend giving it a try.
The Sentry wizard, as well as this guide, will use it as the default way of setting up the SDK.
-
-
If you've already set up the SDK and don't want to migrate to the new setup, or don't want to upgrade to SvelteKit `2.31.0` or higher, that's fine too.
Just follow this guide instead.
However, note that auto instrumentation (e.g. for database queries) will not work.
-
-
-
-
The SvelteKit Sentry SDK is designed to work out of the box with several SvelteKit adapters and their underlying server runtimes.
Here's an overview of the current support:
@@ -41,7 +35,7 @@ Here's an overview of the current support:
- [Adapter-vercel](https://kit.svelte.dev/docs/adapter-vercel) when used with Vercel's Node.js Lambda runtime
- [Adapter-node](https://kit.svelte.dev/docs/adapter-node)
- **Supported non-Node.js runtimes**
- - [Adapter-cloudflare](https://kit.svelte.dev/docs/adapter-cloudflare) requires [additional setup](/platforms/javascript/guides/cloudflare/frameworks/sveltekit/)
+ - [Adapter-cloudflare](https://kit.svelte.dev/docs/adapter-cloudflare) requires [additional setup](/platforms/javascript/guides/sveltekit/cloudflare/)
- **Currently not supported**
- Non-Node.js server runtimes, such as Vercel's edge runtime, are not yet supported.
- **Other adapters**
@@ -49,8 +43,6 @@ Here's an overview of the current support:
-
-
## Install
@@ -66,17 +58,8 @@ Choose the features you want to configure, and this guide will show you how:
]}
/>
-
-
-
-
-
-
-
-
-
### Install the Sentry SDK
Run the command for your preferred package manager to add the Sentry SDK to your application:
@@ -152,18 +135,8 @@ export const handleError = Sentry.handleErrorWithSentry(myErrorHandler);
### Configure Server-Side Sentry
-
-
_Requires SvelteKit `2.31.0` or higher and `@sentry/sveltekit` `10.8.0` or higher._ If you're using older versions, check out [this guide](../manual-setup__v10.7.0#configure-server-side-sentry) instead.
-
-
-
-
-_Requires SvelteKit `2.31.0` or higher and `@sentry/sveltekit` `10.8.0` or higher._
-
-
-
Configure server-side instrumentation and tracing. Where this config lives depends on your SvelteKit version — SvelteKit 2 uses `svelte.config.js`, while SvelteKit 3 moved it into the `sveltekit()` Vite plugin options in `vite.config.(js|ts)` instead (see [Configure Vite](#configure-vite) below). SvelteKit 3 no longer needs an instrumentation flag, so the only option to set there is `tracing`.
```js {tabTitle:SvelteKit 2} {mdExpandTabs} {filename:svelte.config.js} {3-12}
@@ -204,8 +177,6 @@ export default defineConfig({
});
```
-
-
Create a `src/instrumentation.server.(js|ts)` file (if you don't have one already) to initialize the server-side SDK:
```js {filename:src/instrumentation.server.(js|ts)} {1, 3-15}
@@ -250,49 +221,6 @@ If you're using SvelteKit versions older than `2.16.0` and encounter Content Sec
-
-
-
-
-Create a server hooks file `src/hooks.server.(js|ts)` in your project if you don't have one already. In this file, import and initialize the Sentry SDK and add the `handleErrorWithSentry` function to the [`handleError` hook](https://svelte.dev/docs/kit/hooks#Shared-hooks-handleError) and Sentry's Cloudflare request handler to the [`handle` hook](https://kit.svelte.dev/docs/hooks#server-hooks-handle).
-
-```javascript {filename:src/hooks.server.(js|ts)}
-import {
- handleErrorWithSentry,
- sentryHandle,
- initCloudflareSentryHandle,
-} from "@sentry/sveltekit";
-import { sequence } from "@sveltejs/kit/hooks";
-import * as Sentry from "@sentry/sveltekit";
-
-export const handle = sequence(
- initCloudflareSentryHandle({
- dsn: "___PUBLIC_DSN___",
-
- // ___PRODUCT_OPTION_START___ performance
-
- // Set tracesSampleRate to 1.0 to capture 100%
- // of transactions for tracing.
- // We recommend adjusting this value in production
- // Learn more at
- // https://docs.sentry.io/platforms/javascript/configuration/options/#traces-sample-rate
- tracesSampleRate: 1.0,
- // ___PRODUCT_OPTION_END___ performance
- }),
- sentryHandle()
-);
-
-const myErrorHandler = ({ error, event }) => {
- console.error("An error occurred on the server side:", error, event);
-};
-
-export const handleError = Sentry.handleErrorWithSentry(myErrorHandler);
-// or alternatively, if you don't have a custom error handler:
-// export const handleError = handleErrorWithSentry();
-```
-
-
-
### Configure Vite
Add the `sentrySvelteKit` plugin **before** `sveltekit` in your `vite.config.(js|ts)` file to automatically upload source maps to Sentry and instrument `load` functions for tracing if it's configured.
@@ -308,17 +236,6 @@ export default defineConfig({
});
```
-
-
-### Configure Cloudflare for Sentry
-
-
-
-
-
### Add Readable Stack Traces With Source Maps (Optional)
To upload source maps for clear error stack traces, add your Sentry auth token, organization, and project slug in your `vite.config.(js|ts)` file:
@@ -351,7 +268,6 @@ SENTRY_AUTH_TOKEN=___ORG_AUTH_TOKEN___
-
### Override Adapter Detection
`sentrySvelteKit` tries to auto-detect your SvelteKit adapter to configure source maps upload correctly. If you're using an unsupported adapter or the wrong one is detected, set it using the `adapter` option:
@@ -371,15 +287,10 @@ export default {
};
```
-
-
-
### Avoid Ad Blockers With Tunneling (Optional)
-
-
### Control the Data You Send to Sentry (Optional)
@@ -466,17 +377,8 @@ Additionally, this starts a trace to measure the time it takes for the API reque
Now, head over to your project on [Sentry.io](https://sentry.io) to view the collected data (it takes a couple of moments for the data to appear).
-
-
-
-
-
-
-
-
-
## Next Steps
At this point, you should have integrated Sentry into your SvelteKit application and should already be sending data to your Sentry project.
@@ -484,12 +386,11 @@ At this point, you should have integrated Sentry into your SvelteKit application
Now's a good time to customize your setup and look into more advanced topics.
Our next recommended steps for you are:
-
- Explore [practical guides](/get-started/guides/) on what to monitor, log, track, and investigate after setup
- Learn how to [manually capture errors](/platforms/javascript/guides/sveltekit/usage/)
- Continue to [customize your configuration](/platforms/javascript/guides/sveltekit/configuration/)
- Learn how to [manually instrument](/platforms/javascript/guides/sveltekit/apis/#load-function-instrumentation) SvelteKit-specific features
-- Learn more about [deploying SvelteKit apps to Cloudflare Workers and Pages](/platforms/javascript/guides/cloudflare/frameworks/sveltekit/)
+- Learn more about [deploying SvelteKit apps to Cloudflare Workers and Pages](/platforms/javascript/guides/sveltekit/cloudflare/)
- Get familiar with [Sentry's product features](/product/) like tracing, insights, and alerts
@@ -500,21 +401,4 @@ Our next recommended steps for you are:
-
-
-
-- Explore [practical guides](/get-started/guides/) on what to monitor, log, track, and investigate after setup
-- Learn how to [manually capture errors](/platforms/javascript/guides/cloudflare/usage/)
-- Continue to [customize your configuration](/platforms/javascript/guides/cloudflare/configuration/)
-- Get familiar with [Sentry's product features](/product/) like tracing, insights, and alerts
-- Learn how to [manually instrument](/platforms/javascript/guides/sveltekit/apis/#load-function-instrumentation) SvelteKit-specific features
-
-
-
-- Find various support topics in Cloudflare troubleshooting and [SvelteKit troubleshooting](/platforms/javascript/guides/sveltekit/troubleshooting/)
-- [Get support](https://www.sentry.help/en/)
-
-
-
-
diff --git a/platform-includes/getting-started-config/javascript.cloudflare.mdx b/platform-includes/getting-started-config/javascript.cloudflare.mdx
index 3b1a97eed8908..3e0ef0a3166c4 100644
--- a/platform-includes/getting-started-config/javascript.cloudflare.mdx
+++ b/platform-includes/getting-started-config/javascript.cloudflare.mdx
@@ -14,7 +14,7 @@ compatibility_date = "{{@inject new Date().toISOString().slice(0, 10) }}"
compatibility_flags = ["nodejs_compat"]
```
-### Release Configuration (Optional)
+#### Release Configuration
If you don't set the `release` option manually, the SDK automatically detects it from these sources (in order of priority):
diff --git a/platform-includes/getting-started-node/javascript.nextjs.mdx b/platform-includes/getting-started-node/javascript.nextjs.mdx
new file mode 100644
index 0000000000000..1ce1e7b97b13f
--- /dev/null
+++ b/platform-includes/getting-started-node/javascript.nextjs.mdx
@@ -0,0 +1,110 @@
+
+
+
+
+## Install
+
+### Run the Installation Wizard
+
+Run the Sentry wizard to automatically install the SDK and configure Sentry in your Next.js application:
+
+```bash
+npx @sentry/wizard@latest -i nextjs
+```
+
+The wizard asks whether you want to enable **Tracing** and **Session Replay**, route browser requests through your server to avoid ad blockers, and create an example page. To match the configuration in this guide, answer **Yes** to each.
+
+Prefer to set things up yourself? Check out the [Manual Setup](/platforms/javascript/guides/nextjs/manual-setup/) guide.
+
+## Configure
+
+**Error Monitoring** starts working as soon as you call `Sentry.init()`. **Logs** and **Application Metrics** need no extra configuration, and you'll learn how to send them in steps [#3](#send-logs) and [#4](#send-application-metrics-).
+This guide also enables **Tracing**, **Session Replay**, and **User Feedback**.
+
+
+
+
+
+### Control the Data You Send to Sentry
+
+
+
+## Send Logs
+
+
+
+If you're already logging with another library, use an integration to capture those logs as Sentry Logs automatically:
+
+- `consoleLoggingIntegration` for `console` calls
+- Consola
+- Pino
+- Winston
+
+## Send Application Metrics
+
+
+
+In the Node.js runtime, `nodeRuntimeMetricsIntegration` also collects runtime health metrics automatically.
+
+## Verify Your Setup
+
+Let's test your setup and confirm that Sentry is working correctly and sending data to your Sentry project.
+
+The wizard created an example page that sends a test error from both your frontend and your backend:
+
+1. Start your development server:
+
+ ```bash
+ npm run dev
+ ```
+
+2. Open [localhost:3000/sentry-example-page](http://localhost:3000/sentry-example-page) in your browser.
+3. Click **Throw Sample Error**.
+
+If you skipped the example page, add a test button to one of your pages instead. Clicking it will trigger an error for Sentry to capture.
+
+```tsx {filename:app/page.tsx}
+"use client";
+
+export default function Page() {
+ return (
+
+ );
+}
+```
+
+
+
+### View Captured Data in Sentry
+
+Now, head over to your project on [Sentry.io](https://sentry.io/) to view the collected data (it takes a couple of moments for the data to appear).
+
+
+
+## Next Steps
+
+At this point, you should have integrated Sentry into your Next.js application. Here's what to explore next:
+
+- Explore [practical guides](/get-started/guides/) on what to monitor, log, track, and investigate after setup
+- Set up Agent Tracing to monitor agents built with the Vercel AI SDK, LangChain, and more
+- Set up tunneling to avoid ad blockers blocking Sentry events, if you didn't enable it in the wizard
+
+
+
+- If you encountered issues with our installation wizard, try [setting up Sentry manually](/platforms/javascript/guides/nextjs/manual-setup/)
+- Find various topics in Troubleshooting
+- [Get support](https://www.sentry.help/en/)
+
+
+
+
diff --git a/platform-includes/getting-started-node/javascript.nuxt.mdx b/platform-includes/getting-started-node/javascript.nuxt.mdx
new file mode 100644
index 0000000000000..0e18577dbd2e5
--- /dev/null
+++ b/platform-includes/getting-started-node/javascript.nuxt.mdx
@@ -0,0 +1,130 @@
+
+
+
+
+## Install
+
+
+
+
+
+
+
+
+
+## Avoid Ad Blockers With Tunneling (Optional)
+
+
+
+## Control the Data You Send to Sentry (Optional)
+
+
+
+## Verify Your Setup
+
+The `sentry init` command checks the integration files it creates or modifies before it finishes. To confirm runtime events are reaching Sentry, start your Nuxt app, exercise the parts of your app that should send events, and then check your Sentry project.
+
+If you used the Nuxt installation wizard instead, you can also verify your setup with the example page or component it creates.
+
+
+The wizard creates a `SentryErrorButton` component when it fails to add an example page to your project. This usually happens if you don't have a `app.vue` file or if that file does not contain the `NuxtPage` component. To verify your setup, follow these steps before continuing with the next section, "View Captured Data in Sentry":
+
+1. Add the `SentryErrorButton` component to a page and open it in your browser. For most Nuxt applications, this will be at localhost.
+2. Click the "Throw Sample Error" button, which triggers an error and starts a performance trace on the client side.
+
+To test the server side as well, refer to the "Verify" section in the [Manual setup guide](/platforms/javascript/guides/nuxt/manual-setup/).
+
+
+
+To test Sentry, you can run your Nuxt application in either production or development mode.
+We **recommend testing in production mode** as it most closely resembles your deployed application's environment.
+
+The SDK bundles `sentry.server.config.ts` into the Nitro server build and initializes Sentry when the server starts. To learn more, see [Server-Side Installation](/platforms/javascript/guides/nuxt/install/).
+
+### Run in Production Mode (Recommended)
+
+Build your project with `nuxi build`, then start the server.
+
+```bash
+# Start your app after building your project with `nuxi build`
+node .output/server/index.mjs
+```
+
+### Run in Development Mode
+
+Sentry also monitors the server side during development. Start the dev server as usual.
+
+Spans from some libraries, such as database clients, can be missing in development mode.
+Errors and request traces always work. To learn more, see [Development Mode](/platforms/javascript/guides/nuxt/install/#development-mode).
+
+```bash
+nuxt dev
+```
+
+If you used the Nuxt installation wizard, after building and running your project:
+
+1. Open the example page `/sentry-example-page` in your browser. For most Nuxt applications, this will be at localhost.
+2. Click the "Throw sample error" button. This triggers two errors:
+ - a frontend error
+ - an error within the API route
+
+Sentry captures both of these errors for you. Additionally, the button click starts a performance trace to measure the time it takes for the API request to complete.
+
+
+
+### View Captured Data in Sentry
+
+Now, head over to your project on [Sentry.io](https://sentry.io/) to view the collected data (it takes a couple of moments for the data to appear).
+
+
+
+
+
+## Next Steps
+
+At this point, you should have integrated Sentry into your Nuxt application and should already be sending error and performance data to your Sentry project.
+
+Now's a good time to customize your setup and look into more advanced topics. Our next recommended steps for you are:
+
+- Explore [practical guides](/get-started/guides/) on what to monitor, log, track, and investigate after setup
+- Learn how to [manually capture errors](/platforms/javascript/guides/nuxt/usage/)
+- Continue to [customize your configuration](/platforms/javascript/guides/nuxt/configuration/)
+- Get familiar with [Sentry's product features](/product/) like tracing, insights, and alerts
+- Learn how to [track your Vue components or your Pinia store](/platforms/javascript/guides/nuxt/features/)
+- Learn how to [add support for different Nitro deployment presets](/platforms/javascript/guides/nuxt/features/nitro-deployment-presets/) (like Cloudflare)
+
+
+
+- If you encountered issues with our installation wizard, try [setting up Sentry manually](/platforms/javascript/guides/nuxt/manual-setup/)
+- [Get support](https://www.sentry.help/en/)
+
+
+
+
diff --git a/platform-includes/getting-started-prerequisites/javascript.sveltekit.mdx b/platform-includes/getting-started-prerequisites/javascript.sveltekit.mdx
index d042a382ab607..8d099e46eb8d6 100644
--- a/platform-includes/getting-started-prerequisites/javascript.sveltekit.mdx
+++ b/platform-includes/getting-started-prerequisites/javascript.sveltekit.mdx
@@ -36,7 +36,7 @@ Here's an overview of the current support:
- [Adapter-vercel](https://kit.svelte.dev/docs/adapter-vercel) when used with Vercel's Node.js Lambda runtime
- [Adapter-node](https://kit.svelte.dev/docs/adapter-node)
- **Supported non-Node.js runtimes**
- - [Adapter-cloudflare](https://kit.svelte.dev/docs/adapter-cloudflare) requires [additional setup](/platforms/javascript/guides/cloudflare/frameworks/sveltekit/)
+ - [Adapter-cloudflare](https://kit.svelte.dev/docs/adapter-cloudflare) requires [additional setup](/platforms/javascript/guides/sveltekit/cloudflare/)
- **Currently not supported**
- Non-Node.js server runtimes, such as Vercel's edge runtime, are not yet supported.
- **Other adapters**
diff --git a/platform-includes/getting-started-wizard-files/javascript.nextjs.mdx b/platform-includes/getting-started-wizard-files/javascript.nextjs.mdx
new file mode 100644
index 0000000000000..d3b92a08b86ab
--- /dev/null
+++ b/platform-includes/getting-started-wizard-files/javascript.nextjs.mdx
@@ -0,0 +1,143 @@
+### Initialize the SDK
+
+Next.js runs code in different environments, so the wizard creates a separate initialization file for each in your project's root directory (or `src` folder):
+
+- `instrumentation-client.ts`: runs in the browser
+- `sentry.server.config.ts`: runs in the Node.js runtime
+- `sentry.edge.config.ts`: runs in the Edge runtime
+
+Use the tabs in the code box below to view each file.
+
+The snippets also turn on:
+
+- Tracing: via `tracesSampleRate` in all three files
+- Session Replay: via `replayIntegration()`, sampled with `replaysSessionSampleRate` and `replaysOnErrorSampleRate`
+- User Feedback: via `feedbackIntegration()`. The wizard doesn't add this integration, so add it to `instrumentation-client.ts` yourself.
+
+Don't need a feature? Remove its integration and options from the snippets.
+
+```typescript {tabTitle:Client} {mdExpandTabs} {filename:instrumentation-client.ts}
+import * as Sentry from "@sentry/nextjs";
+
+Sentry.init({
+ dsn: "___PUBLIC_DSN___",
+ integrations: [
+ // enables Session Replay
+ Sentry.replayIntegration(),
+ // enables User Feedback
+ Sentry.feedbackIntegration({
+ // Additional integration configuration goes in here
+ colorScheme: "system",
+ }),
+ ],
+
+ // Enables Tracing.
+ // Set to 1.0 to capture 100% of spans for tracing.
+ // We recommend reducing this value in production.
+ tracesSampleRate: 1.0,
+
+ // Capture replays for 10% of all sessions,
+ // plus for 100% of sessions with an error
+ // Requires Sentry.replayIntegration()
+ replaysSessionSampleRate: 0.1,
+ replaysOnErrorSampleRate: 1.0,
+});
+
+// Instruments client-side navigations
+export const onRouterTransitionStart = Sentry.captureRouterTransitionStart;
+```
+
+```typescript {tabTitle:Server} {filename:sentry.server.config.ts}
+import * as Sentry from "@sentry/nextjs";
+
+Sentry.init({
+ dsn: "___PUBLIC_DSN___",
+
+ // Enables Tracing.
+ // Set to 1.0 to capture 100% of spans for tracing.
+ // We recommend reducing this value in production.
+ tracesSampleRate: 1.0,
+});
+```
+
+```typescript {tabTitle:Edge} {filename:sentry.edge.config.ts}
+import * as Sentry from "@sentry/nextjs";
+
+Sentry.init({
+ dsn: "___PUBLIC_DSN___",
+
+ // Enables Tracing.
+ // Set to 1.0 to capture 100% of spans for tracing.
+ // We recommend reducing this value in production.
+ tracesSampleRate: 1.0,
+});
+```
+
+### Register the Server-Side Configuration
+
+The wizard creates a [Next.js instrumentation file](https://nextjs.org/docs/app/guides/instrumentation) named `instrumentation.ts`. It loads your server and edge configurations, and exports `onRequestError` to capture errors from Server Components, route handlers, and middleware.
+
+```typescript {filename:instrumentation.ts}
+import * as Sentry from "@sentry/nextjs";
+
+export async function register() {
+ if (process.env.NEXT_RUNTIME === "nodejs") {
+ await import("./sentry.server.config");
+ }
+
+ if (process.env.NEXT_RUNTIME === "edge") {
+ await import("./sentry.edge.config");
+ }
+}
+
+export const onRequestError = Sentry.captureRequestError;
+```
+
+### Capture React Render Errors
+
+If you use the App Router, the wizard adds Sentry to `app/global-error.tsx` to capture React rendering errors. If you use the Pages Router, it adds Sentry to `pages/_error.tsx` instead.
+
+
+
+### Apply Instrumentation to Your App
+
+The wizard wraps your Next.js configuration with `withSentryConfig`. This instruments your app at build time, uploads source maps, and, if you said yes in the wizard, routes browser requests to Sentry through your server to avoid ad blockers.
+
+To forward only the request body to Sentry, add a tunnel route handler (SDK version `10.77.1` and later on v10, `11.9.0` and later on v11). Use the handler if Vercel Deployment Protection or another login protects your app.
+Learn more about the [`tunnelRoute` option](/platforms/javascript/guides/nextjs/configuration/build/#tunnelRoute).
+
+```typescript {filename:next.config.ts}
+import type { NextConfig } from "next";
+import { withSentryConfig } from "@sentry/nextjs/config";
+
+const nextConfig: NextConfig = {
+ // Your existing Next.js configuration
+};
+
+export default withSentryConfig(nextConfig, {
+ org: "___ORG_SLUG___",
+ project: "___PROJECT_SLUG___",
+
+ // Only print logs for uploading source maps in CI
+ silent: !process.env.CI,
+
+ // Upload a larger set of source maps for prettier stack traces (increases build time)
+ widenClientFileUpload: true,
+
+ // Route browser requests to Sentry through a Next.js rewrite to avoid ad blockers.
+ // This can increase your server load as well as your hosting bill.
+ tunnelRoute: "/monitoring",
+});
+```
+
+### Add Readable Stack Traces With Source Maps
+
+The wizard stores your auth token in `.env.sentry-build-plugin` and adds the file to `.gitignore`. The Sentry build plugin uses this token to upload source maps when you build your app locally.
+
+For CI/CD builds, set the `SENTRY_AUTH_TOKEN` environment variable in your build system instead.
+
+
+
+```bash {filename:.env.sentry-build-plugin}
+SENTRY_AUTH_TOKEN=___ORG_AUTH_TOKEN___
+```
diff --git a/redirects.js b/redirects.js
index 5d7fecaad69f5..a67dc6afc4dc9 100644
--- a/redirects.js
+++ b/redirects.js
@@ -1051,7 +1051,38 @@ const userDocsRedirects = [
{
// The Nuxt SDK links to this path in its Cloudflare build warning
source: '/platforms/javascript/guides/nuxt/install/cloudflare-workers/',
- destination: '/platforms/javascript/guides/cloudflare/frameworks/nuxt/',
+ destination: '/platforms/javascript/guides/nuxt/cloudflare/',
+ },
+ // The Cloudflare quick starts of these frameworks moved from the Cloudflare guide into the framework guides.
+ {
+ source:
+ '/platforms/javascript/guides/cloudflare/frameworks/:framework(astro|hono|nextjs|nuxt|remix|sveltekit)/',
+ destination: '/platforms/javascript/guides/:framework/cloudflare/',
+ },
+ {
+ source: '/platforms/javascript/guides/cloudflare/frameworks/tanstack-start/',
+ destination: '/platforms/javascript/guides/tanstackstart-react/cloudflare/',
+ },
+ {
+ source: '/platforms/javascript/guides/remix/frameworks/',
+ destination: '/platforms/javascript/guides/remix/cloudflare/',
+ },
+ {
+ source: '/platforms/javascript/guides/cloudflare/frameworks/hydrogen-react-router/',
+ destination: '/platforms/javascript/guides/react-router/hydrogen/',
+ },
+ {
+ source: '/platforms/javascript/guides/cloudflare/frameworks/hydrogen-remix/',
+ destination: '/platforms/javascript/guides/remix/hydrogen/',
+ },
+ {
+ // The Cloudflare quick start links to every framework page.
+ source: '/platforms/javascript/guides/cloudflare/frameworks/',
+ destination: '/platforms/javascript/guides/cloudflare/',
+ },
+ {
+ source: '/platforms/javascript/guides/nextjs/best-practices/deploying-on-cloudflare/',
+ destination: '/platforms/javascript/guides/nextjs/cloudflare/',
},
{
source: '/platforms/javascript/guides/connect/',
@@ -2123,13 +2154,11 @@ const userDocsRedirects = [
},
{
source: '/platforms/javascript/guides/remix/frameworks/hydrogen/',
- destination:
- '/platforms/javascript/guides/cloudflare/frameworks/hydrogen-react-router/',
+ destination: '/platforms/javascript/guides/react-router/hydrogen/',
},
{
source: '/platforms/javascript/guides/cloudflare/frameworks/hydrogen/',
- destination:
- '/platforms/javascript/guides/cloudflare/frameworks/hydrogen-react-router/',
+ destination: '/platforms/javascript/guides/react-router/hydrogen/',
},
// Removed /product/onboarding/ section (content was orphaned and duplicated elsewhere)
{
diff --git a/src/components/runtimeLinks.spec.ts b/src/components/runtimeLinks.spec.ts
new file mode 100644
index 0000000000000..8d871ddfcc1fd
--- /dev/null
+++ b/src/components/runtimeLinks.spec.ts
@@ -0,0 +1,50 @@
+import {describe, expect, it} from 'vitest';
+
+import {getRuntimeLinks} from './runtimeLinks';
+
+const G = 'platforms/javascript/guides';
+
+type Page = {children: Page[]; frontmatter: {runtime?: string}; path: string};
+
+const page = (path: string, runtime?: string, children: Page[] = []): Page => ({
+ path,
+ frontmatter: runtime ? {runtime} : {},
+ children,
+});
+
+const piDurable = page(`${G}/pi-durable`, 'node', [
+ page(`${G}/pi-durable/cloudflare`, 'cloudflare'),
+ page(`${G}/pi-durable/deno`, 'deno'),
+ page(`${G}/pi-durable/bun`, 'bun'),
+ page(`${G}/pi-durable/configuration`),
+]);
+
+const path = (p: string) => p.split('/');
+
+describe('getRuntimeLinks', () => {
+ it('links the guide page and its child pages with a runtime, in doc tree order', () => {
+ expect(getRuntimeLinks(piDurable, path(`${G}/pi-durable`))?.map(l => l.url)).toEqual([
+ `/${G}/pi-durable/`,
+ `/${G}/pi-durable/cloudflare/`,
+ `/${G}/pi-durable/deno/`,
+ `/${G}/pi-durable/bun/`,
+ ]);
+ });
+
+ it('selects the runtime of the current page', () => {
+ const selected = (p: string) =>
+ getRuntimeLinks(piDurable, path(p))
+ ?.filter(l => l.selected)
+ .map(l => l.runtime);
+
+ expect(selected(`${G}/pi-durable`)).toEqual(['node']);
+ expect(selected(`${G}/pi-durable/deno`)).toEqual(['deno']);
+ expect(selected(`${G}/pi-durable/configuration/options`)).toEqual([]);
+ });
+
+ it('returns null for a guide with quick starts for fewer than two runtimes', () => {
+ expect(getRuntimeLinks(page(`${G}/node`, 'node'), path(`${G}/node`))).toBeNull();
+ expect(getRuntimeLinks(page(`${G}/eve`), path(`${G}/eve`))).toBeNull();
+ expect(getRuntimeLinks(undefined, path('product/agents'))).toBeNull();
+ });
+});
diff --git a/src/components/runtimeLinks.ts b/src/components/runtimeLinks.ts
new file mode 100644
index 0000000000000..ef440398e15f2
--- /dev/null
+++ b/src/components/runtimeLinks.ts
@@ -0,0 +1,49 @@
+const RUNTIME_TITLES: Record = {
+ node: 'Node.js',
+ cloudflare: 'Cloudflare',
+ deno: 'Deno',
+ bun: 'Bun',
+};
+
+export type RuntimeLink = {
+ runtime: string;
+ selected: boolean;
+ title: string;
+ url: string;
+};
+
+type QuickStartNode = {
+ frontmatter: {runtime?: string};
+ path: string;
+ children?: QuickStartNode[];
+};
+
+/**
+ * Returns the links to the quick starts of `guide`: the guide page and its child pages that
+ * set `runtime` in their frontmatter, in doc tree order. The page at `path` is selected.
+ * Returns `null` if the guide has quick starts for fewer than two runtimes.
+ */
+export function getRuntimeLinks(
+ guide: QuickStartNode | undefined,
+ path: string[]
+): RuntimeLink[] | null {
+ if (!guide) {
+ return null;
+ }
+
+ const current = path.join('/');
+ const links = [guide, ...(guide.children ?? [])].flatMap(page => {
+ const runtime = page.frontmatter.runtime;
+ return runtime
+ ? [
+ {
+ runtime,
+ selected: page.path === current,
+ title: RUNTIME_TITLES[runtime] ?? runtime,
+ url: `/${page.path}/`,
+ },
+ ]
+ : [];
+ });
+ return links.length < 2 ? null : links;
+}
diff --git a/src/components/runtimeSelector.tsx b/src/components/runtimeSelector.tsx
new file mode 100644
index 0000000000000..5e28ffb6dcace
--- /dev/null
+++ b/src/components/runtimeSelector.tsx
@@ -0,0 +1,58 @@
+import {Button} from '@radix-ui/themes';
+import Link from 'next/link';
+import {nodeForPath} from 'sentry-docs/docTree';
+import {serverContext} from 'sentry-docs/serverContext';
+
+import {PlatformIcon} from './platformIcon';
+import {getRuntimeLinks} from './runtimeLinks';
+
+/**
+ * Links the quick starts of the current guide for each runtime: the guide page and its child
+ * pages that set `runtime` in their frontmatter. The links are plain anchors, so they are also
+ * in the page's Markdown export for AI agents.
+ */
+export function RuntimeSelector() {
+ const {rootNode, path} = serverContext();
+ const links = getRuntimeLinks(nodeForPath(rootNode, path.slice(0, 4)), path);
+ if (!links) {
+ return null;
+ }
+
+ return (
+
+ );
+}
diff --git a/src/mdxComponents.ts b/src/mdxComponents.ts
index 13d823b180d63..94b41d1cdb72e 100644
--- a/src/mdxComponents.ts
+++ b/src/mdxComponents.ts
@@ -51,6 +51,7 @@ import {PlatformOrGuideName} from './components/platformOrGuideName';
import {PlatformSdkPackageName} from './components/platformSdkPackageName';
import {PlatformSection} from './components/platformSection';
import {RelayMetrics} from './components/relayMetrics';
+import {RuntimeSelector} from './components/runtimeSelector';
import {SandboxLink} from './components/sandboxLink';
import {SdkApi} from './components/sdkApi';
import {SdkOption} from './components/sdkOption';
@@ -124,6 +125,7 @@ export function mdxComponents(
OnboardingOptionButtons,
OnboardingSteps,
RelayMetrics,
+ RuntimeSelector,
SandboxLink,
CopyableCard,
SignInNote,
diff --git a/src/types/frontmatter.ts b/src/types/frontmatter.ts
index fd9a5557eef19..7d5685fbafaca 100644
--- a/src/types/frontmatter.ts
+++ b/src/types/frontmatter.ts
@@ -97,6 +97,12 @@ export interface FrontMatter {
*/
previousPage?: PaginationNavNode;
+ /**
+ * The runtime of a quick start, for example `node` or `cloudflare`. ``
+ * links the quick starts of the same guide for the other runtimes.
+ */
+ runtime?: string;
+
/**
* Set this to true to show a separator/divider below this item in the sidebar
* @deprecated Use sidebar_section instead