diff --git a/docs/platforms/javascript/guides/astro/index.mdx b/docs/platforms/javascript/guides/astro/index.mdx
index f591f55b703336..2198559cf62b4a 100644
--- a/docs/platforms/javascript/guides/astro/index.mdx
+++ b/docs/platforms/javascript/guides/astro/index.mdx
@@ -94,7 +94,7 @@ export default defineConfig({
### Client-Side Setup
-```javascript {filename:sentry.client.config.js} {"onboardingOptions": {"performance": "11,14-17", "session-replay": "12,18-25"}}
+```javascript {filename:sentry.client.config.js}
import * as Sentry from "@sentry/astro";
Sentry.init({
@@ -105,13 +105,20 @@ Sentry.init({
sendDefaultPii: true,
integrations: [
+ // ___PRODUCT_OPTION_START___ performance
Sentry.browserTracingIntegration(),
+ // ___PRODUCT_OPTION_END___ performance
+ // ___PRODUCT_OPTION_START___ session-replay
Sentry.replayIntegration(),
+ // ___PRODUCT_OPTION_END___ session-replay
],
+ // ___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
+ // ___PRODUCT_OPTION_START___ session-replay
// 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
@@ -120,14 +127,17 @@ Sentry.init({
// If the entire session is not sampled, use the below sample rate to sample
// sessions when an error occurs.
replaysOnErrorSampleRate: 1.0,
+ // ___PRODUCT_OPTION_END___ session-replay
});
```
### Server-Side Setup
-```javascript {filename:sentry.server.config.js} {"onboardingOptions": {"performance": "15-18", "profiling": "2,10-14,19-22"}}
+```javascript {filename:sentry.server.config.js}
import * as Sentry from "@sentry/astro";
+// ___PRODUCT_OPTION_START___ profiling
import { nodeProfilingIntegration } from '@sentry/profiling-node';
+// ___PRODUCT_OPTION_END___ profiling
Sentry.init({
dsn: "___PUBLIC_DSN___",
@@ -135,19 +145,25 @@ Sentry.init({
// Adds request headers and IP for users, for more info visit: for more info visit:
// https://docs.sentry.io/platforms/javascript/guides/astro/configuration/options/#sendDefaultPii
sendDefaultPii: true,
+ // ___PRODUCT_OPTION_START___ profiling
integrations: [
// Add our Profiling integration
nodeProfilingIntegration(),
],
+ // ___PRODUCT_OPTION_END___ profiling
+ // ___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
+ // ___PRODUCT_OPTION_START___ profiling
// Set sampling rate for profiling
// This is relative to tracesSampleRate
profilesSampleRate: 1.0
+ // ___PRODUCT_OPTION_END___ profiling
});
```
diff --git a/docs/platforms/javascript/guides/aws-lambda/install/cjs-layer.mdx b/docs/platforms/javascript/guides/aws-lambda/install/cjs-layer.mdx
index 7e92a0a6e5eaad..948a081ecb756e 100644
--- a/docs/platforms/javascript/guides/aws-lambda/install/cjs-layer.mdx
+++ b/docs/platforms/javascript/guides/aws-lambda/install/cjs-layer.mdx
@@ -49,10 +49,12 @@ Select which Sentry features you'd like to install in addition to Error Monitori
Set the following environment variables in your Lambda function configuration:
-```bash {"onboardingOptions": {"performance": "3"}}
+```bash
NODE_OPTIONS="-r @sentry/aws-serverless/awslambda-auto"
SENTRY_DSN="___PUBLIC_DSN___"
+# ___PRODUCT_OPTION_START___ performance
SENTRY_TRACES_SAMPLE_RATE="1.0"
+# ___PRODUCT_OPTION_END___ performance
```
To set environment variables, navigate to your Lambda function, select **Configuration**, then **Environment variables**:
@@ -67,7 +69,7 @@ Note that you don't have to actually install an NPM package for this to work, as
Make sure you completed [step 1](#1-prerequisites) and [step 2](#2-add-the-sentry-lambda-layer) before proceeding.
-```javascript {filename:index.js} {"onboardingOptions": {"performance": "9-15"}}
+```javascript {filename:index.js}
const Sentry = require("@sentry/aws-serverless");
Sentry.init({
@@ -76,6 +78,7 @@ Sentry.init({
// Adds request headers and IP for users, for more info visit:
// https://docs.sentry.io/platforms/javascript/guides/aws-lambda/configuration/options/#sendDefaultPii
sendDefaultPii: true,
+ // ___PRODUCT_OPTION_START___ performance
// Add Tracing by setting tracesSampleRate and adding integration
// Set tracesSampleRate to 1.0 to capture 100% of transactions
@@ -83,6 +86,7 @@ Sentry.init({
// Learn more at
// https://docs.sentry.io/platforms/javascript/configuration/options/#traces-sample-rate
tracesSampleRate: 1.0,
+ // ___PRODUCT_OPTION_END___ performance
});
exports.handler = Sentry.wrapHandler(async (event, context) => {
diff --git a/docs/platforms/javascript/guides/aws-lambda/install/cjs-layer__v7.x.mdx b/docs/platforms/javascript/guides/aws-lambda/install/cjs-layer__v7.x.mdx
index 158ebbbc979bc1..7306ede792298c 100644
--- a/docs/platforms/javascript/guides/aws-lambda/install/cjs-layer__v7.x.mdx
+++ b/docs/platforms/javascript/guides/aws-lambda/install/cjs-layer__v7.x.mdx
@@ -52,10 +52,12 @@ Select which Sentry features you'd like to install in addition to Error Monitori
Set the following environment variables in your Lambda function configuration:
-```bash {"onboardingOptions": {"performance": "3"}}
+```bash
NODE_OPTIONS="-r @sentry/serverless/dist/awslambda-auto"
SENTRY_DSN="___PUBLIC_DSN___"
+# ___PRODUCT_OPTION_START___ performance
SENTRY_TRACES_SAMPLE_RATE="1.0"
+# ___PRODUCT_OPTION_END___ performance
```
To set environment variables, navigate to your Lambda function, select **Configuration**, then **Environment variables**.
@@ -68,17 +70,19 @@ Note that you don't have to actually install an NPM package for this to work, as
Make sure you completed [step 1](#1-prerequisites) and [step 2](#2-add-the-sentry-lambda-layer) before proceeding.
-```javascript {filename:index.js} {"onboardingOptions": {"performance": "5-8"}}
+```javascript {filename:index.js}
const Sentry = require("@sentry/serverless");
Sentry.init({
dsn: "___PUBLIC_DSN___",
+ // ___PRODUCT_OPTION_START___ performance
// Add Tracing by setting tracesSampleRate and adding integration
// Set tracesSampleRate to 1.0 to capture 100% of transactions
// 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
});
exports.handler = Sentry.wrapHandler(async (event, context) => {
diff --git a/docs/platforms/javascript/guides/aws-lambda/install/cjs-layer__v8.x.mdx b/docs/platforms/javascript/guides/aws-lambda/install/cjs-layer__v8.x.mdx
index b7ead6200aadc3..865375d771885d 100644
--- a/docs/platforms/javascript/guides/aws-lambda/install/cjs-layer__v8.x.mdx
+++ b/docs/platforms/javascript/guides/aws-lambda/install/cjs-layer__v8.x.mdx
@@ -61,10 +61,12 @@ Select which Sentry features you'd like to install in addition to Error Monitori
Set the following environment variables in your Lambda function configuration:
-```bash {"onboardingOptions": {"performance": "3"}}
+```bash
NODE_OPTIONS="-r @sentry/aws-serverless/awslambda-auto"
SENTRY_DSN="___PUBLIC_DSN___"
+# ___PRODUCT_OPTION_START___ performance
SENTRY_TRACES_SAMPLE_RATE="1.0"
+# ___PRODUCT_OPTION_END___ performance
```
To set environment variables, navigate to your Lambda function, select **Configuration**, then **Environment variables**:
@@ -79,17 +81,19 @@ Note that you don't have to actually install an NPM package for this to work, as
Make sure you completed [step 1](#1-prerequisites) and [step 2](#2-add-the-sentry-lambda-layer) before proceeding.
-```javascript {filename:index.js} {"onboardingOptions": {"performance": "5-8"}}
+```javascript {filename:index.js}
const Sentry = require("@sentry/aws-serverless");
Sentry.init({
dsn: "___PUBLIC_DSN___",
+ // ___PRODUCT_OPTION_START___ performance
// Add Tracing by setting tracesSampleRate and adding integration
// Set tracesSampleRate to 1.0 to capture 100% of transactions
// 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
});
exports.handler = Sentry.wrapHandler(async (event, context) => {
diff --git a/docs/platforms/javascript/guides/aws-lambda/install/cjs-npm.mdx b/docs/platforms/javascript/guides/aws-lambda/install/cjs-npm.mdx
index 6611c9d899a76f..257c7a3dad52fd 100644
--- a/docs/platforms/javascript/guides/aws-lambda/install/cjs-npm.mdx
+++ b/docs/platforms/javascript/guides/aws-lambda/install/cjs-npm.mdx
@@ -62,10 +62,12 @@ pnpm add @sentry/aws-serverless @sentry/profiling-node
Initialize and configure the SDK in your Lambda function Code. Call `Sentry.init` _outside_ of the handler function to avoid re-initializing the SDK on every invocation. Also, add the `Sentry.wrapHandler` wrapper around your function to automatically catch errors and performance data:
-```javascript {filename:index.js} {"onboardingOptions": {"performance": "12-18", "profiling": "2,10-11,17-21"}}
+```javascript {filename:index.js}
const Sentry = require("@sentry/aws-serverless");
+// ___PRODUCT_OPTION_START___ profiling
const { nodeProfilingIntegration } = require("@sentry/profiling-node");
+// ___PRODUCT_OPTION_END___ profiling
Sentry.init({
dsn: "___PUBLIC_DSN___",
@@ -73,17 +75,23 @@ Sentry.init({
// https://docs.sentry.io/platforms/javascript/guides/aws-lambda/configuration/options/#sendDefaultPii
sendDefaultPii: true,
+ // ___PRODUCT_OPTION_START___ profiling
integrations: [nodeProfilingIntegration()],
+ // ___PRODUCT_OPTION_END___ profiling
+ // ___PRODUCT_OPTION_START___ performance
// Add Tracing by setting tracesSampleRate and adding integration
// Set tracesSampleRate to 1.0 to capture 100% of transactions
// 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
+ // ___PRODUCT_OPTION_START___ profiling
// Set sampling rate for profiling - this is relative to tracesSampleRate
profilesSampleRate: 1.0,
+ // ___PRODUCT_OPTION_END___ profiling
});
exports.handler = Sentry.wrapHandler(async (event, context) => {
diff --git a/docs/platforms/javascript/guides/aws-lambda/install/esm-npm.mdx b/docs/platforms/javascript/guides/aws-lambda/install/esm-npm.mdx
index 201edf03f3560c..82255dfac30abe 100644
--- a/docs/platforms/javascript/guides/aws-lambda/install/esm-npm.mdx
+++ b/docs/platforms/javascript/guides/aws-lambda/install/esm-npm.mdx
@@ -82,10 +82,12 @@ export const handler = Sentry.wrapHandler(async (event, context) => {
To initialize and configure the SDK, you need to set the following environment variables in your AWS Lambda function configuration:
-```bash {"onboardingOptions": {"performance": "3"}}
+```bash
NODE_OPTIONS="--import @sentry/aws-serverless/awslambda-auto"
SENTRY_DSN="___PUBLIC_DSN___"
+# ___PRODUCT_OPTION_START___ performance
SENTRY_TRACES_SAMPLE_RATE="1.0"
+# ___PRODUCT_OPTION_END___ performance
```
To set environment variables, navigate to your Lambda function, select **Configuration**, then **Environment variables**:
@@ -107,18 +109,23 @@ Follow steps 1 and 2 above to [install the SDK NPM package](#2-install) in your
Create a new file, for example `instrument.mjs` to initialize the SDK:
-```javascript {filename:instrument.mjs} {"onboardingOptions": {"performance": "12-18", "profiling": "2,10-11,17-21"}}
+```javascript {filename:instrument.mjs}
import * as Sentry from "@sentry/aws-serverless";
+// ___PRODUCT_OPTION_START___ profiling
import { nodeProfilingIntegration } from "@sentry/profiling-node";
+// ___PRODUCT_OPTION_END___ profiling
Sentry.init({
dsn: "___PUBLIC_DSN___",
// Adds request headers and IP for users, for more info visit:
// https://docs.sentry.io/platforms/javascript/guides/aws-lambda/configuration/options/#sendDefaultPii
sendDefaultPii: true,
+ // ___PRODUCT_OPTION_START___ profiling
integrations: [nodeProfilingIntegration()],
+ // ___PRODUCT_OPTION_END___ profiling
+ // ___PRODUCT_OPTION_START___ performance
// Add Tracing by setting tracesSampleRate and adding integration
// Set tracesSampleRate to 1.0 to capture 100% of transactions
@@ -126,9 +133,12 @@ Sentry.init({
// Learn more at
// https://docs.sentry.io/platforms/javascript/configuration/options/#traces-sample-rate
tracesSampleRate: 1.0,
+ // ___PRODUCT_OPTION_END___ performance
+ // ___PRODUCT_OPTION_START___ profiling
// Set sampling rate for profiling - this is relative to tracesSampleRate
profilesSampleRate: 1.0,
+ // ___PRODUCT_OPTION_END___ profiling
});
```
diff --git a/docs/platforms/javascript/guides/azure-functions/index.mdx b/docs/platforms/javascript/guides/azure-functions/index.mdx
index 2d0063374e4b49..2d7f99eb1f70f7 100644
--- a/docs/platforms/javascript/guides/azure-functions/index.mdx
+++ b/docs/platforms/javascript/guides/azure-functions/index.mdx
@@ -27,30 +27,38 @@ Sentry captures data by using an SDK within your application’s runtime. This m
To set up Sentry error logging for an Azure Function:
-```javascript {tabTitle:async} {"onboardingOptions": {"performance": "14-20", "profiling": "2, 10-13, 21-23"}}
+```javascript {tabTitle:async}
const Sentry = require("@sentry/node");
+// ___PRODUCT_OPTION_START___ profiling
const { nodeProfilingIntegration } = require("@sentry/profiling-node");
+// ___PRODUCT_OPTION_END___ profiling
Sentry.init({
dsn: "___PUBLIC_DSN___",
// Adds request headers and IP for users, for more info visit:
// https://docs.sentry.io/platforms/javascript/guides/azure-functions/configuration/options/#sendDefaultPii
sendDefaultPii: true,
+ // ___PRODUCT_OPTION_START___ profiling
integrations: [
nodeProfilingIntegration(),
],
+ // ___PRODUCT_OPTION_END___ profiling
+ // ___PRODUCT_OPTION_START___ performance
// Add Performance Monitoring by setting tracesSampleRate
// Set tracesSampleRate to 1.0 to capture 100% of transactions
// 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
+ // ___PRODUCT_OPTION_START___ profiling
// Set sampling rate for profiling - this is relative to tracesSampleRate
profilesSampleRate: 1.0,
+ // ___PRODUCT_OPTION_END___ profiling
});
module.exports = async function (context, req) {
diff --git a/docs/platforms/javascript/guides/bun/index.mdx b/docs/platforms/javascript/guides/bun/index.mdx
index ec68dad82f0bbd..ba16ab8d754b9d 100644
--- a/docs/platforms/javascript/guides/bun/index.mdx
+++ b/docs/platforms/javascript/guides/bun/index.mdx
@@ -34,7 +34,7 @@ Once this is done, Sentry's Bun SDK captures unhandled exceptions as well as tra
You need to create a file named `instrument.js` that imports and initializes Sentry:
-```javascript {filename: instrument.js} {"onboardingOptions": {"performance": "10-16"}}
+```javascript {filename: instrument.js}
import * as Sentry from "@sentry/bun";
// Ensure to call this before importing any other modules!
@@ -44,6 +44,7 @@ Sentry.init({
// Adds request headers and IP for users, for more info visit:
// https://docs.sentry.io/platforms/javascript/guides/bun/configuration/options/#sendDefaultPii
sendDefaultPii: true,
+ // ___PRODUCT_OPTION_START___ performance
// Add Performance Monitoring by setting tracesSampleRate
// Set tracesSampleRate to 1.0 to capture 100% of transactions
@@ -51,6 +52,7 @@ Sentry.init({
// Learn more at
// https://docs.sentry.io/platforms/javascript/configuration/options/#traces-sample-rate
tracesSampleRate: 1.0,
+ // ___PRODUCT_OPTION_END___ performance
});
```
@@ -78,10 +80,12 @@ import http from "http";
This snippet includes an intentional error, so you can test that everything is working as soon as you set it up.
-```javascript {"onboardingOptions": {"performance": "1-4, 12"}}
+```javascript
+// ___PRODUCT_OPTION_START___ performance
Sentry.startSpan({
op: "test",
name: "My First Test Transaction",
+// ___PRODUCT_OPTION_END___ performance
}, () => {
setTimeout(() => {
try {
@@ -90,7 +94,9 @@ Sentry.startSpan({
Sentry.captureException(e);
}
}, 99);
+// ___PRODUCT_OPTION_START___ performance
});
+// ___PRODUCT_OPTION_END___ performance
```
diff --git a/docs/platforms/javascript/guides/capacitor/index.mdx b/docs/platforms/javascript/guides/capacitor/index.mdx
index 987eb8a38a07e7..3eaee2be941cd1 100644
--- a/docs/platforms/javascript/guides/capacitor/index.mdx
+++ b/docs/platforms/javascript/guides/capacitor/index.mdx
@@ -91,7 +91,7 @@ Configuration should happen as early as possible in your application's lifecycle
Then forward the `init` method from the sibling Sentry SDK for the framework you use, such as Angular in this example:
-```typescript {tabTitle: Angular 14+} {filename: app.module.ts} {"onboardingOptions": {"performance": "17-20, 25-34, 54-63", "session-replay": "21-23, 35-42"}}
+```typescript {tabTitle: Angular 14+} {filename: app.module.ts}
import * as Sentry from "@sentry/capacitor";
import * as SentryAngular from "@sentry/angular";
@@ -108,14 +108,19 @@ Sentry.init(
// Set your dist version, such as "1"
dist: "",
integrations: [
+ // ___PRODUCT_OPTION_START___ performance
// Registers and configures the Tracing integration,
// which automatically instruments your application to monitor its
// performance, including custom Angular routing instrumentation
Sentry.browserTracingIntegration(),
+ // ___PRODUCT_OPTION_END___ performance
+ // ___PRODUCT_OPTION_START___ session-replay
// Registers the Replay integration,
// which automatically captures Session Replays
Sentry.replayIntegration(),
+ // ___PRODUCT_OPTION_END___ session-replay
],
+ // ___PRODUCT_OPTION_START___ performance
// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for tracing.
@@ -126,6 +131,8 @@ Sentry.init(
// Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled
tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/],
+ // ___PRODUCT_OPTION_END___ performance
+ // ___PRODUCT_OPTION_START___ session-replay
// Capture Replay for 10% of all sessions,
// plus for 100% of sessions with an error
@@ -133,6 +140,7 @@ Sentry.init(
// https://docs.sentry.io/platforms/javascript/session-replay/configuration/#general-integration-configuration
replaysSessionSampleRate: 0.1,
replaysOnErrorSampleRate: 1.0,
+ // ___PRODUCT_OPTION_END___ session-replay
},
// Forward the init method from @sentry/angular
SentryAngular.init
@@ -145,6 +153,7 @@ Sentry.init(
// Attach the Sentry ErrorHandler
useValue: SentryAngular.createErrorHandler(),
},
+ // ___PRODUCT_OPTION_START___ performance
{
provide: SentryAngular.TraceService,
deps: [Router],
@@ -155,11 +164,12 @@ Sentry.init(
deps: [SentryAngular.TraceService],
multi: true,
},
+ // ___PRODUCT_OPTION_END___ performance
],
})
```
-```typescript {tabTitle: Angular 12, 13} {filename: app.module.ts} {"onboardingOptions": {"performance": "18-21, 26-35, 55-64", "session-replay": "22-24, 36-40"}}
+```typescript {tabTitle: Angular 12, 13} {filename: app.module.ts}
// Requires @sentry/capacitor V0.
import * as Sentry from "@sentry/capacitor";
import * as SentryAngular from "@sentry/angular-ivy";
@@ -177,15 +187,20 @@ Sentry.init(
// Set your dist version, such as "1"
dist: "",
integrations: [
+ // ___PRODUCT_OPTION_START___ performance
// Registers and configures the Tracing integration,
// which automatically instruments your application to monitor its
// performance, including custom Angular routing instrumentation
new Sentry.BrowserTracing(),
+ // ___PRODUCT_OPTION_END___ performance
+ // ___PRODUCT_OPTION_START___ session-replay
// Registers the Replay integration,
// which automatically captures Session Replays
new Sentry.Replay(),
+ // ___PRODUCT_OPTION_END___ session-replay
],
+ // ___PRODUCT_OPTION_START___ performance
// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for tracing.
// We recommend adjusting this value in production
@@ -195,6 +210,8 @@ Sentry.init(
// Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled
tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/],
+ // ___PRODUCT_OPTION_END___ performance
+ // ___PRODUCT_OPTION_START___ session-replay
// Capture Replay for 10% of all sessions,
// plus for 100% of sessions with an error
@@ -228,7 +245,7 @@ Sentry.init(
})
```
-```typescript {tabTitle: React} {filename: index.tsx} {"onboardingOptions": {"performance": "17-20, 25-34, 50-59", "session-replay": "21-23, 33-41"}}
+```typescript {tabTitle: React} {filename: index.tsx}
import * as Sentry from "@sentry/capacitor";
import * as SentryReact from "@sentry/react";
@@ -245,14 +262,19 @@ Sentry.init(
// Set your dist version, such as "1"
dist: "",
integrations: [
+ // ___PRODUCT_OPTION_START___ performance
// Registers and configures the Tracing integration,
// which automatically instruments your application to monitor its
// performance, including custom Angular routing instrumentation
Sentry.browserTracingIntegration(),
+ // ___PRODUCT_OPTION_END___ performance
+ // ___PRODUCT_OPTION_START___ session-replay
// Registers the Replay integration,
// which automatically captures Session Replays
Sentry.replayIntegration(),
+ // ___PRODUCT_OPTION_END___ session-replay
],
+ // ___PRODUCT_OPTION_START___ performance
// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for tracing.
@@ -263,6 +285,8 @@ Sentry.init(
// Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled
tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/],
+ // ___PRODUCT_OPTION_END___ performance
+ // ___PRODUCT_OPTION_START___ session-replay
// Capture Replay for 10% of all sessions,
// plus for 100% of sessions with an error
@@ -270,13 +294,14 @@ Sentry.init(
// https://docs.sentry.io/platforms/javascript/session-replay/configuration/#general-integration-configuration
replaysSessionSampleRate: 0.1,
replaysOnErrorSampleRate: 1.0,
+ // ___PRODUCT_OPTION_END___ session-replay
},
// Forward the init method from @sentry/angular
SentryReact.init
);
```
-```typescript {tabTitle: Vue} {filename: main.ts} {"onboardingOptions": {"performance": "21-24, 29-38, 54-63", "session-replay": "25-27, 37-45"}}
+```typescript {tabTitle: Vue} {filename: main.ts}
import * as Sentry from "@sentry/capacitor";
import * as SentryVue from "@sentry/vue";
import { createApp } from 'vue'
@@ -297,14 +322,19 @@ Sentry.init(
// Set your dist version, such as "1"
dist: "",
integrations: [
+ // ___PRODUCT_OPTION_START___ performance
// Registers and configures the Tracing integration,
// which automatically instruments your application to monitor its
// performance, including custom Angular routing instrumentation
Sentry.browserTracingIntegration(),
+ // ___PRODUCT_OPTION_END___ performance
+ // ___PRODUCT_OPTION_START___ session-replay
// Registers the Replay integration,
// which automatically captures Session Replays
Sentry.replayIntegration(),
+ // ___PRODUCT_OPTION_END___ session-replay
],
+ // ___PRODUCT_OPTION_START___ performance
// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for tracing.
@@ -315,6 +345,8 @@ Sentry.init(
// Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled
tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/],
+ // ___PRODUCT_OPTION_END___ performance
+ // ___PRODUCT_OPTION_START___ session-replay
// Capture Replay for 10% of all sessions,
// plus for 100% of sessions with an error
@@ -322,6 +354,7 @@ Sentry.init(
// https://docs.sentry.io/platforms/javascript/session-replay/configuration/#general-integration-configuration
replaysSessionSampleRate: 0.1,
replaysOnErrorSampleRate: 1.0,
+ // ___PRODUCT_OPTION_END___ session-replay
},
// Forward the init method from @sentry/angular
diff --git a/docs/platforms/javascript/guides/cloudflare/index.mdx b/docs/platforms/javascript/guides/cloudflare/index.mdx
index f3118d308e32b8..9e8a6a700eef66 100644
--- a/docs/platforms/javascript/guides/cloudflare/index.mdx
+++ b/docs/platforms/javascript/guides/cloudflare/index.mdx
@@ -65,7 +65,7 @@ To use this SDK, add the `sentryPagesPlugin` as [middleware to your Cloudflare P
We recommend adding a `functions/_middleware.js` for the middleware setup so that Sentry is initialized for your entire
app.
-```javascript {filename:functions/_middleware.js} {"onboardingOptions": {"performance": "11-15"}}
+```javascript {filename:functions/_middleware.js}
import * as Sentry from "@sentry/cloudflare";
export const onRequest = [
@@ -77,10 +77,12 @@ export const onRequest = [
// https://docs.sentry.io/platforms/javascript/guides/cloudflare/configuration/options/#sendDefaultPii
sendDefaultPii: true,
+ // ___PRODUCT_OPTION_START___ performance
// Set tracesSampleRate to 1.0 to capture 100% of spans for tracing.
// Learn more at
// https://docs.sentry.io/platforms/javascript/configuration/options/#traces-sample-rate
tracesSampleRate: 1.0,
+ // ___PRODUCT_OPTION_END___ performance
})),
// Add more middlewares here
];
@@ -91,16 +93,18 @@ export const onRequest = [
To use this SDK, wrap your handler with the `withSentry` function. This will initialize the SDK and hook into the
environment. Note that you can turn off almost all side effects using the respective options.
-```typescript {filename:index.ts} {"onboardingOptions": {"performance": "6-9"}}
+```typescript {filename:index.ts}
import * as Sentry from "@sentry/cloudflare";
export default Sentry.withSentry(
(env) => ({
dsn: "___PUBLIC_DSN___",
+ // ___PRODUCT_OPTION_START___ performance
// 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,
+ // ___PRODUCT_OPTION_END___ performance
}),
{
async fetch(request, env, ctx) {
diff --git a/docs/platforms/javascript/guides/deno/index.mdx b/docs/platforms/javascript/guides/deno/index.mdx
index ef54f5dd2f2159..a789460fb5e2bc 100644
--- a/docs/platforms/javascript/guides/deno/index.mdx
+++ b/docs/platforms/javascript/guides/deno/index.mdx
@@ -29,7 +29,7 @@ Select which Sentry features you'd like to install in addition to Error Monitori
-```javascript {tabTitle: Deno} {"onboardingOptions": {"performance": "9-15" }}
+```javascript {tabTitle: Deno}
import * as Sentry from "npm:@sentry/deno";
Sentry.init({
@@ -38,6 +38,7 @@ Sentry.init({
// Adds request headers and IP for users, for more info visit:
// https://docs.sentry.io/platforms/javascript/guides/deno/configuration/options/#sendDefaultPii
sendDefaultPii: true,
+ // ___PRODUCT_OPTION_START___ performance
// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for performance monitoring.
@@ -45,14 +46,16 @@ Sentry.init({
// Learn more at
// https://docs.sentry.io/platforms/javascript/configuration/options/#traces-sample-rate
tracesSampleRate: 1.0,
+ // ___PRODUCT_OPTION_END___ performance
});
```
-```javascript {tabTitle: npm} {"onboardingOptions": {"performance": "5-11" }}
+```javascript {tabTitle: npm}
import * as Sentry from "@sentry/deno";
Sentry.init({
dsn: "___PUBLIC_DSN___",
+ // ___PRODUCT_OPTION_START___ performance
// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for performance monitoring.
@@ -60,6 +63,7 @@ Sentry.init({
// Learn more at
// https://docs.sentry.io/platforms/javascript/configuration/options/#traces-sample-rate
tracesSampleRate: 1.0,
+ // ___PRODUCT_OPTION_END___ performance
});
```
To ensure the SDK can send events, you should enable network access for your
diff --git a/docs/platforms/javascript/guides/electron/index.mdx b/docs/platforms/javascript/guides/electron/index.mdx
index e1f29be9cf2497..91d14fa5dbd05c 100644
--- a/docs/platforms/javascript/guides/electron/index.mdx
+++ b/docs/platforms/javascript/guides/electron/index.mdx
@@ -47,7 +47,7 @@ Sentry.init({
In the Electron `renderer` process:
-```javascript {"onboardingOptions": {"performance": "8, 11-17", "session-replay": "9, 18-24"}}
+```javascript
import * as Sentry from "@sentry/electron/renderer";
Sentry.init({
@@ -55,9 +55,14 @@ Sentry.init({
// https://docs.sentry.io/platforms/javascript/guides/electron/configuration/options/#sendDefaultPii
sendDefaultPii: true,
integrations: [
+ // ___PRODUCT_OPTION_START___ performance
Sentry.browserTracingIntegration(),
+ // ___PRODUCT_OPTION_END___ performance
+ // ___PRODUCT_OPTION_START___ session-replay
Sentry.replayIntegration(),
+ // ___PRODUCT_OPTION_END___ session-replay
],
+ // ___PRODUCT_OPTION_START___ performance
// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for performance monitoring.
@@ -65,6 +70,8 @@ Sentry.init({
// Learn more at
// https://docs.sentry.io/platforms/javascript/configuration/options/#traces-sample-rate
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
@@ -72,6 +79,7 @@ Sentry.init({
// https://docs.sentry.io/platforms/javascript/session-replay/configuration/#general-integration-configuration
replaysSessionSampleRate: 0.1,
replaysOnErrorSampleRate: 1.0,
+ // ___PRODUCT_OPTION_END___ session-replay
});
```
diff --git a/docs/platforms/javascript/guides/ember/index.mdx b/docs/platforms/javascript/guides/ember/index.mdx
index 758da3ab6e4340..6ce52dade456dc 100644
--- a/docs/platforms/javascript/guides/ember/index.mdx
+++ b/docs/platforms/javascript/guides/ember/index.mdx
@@ -36,7 +36,7 @@ Configuration should happen as early as possible in your application's lifecycle
This snippet includes automatic instrumentation to monitor the performance of your application, which registers and configures the Tracing integration, including custom [Ember instrumentation](./configuration/ember-options/).
-```javascript {"onboardingOptions": {"performance": "16-23", "session-replay": "14-15, 23-29"}}
+```javascript
import Application from "@ember/application";
import Resolver from "ember-resolver";
import loadInitializers from "ember-load-initializers";
@@ -51,7 +51,10 @@ Sentry.init({
// https://docs.sentry.io/platforms/javascript/guides/ember/configuration/options/#sendDefaultPii
sendDefaultPii: true,
+ // ___PRODUCT_OPTION_START___ session-replay
integrations: [Sentry.replayIntegration()],
+ // ___PRODUCT_OPTION_END___ session-replay
+ // ___PRODUCT_OPTION_START___ performance
// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for tracing.
@@ -59,6 +62,8 @@ Sentry.init({
// Learn more at
// https://docs.sentry.io/platforms/javascript/configuration/options/#traces-sample-rate
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
@@ -66,6 +71,7 @@ Sentry.init({
// https://docs.sentry.io/platforms/javascript/session-replay/configuration/#general-integration-configuration
replaysSessionSampleRate: 0.1,
replaysOnErrorSampleRate: 1.0,
+ // ___PRODUCT_OPTION_END___ session-replay
});
export default class App extends Application {
diff --git a/docs/platforms/javascript/guides/gatsby/index.mdx b/docs/platforms/javascript/guides/gatsby/index.mdx
index 5894ed1cf9d59b..da8f532b8b2ce1 100644
--- a/docs/platforms/javascript/guides/gatsby/index.mdx
+++ b/docs/platforms/javascript/guides/gatsby/index.mdx
@@ -54,7 +54,7 @@ module.exports = {
Then, configure your `Sentry.init`. For this, create a new file called `sentry.config.js` in the root of your project and add the following code:
-```javascript {filename:sentry.config.(js|ts)} {"onboardingOptions": {"performance": "11, 15-20", "session-replay": "12, 21-27"}}
+```javascript {filename:sentry.config.(js|ts)}
import * as Sentry from "@sentry/gatsby";
Sentry.init({
@@ -65,9 +65,14 @@ Sentry.init({
sendDefaultPii: true,
integrations: [
+ // ___PRODUCT_OPTION_START___ performance
Sentry.browserTracingIntegration(),
+ // ___PRODUCT_OPTION_END___ performance
+ // ___PRODUCT_OPTION_START___ session-replay
Sentry.replayIntegration(),
+ // ___PRODUCT_OPTION_END___ session-replay
],
+ // ___PRODUCT_OPTION_START___ performance
// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for tracing.
@@ -75,6 +80,8 @@ Sentry.init({
// Learn more at
// https://docs.sentry.io/platforms/javascript/configuration/options/#traces-sample-rate
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
@@ -82,5 +89,6 @@ Sentry.init({
// https://docs.sentry.io/platforms/javascript/session-replay/configuration/#general-integration-configuration
replaysSessionSampleRate: 0.1,
replaysOnErrorSampleRate: 1.0,
+ // ___PRODUCT_OPTION_END___ session-replay
});
```
diff --git a/docs/platforms/javascript/guides/gcp-functions/index.mdx b/docs/platforms/javascript/guides/gcp-functions/index.mdx
index 52b7e4a4020b8a..a1262cc0dc057a 100644
--- a/docs/platforms/javascript/guides/gcp-functions/index.mdx
+++ b/docs/platforms/javascript/guides/gcp-functions/index.mdx
@@ -35,7 +35,7 @@ Add `@sentry/google-cloud-serverless` as a dependency to `package.json`:
To set up Sentry for a Google Cloud Function:
-```javascript {tabTitle:Http functions} {"onboardingOptions": {"performance": "9-15"}}
+```javascript {tabTitle:Http functions}
const Sentry = require("@sentry/google-cloud-serverless");
Sentry.init({
@@ -44,6 +44,7 @@ Sentry.init({
// Adds request headers and IP for users, for more info visit:
// https://docs.sentry.io/platforms/javascript/guides/gcp-functions/configuration/options/#sendDefaultPii
sendDefaultPii: true,
+ // ___PRODUCT_OPTION_START___ performance
// Add Tracing by setting tracesSampleRate and adding integration
// Set tracesSampleRate to 1.0 to capture 100% of transactions
@@ -51,6 +52,7 @@ Sentry.init({
// Learn more at
// https://docs.sentry.io/platforms/javascript/configuration/options/#traces-sample-rate
tracesSampleRate: 1.0,
+ // ___PRODUCT_OPTION_END___ performance
});
exports.helloHttp = Sentry.wrapHttpFunction((req, res) => {
@@ -58,12 +60,14 @@ exports.helloHttp = Sentry.wrapHttpFunction((req, res) => {
});
```
-```javascript {tabTitle:Background functions} {"onboardingOptions": {"performance": "5"}}
+```javascript {tabTitle:Background functions}
const Sentry = require("@sentry/google-cloud-serverless");
Sentry.init({
dsn: "___PUBLIC_DSN___",
+ // ___PRODUCT_OPTION_START___ performance
tracesSampleRate: 1.0,
+ // ___PRODUCT_OPTION_END___ performance
});
exports.helloEvents = Sentry.wrapEventFunction(
@@ -73,12 +77,14 @@ exports.helloEvents = Sentry.wrapEventFunction(
);
```
-```javascript {tabTitle:CloudEvent functions} {"onboardingOptions": {"performance": "5"}}
+```javascript {tabTitle:CloudEvent functions}
const Sentry = require("@sentry/google-cloud-serverless");
Sentry.init({
dsn: "___PUBLIC_DSN___",
+ // ___PRODUCT_OPTION_START___ performance
tracesSampleRate: 1.0,
+ // ___PRODUCT_OPTION_END___ performance
});
exports.helloEvents = Sentry.wrapCloudEventFunction(
diff --git a/docs/platforms/javascript/guides/nextjs/manual-setup.mdx b/docs/platforms/javascript/guides/nextjs/manual-setup.mdx
index 11f9a612185ae5..7833572146c572 100644
--- a/docs/platforms/javascript/guides/nextjs/manual-setup.mdx
+++ b/docs/platforms/javascript/guides/nextjs/manual-setup.mdx
@@ -94,7 +94,7 @@ Create three files in your application's root directory: `sentry.server.config.(
slightly different, so copy them carefully.
-```javascript {tabTitle:Client} {filename:instrumentation-client.(js|ts)} {"onboardingOptions": {"performance": "9-15", "session-replay": "16-24"}}
+```javascript {tabTitle:Client} {filename:instrumentation-client.(js|ts)}
import * as Sentry from "@sentry/nextjs";
Sentry.init({
@@ -103,6 +103,7 @@ Sentry.init({
// Adds request headers and IP for users, for more info visit:
// https://docs.sentry.io/platforms/javascript/guides/nextjs/configuration/options/#sendDefaultPii
sendDefaultPii: true,
+ // ___PRODUCT_OPTION_START___ performance
// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for tracing.
@@ -110,7 +111,9 @@ Sentry.init({
// Learn more at
// https://docs.sentry.io/platforms/javascript/configuration/options/#traces-sample-rate
tracesSampleRate: 1.0,
+ // ___PRODUCT_OPTION_END___ performance
// Replay may only be enabled for the client-side
+ // ___PRODUCT_OPTION_START___ session-replay
integrations: [Sentry.replayIntegration()],
// Capture Replay for 10% of all sessions,
@@ -120,6 +123,7 @@ Sentry.init({
replaysSessionSampleRate: 0.1,
replaysOnErrorSampleRate: 1.0,
+ // ___PRODUCT_OPTION_END___ session-replay
// Note: if you want to override the automatic release value, do not set a
// `release` value here - use the environment variable `SENTRY_RELEASE`, so
// that it will also get attached to your source maps
@@ -130,7 +134,7 @@ Sentry.init({
export const onRouterTransitionStart = Sentry.captureRouterTransitionStart;
```
-```javascript {tabTitle:Server} {filename:sentry.server.config.(js|ts)} {"onboardingOptions": {"performance": "9-15"}}
+```javascript {tabTitle:Server} {filename:sentry.server.config.(js|ts)}
import * as Sentry from "@sentry/nextjs";
Sentry.init({
@@ -139,6 +143,7 @@ Sentry.init({
// Adds request headers and IP for users, for more info visit:
// https://docs.sentry.io/platforms/javascript/guides/nextjs/configuration/options/#sendDefaultPii
sendDefaultPii: true,
+ // ___PRODUCT_OPTION_START___ performance
// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for tracing.
@@ -146,6 +151,7 @@ Sentry.init({
// Learn more at
// https://docs.sentry.io/platforms/javascript/configuration/options/#traces-sample-rate
tracesSampleRate: 1.0,
+ // ___PRODUCT_OPTION_END___ performance
// ...
@@ -155,7 +161,7 @@ Sentry.init({
});
```
-```javascript {tabTitle:Edge} {filename:sentry.edge.config.(js|ts)} {"onboardingOptions": {"performance": "9-15"}}
+```javascript {tabTitle:Edge} {filename:sentry.edge.config.(js|ts)}
import * as Sentry from "@sentry/nextjs";
Sentry.init({
@@ -164,6 +170,7 @@ Sentry.init({
// Adds request headers and IP for users, for more info visit:
// https://docs.sentry.io/platforms/javascript/guides/nextjs/configuration/options/#sendDefaultPii
sendDefaultPii: true,
+ // ___PRODUCT_OPTION_START___ performance
// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for tracing.
@@ -171,6 +178,7 @@ Sentry.init({
// Learn more at
// https://docs.sentry.io/platforms/javascript/configuration/options/#traces-sample-rate
tracesSampleRate: 1.0,
+ // ___PRODUCT_OPTION_END___ performance
// ...
diff --git a/docs/platforms/javascript/guides/nuxt/manual-setup.mdx b/docs/platforms/javascript/guides/nuxt/manual-setup.mdx
index e47f78ad1f99c9..06a864f61c5bee 100644
--- a/docs/platforms/javascript/guides/nuxt/manual-setup.mdx
+++ b/docs/platforms/javascript/guides/nuxt/manual-setup.mdx
@@ -88,7 +88,7 @@ export default defineNuxtConfig({
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:
-```javascript {filename:sentry.client.config.ts} {"onboardingOptions": {"performance": "15-21", "session-replay": "13-14, 22-28"}}
+```javascript {filename:sentry.client.config.ts}
import * as Sentry from "@sentry/nuxt";
Sentry.init({
@@ -100,9 +100,12 @@ Sentry.init({
// Adds request headers and IP for users, for more info visit:
// https://docs.sentry.io/platforms/javascript/guides/nuxt/configuration/options/#sendDefaultPii
sendDefaultPii: true,
-
+ // ___PRODUCT_OPTION_START___ session-replay
+
// Replay may only be enabled for the client-side
integrations: [Sentry.replayIntegration()],
+ // ___PRODUCT_OPTION_END___ session-replay
+ // ___PRODUCT_OPTION_START___ performance
// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for tracing.
@@ -110,6 +113,8 @@ Sentry.init({
// Learn more at
// https://docs.sentry.io/platforms/javascript/configuration/options/#traces-sample-rate
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
@@ -117,6 +122,7 @@ Sentry.init({
// https://docs.sentry.io/platforms/javascript/session-replay/configuration/#general-integration-configuration
replaysSessionSampleRate: 0.1,
replaysOnErrorSampleRate: 1.0,
+ // ___PRODUCT_OPTION_END___ session-replay
});
```
@@ -141,11 +147,12 @@ This allows you to access the DSN using `useRuntimeConfig().public.sentry.dsn`.
Add a `sentry.server.config.ts` file to the root of your project and add the following initialization code to it:
-```javascript {filename:sentry.server.config.ts} {"onboardingOptions": {"performance": "5-11"}}
+```javascript {filename:sentry.server.config.ts}
import * as Sentry from "@sentry/nuxt";
Sentry.init({
dsn: "___PUBLIC_DSN___",
+ // ___PRODUCT_OPTION_START___ performance
// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for tracing.
@@ -153,6 +160,7 @@ Sentry.init({
// Learn more at
// https://docs.sentry.io/platforms/javascript/configuration/options/#traces-sample-rate
tracesSampleRate: 1.0,
+ // ___PRODUCT_OPTION_END___ performance
});
```
diff --git a/docs/platforms/javascript/guides/react-router/index.mdx b/docs/platforms/javascript/guides/react-router/index.mdx
index a1d22fbbb6b0c0..1a06ea0c904d30 100644
--- a/docs/platforms/javascript/guides/react-router/index.mdx
+++ b/docs/platforms/javascript/guides/react-router/index.mdx
@@ -83,7 +83,7 @@ npx react-router reveal
Initialize the Sentry React SDK in your `entry.client.tsx` file:
-```tsx {filename: entry.client.tsx} {"onboardingOptions": {"performance": "14, 17-21", "session-replay": "15, 22-26"}}
+```tsx {filename: entry.client.tsx}
import * as Sentry from "@sentry/react-router";
import { startTransition, StrictMode } from "react";
import { hydrateRoot } from "react-dom/client";
@@ -97,19 +97,27 @@ Sentry.init({
sendDefaultPii: true,
integrations: [
+ // ___PRODUCT_OPTION_START___ performance
Sentry.browserTracingIntegration(),
+ // ___PRODUCT_OPTION_END___ performance
+ // ___PRODUCT_OPTION_START___ session-replay
Sentry.replayIntegration(),
+ // ___PRODUCT_OPTION_END___ session-replay
],
+ // ___PRODUCT_OPTION_START___ performance
tracesSampleRate: 1.0, // Capture 100% of the transactions
// Set `tracePropagationTargets` to declare which URL(s) should have trace propagation enabled
tracePropagationTargets: [/^\//, /^https:\/\/yourserver\.io\/api/],
+ // ___PRODUCT_OPTION_END___ performance
+ // ___PRODUCT_OPTION_START___ session-replay
// Capture Replay for 10% of all sessions,
// plus 100% of sessions with an error
replaysSessionSampleRate: 0.1,
replaysOnErrorSampleRate: 1.0,
+ // ___PRODUCT_OPTION_END___ session-replay
});
startTransition(() => {
@@ -166,9 +174,11 @@ export function ErrorBoundary({ error }: Route.ErrorBoundaryProps) {
Create an `instrument.server.mjs` file in the root of your app:
-```js {filename: instrument.server.mjs} {"onboardingOptions": {"performance": "12", "profiling": "2, 10-11, 13"}}
+```js {filename: instrument.server.mjs}
import * as Sentry from "@sentry/react-router";
+// ___PRODUCT_OPTION_START___ profiling
import { nodeProfilingIntegration } from '@sentry/profiling-node';
+// ___PRODUCT_OPTION_END___ profiling
Sentry.init({
dsn: "___PUBLIC_DSN___",
@@ -176,10 +186,16 @@ Sentry.init({
// Adds request headers and IP for users, for more info visit:
// https://docs.sentry.io/platforms/javascript/guides/react-router/configuration/options/#sendDefaultPii
sendDefaultPii: true,
+ // ___PRODUCT_OPTION_START___ profiling
integrations: [nodeProfilingIntegration()],
+ // ___PRODUCT_OPTION_END___ profiling
+ // ___PRODUCT_OPTION_START___ performance
tracesSampleRate: 1.0, // Capture 100% of the transactions
+ // ___PRODUCT_OPTION_END___ performance
+ // ___PRODUCT_OPTION_START___ profiling
profilesSampleRate: 1.0, // profile every transaction
+ // ___PRODUCT_OPTION_END___ profiling
});
```
diff --git a/docs/platforms/javascript/guides/react/index.mdx b/docs/platforms/javascript/guides/react/index.mdx
index b7fa5c6a7464ed..afef4a7ea5d168 100644
--- a/docs/platforms/javascript/guides/react/index.mdx
+++ b/docs/platforms/javascript/guides/react/index.mdx
@@ -41,7 +41,7 @@ pnpm add @sentry/react
To import and initialize Sentry, create a file in your project's root directory, for example, `instrument.js`, and add the following code:
-```javascript {filename:instrument.js} {"onboardingOptions": {"performance": "11-14, 17-25", "session-replay": "15, 26-32"}}
+```javascript {filename:instrument.js}
import * as Sentry from "@sentry/react";
Sentry.init({
@@ -52,13 +52,18 @@ Sentry.init({
sendDefaultPii: true,
integrations: [
+ // ___PRODUCT_OPTION_START___ performance
// If you're using react router, use the integration for your react router version instead.
// Learn more at
// https://docs.sentry.io/platforms/javascript/guides/react/configuration/integrations/react-router/
Sentry.browserTracingIntegration(),
+ // ___PRODUCT_OPTION_END___ performance
+ // ___PRODUCT_OPTION_START___ session-replay
Sentry.replayIntegration(),
+ // ___PRODUCT_OPTION_END___ session-replay
],
+ // ___PRODUCT_OPTION_START___ performance
// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for tracing.
// Learn more at
@@ -67,6 +72,8 @@ Sentry.init({
// Set `tracePropagationTargets` to control for which URLs trace propagation should be enabled
tracePropagationTargets: [/^\//, /^https:\/\/yourserver\.io\/api/],
+ // ___PRODUCT_OPTION_END___ performance
+ // ___PRODUCT_OPTION_START___ session-replay
// Capture Replay for 10% of all sessions,
// plus for 100% of sessions with an error
@@ -74,6 +81,7 @@ Sentry.init({
// https://docs.sentry.io/platforms/javascript/session-replay/configuration/#general-integration-configuration
replaysSessionSampleRate: 0.1,
replaysOnErrorSampleRate: 1.0,
+ // ___PRODUCT_OPTION_END___ session-replay
});
```
diff --git a/docs/platforms/javascript/guides/remix/manual-setup.mdx b/docs/platforms/javascript/guides/remix/manual-setup.mdx
index f47353a625a390..52379832556305 100644
--- a/docs/platforms/javascript/guides/remix/manual-setup.mdx
+++ b/docs/platforms/javascript/guides/remix/manual-setup.mdx
@@ -38,7 +38,7 @@ To use this SDK, initialize Sentry in your Remix project for both the client and
### Client-side Configuration
-```typescript {tabTitle:Client} {filename: entry.client.tsx} {"onboardingOptions": {"performance": "12-17,21-28", "session-replay": "18-19,29-33"}}
+```typescript {tabTitle:Client} {filename: entry.client.tsx}
import { useLocation, useMatches } from "@remix-run/react";
import * as Sentry from "@sentry/remix";
import { useEffect } from "react";
@@ -51,14 +51,19 @@ Sentry.init({
sendDefaultPii: true,
integrations: [
+ // ___PRODUCT_OPTION_START___ performance
Sentry.browserTracingIntegration({
useEffect,
useLocation,
useMatches,
}),
+ // ___PRODUCT_OPTION_END___ performance
+ // ___PRODUCT_OPTION_START___ session-replay
// Replay is only available in the client
Sentry.replayIntegration(),
+ // ___PRODUCT_OPTION_END___ session-replay
],
+ // ___PRODUCT_OPTION_START___ performance
// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for tracing.
@@ -69,6 +74,8 @@ Sentry.init({
// Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled
tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/],
+ // ___PRODUCT_OPTION_END___ performance
+ // ___PRODUCT_OPTION_START___ session-replay
// Capture Replay for 10% of all sessions,
// plus for 100% of sessions with an error
@@ -76,6 +83,7 @@ Sentry.init({
// https://docs.sentry.io/platforms/javascript/session-replay/configuration/#general-integration-configuration
replaysSessionSampleRate: 0.1,
replaysOnErrorSampleRate: 1.0,
+ // ___PRODUCT_OPTION_END___ session-replay
});
```
@@ -133,7 +141,7 @@ export default withSentry(App);
Create an instrumentation file (named here as `instrument.server.mjs`) in your project. Add your initialization code in this file for the server-side SDK.
-```typescript {tabTitle:Server} {filename: instrument.server.mjs} {"onboardingOptions": {"performance": "9-15"}}
+```typescript {tabTitle:Server} {filename: instrument.server.mjs}
import * as Sentry from "@sentry/remix";
Sentry.init({
@@ -142,6 +150,7 @@ Sentry.init({
// Adds request headers and IP for users, for more info visit: and captures action formData attributes
// https://docs.sentry.io/platforms/javascript/guides/remix/configuration/options/#sendDefaultPii
sendDefaultPii: true,
+ // ___PRODUCT_OPTION_START___ performance
// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for tracing.
@@ -149,6 +158,7 @@ Sentry.init({
// Learn more at
// https://docs.sentry.io/platforms/javascript/configuration/options/#traces-sample-rate
tracesSampleRate: 1.0,
+ // ___PRODUCT_OPTION_END___ performance
// Optionally capture action formData attributes with errors.
// This requires `sendDefaultPii` set to true as well.
diff --git a/docs/platforms/javascript/guides/remix/manual-setup__v8.x.mdx b/docs/platforms/javascript/guides/remix/manual-setup__v8.x.mdx
index 7a27030a881033..dac12085efcef0 100644
--- a/docs/platforms/javascript/guides/remix/manual-setup__v8.x.mdx
+++ b/docs/platforms/javascript/guides/remix/manual-setup__v8.x.mdx
@@ -39,7 +39,7 @@ To use this SDK, initialize Sentry in your Remix project for both the client and
### Client-side Configuration
-```typescript {tabTitle:Client} {filename: entry.client.tsx} {"onboardingOptions": {"performance": "8-12,16-23", "session-replay": "13-14,24-28"}}
+```typescript {tabTitle:Client} {filename: entry.client.tsx}
import { useLocation, useMatches } from "@remix-run/react";
import * as Sentry from "@sentry/remix";
import { useEffect } from "react";
@@ -47,15 +47,20 @@ import { useEffect } from "react";
Sentry.init({
dsn: "___PUBLIC_DSN___",
integrations: [
+ // ___PRODUCT_OPTION_START___ performance
Sentry.browserTracingIntegration({
useEffect,
useLocation,
useMatches,
}),
+ // ___PRODUCT_OPTION_END___ performance
+ // ___PRODUCT_OPTION_START___ session-replay
// Replay is only available in the client
Sentry.replayIntegration(),
+ // ___PRODUCT_OPTION_END___ session-replay
],
+ // ___PRODUCT_OPTION_START___ performance
// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for tracing.
// We recommend adjusting this value in production
@@ -65,13 +70,16 @@ Sentry.init({
// Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled
tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/],
+ // ___PRODUCT_OPTION_END___ performance
+ // ___PRODUCT_OPTION_START___ session-replay
// Capture Replay for 10% of all sessions,
// plus for 100% of sessions with an error
// Learn more at
// https://docs.sentry.io/platforms/javascript/session-replay/configuration/#general-integration-configuration
replaysSessionSampleRate: 0.1,
replaysOnErrorSampleRate: 1.0,
+ // ___PRODUCT_OPTION_END___ session-replay
});
```
@@ -157,17 +165,19 @@ withSentry(App, {
Create an instrumentation file (named here as `instrument.server.mjs`) in your project. Add your initialization code in this file for the server-side SDK.
-```typescript {tabTitle:Server} {filename: instrument.server.mjs} {"onboardingOptions": {"performance": "5-9"}}
+```typescript {tabTitle:Server} {filename: instrument.server.mjs}
import * as Sentry from "@sentry/remix";
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/configuration/options/#traces-sample-rate
tracesSampleRate: 1.0,
+ // ___PRODUCT_OPTION_END___ performance
// To use Sentry OpenTelemetry auto-instrumentation
// default: false
diff --git a/docs/platforms/javascript/guides/solid/index.mdx b/docs/platforms/javascript/guides/solid/index.mdx
index 64b729691c00f5..84e6bda458af39 100644
--- a/docs/platforms/javascript/guides/solid/index.mdx
+++ b/docs/platforms/javascript/guides/solid/index.mdx
@@ -43,9 +43,11 @@ To use the SDK, initialize it in your Solid entry point before bootstrapping you
-```javascript {filename: index.jsx} {"onboardingOptions": {"performance": "2, 17, 20-26", "session-replay": "18, 30-36"}}
+```javascript {filename: index.jsx}
import * as Sentry from "@sentry/solid";
+// ___PRODUCT_OPTION_START___ performance
import { solidRouterBrowserTracingIntegration } from "@sentry/solid/solidrouter";
+// ___PRODUCT_OPTION_END___ performance
import { render } from "solid-js/web";
import { DEV } from "solid-js";
import App from "./app";
@@ -60,9 +62,14 @@ if (!DEV) {
sendDefaultPii: true,
integrations: [
+ // ___PRODUCT_OPTION_START___ performance
solidRouterBrowserTracingIntegration(),
+ // ___PRODUCT_OPTION_END___ performance
+ // ___PRODUCT_OPTION_START___ session-replay
Sentry.replayIntegration(),
+ // ___PRODUCT_OPTION_END___ session-replay
],
+ // ___PRODUCT_OPTION_START___ performance
// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for tracing.
@@ -73,6 +80,8 @@ if (!DEV) {
// Set `tracePropagationTargets` to control for which URLs trace propagation should be enabled
tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/],
+ // ___PRODUCT_OPTION_END___ performance
+ // ___PRODUCT_OPTION_START___ session-replay
// Capture Replay for 10% of all sessions,
// plus 100% of sessions with an error
@@ -80,6 +89,7 @@ if (!DEV) {
// https://docs.sentry.io/platforms/javascript/session-replay/configuration/#general-integration-configuration
replaysSessionSampleRate: 0.1,
replaysOnErrorSampleRate: 1.0,
+ // ___PRODUCT_OPTION_END___ session-replay
});
}
diff --git a/docs/platforms/javascript/guides/svelte/index.mdx b/docs/platforms/javascript/guides/svelte/index.mdx
index 60e3c769f99128..ce1c2d1fef0443 100644
--- a/docs/platforms/javascript/guides/svelte/index.mdx
+++ b/docs/platforms/javascript/guides/svelte/index.mdx
@@ -39,7 +39,7 @@ pnpm add @sentry/svelte
To use the SDK, initialize it in your Svelte entry point before bootstrapping your app. In a typical Svelte project, that is your `main.js` or `main.ts` file.
-```javascript {tabTitle: Svelte v5+} {filename: main.js} {"onboardingOptions": {"performance": "16, 19-26", "session-replay": "17, 29-35"}}
+```javascript {tabTitle: Svelte v5+} {filename: main.js}
import { mount } from "svelte";
import "./app.css";
import App from "./App.svelte";
@@ -55,9 +55,14 @@ Sentry.init({
sendDefaultPii: true,
integrations: [
+ // ___PRODUCT_OPTION_START___ performance
Sentry.browserTracingIntegration(),
+ // ___PRODUCT_OPTION_END___ performance
+ // ___PRODUCT_OPTION_START___ session-replay
Sentry.replayIntegration(),
+ // ___PRODUCT_OPTION_END___ session-replay
],
+ // ___PRODUCT_OPTION_START___ performance
// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for tracing.
@@ -68,6 +73,8 @@ Sentry.init({
// Set `tracePropagationTargets` to control for which URLs trace propagation should be enabled
tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/],
+ // ___PRODUCT_OPTION_END___ performance
+ // ___PRODUCT_OPTION_START___ session-replay
// Capture Replay for 10% of all sessions,
// plus 100% of sessions with an error
@@ -75,6 +82,7 @@ Sentry.init({
// https://docs.sentry.io/platforms/javascript/session-replay/configuration/#general-integration-configuration
replaysSessionSampleRate: 0.1,
replaysOnErrorSampleRate: 1.0,
+ // ___PRODUCT_OPTION_END___ session-replay
});
const app = mount(App, {
@@ -84,7 +92,7 @@ const app = mount(App, {
export default app;
```
-```javascript {tabTitle: Svelte v3-v4} {filename: main.js} {"onboardingOptions": {"performance": "10, 13-22", "session-replay": "11, 23-29"}}
+```javascript {tabTitle: Svelte v3-v4} {filename: main.js}
import "./app.css";
import App from "./App.svelte";
@@ -94,9 +102,14 @@ import * as Sentry from "@sentry/svelte";
Sentry.init({
dsn: "___PUBLIC_DSN___",
integrations: [
+ // ___PRODUCT_OPTION_START___ performance
Sentry.browserTracingIntegration(),
+ // ___PRODUCT_OPTION_END___ performance
+ // ___PRODUCT_OPTION_START___ session-replay
Sentry.replayIntegration(),
+ // ___PRODUCT_OPTION_END___ session-replay
],
+ // ___PRODUCT_OPTION_START___ performance
// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for tracing.
@@ -107,6 +120,8 @@ Sentry.init({
// Set `tracePropagationTargets` to control for which URLs trace propagation should be enabled
tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/],
+ // ___PRODUCT_OPTION_END___ performance
+ // ___PRODUCT_OPTION_START___ session-replay
// Capture Replay for 10% of all sessions,
// plus 100% of sessions with an error
@@ -114,6 +129,7 @@ Sentry.init({
// https://docs.sentry.io/platforms/javascript/session-replay/configuration/#general-integration-configuration
replaysSessionSampleRate: 0.1,
replaysOnErrorSampleRate: 1.0,
+ // ___PRODUCT_OPTION_END___ session-replay
});
const app = new App({
diff --git a/docs/platforms/javascript/guides/tanstackstart-react/index.mdx b/docs/platforms/javascript/guides/tanstackstart-react/index.mdx
index b170d910f37749..f963da1384d238 100644
--- a/docs/platforms/javascript/guides/tanstackstart-react/index.mdx
+++ b/docs/platforms/javascript/guides/tanstackstart-react/index.mdx
@@ -68,7 +68,7 @@ Make sure to keep your auth token secret and out of version control.
Add the following initialization code to your `app/client.tsx` file to initialize Sentry on the client:
-```tsx {filename:app/client.tsx} {"onboardingOptions": {"performance": "17, 20-25", "session-replay": "18,26-31"}}
+```tsx {filename:app/client.tsx}
import { hydrateRoot } from "react-dom/client";
import { StartClient } from "@tanstack/react-start";
import { createRouter } from "./router";
@@ -85,21 +85,29 @@ Sentry.init({
sendDefaultPii: true,
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___ 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
+ // ___PRODUCT_OPTION_START___ session-replay
// Capture Replay for 10% of all sessions,
// plus for 100% of sessions with an error.
// Learn more at https://docs.sentry.io/platforms/javascript/session-replay/configuration/#general-integration-configuration
replaysSessionSampleRate: 0.1,
replaysOnErrorSampleRate: 1.0,
+ // ___PRODUCT_OPTION_END___ session-replay
});
hydrateRoot(document, );
@@ -107,7 +115,7 @@ hydrateRoot(document, );
Add the following initialization code anywhere in your `app/ssr.tsx` file to initialize Sentry on the server:
-```tsx {filename:app/ssr.tsx} {"onboardingOptions": {"performance": "9-15"}}
+```tsx {filename:app/ssr.tsx}
import * as Sentry from "@sentry/tanstackstart-react";
Sentry.init({
@@ -116,6 +124,7 @@ Sentry.init({
// Adds request headers and IP for users, for more info visit:
// https://docs.sentry.io/platforms/javascript/guides/tanstackstart-react/configuration/options/#sendDefaultPii
sendDefaultPii: true,
+ // ___PRODUCT_OPTION_START___ performance
// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for tracing.
@@ -123,6 +132,7 @@ Sentry.init({
// Learn more at
// https://docs.sentry.io/platforms/javascript/configuration/options/#traces-sample-rate
tracesSampleRate: 1.0,
+ // ___PRODUCT_OPTION_END___ performance
});
```
diff --git a/docs/platforms/javascript/guides/vue/index.mdx b/docs/platforms/javascript/guides/vue/index.mdx
index 14835624437e32..40084be1a2179d 100644
--- a/docs/platforms/javascript/guides/vue/index.mdx
+++ b/docs/platforms/javascript/guides/vue/index.mdx
@@ -38,7 +38,7 @@ Configuration should happen as early as possible in your application's lifecycle
To initialize Sentry in your Vue application, add the following code snippet to your `main.js`:
-```javascript {tabTitle:Vue 3} {filename:main.js} {3, 12-41} {"onboardingOptions": {"performance": "21, 24-30", "session-replay": "22, 34-40"} }
+```javascript {tabTitle:Vue 3} {filename:main.js} {3, 12-41}
import { createApp } from "vue";
import { createRouter } from "vue-router";
import * as Sentry from "@sentry/vue";
@@ -59,9 +59,14 @@ Sentry.init({
sendDefaultPii: true,
integrations: [
+ // ___PRODUCT_OPTION_START___ performance
Sentry.browserTracingIntegration({ router }),
+ // ___PRODUCT_OPTION_END___ performance
+ // ___PRODUCT_OPTION_START___ session-replay
Sentry.replayIntegration(),
+ // ___PRODUCT_OPTION_END___ session-replay
],
+ // ___PRODUCT_OPTION_START___ performance
// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for tracing.
@@ -72,6 +77,8 @@ Sentry.init({
// Set `tracePropagationTargets` to control for which URLs trace propagation should be enabled
tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/],
+ // ___PRODUCT_OPTION_END___ performance
+ // ___PRODUCT_OPTION_START___ session-replay
// Capture Replay for 10% of all sessions,
// plus for 100% of sessions with an error
@@ -79,13 +86,14 @@ Sentry.init({
// https://docs.sentry.io/platforms/javascript/session-replay/configuration/#general-integration-configuration
replaysSessionSampleRate: 0.1,
replaysOnErrorSampleRate: 1.0,
+ // ___PRODUCT_OPTION_END___ session-replay
});
app.use(router);
app.mount("#app");
```
-```javascript {tabTitle:Vue 2} {filename:main.js} {3, 11-35} {"onboardingOptions": {"performance": "15, 18-24", "session-replay": "16, 28-34"}}
+```javascript {tabTitle:Vue 2} {filename:main.js} {3, 11-35}
import Vue from "vue";
import Router from "vue-router";
import * as Sentry from "@sentry/vue";
@@ -100,9 +108,14 @@ Sentry.init({
Vue,
dsn: "___PUBLIC_DSN___",
integrations: [
+ // ___PRODUCT_OPTION_START___ performance
Sentry.browserTracingIntegration({ router }),
+ // ___PRODUCT_OPTION_END___ performance
+ // ___PRODUCT_OPTION_START___ session-replay
Sentry.replayIntegration(),
+ // ___PRODUCT_OPTION_END___ session-replay
],
+ // ___PRODUCT_OPTION_START___ performance
// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for tracing.
@@ -113,6 +126,8 @@ Sentry.init({
// Set `tracePropagationTargets` to control for which URLs trace propagation should be enabled
tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/],
+ // ___PRODUCT_OPTION_END___ performance
+ // ___PRODUCT_OPTION_START___ session-replay
// Capture Replay for 10% of all sessions,
// plus for 100% of sessions with an error
@@ -120,6 +135,7 @@ Sentry.init({
// https://docs.sentry.io/platforms/javascript/session-replay/configuration/#general-integration-configuration
replaysSessionSampleRate: 0.1,
replaysOnErrorSampleRate: 1.0,
+ // ___PRODUCT_OPTION_END___ session-replay
});
// ...
diff --git a/docs/platforms/react-native/index.mdx b/docs/platforms/react-native/index.mdx
index 2f94111a9efc47..847b9bf1bd8123 100644
--- a/docs/platforms/react-native/index.mdx
+++ b/docs/platforms/react-native/index.mdx
@@ -64,7 +64,7 @@ If you're using Expo, [read our docs](/platforms/react-native/manual-setup/expo/
To capture all errors, initialize the Sentry React Native SDK as soon as possible.
-```javascript {filename:App.js} {"onboardingOptions": {"performance": "8-12", "profiling": "13-15"}}
+```javascript {filename:App.js}
import * as Sentry from "@sentry/react-native";
Sentry.init({
@@ -72,14 +72,18 @@ Sentry.init({
// Adds more context data to events (IP address, cookies, user, etc.)
// For more information, visit: https://docs.sentry.io/platforms/react-native/data-management/data-collected/
sendDefaultPii: true,
+ // ___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/react-native/configuration/options/#traces-sample-rate
tracesSampleRate: 1.0,
+ // ___PRODUCT_OPTION_END___ performance
+ // ___PRODUCT_OPTION_START___ profiling
// profilesSampleRate is relative to tracesSampleRate.
// Here, we'll capture profiles for 100% of transactions.
profilesSampleRate: 1.0,
+ // ___PRODUCT_OPTION_END___ profiling
});
```
diff --git a/docs/platforms/react-native/manual-setup/expo.mdx b/docs/platforms/react-native/manual-setup/expo.mdx
index 498ebc49cb0106..7b0059b0821269 100644
--- a/docs/platforms/react-native/manual-setup/expo.mdx
+++ b/docs/platforms/react-native/manual-setup/expo.mdx
@@ -66,7 +66,7 @@ pnpm add @sentry/react-native
Import the `@sentry/react-native` package and call `init` with your DSN:
-```javascript {tabTitle:App.js or app/_layout.js} {"onboardingOptions": {"performance": "9-13", "profiling": "14-16"}}
+```javascript {tabTitle:App.js or app/_layout.js}
import { Text, View } from "react-native";
import * as Sentry from "@sentry/react-native";
@@ -75,14 +75,18 @@ Sentry.init({
// Adds more context data to events (IP address, cookies, user, etc.)
// For more information, visit: https://docs.sentry.io/platforms/react-native/data-management/data-collected/
sendDefaultPii: true,
+ // ___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/react-native/configuration/options/#traces-sample-rate
tracesSampleRate: 1.0,
+ // ___PRODUCT_OPTION_END___ performance
+ // ___PRODUCT_OPTION_START___ profiling
// profilesSampleRate is relative to tracesSampleRate.
// Here, we'll capture profiles for 100% of transactions.
profilesSampleRate: 1.0,
+ // ___PRODUCT_OPTION_END___ profiling
});
function App() {
diff --git a/platform-includes/getting-started-config/javascript.angular.mdx b/platform-includes/getting-started-config/javascript.angular.mdx
index f815890211a46c..558e566e818233 100644
--- a/platform-includes/getting-started-config/javascript.angular.mdx
+++ b/platform-includes/getting-started-config/javascript.angular.mdx
@@ -1,6 +1,6 @@
Once this is done, Sentry's Angular SDK captures all unhandled exceptions and transactions.
-```typescript {tabTitle: App Config} {filename: main.ts} {5-39} {"onboardingOptions": {"performance": "15-18, 23-32", "session-replay": "19-21, 33-39"}}
+```typescript {tabTitle: App Config} {filename: main.ts} {5-39}
import { bootstrapApplication } from "@angular/platform-browser";
import { appConfig } from "./app/app.config";
import { AppComponent } from "./app/app.component";
@@ -15,14 +15,19 @@ Sentry.init({
sendDefaultPii: true,
integrations: [
+ // ___PRODUCT_OPTION_START___ performance
// Registers and configures the Tracing integration,
// which automatically instruments your application to monitor its
// performance, including custom Angular routing instrumentation
Sentry.browserTracingIntegration(),
+ // ___PRODUCT_OPTION_END___ performance
+ // ___PRODUCT_OPTION_START___ session-replay
// Registers the Replay integration,
// which automatically captures Session Replays
Sentry.replayIntegration(),
+ // ___PRODUCT_OPTION_END___ session-replay
],
+ // ___PRODUCT_OPTION_START___ performance
// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for tracing.
@@ -33,6 +38,8 @@ Sentry.init({
// Set `tracePropagationTargets` to control for which URLs trace propagation should be enabled
tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/],
+ // ___PRODUCT_OPTION_END___ performance
+ // ___PRODUCT_OPTION_START___ session-replay
// Capture Replay for 10% of all sessions,
// plus for 100% of sessions with an error
@@ -40,6 +47,7 @@ Sentry.init({
// https://docs.sentry.io/platforms/javascript/session-replay/configuration/#general-integration-configuration
replaysSessionSampleRate: 0.1,
replaysOnErrorSampleRate: 1.0,
+ // ___PRODUCT_OPTION_END___ session-replay
});
bootstrapApplication(AppComponent, appConfig).catch((err) =>
@@ -47,7 +55,7 @@ bootstrapApplication(AppComponent, appConfig).catch((err) =>
);
```
-```typescript {tabTitle: NGModule Config} {filename: main.ts} {"onboardingOptions": {"performance": "14-17, 23-32", "session-replay": "18-20, 32-38"}}
+```typescript {tabTitle: NGModule Config} {filename: main.ts}
import { platformBrowserDynamic } from "@angular/platform-browser-dynamic";
import { AppModule } from "./app/app.module";
@@ -61,14 +69,19 @@ Sentry.init({
sendDefaultPii: true,
integrations: [
+ // ___PRODUCT_OPTION_START___ performance
// Registers and configures the Tracing integration,
// which automatically instruments your application to monitor its
// performance, including custom Angular routing instrumentation
Sentry.browserTracingIntegration(),
+ // ___PRODUCT_OPTION_END___ performance
+ // ___PRODUCT_OPTION_START___ session-replay
// Registers the Replay integration,
// which automatically captures Session Replays
Sentry.replayIntegration(),
+ // ___PRODUCT_OPTION_END___ session-replay
],
+ // ___PRODUCT_OPTION_START___ performance
// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for tracing.
@@ -79,6 +92,8 @@ Sentry.init({
// Set `tracePropagationTargets` to control for which URLs trace propagation should be enabled
tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/],
+ // ___PRODUCT_OPTION_END___ performance
+ // ___PRODUCT_OPTION_START___ session-replay
// Capture Replay for 10% of all sessions,
// plus for 100% of sessions with an error
@@ -86,6 +101,7 @@ Sentry.init({
// https://docs.sentry.io/platforms/javascript/session-replay/configuration/#general-integration-configuration
replaysSessionSampleRate: 0.1,
replaysOnErrorSampleRate: 1.0,
+ // ___PRODUCT_OPTION_END___ session-replay
});
platformBrowserDynamic()
@@ -97,7 +113,7 @@ platformBrowserDynamic()
The Sentry Angular SDK exports a couple of Angular providers that are necessary to fully instrument your application. We recommend registering them in your `app.config.ts` or main `app.module.ts`:
-```typescript {tabTitle: App Config (Angular 19+)} {filename: app.config.ts} {9, 14-24} {"onboardingOptions": {"performance": "18-24"}}
+```typescript {tabTitle: App Config (Angular 19+)} {filename: app.config.ts} {9, 14-24}
import {
ApplicationConfig,
ErrorHandler,
@@ -115,6 +131,7 @@ export const appConfig: ApplicationConfig = {
provide: ErrorHandler,
useValue: Sentry.createErrorHandler(),
},
+ // ___PRODUCT_OPTION_START___ performance
{
provide: Sentry.TraceService,
deps: [Router],
@@ -122,11 +139,12 @@ export const appConfig: ApplicationConfig = {
provideAppInitializer(() => {
inject(TraceService);
}),
+ // ___PRODUCT_OPTION_END___ performance
],
};
```
-```typescript {tabTitle: App Config (Angular <=18)} {filename: app.config.ts} {8, 13-26} {"onboardingOptions": {"performance": "17-26"}}
+```typescript {tabTitle: App Config (Angular <=18)} {filename: app.config.ts} {8, 13-26}
import {
APP_INITIALIZER,
ApplicationConfig,
@@ -143,6 +161,7 @@ export const appConfig: ApplicationConfig = {
provide: ErrorHandler,
useValue: Sentry.createErrorHandler(),
},
+ // ___PRODUCT_OPTION_START___ performance
{
provide: Sentry.TraceService,
deps: [Router],
@@ -153,11 +172,12 @@ export const appConfig: ApplicationConfig = {
deps: [Sentry.TraceService],
multi: true,
},
+ // ___PRODUCT_OPTION_END___ performance
],
};
```
-```typescript {tabTitle: NGModule Config} {filename: app.module.ts} {4, 9-22} {"onboardingOptions": {"performance": "13-22"}}
+```typescript {tabTitle: NGModule Config} {filename: app.module.ts} {4, 9-22}
import { APP_INITIALIZER, ErrorHandler, NgModule } from "@angular/core";
import { Router } from "@angular/router";
@@ -170,6 +190,7 @@ import * as Sentry from "@sentry/angular";
provide: ErrorHandler,
useValue: Sentry.createErrorHandler(),
},
+ // ___PRODUCT_OPTION_START___ performance
{
provide: Sentry.TraceService,
deps: [Router],
@@ -180,6 +201,7 @@ import * as Sentry from "@sentry/angular";
deps: [Sentry.TraceService],
multi: true,
},
+ // ___PRODUCT_OPTION_END___ performance
],
// ...
})
diff --git a/platform-includes/getting-started-config/javascript.aws-lambda.mdx b/platform-includes/getting-started-config/javascript.aws-lambda.mdx
index 2892e1e719ab9a..6c4d81e281e136 100644
--- a/platform-includes/getting-started-config/javascript.aws-lambda.mdx
+++ b/platform-includes/getting-started-config/javascript.aws-lambda.mdx
@@ -1,6 +1,8 @@
-```javascript {tabTitle:async} {"onboardingOptions": {"performance": "14-18", "profiling": "2, 11-13, 19-21"}}
+```javascript {tabTitle:async}
const Sentry = require("@sentry/aws-serverless");
+// ___PRODUCT_OPTION_START___ profiling
const { nodeProfilingIntegration } = require("@sentry/profiling-node");
+// ___PRODUCT_OPTION_END___ profiling
Sentry.init({
dsn: "___PUBLIC_DSN___",
@@ -8,10 +10,13 @@ Sentry.init({
// Adds request headers and IP for users, for more info visit:
// https://docs.sentry.io/platforms/javascript/guides/aws-lambda/configuration/options/#sendDefaultPii
sendDefaultPii: true,
+ // ___PRODUCT_OPTION_START___ profiling
integrations: [
nodeProfilingIntegration(),
],
+ // ___PRODUCT_OPTION_END___ profiling
+ // ___PRODUCT_OPTION_START___ performance
// Add Performance Monitoring by setting tracesSampleRate
// Set tracesSampleRate to 1.0 to capture 100% of transactions
@@ -19,9 +24,12 @@ Sentry.init({
// Learn more at
// https://docs.sentry.io/platforms/javascript/configuration/options/#traces-sample-rate
tracesSampleRate: 1.0,
+ // ___PRODUCT_OPTION_END___ performance
+ // ___PRODUCT_OPTION_START___ profiling
// Set sampling rate for profiling - this is relative to tracesSampleRate
profilesSampleRate: 1.0,
+ // ___PRODUCT_OPTION_END___ profiling
});
exports.handler = Sentry.wrapHandler(async (event, context) => {
@@ -29,9 +37,11 @@ exports.handler = Sentry.wrapHandler(async (event, context) => {
});
```
-```javascript {tabTitle:sync} {"onboardingOptions": {"performance": "14-18", "profiling": "2, 11-13, 19-21"}}
+```javascript {tabTitle:sync}
const Sentry = require("@sentry/aws-serverless");
+// ___PRODUCT_OPTION_START___ profiling
const { nodeProfilingIntegration } = require("@sentry/profiling-node");
+// ___PRODUCT_OPTION_END___ profiling
Sentry.init({
dsn: "___PUBLIC_DSN___",
@@ -39,10 +49,13 @@ Sentry.init({
// Adds request headers and IP for users, for more info visit:
// https://docs.sentry.io/platforms/javascript/guides/aws-lambda/configuration/options/#sendDefaultPii
sendDefaultPii: true,
+ // ___PRODUCT_OPTION_START___ profiling
integrations: [
nodeProfilingIntegration(),
],
+ // ___PRODUCT_OPTION_END___ profiling
+ // ___PRODUCT_OPTION_START___ performance
// Add Performance Monitoring by setting tracesSampleRate
// Set tracesSampleRate to 1.0 to capture 100% of transactions
@@ -50,9 +63,12 @@ Sentry.init({
// Learn more at
// https://docs.sentry.io/platforms/javascript/configuration/options/#traces-sample-rate
tracesSampleRate: 1.0,
+ // ___PRODUCT_OPTION_END___ performance
+ // ___PRODUCT_OPTION_START___ profiling
// Set sampling rate for profiling - this is relative to tracesSampleRate
profilesSampleRate: 1.0,
+ // ___PRODUCT_OPTION_END___ profiling
});
exports.handler = Sentry.wrapHandler((event, context, callback) => {
diff --git a/platform-includes/getting-started-config/javascript.gcp-functions.mdx b/platform-includes/getting-started-config/javascript.gcp-functions.mdx
index cd5b34b1f5de36..da9050309d8c7b 100644
--- a/platform-includes/getting-started-config/javascript.gcp-functions.mdx
+++ b/platform-includes/getting-started-config/javascript.gcp-functions.mdx
@@ -1,4 +1,4 @@
-```javascript {tabTitle:Http functions} {"onboardingOptions": {"performance": "14-18", "profiling": "2, 11-13, 19-21"}}
+```javascript {tabTitle:Http functions}
const Sentry = require("@sentry/google-cloud-serverless");
const { nodeProfilingIntegration } = require("@sentry/profiling-node");
@@ -12,6 +12,7 @@ Sentry.init({
integrations: [
nodeProfilingIntegration(),
],
+ // ___PRODUCT_OPTION_START___ performance
// Add Performance Monitoring by setting tracesSampleRate
// Set tracesSampleRate to 1.0 to capture 100% of transactions
@@ -19,9 +20,12 @@ Sentry.init({
// Learn more at
// https://docs.sentry.io/platforms/javascript/configuration/options/#traces-sample-rate
tracesSampleRate: 1.0,
+ // ___PRODUCT_OPTION_END___ performance
+ // ___PRODUCT_OPTION_START___ profiling
// Set sampling rate for profiling - this is relative to tracesSampleRate
profilesSampleRate: 1.0,
+ // ___PRODUCT_OPTION_END___ profiling
});
exports.helloHttp = Sentry.wrapHttpFunction((req, res) => {
@@ -29,7 +33,7 @@ exports.helloHttp = Sentry.wrapHttpFunction((req, res) => {
});
```
-```javascript {tabTitle:Background functions} {"onboardingOptions": {"performance": "14-18", "profiling": "2, 11-13, 19-21"}}
+```javascript {tabTitle:Background functions}
const Sentry = require("@sentry/google-cloud-serverless");
const { nodeProfilingIntegration } = require("@sentry/profiling-node");
@@ -43,6 +47,7 @@ Sentry.init({
integrations: [
nodeProfilingIntegration(),
],
+ // ___PRODUCT_OPTION_START___ performance
// Add Performance Monitoring by setting tracesSampleRate
// Set tracesSampleRate to 1.0 to capture 100% of transactions
@@ -50,9 +55,12 @@ Sentry.init({
// Learn more at
// https://docs.sentry.io/platforms/javascript/configuration/options/#traces-sample-rate
tracesSampleRate: 1.0,
+ // ___PRODUCT_OPTION_END___ performance
+ // ___PRODUCT_OPTION_START___ profiling
// Set sampling rate for profiling - this is relative to tracesSampleRate
profilesSampleRate: 1.0,
+ // ___PRODUCT_OPTION_END___ profiling
});
exports.helloEvents = Sentry.wrapEventFunction(
@@ -62,15 +70,20 @@ exports.helloEvents = Sentry.wrapEventFunction(
);
```
-```javascript {tabTitle:CloudEvent functions} {"onboardingOptions": {"performance": "9-13", "profiling": "2, 6-8, 14-16"}}
+```javascript {tabTitle:CloudEvent functions}
const Sentry = require("@sentry/google-cloud-serverless");
+// ___PRODUCT_OPTION_START___ profiling
const { nodeProfilingIntegration } = require("@sentry/profiling-node");
+// ___PRODUCT_OPTION_END___ profiling
Sentry.init({
dsn: "___PUBLIC_DSN___",
+ // ___PRODUCT_OPTION_START___ profiling
integrations: [
nodeProfilingIntegration(),
],
+ // ___PRODUCT_OPTION_END___ profiling
+ // ___PRODUCT_OPTION_START___ performance
// Add Performance Monitoring by setting tracesSampleRate
// Set tracesSampleRate to 1.0 to capture 100% of transactions
@@ -78,9 +91,12 @@ Sentry.init({
// Learn more at
// https://docs.sentry.io/platforms/javascript/configuration/options/#traces-sample-rate
tracesSampleRate: 1.0,
+ // ___PRODUCT_OPTION_END___ performance
+ // ___PRODUCT_OPTION_START___ profiling
// Set sampling rate for profiling - this is relative to tracesSampleRate
profilesSampleRate: 1.0,
+ // ___PRODUCT_OPTION_END___ profiling
});
exports.helloEvents = Sentry.wrapCloudEventFunction(
diff --git a/platform-includes/getting-started-config/javascript.nestjs.mdx b/platform-includes/getting-started-config/javascript.nestjs.mdx
index 567500b4d4e31c..432dde267a99fd 100644
--- a/platform-includes/getting-started-config/javascript.nestjs.mdx
+++ b/platform-includes/getting-started-config/javascript.nestjs.mdx
@@ -1,6 +1,8 @@
-```javascript {tabTitle:ESM} {filename: instrument.mjs} {"onboardingOptions": {"performance": "16-19", "profiling": "2, 11-15, 20-23"}}
+```javascript {tabTitle:ESM} {filename: instrument.mjs}
import * as Sentry from "@sentry/nestjs";
+// ___PRODUCT_OPTION_START___ profiling
import { nodeProfilingIntegration } from '@sentry/profiling-node';
+// ___PRODUCT_OPTION_END___ profiling
// Ensure to call this before importing any other modules!
Sentry.init({
@@ -10,40 +12,54 @@ Sentry.init({
// https://docs.sentry.io/platforms/javascript/guides/nestjs/configuration/options/#sendDefaultPii
sendDefaultPii: true,
+ // ___PRODUCT_OPTION_START___ profiling
integrations: [
// Add our Profiling integration
nodeProfilingIntegration(),
],
+ // ___PRODUCT_OPTION_END___ profiling
+ // ___PRODUCT_OPTION_START___ performance
// Add Tracing by setting tracesSampleRate
// We recommend adjusting this value in production
tracesSampleRate: 1.0,
+ // ___PRODUCT_OPTION_END___ performance
+ // ___PRODUCT_OPTION_START___ profiling
// Set sampling rate for profiling
// This is relative to tracesSampleRate
profilesSampleRate: 1.0,
+ // ___PRODUCT_OPTION_END___ profiling
});
```
-```javascript {tabTitle:CommonJS} {filename: instrument.js} {"onboardingOptions": {"performance": "11-14", "profiling": "2, 7-10, 15-18"}}
+```javascript {tabTitle:CommonJS} {filename: instrument.js}
const Sentry = require("@sentry/nestjs");
+// ___PRODUCT_OPTION_START___ profiling
const { nodeProfilingIntegration } = require("@sentry/profiling-node");
+// ___PRODUCT_OPTION_END___ profiling
// Ensure to call this before requiring any other modules!
Sentry.init({
dsn: "___PUBLIC_DSN___",
+ // ___PRODUCT_OPTION_START___ profiling
integrations: [
// Add our Profiling integration
nodeProfilingIntegration(),
],
+ // ___PRODUCT_OPTION_END___ profiling
+ // ___PRODUCT_OPTION_START___ performance
// Add Tracing by setting tracesSampleRate
// We recommend adjusting this value in production
tracesSampleRate: 1.0,
+ // ___PRODUCT_OPTION_END___ performance
+ // ___PRODUCT_OPTION_START___ profiling
// Set sampling rate for profiling
// This is relative to tracesSampleRate
profilesSampleRate: 1.0,
+ // ___PRODUCT_OPTION_END___ profiling
});
```
diff --git a/platform-includes/getting-started-config/javascript.node.mdx b/platform-includes/getting-started-config/javascript.node.mdx
index b2cb9687711f2b..16e553db0b90c4 100644
--- a/platform-includes/getting-started-config/javascript.node.mdx
+++ b/platform-includes/getting-started-config/javascript.node.mdx
@@ -1,6 +1,8 @@
-```javascript {tabTitle:CommonJS} {filename: instrument.js} {"onboardingOptions": {"performance": "16-22", "profiling": "2, 11-15, 23-29"}}
+```javascript {tabTitle:CommonJS} {filename: instrument.js}
const Sentry = require("@sentry/node");
+// ___PRODUCT_OPTION_START___ profiling
const { nodeProfilingIntegration } = require("@sentry/profiling-node");
+// ___PRODUCT_OPTION_END___ profiling
// Ensure to call this before requiring any other modules!
Sentry.init({
@@ -9,11 +11,14 @@ Sentry.init({
// Adds request headers and IP for users, for more info visit:
// https://docs.sentry.io/platforms/javascript/guides/node/configuration/options/#sendDefaultPii
sendDefaultPii: true,
+ // ___PRODUCT_OPTION_START___ profiling
integrations: [
// Add our Profiling integration
nodeProfilingIntegration(),
],
+ // ___PRODUCT_OPTION_END___ profiling
+ // ___PRODUCT_OPTION_START___ performance
// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for tracing.
@@ -21,6 +26,8 @@ Sentry.init({
// Learn more at
// https://docs.sentry.io/platforms/javascript/guides/node/configuration/options/#tracesSampleRate
tracesSampleRate: 1.0,
+ // ___PRODUCT_OPTION_END___ performance
+ // ___PRODUCT_OPTION_START___ profiling
// Set profilesSampleRate to 1.0 to profile 100%
// of sampled transactions.
@@ -28,12 +35,15 @@ Sentry.init({
// Learn more at
// https://docs.sentry.io/platforms/javascript/guides/node/configuration/options/#profilesSampleRate
profilesSampleRate: 1.0,
+ // ___PRODUCT_OPTION_END___ profiling
});
```
-```javascript {tabTitle:ESM} {filename: instrument.mjs} {"onboardingOptions": {"performance": "16-22", "profiling": "2, 11-15, 23-29"}}
+```javascript {tabTitle:ESM} {filename: instrument.mjs}
import * as Sentry from "@sentry/node";
+// ___PRODUCT_OPTION_START___ profiling
import { nodeProfilingIntegration } from "@sentry/profiling-node";
+// ___PRODUCT_OPTION_END___ profiling
// Ensure to call this before importing any other modules!
Sentry.init({
@@ -42,11 +52,14 @@ Sentry.init({
// Adds request headers and IP for users, for more info visit:
// https://docs.sentry.io/platforms/javascript/guides/node/configuration/options/#sendDefaultPii
sendDefaultPii: true,
-
+ // ___PRODUCT_OPTION_START___ profiling
+
integrations: [
// Add our Profiling integration
nodeProfilingIntegration(),
],
+ // ___PRODUCT_OPTION_END___ profiling
+ // ___PRODUCT_OPTION_START___ performance
// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for tracing.
@@ -54,6 +67,8 @@ Sentry.init({
// Learn more at
// https://docs.sentry.io/platforms/javascript/guides/node/configuration/options/#tracesSampleRate
tracesSampleRate: 1.0,
+ // ___PRODUCT_OPTION_END___ performance
+ // ___PRODUCT_OPTION_START___ profiling
// Set profilesSampleRate to 1.0 to profile 100%
// of sampled transactions.
@@ -61,5 +76,6 @@ Sentry.init({
// Learn more at
// https://docs.sentry.io/platforms/javascript/guides/node/configuration/options/#profilesSampleRate
profilesSampleRate: 1.0,
+ // ___PRODUCT_OPTION_END___ profiling
});
```
diff --git a/platform-includes/getting-started-node/javascript.express__v7.x.mdx b/platform-includes/getting-started-node/javascript.express__v7.x.mdx
index fe4ddd0020c27c..bbc5da2b1e6411 100644
--- a/platform-includes/getting-started-node/javascript.express__v7.x.mdx
+++ b/platform-includes/getting-started-node/javascript.express__v7.x.mdx
@@ -8,16 +8,19 @@
Sentry should be initialized in your application as early as possible:
-```javascript {tabTitle:CommonJS} {filename: instrument.js} {"onboardingOptions": {"performance": "10-14", "profiling": "3, 15-18, 22"}}
+```javascript {tabTitle:CommonJS} {filename: instrument.js}
const express = require('express');
const Sentry = require('@sentry/node');
+// ___PRODUCT_OPTION_START___ profiling
const { nodeProfilingIntegration } = require("@sentry/profiling-node");
+// ___PRODUCT_OPTION_END___ profiling
const app = express();
// Sentry must be initialized as early as possible
Sentry.init({
dsn: "___DSN___",
+ // ___PRODUCT_OPTION_START___ performance
// Add Performance Monitoring by setting tracesSampleRate and adding integration
// Set tracesSampleRate to 1.0 to capture 100% of transactions
@@ -25,14 +28,19 @@ Sentry.init({
// Learn more at
// https://docs.sentry.io/platforms/javascript/configuration/options/#traces-sample-rate
tracesSampleRate: 1.0,
+ // ___PRODUCT_OPTION_END___ performance
+ // ___PRODUCT_OPTION_START___ profiling
// Set sampling rate for profiling
// This is relative to tracesSampleRate
profilesSampleRate: 1.0,
+ // ___PRODUCT_OPTION_END___ profiling
integrations: [
expressIntegration({ app }),
+ // ___PRODUCT_OPTION_START___ profiling
nodeProfilingIntegration(),
+ // ___PRODUCT_OPTION_END___ profiling
],
// It is possible to specify the routes that should be traced by passing a router instance to the `router` option:
@@ -63,29 +71,37 @@ app.use(function onError(err, req, res, next) {
app.listen(3000);
```
-```javascript {tabTitle:ESM} {filename: instrument.mjs} {"onboardingOptions": {"performance": "10-14", "profiling": "3, 15-18, 22"}}
+```javascript {tabTitle:ESM} {filename: instrument.mjs}
import express from "express";
import * as Sentry from "@sentry/node";
+// ___PRODUCT_OPTION_START___ profiling
import { nodeProfilingIntegration } from '@sentry/profiling-node';
+// ___PRODUCT_OPTION_END___ profiling
const app = express();
// Sentry must be initialized as early as possible
Sentry.init({
dsn: "___DSN___",
+ // ___PRODUCT_OPTION_START___ performance
// Add Performance Monitoring by setting tracesSampleRate and adding integration
// Set tracesSampleRate to 1.0 to capture 100% of transactions
// We recommend adjusting this value in production
tracesSampleRate: 1.0,
+ // ___PRODUCT_OPTION_END___ performance
+ // ___PRODUCT_OPTION_START___ profiling
// Set sampling rate for profiling
// This is relative to tracesSampleRate
profilesSampleRate: 1.0,
+ // ___PRODUCT_OPTION_END___ profiling
integrations: [
expressIntegration({ app }),
+ // ___PRODUCT_OPTION_START___ profiling
nodeProfilingIntegration(),
+ // ___PRODUCT_OPTION_END___ profiling
],
// It is possible to specify the routes that should be traced by passing a router instance to the `router` option: