From a2fdf8bc9c063e03f11efb9f5f9bba776d4d1db3 Mon Sep 17 00:00:00 2001 From: Charly Gomez Date: Tue, 26 Nov 2024 13:50:06 +0100 Subject: [PATCH 1/9] update astro setup --- .../javascript/guides/astro/manual-setup.mdx | 254 ------------------ .../javascript.astro.mdx | 65 ++++- .../javascript.astro.mdx | 31 ++- .../javascript.astro.mdx | 89 ++++++ redirects.js | 4 + 5 files changed, 180 insertions(+), 263 deletions(-) delete mode 100644 docs/platforms/javascript/guides/astro/manual-setup.mdx create mode 100644 platform-includes/getting-started-next-steps/javascript.astro.mdx diff --git a/docs/platforms/javascript/guides/astro/manual-setup.mdx b/docs/platforms/javascript/guides/astro/manual-setup.mdx deleted file mode 100644 index 2a86edae87851..0000000000000 --- a/docs/platforms/javascript/guides/astro/manual-setup.mdx +++ /dev/null @@ -1,254 +0,0 @@ ---- -title: Manual Setup -sidebar_order: 1 -description: "Learn how to manually customize the SDK setup." ---- - -If you can't (or prefer not to) use the Astro CLI to install the Sentry Astro SDK, follow the instructions below to configure the SDK in your application manually. - -This guide also explains how to further customize your SDK setup. - -## Manual Installation - -```bash {tabTitle:npm} -npm install @sentry/astro --save -``` - -```bash {tabTitle:yarn} -yarn add @sentry/astro -``` - -```bash {tabTitle:pnpm} -pnpm add @sentry/astro -``` - -If you're updating your Sentry SDK to the latest version, check out our [migration guide](https://github.com/getsentry/sentry-javascript/blob/master/MIGRATION.md) to learn more about breaking changes. - -## Configure the Astro Integration - -Import and install the Sentry Astro integration: - - -```javascript {filename:astro.config.mjs} -import { defineConfig } from "astro/config"; -import sentry from "@sentry/astro"; - -export default defineConfig({ - integrations: [ - sentry({ - dsn: "___PUBLIC_DSN___", - sourceMapsUploadOptions: { - project: "___PROJECT_SLUG___", - authToken: process.env.SENTRY_AUTH_TOKEN, - }, - }), - ], -}); -``` - -This integration enables the following features by default: - -- Error Monitoring with 100% sample rate -- Tracing with 100% sample rate -- Session Replay with - - 10% sample rate for regular replay sessions - - 100% sample rate for sessions where an error occurred -- Automatic source maps upload for production builds to [Add Readable Stack Traces to Errors](/platforms/javascript/guides/astro/#add-readable-stack-traces-to-errors). This requires providing an auth token and project slug. - -### Astro Integration Options - -Besides the required `dsn` option, you can specify the following options in the integration directly. These are a subset of the full Sentry SDK options. - -- release -- environment -- sampleRate -- tracesSampleRate -- replaysSessionSampleRate -- replaysOnErrorSampleRate -- debug Here's an example with all available integration options: - -```javascript {filename:astro.config.mjs} -import { defineConfig } from "astro/config"; -import sentry from "@sentry/astro"; - -export default defineConfig({ - integrations: [ - sentry({ - dsn: "___PUBLIC_DSN___", - release: "1.0.0", - environment: "production", - sampleRate: 0.5, - tracesSampleRate: 1.0, - replaysSessionSampleRate: 0.2, - replaysOnErrorSampleRate: 0.8, - debug: false, - sourceMapsUploadOptions: { - project: "___PROJECT_SLUG___", - authToken: process.env.SENTRY_AUTH_TOKEN, - }, - }), - ], -}); -``` - -## Manual SDK Initialization - -To fully customize the SDK initialization, you can manually initialize the SDK for the client, server, or both. -At build time, the integration looks for the following two files in the root directory of your config: - -- `sentry.client.config.js` containing a `Sentry.init` call for the client side -- `sentry.server.config.js` containing a `Sentry.init` call for the sever side - -This file can also be a `.ts`, `.mjs`, `.mts`, etc. file. - -In these files, you can specify the full range of Sentry SDK options. - - - -If you add a `sentry.client.config.js` or `sentry.server.config.js` file, the options specified in the [Sentry Astro integration](#astro-integration-options) are ignored for the respective runtime. -The only exception is `sourceMapsUploadOptions` which **always** needs to be set in the integration options. - - - -### Client Side - -Here's an example of a custom client-side SDK setup: - -```javascript {filename:sentry.client.config.js} -import * as Sentry from "@sentry/astro"; - -Sentry.init({ - dsn: "___PUBLIC_DSN___", - replaysSessionSampleRate: 0.1, - replaysOnErrorSampleRate: 1.0, - integrations: [ - Sentry.replayIntegration({ - maskAllText: true, - blockAllMedia: true, - }), - Sentry.browserTracingIntegration({ - tracePropagationTargets: [/\//, "my-api-domain.com"], - }), - ], - tracesSampler: (samplingContext) => { - if (samplingContext.transactionContext.name === "/home") { - return 0.5; - } - return 0.1; - }, -}); -``` - -### Server Side - -Here's an example of a custom server-side SDK setup: - -```javascript {filename:sentry.server.config.js} -import * as Sentry from "@sentry/astro"; - -Sentry.init({ - dsn: "___PUBLIC_DSN___", - tracesSampler: (samplingContext) => { - if (samplingContext.transactionContext.name === "/home") { - return 0.5; - } - return 0.1; - }, - beforeSend: (event) => { - console.log("before send", event); - return event; - }, -}); -``` - -### Changing config files location - -Sentry automatically detects configuration files named `sentry.(client|server).config.js` in the root of your project. You can rename these files or move them to a custom folder within your project. -To change their location or names, specify the paths in the Sentry Astro integration options in your `astro.config.mjs`: - -```javascript {filename:astro.config.mjs} -export default defineConfig({ - // Other Astro project options - integrations: [ - sentry({ - clientInitPath: ".config/sentryClientInit.js", - serverInitPath: ".config/sentryServerInit.js", - }), - ], -}); -``` - -## Configure Server Instrumentation - - - -Auto instrumentation only works for Astro 3.5.2 or newer. If you're using an older version, you need to [manually add the Sentry middleware](#manually-add-server-instrumentation) instead. - - - -In SSR or hybrid mode configured Astro apps, the Sentry Astro integration will automatically add an [Astro middleware](https://docs.astro.build/en/guides/middleware/) request handler to your server code. This middleware enhances the data collected by Sentry on the server side by: - -- Collecting performance spans for incoming requests -- Enabeling distributed tracing between client and server -- Enhancing captured errors with additional information - -### Manually Add Server Instrumentation - -For Astro versions below 3.5.2, you need to manually add the Sentry middleware to your `src/middleware.js` file: - -```javascript {filename:src/middleware.(js|ts)} -import * as Sentry from "@sentry/astro"; -import { sequence } from "astro:middleware"; - -export const onRequest = sequence( - Sentry.handleRequest() - // other middleware handlers -); -``` - -If you have multiple request handlers, make sure to add the Sentry middleware as the first handler in the sequence. - -### Customize Server Instrumentation - -Sentry's Astro middleware allows control over what additional data should be added to the recorded request spans. - -To customize the server instrumentation, add the Sentry middleware to your `src/middleware.js` file: - -```javascript {filename:src/middleware.(js|ts)} -import * as Sentry from "@sentry/astro"; -import { sequence } from "astro:middleware"; - -export const onRequest = sequence( - Sentry.handleRequest({ - trackClientIp: true, // defaults to false - trackHeaders: true, // defaults to false - }) - // other middleware handlers -); -``` - -If you're using Astro 3.5.2 or newer, make sure to also disable auto instrumentation as shown below. - -### Disable Auto Server Instrumentation - -For Astro 3.5.2 or newer, you can disable the automatic server instrumentation by turning off the `requestHandler` auto instrumentation option: - -```javascript {filename:astro.config.mjs} -import { defineConfig } from "astro/config"; -import sentry from "@sentry/astro"; - -export default defineConfig({ - integrations: [ - sentry({ - autoInstrumentation: { - requestHandler: false, - }, - }), - ], - output: "server", -}); -``` - -## Configure Source Maps Upload - -To enable readable stack traces, set up source maps upload for your production builds. diff --git a/platform-includes/getting-started-config/javascript.astro.mdx b/platform-includes/getting-started-config/javascript.astro.mdx index ccec3814bd01d..1071f25a32cff 100644 --- a/platform-includes/getting-started-config/javascript.astro.mdx +++ b/platform-includes/getting-started-config/javascript.astro.mdx @@ -1,4 +1,11 @@ -Get started by adding your DSN to your Astro config file (`astro.config.mjs`): +Configuration should happen as early as possible in your application's lifecycle. + +To set up the Sentry SDK, register the Sentry integration and initialize the SDK for client and server in the root directory of your project: + +- Client-Side: `sentry.client.config.ts` containing a `Sentry.init` call +- Server-Side: `sentry.server.config.ts` containing a `Sentry.init` call + +### Astro Integration Setup ```javascript {filename:astro.config.mjs} @@ -8,7 +15,6 @@ import sentry from "@sentry/astro"; export default defineConfig({ integrations: [ sentry({ - dsn: "___PUBLIC_DSN___", sourceMapsUploadOptions: { project: "___PROJECT_SLUG___", authToken: process.env.SENTRY_AUTH_TOKEN, @@ -18,4 +24,57 @@ export default defineConfig({ }); ``` -Once you've added your `dsn`, the SDK will automatically capture and send errors and performance events to Sentry. + + Passing runtime-specific configuration options other than `release`, and `environment` to the Sentry integration will be deprecated in future versions. + We recommend passing your configuration directly to the respective `Sentry.init()` calls in `sentry.client.config.js` and `sentry.server.config.js` instead. + + +### Client-side Setup + +```javascript {filename:sentry.client.config.js} {"onboardingOptions": {"performance": "7,11-13", "session-replay": "8,14-21"}} +import * as Sentry from "@sentry/astro"; + +Sentry.init({ + dsn: "___PUBLIC_DSN___", + + integrations: [ + Sentry.browserTracingIntegration(), + Sentry.replayIntegration(), + ], + + // Define how likely traces are sampled. Adjust this value in production, + // or use tracesSampler for greater control. + tracesSampleRate: 1.0, + + // This sets the sample rate to be 10%. You may want this to be 100% while + // in development and sample at a lower rate in production + replaysSessionSampleRate: 0.1, + + // If the entire session is not sampled, use the below sample rate to sample + // sessions when an error occurs. + replaysOnErrorSampleRate: 1.0, +}); +``` + +### Server-side Setup + +```javascript {filename:sentry.server.config.js} {"onboardingOptions": {"performance": "10-13", "profiling": "2,6-9,14-17"}} +import * as Sentry from "@sentry/astro"; +import { nodeProfilingIntegration } from '@sentry/profiling-node'; + +Sentry.init({ + dsn: "___PUBLIC_DSN___", + integrations: [ + // Add our Profiling integration + nodeProfilingIntegration(), + ], + + // Define how likely traces are sampled. Adjust this value in production, + // or use tracesSampler for greater control. + tracesSampleRate: 1.0, + + // Set sampling rate for profiling + // This is relative to tracesSampleRate + profilesSampleRate: 1.0 +}); +``` diff --git a/platform-includes/getting-started-install/javascript.astro.mdx b/platform-includes/getting-started-install/javascript.astro.mdx index 6278d70e88ec0..4ccc79c21a65a 100644 --- a/platform-includes/getting-started-install/javascript.astro.mdx +++ b/platform-includes/getting-started-install/javascript.astro.mdx @@ -1,17 +1,36 @@ -Install the SDK by using the `astro` CLI: + + + + +```bash {tabTitle:npm} +npm install @sentry/astro --save +``` + +```bash {tabTitle:yarn} +yarn add @sentry/astro +``` + +```bash {tabTitle:pnpm} +pnpm add @sentry/astro +``` + + + + ```bash {tabTitle:npm} -npx astro add @sentry/astro +npm install @sentry/astro @sentry/profiling-node --save ``` ```bash {tabTitle:yarn} -yarn astro add @sentry/astro +yarn add @sentry/astro @sentry/profiling-node ``` ```bash {tabTitle:pnpm} -pnpm astro add @sentry/astro +pnpm add @sentry/astro @sentry/profiling-node ``` -The `astro` CLI installs the SDK package and adds the Sentry integration to your `astro.config.mjs` file. + -To finish the setup, configure the Sentry integration. diff --git a/platform-includes/getting-started-next-steps/javascript.astro.mdx b/platform-includes/getting-started-next-steps/javascript.astro.mdx new file mode 100644 index 0000000000000..2eea23ebc2d12 --- /dev/null +++ b/platform-includes/getting-started-next-steps/javascript.astro.mdx @@ -0,0 +1,89 @@ +## Advanced Configuration Options + +### Changing config files location + +Sentry automatically detects configuration files named `sentry.(client|server).config.js` in the root of your project. You can rename these files or move them to a custom folder within your project. +To change their location or names, specify the paths in the Sentry Astro integration options in your `astro.config.mjs`: + +```javascript {filename:astro.config.mjs} +export default defineConfig({ + // Other Astro project options + integrations: [ + sentry({ + clientInitPath: ".config/sentryClientInit.js", + serverInitPath: ".config/sentryServerInit.js", + }), + ], +}); +``` + +### Server Instrumentation + + + +Auto instrumentation only works for Astro 3.5.2 or newer. If you're using an older version, you need to [manually add the Sentry middleware](#manually-add-server-instrumentation) instead. + + + +In SSR or hybrid mode configured Astro apps, the Sentry Astro integration will automatically add an [Astro middleware](https://docs.astro.build/en/guides/middleware/) request handler to your server code. This middleware enhances the data collected by Sentry on the server side by: + +- Collecting performance spans for incoming requests +- Enabeling distributed tracing between client and server +- Enhancing captured errors with additional information + +### Manually Add Server Instrumentation + +For Astro versions below 3.5.2, you need to manually add the Sentry middleware to your `src/middleware.js` file: + +```javascript {filename:src/middleware.(js|ts)} +import * as Sentry from "@sentry/astro"; +import { sequence } from "astro:middleware"; + +export const onRequest = sequence( + Sentry.handleRequest() + // other middleware handlers +); +``` + +If you have multiple request handlers, make sure to add the Sentry middleware as the first handler in the sequence. + +### Customize Server Instrumentation + +Sentry's Astro middleware allows control over what additional data should be added to the recorded request spans. + +To customize the server instrumentation, add the Sentry middleware to your `src/middleware.js` file: + +```javascript {filename:src/middleware.(js|ts)} +import * as Sentry from "@sentry/astro"; +import { sequence } from "astro:middleware"; + +export const onRequest = sequence( + Sentry.handleRequest({ + trackClientIp: true, // defaults to false + trackHeaders: true, // defaults to false + }) + // other middleware handlers +); +``` + +If you're using Astro 3.5.2 or newer, make sure to also disable auto instrumentation as shown below. + +### Disable Auto Server Instrumentation + +For Astro 3.5.2 or newer, you can disable the automatic server instrumentation by turning off the `requestHandler` auto instrumentation option: + +```javascript {filename:astro.config.mjs} +import { defineConfig } from "astro/config"; +import sentry from "@sentry/astro"; + +export default defineConfig({ + integrations: [ + sentry({ + autoInstrumentation: { + requestHandler: false, + }, + }), + ], + output: "server", +}); +``` diff --git a/redirects.js b/redirects.js index e48788f633f2e..bc4be06514170 100644 --- a/redirects.js +++ b/redirects.js @@ -868,6 +868,10 @@ const userDocsRedirects = [ destination: '/product/insights/ai/llm-monitoring/getting-started/the-dashboard/', }, // End of Insights reduirects. + { + source: '/platforms/javascript/guides/astro/manual-setup/', + destination: '/platforms/javascript/guides/astro/', + }, ]; /** From 7d59d37082cd0d2e411b4808a5ebefdcb6b2843f Mon Sep 17 00:00:00 2001 From: Charly Gomez Date: Tue, 26 Nov 2024 14:37:54 +0100 Subject: [PATCH 2/9] makes no sense --- platform-includes/getting-started-config/javascript.astro.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform-includes/getting-started-config/javascript.astro.mdx b/platform-includes/getting-started-config/javascript.astro.mdx index 1071f25a32cff..1741aca34bbc2 100644 --- a/platform-includes/getting-started-config/javascript.astro.mdx +++ b/platform-includes/getting-started-config/javascript.astro.mdx @@ -25,7 +25,7 @@ export default defineConfig({ ``` - Passing runtime-specific configuration options other than `release`, and `environment` to the Sentry integration will be deprecated in future versions. + Passing runtime-specific configuration options to the Sentry integration will be deprecated in future versions. We recommend passing your configuration directly to the respective `Sentry.init()` calls in `sentry.client.config.js` and `sentry.server.config.js` instead. From 4df6ea20515a450eaf9ea402526a16b8093b373c Mon Sep 17 00:00:00 2001 From: Charly Gomez Date: Tue, 26 Nov 2024 15:02:51 +0100 Subject: [PATCH 3/9] remove note on early configuration --- platform-includes/getting-started-config/javascript.astro.mdx | 2 -- 1 file changed, 2 deletions(-) diff --git a/platform-includes/getting-started-config/javascript.astro.mdx b/platform-includes/getting-started-config/javascript.astro.mdx index 1741aca34bbc2..ed19092253cf0 100644 --- a/platform-includes/getting-started-config/javascript.astro.mdx +++ b/platform-includes/getting-started-config/javascript.astro.mdx @@ -1,5 +1,3 @@ -Configuration should happen as early as possible in your application's lifecycle. - To set up the Sentry SDK, register the Sentry integration and initialize the SDK for client and server in the root directory of your project: - Client-Side: `sentry.client.config.ts` containing a `Sentry.init` call From 7f1a1d22beef596b47f5edb9848425adb92f39b7 Mon Sep 17 00:00:00 2001 From: Charly Gomez Date: Tue, 26 Nov 2024 15:04:26 +0100 Subject: [PATCH 4/9] remove bulletpoints for runtime configs --- platform-includes/getting-started-config/javascript.astro.mdx | 3 --- 1 file changed, 3 deletions(-) diff --git a/platform-includes/getting-started-config/javascript.astro.mdx b/platform-includes/getting-started-config/javascript.astro.mdx index ed19092253cf0..cd6cc8e019e2b 100644 --- a/platform-includes/getting-started-config/javascript.astro.mdx +++ b/platform-includes/getting-started-config/javascript.astro.mdx @@ -1,8 +1,5 @@ To set up the Sentry SDK, register the Sentry integration and initialize the SDK for client and server in the root directory of your project: -- Client-Side: `sentry.client.config.ts` containing a `Sentry.init` call -- Server-Side: `sentry.server.config.ts` containing a `Sentry.init` call - ### Astro Integration Setup From 6d96162343625c01b025067a96001092f1352292 Mon Sep 17 00:00:00 2001 From: Charly Gomez Date: Tue, 26 Nov 2024 15:35:28 +0100 Subject: [PATCH 5/9] specify deprecated options --- platform-includes/getting-started-config/javascript.astro.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform-includes/getting-started-config/javascript.astro.mdx b/platform-includes/getting-started-config/javascript.astro.mdx index cd6cc8e019e2b..ecb0ed30a8dd9 100644 --- a/platform-includes/getting-started-config/javascript.astro.mdx +++ b/platform-includes/getting-started-config/javascript.astro.mdx @@ -20,7 +20,7 @@ export default defineConfig({ ``` - Passing runtime-specific configuration options to the Sentry integration will be deprecated in future versions. + Passing runtime-specific configuration options (`dsn`, `release`, `environment`, `sampleRate`, `tracesSampleRate`, `replaysSessionSampleRate`, `replaysOnErrorSampleRate`) to the Sentry integration will be deprecated in future versions. We recommend passing your configuration directly to the respective `Sentry.init()` calls in `sentry.client.config.js` and `sentry.server.config.js` instead. From 71565dc2f15e62fe40d5a101216cc2ce49033c8a Mon Sep 17 00:00:00 2001 From: Charly Gomez Date: Wed, 27 Nov 2024 10:35:36 +0100 Subject: [PATCH 6/9] use astro cli for adding sentry integration --- .../javascript.astro.mdx | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/platform-includes/getting-started-install/javascript.astro.mdx b/platform-includes/getting-started-install/javascript.astro.mdx index 4ccc79c21a65a..a6854f5049511 100644 --- a/platform-includes/getting-started-install/javascript.astro.mdx +++ b/platform-includes/getting-started-install/javascript.astro.mdx @@ -2,35 +2,37 @@ options={["error-monitoring", "performance", "profiling", "session-replay"]} /> - +Install the SDK by using the `astro` CLI: ```bash {tabTitle:npm} -npm install @sentry/astro --save +npx astro add @sentry/astro ``` ```bash {tabTitle:yarn} -yarn add @sentry/astro +yarn astro add @sentry/astro ``` ```bash {tabTitle:pnpm} -pnpm add @sentry/astro +pnpm astro add @sentry/astro ``` - +The `astro` CLI installs the SDK package and adds the Sentry integration to your `astro.config.mjs` file. + ```bash {tabTitle:npm} -npm install @sentry/astro @sentry/profiling-node --save +npm install @sentry/profiling-node ``` ```bash {tabTitle:yarn} -yarn add @sentry/astro @sentry/profiling-node +yarn add @sentry/profiling-node ``` ```bash {tabTitle:pnpm} -pnpm add @sentry/astro @sentry/profiling-node +pnpm add @sentry/profiling-node ``` +To finish the setup, configure the Sentry integration. \ No newline at end of file From f02cdeca52923eedd23dbde66b6130e625ac7f4d Mon Sep 17 00:00:00 2001 From: Charly Gomez Date: Thu, 28 Nov 2024 09:44:10 +0100 Subject: [PATCH 7/9] Update platform-includes/getting-started-config/javascript.astro.mdx Co-authored-by: Alex Krawiec --- platform-includes/getting-started-config/javascript.astro.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform-includes/getting-started-config/javascript.astro.mdx b/platform-includes/getting-started-config/javascript.astro.mdx index ecb0ed30a8dd9..31d341da57706 100644 --- a/platform-includes/getting-started-config/javascript.astro.mdx +++ b/platform-includes/getting-started-config/javascript.astro.mdx @@ -24,7 +24,7 @@ export default defineConfig({ We recommend passing your configuration directly to the respective `Sentry.init()` calls in `sentry.client.config.js` and `sentry.server.config.js` instead. -### Client-side Setup +### Client-Side Setup ```javascript {filename:sentry.client.config.js} {"onboardingOptions": {"performance": "7,11-13", "session-replay": "8,14-21"}} import * as Sentry from "@sentry/astro"; From 0038e56be84e4cf7ceb62737d362f487d59724e3 Mon Sep 17 00:00:00 2001 From: Charly Gomez Date: Thu, 28 Nov 2024 09:44:20 +0100 Subject: [PATCH 8/9] Update platform-includes/getting-started-next-steps/javascript.astro.mdx Co-authored-by: Alex Krawiec --- .../getting-started-next-steps/javascript.astro.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform-includes/getting-started-next-steps/javascript.astro.mdx b/platform-includes/getting-started-next-steps/javascript.astro.mdx index 2eea23ebc2d12..cb2b119202856 100644 --- a/platform-includes/getting-started-next-steps/javascript.astro.mdx +++ b/platform-includes/getting-started-next-steps/javascript.astro.mdx @@ -1,6 +1,6 @@ ## Advanced Configuration Options -### Changing config files location +### Changing Config Files Location Sentry automatically detects configuration files named `sentry.(client|server).config.js` in the root of your project. You can rename these files or move them to a custom folder within your project. To change their location or names, specify the paths in the Sentry Astro integration options in your `astro.config.mjs`: From 6ad298d7e7b3216981e0b715904f6b6bc8a0d9ae Mon Sep 17 00:00:00 2001 From: Charly Gomez Date: Thu, 28 Nov 2024 09:44:28 +0100 Subject: [PATCH 9/9] Update platform-includes/getting-started-next-steps/javascript.astro.mdx Co-authored-by: Alex Krawiec --- .../getting-started-next-steps/javascript.astro.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform-includes/getting-started-next-steps/javascript.astro.mdx b/platform-includes/getting-started-next-steps/javascript.astro.mdx index cb2b119202856..1346353734d0e 100644 --- a/platform-includes/getting-started-next-steps/javascript.astro.mdx +++ b/platform-includes/getting-started-next-steps/javascript.astro.mdx @@ -49,7 +49,7 @@ If you have multiple request handlers, make sure to add the Sentry middleware as ### Customize Server Instrumentation -Sentry's Astro middleware allows control over what additional data should be added to the recorded request spans. +Sentry's Astro middleware gives you control over what additional data should be added to the recorded request spans. To customize the server instrumentation, add the Sentry middleware to your `src/middleware.js` file: