From c907eec14a8d018216114d6adde3a385873b5d14 Mon Sep 17 00:00:00 2001 From: Charly Gomez Date: Mon, 16 Dec 2024 14:09:41 +0100 Subject: [PATCH 1/9] split browser and node profiling --- .../common/profiling/browser-profiling.mdx | 84 +++++++++++++++++++ .../javascript/common/profiling/index.mdx | 69 +-------------- .../common/profiling/node-profiling.mdx | 81 ++++++++++++++++++ 3 files changed, 167 insertions(+), 67 deletions(-) create mode 100644 docs/platforms/javascript/common/profiling/browser-profiling.mdx create mode 100644 docs/platforms/javascript/common/profiling/node-profiling.mdx diff --git a/docs/platforms/javascript/common/profiling/browser-profiling.mdx b/docs/platforms/javascript/common/profiling/browser-profiling.mdx new file mode 100644 index 00000000000000..a3ece4713705ed --- /dev/null +++ b/docs/platforms/javascript/common/profiling/browser-profiling.mdx @@ -0,0 +1,84 @@ +--- +title: Browser Profiling +sidebar_order: 5000 +supported: + - javascript +notSupported: + - javascript.bun + - javascript.cordova + - javascript.deno + - javascript.cloudflare + - javascript.nodejs + - javascript.electron + - javascript.node + - javascript.aws-lambda + - javascript.azure-functions + - javascript.connect + - javascript.express + - javascript.fastify + - javascript.gcp-functions + - javascript.hapi + - javascript.koa + - javascript.nestjs +description: "Collect & view performance insights for JavaScript programs with Sentry’s JavaScript Profiling integration. Get started with browser profiling here." +--- + + + +Browser Profiling is currently in beta. Beta features are still in progress and may have bugs. We recognize the irony. + + + +The browser profiling integration is built using [JS Self-Profiling API](https://wicg.github.io/js-self-profiling/) and will likely only move out of beta once the specification progresses and gains adoption. See platform [status](https://chromestatus.com/feature/5170190448852992). + +Note that since the profiling API is currently only exposed in Chromium, profiles collected only include that demographic. This is obvious, but should not be forgotten when analyzing the data collected. We hope that as the API gains adoption, other browsers will implement it as well. + + + +## Prerequisites + +To get started with JavaScript browser profiling, you'll need to: + +- Install the SDK, minimum version 7.60.0 +- Configure the document response header to include `Document-Policy: js-profiling` +- Configure the SDK to use the `BrowserProfilingIntegration` and set `profilesSampleRate` + +## Step 1: Install the SDK + + + +Install our SDK using either `yarn` or `npm`, the minimum version that supports profiling is **7.60.0**. + + + + + +Install our Electron SDK using either `yarn` or `npm`, the minimum version that supports profiling is **4.16.0**. + + + + + +## Step 2: Add Document-Policy: js-profiling header + +For the JavaScript browser profiler to start, the document response header needs to include a `Document-Policy` header key with the `js-profiling` value. + + + +## Step 3: Configure the JavaScript SDK + +Configuration should happen as early as possible in your application's lifecycle. Once this is done, Sentry's JavaScript SDK will capture all unhandled exceptions and transactions. + + + +## The Difference Between DevTools & Sentry's JavaScript Browser Profiler + +What does Sentry's JavaScript browser profile offer that Chrome DevTools does not? + +- Sentry JavaScript profiler runs in production and captures real user data, showing real-world performance. DevTools runs locally on your machine and only shows profiles of what's running on your machine. +- Sentry runs at a lower sampling rate of 100Hz with a 10ms sample period versus a sampling rate of 1000Hz and a 1ms sample period for DevTools. +- Sentry supports deobfuscation, making it so that all the function names in your code are correct. Typically, when you run JavaScript code, it's minified, meaning that all the function names are replaced with machine-generated abbreviations. + +Please note, that since the browser profiling API is currently only implemented in Chromium-based browsers, the profiles collected with Sentry's JavaScript browser profiling will inherently be biased toward that demographic. This is something that you'll need to consider if you're basing your decisions on the data collected. + +We hope that as the Javascript browser profiling API gains adoption, other browsers will implement it as well. If you find the browser profiling feature helpful and would like to see it gain further adoption, please consider supporting the spec at the official WICG repository. diff --git a/docs/platforms/javascript/common/profiling/index.mdx b/docs/platforms/javascript/common/profiling/index.mdx index 5088dc921cc53c..f23a686c1767c3 100644 --- a/docs/platforms/javascript/common/profiling/index.mdx +++ b/docs/platforms/javascript/common/profiling/index.mdx @@ -1,72 +1,7 @@ --- title: Set Up Profiling sidebar_order: 5000 -supported: - - javascript -notSupported: - - javascript.bun - - javascript.cordova - - javascript.deno - - javascript.cloudflare -description: "Collect & view performance insights for JavaScript programs with Sentry’s JavaScript Profiling integration. Get started with browser profiling here." +description: "Collect & view performance insights for JavaScript programs with Sentry's Profiling integrations. Get started with browser and Node.js profiling to understand your application's performance." --- - - -Browser Profiling is currently in beta. Beta features are still in progress and may have bugs. We recognize the irony. - - - -The browser profiling integration is built using [JS Self-Profiling API](https://wicg.github.io/js-self-profiling/) and will likely only move out of beta once the specification progresses and gains adoption. See platform [status](https://chromestatus.com/feature/5170190448852992). - -Note that since the profiling API is currently only exposed in Chromium, profiles collected only include that demographic. This is obvious, but should not be forgotten when analyzing the data collected. We hope that as the API gains adoption, other browsers will implement it as well. - - - -## Prerequisites - -To get started with JavaScript browser profiling, you'll need to: - -- Install the SDK, minimum version 7.60.0 -- Configure the document response header to include `Document-Policy: js-profiling` -- Configure the SDK to use the `BrowserProfilingIntegration` and set `profilesSampleRate` - -## Step 1: Install the SDK - - - -Install our SDK using either `yarn` or `npm`, the minimum version that supports profiling is **7.60.0**. - - - - - -Install our Electron SDK using either `yarn` or `npm`, the minimum version that supports profiling is **4.16.0**. - - - - - -## Step 2: Add Document-Policy: js-profiling header - -For the JavaScript browser profiler to start, the document response header needs to include a `Document-Policy` header key with the `js-profiling` value. - - - -## Step 3: Configure the JavaScript SDK - -Configuration should happen as early as possible in your application's lifecycle. Once this is done, Sentry's JavaScript SDK will capture all unhandled exceptions and transactions. - - - -## The Difference Between DevTools & Sentry's JavaScript Browser Profiler - -What does Sentry's JavaScript browser profile offer that Chrome DevTools does not? - -- Sentry JavaScript profiler runs in production and captures real user data, showing real-world performance. DevTools runs locally on your machine and only shows profiles of what's running on your machine. -- Sentry runs at a lower sampling rate of 100Hz with a 10ms sample period versus a sampling rate of 1000Hz and a 1ms sample period for DevTools. -- Sentry supports deobfuscation, making it so that all the function names in your code are correct. Typically, when you run JavaScript code, it's minified, meaning that all the function names are replaced with machine-generated abbreviations. - -Please note, that since the browser profiling API is currently only implemented in Chromium-based browsers, the profiles collected with Sentry's JavaScript browser profiling will inherently be biased toward that demographic. This is something that you'll need to consider if you're basing your decisions on the data collected. - -We hope that as the Javascript browser profiling API gains adoption, other browsers will implement it as well. If you find the browser profiling feature helpful and would like to see it gain further adoption, please consider supporting the spec at the official WICG repository. + \ No newline at end of file diff --git a/docs/platforms/javascript/common/profiling/node-profiling.mdx b/docs/platforms/javascript/common/profiling/node-profiling.mdx new file mode 100644 index 00000000000000..be605ddf677de6 --- /dev/null +++ b/docs/platforms/javascript/common/profiling/node-profiling.mdx @@ -0,0 +1,81 @@ +--- +title: Node Profiling +sidebar_order: 5000 +description: "Learn more about how to configure our Profiling integration and start profiling your code." +supported: + - javascript.nextjs + - javascript.sveltekit + - javascript.remix + - javascript.astro + - javascript.node + - javascript.aws-lambda + - javascript.azure-functions + - javascript.connect + - javascript.express + - javascript.fastify + - javascript.gcp-functions + - javascript.hapi + - javascript.koa + - javascript.nestjs +--- + +By default, Sentry error events will not get trace context unless you configure the scope with the transaction, as illustrated in the example below. + + + +If you're adopting Profiling in a high-throughput environment, we recommend testing prior to deployment to ensure that your service's performance characteristics maintain expectations. + + + +## Installation + + + +## Enabling Profiling + +To enable profiling, add `@sentry/profiling-node` to your imports and set up `nodeProfilingIntegration` in your Sentry config. + +```javascript {diff} +const { nodeProfilingIntegration } = require("@sentry/profiling-node"); + +Sentry.init({ + dsn: "___PUBLIC_DSN___", + integrations: [ + // Add our Profiling integration ++ nodeProfilingIntegration(), + ], + tracesSampleRate: 1.0, ++ // Set sampling rate for profiling - this is relative to tracesSampleRate ++ profilesSampleRate: 1.0, +}); + +// Profiling happens automatically after setting it up with `Sentry.init()`. +// All spans captured in your application will have profiling data attached to them. +// You can also manually capture spans with `startSpan`, as shown below: +Sentry.startSpan( + { + op: "rootSpan", + name: "My root span", + }, + () => { + // Any code in this callback will be profiled. + } +); +``` + +## How Does It Work? + +Under the hood, the Sentry profiler uses V8's [CpuProfiler](https://v8docs.nodesource.com/node-18.2/d2/d34/classv8_1_1_cpu_profiler.html) to collect stack samples. This means that `sentry/profiling-node` is written as a [native add-on](https://nodejs.org/docs/latest-v18.x/api/addons.html) for Node and won't run in environments like Deno or Bun. Profiling enhances tracing by providing profiles for individual transactions. This allows you to look at higher level performance information like transaction and span durations before diving deeper and looking at profiles. + + + +## Precompiled Binaries + +Starting from version `0.1.0`, the `@sentry/profiling-node` package precompiles binaries for a number of common architectures. This minimizes the tooling required to run the package and avoids compiling the package from source in most cases, which speeds up installation. Currently, we ship prebuilt binaries for the following architectures and Node versions: + +- macOS x64: Node v16, v18, v20, v22 +- Linux ARM64 (musl): Node v16, v18, v20, v22 +- Linux x64 (glibc): Node v16, v18, v20, v22 +- Windows x64: Node v16, v18, v20, v22 + +The set of common architectures should cover a wide variety of use cases, but if you have feedback or experience different behavior, please open an issue in the [Sentry JavaScript SDK](https://github.com/getsentry/sentry-javascript) repository. From 449afbde61606a56b12c86e20918ff0cbfc124e3 Mon Sep 17 00:00:00 2001 From: Charly Gomez Date: Mon, 16 Dec 2024 14:10:00 +0100 Subject: [PATCH 2/9] remove duplicate node profiling content --- .../guides/aws-lambda/profiling/index.mdx | 85 ---------- .../azure-functions/profiling/index.mdx | 85 ---------- .../guides/connect/profiling/index.mdx | 85 ---------- .../guides/express/profiling/index.mdx | 85 ---------- .../guides/fastify/profiling/index.mdx | 85 ---------- .../guides/gcp-functions/profiling/index.mdx | 85 ---------- .../guides/hapi/profiling/index.mdx | 85 ---------- .../javascript/guides/koa/profiling/index.mdx | 85 ---------- .../guides/nestjs/profiling/index.mdx | 85 ---------- .../guides/node/profiling/index.mdx | 146 ------------------ .../node-install/javascript.astro.mdx | 18 +++ .../node-install/javascript.aws-lambda.mdx | 18 +++ .../node-install/javascript.gcp-functions.mdx | 18 +++ .../node-install/javascript.nestjs.mdx | 20 +++ .../node-install/javascript.nextjs.mdx | 18 +++ .../node-install/javascript.node.mdx | 18 +++ .../node-install/javascript.nuxt.mdx | 18 +++ .../node-install/javascript.remix.mdx | 18 +++ .../node-install/javascript.solidstart.mdx | 18 +++ .../node-install/javascript.sveltekit.mdx | 18 +++ 20 files changed, 182 insertions(+), 911 deletions(-) delete mode 100644 docs/platforms/javascript/guides/aws-lambda/profiling/index.mdx delete mode 100644 docs/platforms/javascript/guides/azure-functions/profiling/index.mdx delete mode 100644 docs/platforms/javascript/guides/connect/profiling/index.mdx delete mode 100644 docs/platforms/javascript/guides/express/profiling/index.mdx delete mode 100644 docs/platforms/javascript/guides/fastify/profiling/index.mdx delete mode 100644 docs/platforms/javascript/guides/gcp-functions/profiling/index.mdx delete mode 100644 docs/platforms/javascript/guides/hapi/profiling/index.mdx delete mode 100644 docs/platforms/javascript/guides/koa/profiling/index.mdx delete mode 100644 docs/platforms/javascript/guides/nestjs/profiling/index.mdx delete mode 100644 docs/platforms/javascript/guides/node/profiling/index.mdx create mode 100644 platform-includes/profiling/node-install/javascript.astro.mdx create mode 100644 platform-includes/profiling/node-install/javascript.aws-lambda.mdx create mode 100644 platform-includes/profiling/node-install/javascript.gcp-functions.mdx create mode 100644 platform-includes/profiling/node-install/javascript.nestjs.mdx create mode 100644 platform-includes/profiling/node-install/javascript.nextjs.mdx create mode 100644 platform-includes/profiling/node-install/javascript.node.mdx create mode 100644 platform-includes/profiling/node-install/javascript.nuxt.mdx create mode 100644 platform-includes/profiling/node-install/javascript.remix.mdx create mode 100644 platform-includes/profiling/node-install/javascript.solidstart.mdx create mode 100644 platform-includes/profiling/node-install/javascript.sveltekit.mdx diff --git a/docs/platforms/javascript/guides/aws-lambda/profiling/index.mdx b/docs/platforms/javascript/guides/aws-lambda/profiling/index.mdx deleted file mode 100644 index 471e531a5b7800..00000000000000 --- a/docs/platforms/javascript/guides/aws-lambda/profiling/index.mdx +++ /dev/null @@ -1,85 +0,0 @@ ---- -title: Set Up Profiling -sidebar_order: 5000 -description: "Learn more about how to configure our Profiling integration and start profiling your code." ---- - -By default, Sentry error events will not get trace context unless you configure the scope with the transaction, as illustrated in the example below. - - - -If you're adopting Profiling in a high-throughput environment, we recommend testing prior to deployment to ensure that your service's performance characteristics maintain expectations. - - - -## Installation - - - -Node profiling is available starting in `@sentry/profiling-node` version `0.3.0`. -You have to have the `@sentry/aws-serverless` (minimum version `8.0.0`) package installed. - - - -```bash {tabTitle:npm} -npm install @sentry/aws-serverless @sentry/profiling-node --save -``` - -```bash {tabTitle:yarn} -yarn add @sentry/aws-serverless @sentry/profiling-node -``` - -```bash {tabTitle:pnpm} -pnpm add @sentry/aws-serverless @sentry/profiling-node -``` - -## Enabling Profiling - -To enable profiling, import `@sentry/profiling-node`, add the `nodeProfilingIntegration` to your integrations, and set the `profilesSampleRate`. - - -```javascript -const Sentry = require("@sentry/aws-serverless"); -const { nodeProfilingIntegration } = require("@sentry/profiling-node"); - -Sentry.init({ - dsn: "___PUBLIC_DSN___", - integrations: [ - // Add our Profiling integration - nodeProfilingIntegration(), - ], - tracesSampleRate: 1.0, - // Set sampling rate for profiling - this is relative to tracesSampleRate - profilesSampleRate: 1.0, -}); - -// Profiling happens automatically after setting it up with `Sentry.init()`. -// All spans captured in your application will have profiling data attached to them. -// You can also manually capture spans with `startSpan`, as shown below: -Sentry.startSpan( - { - op: "rootSpan", - name: "My root span", - }, - () => { - // Any code in this callback will be profiled. - } -); -``` - -## How Does It Work? - -Under the hood, the Sentry profiler uses V8's [CpuProfiler](https://v8docs.nodesource.com/node-18.2/d2/d34/classv8_1_1_cpu_profiler.html) to collect stack samples. This means that `sentry/profiling-node` is written as a [native add-on](https://nodejs.org/docs/latest-v18.x/api/addons.html) for Node and won't run in environments like Deno or Bun. Profiling enhances tracing by providing profiles for individual transactions. This allows you to look at higher level performance information like transaction and span durations before diving deeper and looking at profiles. - - - -## Precompiled Binaries - -Starting from version `0.1.0`, the `@sentry/profiling-node` package precompiles binaries for a number of common architectures. This minimizes the tooling required to run the package and avoids compiling the package from source in most cases, which speeds up installation. Currently, we ship prebuilt binaries for the following architectures and Node versions: - -- macOS x64: Node v16, v18, v20 -- Linux ARM64 (musl): Node v16, v18, v20 -- Linux x64 (glibc): Node v16, v18, v20 -- Windows x64: Node v16, v18, v20 - -The set of common architectures should cover a wide variety of use cases, but if you have feedback or experience different behavior, please open an issue in the [Sentry JavaScript SDK](https://github.com/getsentry/sentry-javascript) repository. diff --git a/docs/platforms/javascript/guides/azure-functions/profiling/index.mdx b/docs/platforms/javascript/guides/azure-functions/profiling/index.mdx deleted file mode 100644 index 16308479c44ef6..00000000000000 --- a/docs/platforms/javascript/guides/azure-functions/profiling/index.mdx +++ /dev/null @@ -1,85 +0,0 @@ ---- -title: Set Up Profiling -sidebar_order: 5000 -description: "Learn more about how to configure our Profiling integration and start profiling your code." ---- - -By default, Sentry error events will not get trace context unless you configure the scope with the transaction, as illustrated in the example below. - - - -If you're adopting Profiling in a high-throughput environment, we recommend testing prior to deployment to ensure that your service's performance characteristics maintain expectations. - - - -## Installation - - - -Node profiling is available starting in `@sentry/profiling-node` version `0.3.0`. -You have to have the `@sentry/node` (minimum version `7.44.1`) package installed. - - - -```bash {tabTitle:npm} -npm install @sentry/node @sentry/profiling-node --save -``` - -```bash {tabTitle:yarn} -yarn add @sentry/node @sentry/profiling-node -``` - -```bash {tabTitle:pnpm} -pnpm add @sentry/node @sentry/profiling-node -``` - -## Enabling Profiling - -To enable profiling, import `@sentry/profiling-node`, add `ProfilingIntegration` to your `integrations`, and set the `profilesSampleRate`. - - -```javascript -const Sentry = require("@sentry/node"); -const { nodeProfilingIntegration } = require("@sentry/profiling-node"); - -Sentry.init({ - dsn: "___PUBLIC_DSN___", - integrations: [ - // Add our Profiling integration - nodeProfilingIntegration(), - ], - tracesSampleRate: 1.0, - // Set sampling rate for profiling - this is relative to tracesSampleRate - profilesSampleRate: 1.0, -}); - -// Profiling happens automatically after setting it up with `Sentry.init()`. -// All spans captured in your application will have profiling data attached to them. -// You can also manually capture spans with `startSpan`, as shown below: -Sentry.startSpan( - { - op: "rootSpan", - name: "My root span", - }, - () => { - // Any code in this callback will be profiled. - } -); -``` - -## How Does It Work? - -Under the hood, the Sentry profiler uses V8's [CpuProfiler](https://v8docs.nodesource.com/node-18.2/d2/d34/classv8_1_1_cpu_profiler.html) to collect stack samples. This means that `sentry/profiling-node` is written as a [native add-on](https://nodejs.org/docs/latest-v18.x/api/addons.html) for Node and won't run in environments like Deno or Bun. Profiling enhances tracing by providing profiles for individual transactions. This allows you to look at higher level performance information like transaction and span durations before diving deeper and looking at profiles. - - - -## Precompiled Binaries - -Starting from version `0.1.0`, the `@sentry/profiling-node` package precompiles binaries for a number of common architectures. This minimizes the tooling required to run the package and avoids compiling the package from source in most cases, which speeds up installation. Currently, we ship prebuilt binaries for the following architectures and Node versions: - -- macOS x64: Node v16, v18, v20 -- Linux ARM64 (musl): Node v16, v18, v20 -- Linux x64 (glibc): Node v16, v18, v20 -- Windows x64: Node v16, v18, v20 - -The set of common architectures should cover a wide variety of use cases, but if you have feedback or experience different behavior, please open an issue in the [Sentry JavaScript SDK](https://github.com/getsentry/sentry-javascript) repository. diff --git a/docs/platforms/javascript/guides/connect/profiling/index.mdx b/docs/platforms/javascript/guides/connect/profiling/index.mdx deleted file mode 100644 index 16308479c44ef6..00000000000000 --- a/docs/platforms/javascript/guides/connect/profiling/index.mdx +++ /dev/null @@ -1,85 +0,0 @@ ---- -title: Set Up Profiling -sidebar_order: 5000 -description: "Learn more about how to configure our Profiling integration and start profiling your code." ---- - -By default, Sentry error events will not get trace context unless you configure the scope with the transaction, as illustrated in the example below. - - - -If you're adopting Profiling in a high-throughput environment, we recommend testing prior to deployment to ensure that your service's performance characteristics maintain expectations. - - - -## Installation - - - -Node profiling is available starting in `@sentry/profiling-node` version `0.3.0`. -You have to have the `@sentry/node` (minimum version `7.44.1`) package installed. - - - -```bash {tabTitle:npm} -npm install @sentry/node @sentry/profiling-node --save -``` - -```bash {tabTitle:yarn} -yarn add @sentry/node @sentry/profiling-node -``` - -```bash {tabTitle:pnpm} -pnpm add @sentry/node @sentry/profiling-node -``` - -## Enabling Profiling - -To enable profiling, import `@sentry/profiling-node`, add `ProfilingIntegration` to your `integrations`, and set the `profilesSampleRate`. - - -```javascript -const Sentry = require("@sentry/node"); -const { nodeProfilingIntegration } = require("@sentry/profiling-node"); - -Sentry.init({ - dsn: "___PUBLIC_DSN___", - integrations: [ - // Add our Profiling integration - nodeProfilingIntegration(), - ], - tracesSampleRate: 1.0, - // Set sampling rate for profiling - this is relative to tracesSampleRate - profilesSampleRate: 1.0, -}); - -// Profiling happens automatically after setting it up with `Sentry.init()`. -// All spans captured in your application will have profiling data attached to them. -// You can also manually capture spans with `startSpan`, as shown below: -Sentry.startSpan( - { - op: "rootSpan", - name: "My root span", - }, - () => { - // Any code in this callback will be profiled. - } -); -``` - -## How Does It Work? - -Under the hood, the Sentry profiler uses V8's [CpuProfiler](https://v8docs.nodesource.com/node-18.2/d2/d34/classv8_1_1_cpu_profiler.html) to collect stack samples. This means that `sentry/profiling-node` is written as a [native add-on](https://nodejs.org/docs/latest-v18.x/api/addons.html) for Node and won't run in environments like Deno or Bun. Profiling enhances tracing by providing profiles for individual transactions. This allows you to look at higher level performance information like transaction and span durations before diving deeper and looking at profiles. - - - -## Precompiled Binaries - -Starting from version `0.1.0`, the `@sentry/profiling-node` package precompiles binaries for a number of common architectures. This minimizes the tooling required to run the package and avoids compiling the package from source in most cases, which speeds up installation. Currently, we ship prebuilt binaries for the following architectures and Node versions: - -- macOS x64: Node v16, v18, v20 -- Linux ARM64 (musl): Node v16, v18, v20 -- Linux x64 (glibc): Node v16, v18, v20 -- Windows x64: Node v16, v18, v20 - -The set of common architectures should cover a wide variety of use cases, but if you have feedback or experience different behavior, please open an issue in the [Sentry JavaScript SDK](https://github.com/getsentry/sentry-javascript) repository. diff --git a/docs/platforms/javascript/guides/express/profiling/index.mdx b/docs/platforms/javascript/guides/express/profiling/index.mdx deleted file mode 100644 index 16308479c44ef6..00000000000000 --- a/docs/platforms/javascript/guides/express/profiling/index.mdx +++ /dev/null @@ -1,85 +0,0 @@ ---- -title: Set Up Profiling -sidebar_order: 5000 -description: "Learn more about how to configure our Profiling integration and start profiling your code." ---- - -By default, Sentry error events will not get trace context unless you configure the scope with the transaction, as illustrated in the example below. - - - -If you're adopting Profiling in a high-throughput environment, we recommend testing prior to deployment to ensure that your service's performance characteristics maintain expectations. - - - -## Installation - - - -Node profiling is available starting in `@sentry/profiling-node` version `0.3.0`. -You have to have the `@sentry/node` (minimum version `7.44.1`) package installed. - - - -```bash {tabTitle:npm} -npm install @sentry/node @sentry/profiling-node --save -``` - -```bash {tabTitle:yarn} -yarn add @sentry/node @sentry/profiling-node -``` - -```bash {tabTitle:pnpm} -pnpm add @sentry/node @sentry/profiling-node -``` - -## Enabling Profiling - -To enable profiling, import `@sentry/profiling-node`, add `ProfilingIntegration` to your `integrations`, and set the `profilesSampleRate`. - - -```javascript -const Sentry = require("@sentry/node"); -const { nodeProfilingIntegration } = require("@sentry/profiling-node"); - -Sentry.init({ - dsn: "___PUBLIC_DSN___", - integrations: [ - // Add our Profiling integration - nodeProfilingIntegration(), - ], - tracesSampleRate: 1.0, - // Set sampling rate for profiling - this is relative to tracesSampleRate - profilesSampleRate: 1.0, -}); - -// Profiling happens automatically after setting it up with `Sentry.init()`. -// All spans captured in your application will have profiling data attached to them. -// You can also manually capture spans with `startSpan`, as shown below: -Sentry.startSpan( - { - op: "rootSpan", - name: "My root span", - }, - () => { - // Any code in this callback will be profiled. - } -); -``` - -## How Does It Work? - -Under the hood, the Sentry profiler uses V8's [CpuProfiler](https://v8docs.nodesource.com/node-18.2/d2/d34/classv8_1_1_cpu_profiler.html) to collect stack samples. This means that `sentry/profiling-node` is written as a [native add-on](https://nodejs.org/docs/latest-v18.x/api/addons.html) for Node and won't run in environments like Deno or Bun. Profiling enhances tracing by providing profiles for individual transactions. This allows you to look at higher level performance information like transaction and span durations before diving deeper and looking at profiles. - - - -## Precompiled Binaries - -Starting from version `0.1.0`, the `@sentry/profiling-node` package precompiles binaries for a number of common architectures. This minimizes the tooling required to run the package and avoids compiling the package from source in most cases, which speeds up installation. Currently, we ship prebuilt binaries for the following architectures and Node versions: - -- macOS x64: Node v16, v18, v20 -- Linux ARM64 (musl): Node v16, v18, v20 -- Linux x64 (glibc): Node v16, v18, v20 -- Windows x64: Node v16, v18, v20 - -The set of common architectures should cover a wide variety of use cases, but if you have feedback or experience different behavior, please open an issue in the [Sentry JavaScript SDK](https://github.com/getsentry/sentry-javascript) repository. diff --git a/docs/platforms/javascript/guides/fastify/profiling/index.mdx b/docs/platforms/javascript/guides/fastify/profiling/index.mdx deleted file mode 100644 index 16308479c44ef6..00000000000000 --- a/docs/platforms/javascript/guides/fastify/profiling/index.mdx +++ /dev/null @@ -1,85 +0,0 @@ ---- -title: Set Up Profiling -sidebar_order: 5000 -description: "Learn more about how to configure our Profiling integration and start profiling your code." ---- - -By default, Sentry error events will not get trace context unless you configure the scope with the transaction, as illustrated in the example below. - - - -If you're adopting Profiling in a high-throughput environment, we recommend testing prior to deployment to ensure that your service's performance characteristics maintain expectations. - - - -## Installation - - - -Node profiling is available starting in `@sentry/profiling-node` version `0.3.0`. -You have to have the `@sentry/node` (minimum version `7.44.1`) package installed. - - - -```bash {tabTitle:npm} -npm install @sentry/node @sentry/profiling-node --save -``` - -```bash {tabTitle:yarn} -yarn add @sentry/node @sentry/profiling-node -``` - -```bash {tabTitle:pnpm} -pnpm add @sentry/node @sentry/profiling-node -``` - -## Enabling Profiling - -To enable profiling, import `@sentry/profiling-node`, add `ProfilingIntegration` to your `integrations`, and set the `profilesSampleRate`. - - -```javascript -const Sentry = require("@sentry/node"); -const { nodeProfilingIntegration } = require("@sentry/profiling-node"); - -Sentry.init({ - dsn: "___PUBLIC_DSN___", - integrations: [ - // Add our Profiling integration - nodeProfilingIntegration(), - ], - tracesSampleRate: 1.0, - // Set sampling rate for profiling - this is relative to tracesSampleRate - profilesSampleRate: 1.0, -}); - -// Profiling happens automatically after setting it up with `Sentry.init()`. -// All spans captured in your application will have profiling data attached to them. -// You can also manually capture spans with `startSpan`, as shown below: -Sentry.startSpan( - { - op: "rootSpan", - name: "My root span", - }, - () => { - // Any code in this callback will be profiled. - } -); -``` - -## How Does It Work? - -Under the hood, the Sentry profiler uses V8's [CpuProfiler](https://v8docs.nodesource.com/node-18.2/d2/d34/classv8_1_1_cpu_profiler.html) to collect stack samples. This means that `sentry/profiling-node` is written as a [native add-on](https://nodejs.org/docs/latest-v18.x/api/addons.html) for Node and won't run in environments like Deno or Bun. Profiling enhances tracing by providing profiles for individual transactions. This allows you to look at higher level performance information like transaction and span durations before diving deeper and looking at profiles. - - - -## Precompiled Binaries - -Starting from version `0.1.0`, the `@sentry/profiling-node` package precompiles binaries for a number of common architectures. This minimizes the tooling required to run the package and avoids compiling the package from source in most cases, which speeds up installation. Currently, we ship prebuilt binaries for the following architectures and Node versions: - -- macOS x64: Node v16, v18, v20 -- Linux ARM64 (musl): Node v16, v18, v20 -- Linux x64 (glibc): Node v16, v18, v20 -- Windows x64: Node v16, v18, v20 - -The set of common architectures should cover a wide variety of use cases, but if you have feedback or experience different behavior, please open an issue in the [Sentry JavaScript SDK](https://github.com/getsentry/sentry-javascript) repository. diff --git a/docs/platforms/javascript/guides/gcp-functions/profiling/index.mdx b/docs/platforms/javascript/guides/gcp-functions/profiling/index.mdx deleted file mode 100644 index a64aa6ce254e51..00000000000000 --- a/docs/platforms/javascript/guides/gcp-functions/profiling/index.mdx +++ /dev/null @@ -1,85 +0,0 @@ ---- -title: Set Up Profiling -sidebar_order: 5000 -description: "Learn more about how to configure our Profiling integration and start profiling your code." ---- - -By default, Sentry error events will not get trace context unless you configure the scope with the transaction, as illustrated in the example below. - - - -If you're adopting Profiling in a high-throughput environment, we recommend testing prior to deployment to ensure that your service's performance characteristics maintain expectations. - - - -## Installation - - - -Node profiling is available starting in `@sentry/profiling-node` version `0.3.0`. -You have to have the `@sentry/google-cloud-serverless` (minimum version `8.0.0`) package installed. - - - -```bash {tabTitle:npm} -npm install @sentry/google-cloud-serverless @sentry/profiling-node --save -``` - -```bash {tabTitle:yarn} -yarn add @sentry/google-cloud-serverless @sentry/profiling-node -``` - -```bash {tabTitle:pnpm} -pnpm add @sentry/google-cloud-serverless @sentry/profiling-node -``` - -## Enabling Profiling - -To enable profiling, import `@sentry/profiling-node`, add the `nodeProfilingIntegration` to your integrations, and set the `profilesSampleRate`. - - -```javascript -const Sentry = require("@sentry/google-cloud-serverless"); -const { nodeProfilingIntegration } = require("@sentry/profiling-node"); - -Sentry.init({ - dsn: "___PUBLIC_DSN___", - integrations: [ - // Add our Profiling integration - nodeProfilingIntegration(), - ], - tracesSampleRate: 1.0, - // Set sampling rate for profiling - this is relative to tracesSampleRate - profilesSampleRate: 1.0, -}); - -// Profiling happens automatically after setting it up with `Sentry.init()`. -// All spans captured in your application will have profiling data attached to them. -// You can also manually capture spans with `startSpan`, as shown below: -Sentry.startSpan( - { - op: "rootSpan", - name: "My root span", - }, - () => { - // Any code in this callback will be profiled. - } -); -``` - -## How Does It Work? - -Under the hood, the Sentry profiler uses V8's [CpuProfiler](https://v8docs.nodesource.com/node-18.2/d2/d34/classv8_1_1_cpu_profiler.html) to collect stack samples. This means that `sentry/profiling-node` is written as a [native add-on](https://nodejs.org/docs/latest-v18.x/api/addons.html) for Node and won't run in environments like Deno or Bun. Profiling enhances tracing by providing profiles for individual transactions. This allows you to look at higher level performance information like transaction and span durations before diving deeper and looking at profiles. - - - -## Precompiled Binaries - -Starting from version `0.1.0`, the `@sentry/profiling-node` package precompiles binaries for a number of common architectures. This minimizes the tooling required to run the package and avoids compiling the package from source in most cases, which speeds up installation. Currently, we ship prebuilt binaries for the following architectures and Node versions: - -- macOS x64: Node v16, v18, v20 -- Linux ARM64 (musl): Node v16, v18, v20 -- Linux x64 (glibc): Node v16, v18, v20 -- Windows x64: Node v16, v18, v20 - -The set of common architectures should cover a wide variety of use cases, but if you have feedback or experience different behavior, please open an issue in the [Sentry JavaScript SDK](https://github.com/getsentry/sentry-javascript) repository. diff --git a/docs/platforms/javascript/guides/hapi/profiling/index.mdx b/docs/platforms/javascript/guides/hapi/profiling/index.mdx deleted file mode 100644 index 16308479c44ef6..00000000000000 --- a/docs/platforms/javascript/guides/hapi/profiling/index.mdx +++ /dev/null @@ -1,85 +0,0 @@ ---- -title: Set Up Profiling -sidebar_order: 5000 -description: "Learn more about how to configure our Profiling integration and start profiling your code." ---- - -By default, Sentry error events will not get trace context unless you configure the scope with the transaction, as illustrated in the example below. - - - -If you're adopting Profiling in a high-throughput environment, we recommend testing prior to deployment to ensure that your service's performance characteristics maintain expectations. - - - -## Installation - - - -Node profiling is available starting in `@sentry/profiling-node` version `0.3.0`. -You have to have the `@sentry/node` (minimum version `7.44.1`) package installed. - - - -```bash {tabTitle:npm} -npm install @sentry/node @sentry/profiling-node --save -``` - -```bash {tabTitle:yarn} -yarn add @sentry/node @sentry/profiling-node -``` - -```bash {tabTitle:pnpm} -pnpm add @sentry/node @sentry/profiling-node -``` - -## Enabling Profiling - -To enable profiling, import `@sentry/profiling-node`, add `ProfilingIntegration` to your `integrations`, and set the `profilesSampleRate`. - - -```javascript -const Sentry = require("@sentry/node"); -const { nodeProfilingIntegration } = require("@sentry/profiling-node"); - -Sentry.init({ - dsn: "___PUBLIC_DSN___", - integrations: [ - // Add our Profiling integration - nodeProfilingIntegration(), - ], - tracesSampleRate: 1.0, - // Set sampling rate for profiling - this is relative to tracesSampleRate - profilesSampleRate: 1.0, -}); - -// Profiling happens automatically after setting it up with `Sentry.init()`. -// All spans captured in your application will have profiling data attached to them. -// You can also manually capture spans with `startSpan`, as shown below: -Sentry.startSpan( - { - op: "rootSpan", - name: "My root span", - }, - () => { - // Any code in this callback will be profiled. - } -); -``` - -## How Does It Work? - -Under the hood, the Sentry profiler uses V8's [CpuProfiler](https://v8docs.nodesource.com/node-18.2/d2/d34/classv8_1_1_cpu_profiler.html) to collect stack samples. This means that `sentry/profiling-node` is written as a [native add-on](https://nodejs.org/docs/latest-v18.x/api/addons.html) for Node and won't run in environments like Deno or Bun. Profiling enhances tracing by providing profiles for individual transactions. This allows you to look at higher level performance information like transaction and span durations before diving deeper and looking at profiles. - - - -## Precompiled Binaries - -Starting from version `0.1.0`, the `@sentry/profiling-node` package precompiles binaries for a number of common architectures. This minimizes the tooling required to run the package and avoids compiling the package from source in most cases, which speeds up installation. Currently, we ship prebuilt binaries for the following architectures and Node versions: - -- macOS x64: Node v16, v18, v20 -- Linux ARM64 (musl): Node v16, v18, v20 -- Linux x64 (glibc): Node v16, v18, v20 -- Windows x64: Node v16, v18, v20 - -The set of common architectures should cover a wide variety of use cases, but if you have feedback or experience different behavior, please open an issue in the [Sentry JavaScript SDK](https://github.com/getsentry/sentry-javascript) repository. diff --git a/docs/platforms/javascript/guides/koa/profiling/index.mdx b/docs/platforms/javascript/guides/koa/profiling/index.mdx deleted file mode 100644 index 16308479c44ef6..00000000000000 --- a/docs/platforms/javascript/guides/koa/profiling/index.mdx +++ /dev/null @@ -1,85 +0,0 @@ ---- -title: Set Up Profiling -sidebar_order: 5000 -description: "Learn more about how to configure our Profiling integration and start profiling your code." ---- - -By default, Sentry error events will not get trace context unless you configure the scope with the transaction, as illustrated in the example below. - - - -If you're adopting Profiling in a high-throughput environment, we recommend testing prior to deployment to ensure that your service's performance characteristics maintain expectations. - - - -## Installation - - - -Node profiling is available starting in `@sentry/profiling-node` version `0.3.0`. -You have to have the `@sentry/node` (minimum version `7.44.1`) package installed. - - - -```bash {tabTitle:npm} -npm install @sentry/node @sentry/profiling-node --save -``` - -```bash {tabTitle:yarn} -yarn add @sentry/node @sentry/profiling-node -``` - -```bash {tabTitle:pnpm} -pnpm add @sentry/node @sentry/profiling-node -``` - -## Enabling Profiling - -To enable profiling, import `@sentry/profiling-node`, add `ProfilingIntegration` to your `integrations`, and set the `profilesSampleRate`. - - -```javascript -const Sentry = require("@sentry/node"); -const { nodeProfilingIntegration } = require("@sentry/profiling-node"); - -Sentry.init({ - dsn: "___PUBLIC_DSN___", - integrations: [ - // Add our Profiling integration - nodeProfilingIntegration(), - ], - tracesSampleRate: 1.0, - // Set sampling rate for profiling - this is relative to tracesSampleRate - profilesSampleRate: 1.0, -}); - -// Profiling happens automatically after setting it up with `Sentry.init()`. -// All spans captured in your application will have profiling data attached to them. -// You can also manually capture spans with `startSpan`, as shown below: -Sentry.startSpan( - { - op: "rootSpan", - name: "My root span", - }, - () => { - // Any code in this callback will be profiled. - } -); -``` - -## How Does It Work? - -Under the hood, the Sentry profiler uses V8's [CpuProfiler](https://v8docs.nodesource.com/node-18.2/d2/d34/classv8_1_1_cpu_profiler.html) to collect stack samples. This means that `sentry/profiling-node` is written as a [native add-on](https://nodejs.org/docs/latest-v18.x/api/addons.html) for Node and won't run in environments like Deno or Bun. Profiling enhances tracing by providing profiles for individual transactions. This allows you to look at higher level performance information like transaction and span durations before diving deeper and looking at profiles. - - - -## Precompiled Binaries - -Starting from version `0.1.0`, the `@sentry/profiling-node` package precompiles binaries for a number of common architectures. This minimizes the tooling required to run the package and avoids compiling the package from source in most cases, which speeds up installation. Currently, we ship prebuilt binaries for the following architectures and Node versions: - -- macOS x64: Node v16, v18, v20 -- Linux ARM64 (musl): Node v16, v18, v20 -- Linux x64 (glibc): Node v16, v18, v20 -- Windows x64: Node v16, v18, v20 - -The set of common architectures should cover a wide variety of use cases, but if you have feedback or experience different behavior, please open an issue in the [Sentry JavaScript SDK](https://github.com/getsentry/sentry-javascript) repository. diff --git a/docs/platforms/javascript/guides/nestjs/profiling/index.mdx b/docs/platforms/javascript/guides/nestjs/profiling/index.mdx deleted file mode 100644 index 6c872ec942f170..00000000000000 --- a/docs/platforms/javascript/guides/nestjs/profiling/index.mdx +++ /dev/null @@ -1,85 +0,0 @@ ---- -title: Set Up Profiling -sidebar_order: 5000 -description: "Learn more about how to configure our Profiling integration and start profiling your code." ---- - -By default, Sentry error events will not get trace context unless you configure the scope with the transaction, as illustrated in the example below. - - - -If you're adopting Profiling in a high-throughput environment, we recommend testing prior to deployment to ensure that your service's performance characteristics maintain expectations. - - - -## Installation - - - -Node profiling is available starting in `@sentry/profiling-node` version `0.3.0`. -You have to have the `@sentry/nestjs` package installed. - - - -```bash {tabTitle:npm} -npm install @sentry/nestjs @sentry/profiling-node --save -``` - -```bash {tabTitle:yarn} -yarn add @sentry/nestjs @sentry/profiling-node -``` - -```bash {tabTitle:pnpm} -pnpm add @sentry/nestjs @sentry/profiling-node -``` - -## Enabling Profiling - -To enable profiling, import `@sentry/profiling-node`, add `ProfilingIntegration` to your `integrations`, and set the `profilesSampleRate`. - - -```javascript -const Sentry = require("@sentry/nestjs"); -const { nodeProfilingIntegration } = require("@sentry/profiling-node"); - -Sentry.init({ - dsn: "___PUBLIC_DSN___", - integrations: [ - // Add our Profiling integration - nodeProfilingIntegration(), - ], - tracesSampleRate: 1.0, - // Set sampling rate for profiling - this is relative to tracesSampleRate - profilesSampleRate: 1.0, -}); - -// Profiling happens automatically after setting it up with `Sentry.init()`. -// All spans captured in your application will have profiling data attached to them. -// You can also manually capture spans with `startSpan`, as shown below: -Sentry.startSpan( - { - op: "rootSpan", - name: "My root span", - }, - () => { - // Any code in this callback will be profiled. - } -); -``` - -## How Does It Work? - -Under the hood, the Sentry profiler uses V8's [CpuProfiler](https://v8docs.nodesource.com/node-18.2/d2/d34/classv8_1_1_cpu_profiler.html) to collect stack samples. This means that `sentry/profiling-node` is written as a [native add-on](https://nodejs.org/docs/latest-v18.x/api/addons.html) for Node and won't run in environments like Deno or Bun. Profiling enhances tracing by providing profiles for individual transactions. This allows you to look at higher level performance information like transaction and span durations before diving deeper and looking at profiles. - - - -## Precompiled Binaries - -Starting from version `0.1.0`, the `@sentry/profiling-node` package precompiles binaries for a number of common architectures. This minimizes the tooling required to run the package and avoids compiling the package from source in most cases, which speeds up installation. Currently, we ship prebuilt binaries for the following architectures and Node versions: - -- macOS x64: Node v16, v18, v20, v22 -- Linux ARM64 (musl): Node v16, v18, v20, v22 -- Linux x64 (glibc): Node v16, v18, v20, v22 -- Windows x64: Node v16, v18, v20, v22 - -The set of common architectures should cover a wide variety of use cases, but if you have feedback or experience different behavior, please open an issue in the [Sentry JavaScript SDK](https://github.com/getsentry/sentry-javascript) repository. diff --git a/docs/platforms/javascript/guides/node/profiling/index.mdx b/docs/platforms/javascript/guides/node/profiling/index.mdx deleted file mode 100644 index 6fb57a956ccc80..00000000000000 --- a/docs/platforms/javascript/guides/node/profiling/index.mdx +++ /dev/null @@ -1,146 +0,0 @@ ---- -title: Set Up Profiling -description: "Learn more about how to configure our Profiling integration and start profiling your code." -sidebar_order: 5000 ---- - -By default, Sentry error events will not get trace context unless you configure the scope with the transaction, as illustrated in the example below. - - - -If you're adopting Profiling in a high-throughput environment, we recommend testing prior to deployment to ensure that your service's performance characteristics maintain expectations. - - - -## Installation - - - -Node profiling is available starting in `@sentry/profiling-node` version `0.3.0`. -You have to have the `@sentry/node` (minimum version `7.44.1`) package installed. - - - -```bash {tabTitle:npm} -npm install @sentry/node @sentry/profiling-node --save -``` - -```bash {tabTitle:yarn} -yarn add @sentry/node @sentry/profiling-node -``` - -```bash {tabTitle:pnpm} -pnpm add @sentry/node @sentry/profiling-node -``` - -## Enabling Profiling - -To enable profiling, import `@sentry/profiling-node`, add `ProfilingIntegration` to your `integrations`, and set the `profilesSampleRate`. - -```javascript -const Sentry = require("@sentry/node"); -const { nodeProfilingIntegration } = require("@sentry/profiling-node"); - -Sentry.init({ - dsn: "___PUBLIC_DSN___", - integrations: [ - // Add our Profiling integration - nodeProfilingIntegration(), - ], - tracesSampleRate: 1.0, - - // Set profilesSampleRate to 1.0 to profile every transaction. - // Since profilesSampleRate is relative to tracesSampleRate, - // the final profiling rate can be computed as tracesSampleRate * profilesSampleRate - // For example, a tracesSampleRate of 0.5 and profilesSampleRate of 0.5 would - // result in 25% of transactions being profiled (0.5*0.5=0.25) - profilesSampleRate: 1.0, -}); - -// Profiling happens automatically after setting it up with `Sentry.init()`. -// All spans captured in your application will have profiling data attached to them. -// You can also manually capture spans with `startSpan`, as shown below: -Sentry.startSpan( - { - op: "rootSpan", - name: "My root span", - }, - () => { - // Any code in this callback will be profiled. - } -); -``` - -Alternatively, instead of a `profilesSampleRate` your can also provide a `profilesSampler` function: - -```javascript -const Sentry = require("@sentry/node"); -const { nodeProfilingIntegration } = require("@sentry/profiling-node"); - -Sentry.init({ - dsn: "___PUBLIC_DSN___", - integrations: [ - // Add our Profiling integration - nodeProfilingIntegration(), - ], - tracesSampleRate: 1.0, - - // This function will be called for every sampled span - // to determine if it should be profiled - profilesSampler: (samplingContext) => { - return 1.0; - }, -}); -``` - -## Enable Continuous Profiling - - - -_(New in version 8.28.0)_ - -The current profiling implementation stops the profiler automatically after 30 seconds (unless you manually stop it earlier). Naturally, this limitation makes it difficult to get full coverage of your app's execution. We now offer an experimental continuous mode, where profiling data is periodically uploaded while running, with no limit on how long the profiler may run. - -To get started with continuous profiling, you can start and stop the profiler directly with `Sentry.profiler.startProfiler` and `Sentry.profiler.stopProfiler`. - - - -If you previously set `profilesSampleRate` or `profilesSampler` to use transaction-based profiling, you must remove those lines of code from your configuration in order to use continuous profiling. - - - -```js -const Sentry = require("@sentry/node"); - -Sentry.init({ - dsn: "___PUBLIC_DSN___", -}); - -Sentry.profiler.startProfiler(); - -// run some code here - -Sentry.profiler.stopProfiler(); -``` - -These new APIs do not offer any sampling functionality—every call to start the profiler will run and start sending profiling data. If you are interested in reducing the amount of profiles that run, you must take care to do it at the callsites. - -Continuous profiling has implications for your org's billing structure. This feature is only available for subscription plans that enrolled after June 5, 2024. - -## How Does It Work? - -Under the hood, the Sentry profiler uses V8's [CpuProfiler](https://v8docs.nodesource.com/node-18.2/d2/d34/classv8_1_1_cpu_profiler.html) to collect stack samples. This means that `sentry/profiling-node` is written as a [native add-on](https://nodejs.org/docs/latest-v18.x/api/addons.html) for Node and won't run in environments like Deno or Bun. Profiling enhances tracing by providing profiles for individual transactions. This allows you to look at higher level performance information like transaction and span durations before diving deeper and looking at profiles. - - - -## Precompiled Binaries - -Starting from version `0.1.0`, the `@sentry/profiling-node` package precompiles binaries for a number of common architectures. This minimizes the tooling required to run the package and avoids compiling the package from source in most cases, which speeds up installation. Currently, we ship prebuilt binaries for the following architectures and Node versions: - -- macOS arm64: Node v16, v18, v20, v22 -- macOS x64: Node v16, v18, v20, v22 -- Linux arm64 (musl): Node v16, v18, v20, v22 -- Linux x64 (glibc): Node v16, v18, v20, v22 -- Windows x64: Node v16, v18, v20, v22 - -The set of common architectures should cover a wide variety of use cases, but if you have feedback or experience different behavior, please open an issue in the [Sentry JavaScript SDK](https://github.com/getsentry/sentry-javascript) repository. diff --git a/platform-includes/profiling/node-install/javascript.astro.mdx b/platform-includes/profiling/node-install/javascript.astro.mdx new file mode 100644 index 00000000000000..0fbc72736f69b0 --- /dev/null +++ b/platform-includes/profiling/node-install/javascript.astro.mdx @@ -0,0 +1,18 @@ + + +Node profiling is available starting in `@sentry/profiling-node` version `0.3.0`. +You have to have the `@sentry/astro` package installed. + + + +```bash {tabTitle:npm} +npm install @sentry/astro @sentry/profiling-node --save +``` + +```bash {tabTitle:yarn} +yarn add @sentry/astro @sentry/profiling-node +``` + +```bash {tabTitle:pnpm} +pnpm add @sentry/astro @sentry/profiling-node +``` diff --git a/platform-includes/profiling/node-install/javascript.aws-lambda.mdx b/platform-includes/profiling/node-install/javascript.aws-lambda.mdx new file mode 100644 index 00000000000000..d7cc61fa8a8444 --- /dev/null +++ b/platform-includes/profiling/node-install/javascript.aws-lambda.mdx @@ -0,0 +1,18 @@ + + +Node profiling is available starting in `@sentry/profiling-node` version `0.3.0`. +You have to have the `@sentry/aws-serverless` (minimum version `8.0.0`) package installed. + + + +```bash {tabTitle:npm} +npm install @sentry/aws-serverless @sentry/profiling-node --save +``` + +```bash {tabTitle:yarn} +yarn add @sentry/aws-serverless @sentry/profiling-node +``` + +```bash {tabTitle:pnpm} +pnpm add @sentry/aws-serverless @sentry/profiling-node +``` diff --git a/platform-includes/profiling/node-install/javascript.gcp-functions.mdx b/platform-includes/profiling/node-install/javascript.gcp-functions.mdx new file mode 100644 index 00000000000000..3844735e6f12d9 --- /dev/null +++ b/platform-includes/profiling/node-install/javascript.gcp-functions.mdx @@ -0,0 +1,18 @@ + + +Node profiling is available starting in `@sentry/profiling-node` version `0.3.0`. +You have to have the `@sentry/google-cloud-serverless` (minimum version `8.0.0`) package installed. + + + +```bash {tabTitle:npm} +npm install @sentry/google-cloud-serverless @sentry/profiling-node --save +``` + +```bash {tabTitle:yarn} +yarn add @sentry/google-cloud-serverless @sentry/profiling-node +``` + +```bash {tabTitle:pnpm} +pnpm add @sentry/google-cloud-serverless @sentry/profiling-node +``` diff --git a/platform-includes/profiling/node-install/javascript.nestjs.mdx b/platform-includes/profiling/node-install/javascript.nestjs.mdx new file mode 100644 index 00000000000000..e35514b89a59d1 --- /dev/null +++ b/platform-includes/profiling/node-install/javascript.nestjs.mdx @@ -0,0 +1,20 @@ + + + + +Node profiling is available starting in `@sentry/profiling-node` version `0.3.0`. +You have to have the `@sentry/nestjs` package installed. + + + +```bash {tabTitle:npm} +npm install @sentry/nestjs @sentry/profiling-node --save +``` + +```bash {tabTitle:yarn} +yarn add @sentry/nestjs @sentry/profiling-node +``` + +```bash {tabTitle:pnpm} +pnpm add @sentry/nestjs @sentry/profiling-node +``` \ No newline at end of file diff --git a/platform-includes/profiling/node-install/javascript.nextjs.mdx b/platform-includes/profiling/node-install/javascript.nextjs.mdx new file mode 100644 index 00000000000000..042e5729261435 --- /dev/null +++ b/platform-includes/profiling/node-install/javascript.nextjs.mdx @@ -0,0 +1,18 @@ + + +Node profiling is available starting in `@sentry/profiling-node` version `0.3.0`. +You have to have the `@sentry/nextjs` (minimum version `7.44.1`) package installed. + + + +```bash {tabTitle:npm} +npm install @sentry/nextjs @sentry/profiling-node --save +``` + +```bash {tabTitle:yarn} +yarn add @sentry/nextjs @sentry/profiling-node +``` + +```bash {tabTitle:pnpm} +pnpm add @sentry/nextjs @sentry/profiling-node +``` \ No newline at end of file diff --git a/platform-includes/profiling/node-install/javascript.node.mdx b/platform-includes/profiling/node-install/javascript.node.mdx new file mode 100644 index 00000000000000..5291126f468ec1 --- /dev/null +++ b/platform-includes/profiling/node-install/javascript.node.mdx @@ -0,0 +1,18 @@ + + +Node profiling is available starting in `@sentry/profiling-node` version `0.3.0`. +You have to have the `@sentry/node` (minimum version `7.44.1`) package installed. + + + +```bash {tabTitle:npm} +npm install @sentry/node @sentry/profiling-node --save +``` + +```bash {tabTitle:yarn} +yarn add @sentry/node @sentry/profiling-node +``` + +```bash {tabTitle:pnpm} +pnpm add @sentry/node @sentry/profiling-node +``` \ No newline at end of file diff --git a/platform-includes/profiling/node-install/javascript.nuxt.mdx b/platform-includes/profiling/node-install/javascript.nuxt.mdx new file mode 100644 index 00000000000000..441efba901f03c --- /dev/null +++ b/platform-includes/profiling/node-install/javascript.nuxt.mdx @@ -0,0 +1,18 @@ + + +Node profiling is available starting in `@sentry/profiling-node` version `0.3.0`. +You have to have the `@sentry/nuxt` package installed. + + + +```bash {tabTitle:npm} +npm install @sentry/nuxt @sentry/profiling-node --save +``` + +```bash {tabTitle:yarn} +yarn add @sentry/nuxt @sentry/profiling-node +``` + +```bash {tabTitle:pnpm} +pnpm add @sentry/nuxt @sentry/profiling-node +``` diff --git a/platform-includes/profiling/node-install/javascript.remix.mdx b/platform-includes/profiling/node-install/javascript.remix.mdx new file mode 100644 index 00000000000000..1620e6cf6e5812 --- /dev/null +++ b/platform-includes/profiling/node-install/javascript.remix.mdx @@ -0,0 +1,18 @@ + + +Node profiling is available starting in `@sentry/profiling-node` version `0.3.0`. +You have to have the `@sentry/remix` package installed. + + + +```bash {tabTitle:npm} +npm install @sentry/remix @sentry/profiling-node --save +``` + +```bash {tabTitle:yarn} +yarn add @sentry/remix @sentry/profiling-node +``` + +```bash {tabTitle:pnpm} +pnpm add @sentry/remix @sentry/profiling-node +``` diff --git a/platform-includes/profiling/node-install/javascript.solidstart.mdx b/platform-includes/profiling/node-install/javascript.solidstart.mdx new file mode 100644 index 00000000000000..60f401168f218b --- /dev/null +++ b/platform-includes/profiling/node-install/javascript.solidstart.mdx @@ -0,0 +1,18 @@ + + +Node profiling is available starting in `@sentry/profiling-node` version `0.3.0`. +You have to have the `@sentry/solidstart` package installed. + + + +```bash {tabTitle:npm} +npm install @sentry/solidstart @sentry/profiling-node --save +``` + +```bash {tabTitle:yarn} +yarn add @sentry/solidstart @sentry/profiling-node +``` + +```bash {tabTitle:pnpm} +pnpm add @sentry/solidstart @sentry/profiling-node +``` diff --git a/platform-includes/profiling/node-install/javascript.sveltekit.mdx b/platform-includes/profiling/node-install/javascript.sveltekit.mdx new file mode 100644 index 00000000000000..cf55f4a20d6be7 --- /dev/null +++ b/platform-includes/profiling/node-install/javascript.sveltekit.mdx @@ -0,0 +1,18 @@ + + +Node profiling is available starting in `@sentry/profiling-node` version `0.3.0`. +You have to have the `@sentry/sveltekit` package installed. + + + +```bash {tabTitle:npm} +npm install @sentry/sveltekit @sentry/profiling-node --save +``` + +```bash {tabTitle:yarn} +yarn add @sentry/sveltekit @sentry/profiling-node +``` + +```bash {tabTitle:pnpm} +pnpm add @sentry/sveltekit @sentry/profiling-node +``` From 9b16530943dea157459ed0462b61a28ad88bc4cc Mon Sep 17 00:00:00 2001 From: Charly Gomez Date: Tue, 17 Dec 2024 11:24:35 +0100 Subject: [PATCH 3/9] get rid of platform includes in node profiling --- .../common/profiling/browser-profiling.mdx | 5 ++--- .../javascript/common/profiling/index.mdx | 6 ++++++ .../common/profiling/node-profiling.mdx | 3 ++- .../javascript.astro.mdx | 11 ++++++++++ .../javascript.angular.mdx | 2 +- .../javascript.astro.mdx | 2 +- .../javascript.nextjs.mdx | 2 +- .../javascript.nuxt.mdx | 2 +- .../javascript.react.mdx | 2 +- .../javascript.remix.mdx | 2 +- .../javascript.svelte.mdx | 2 +- .../javascript.sveltekit.mdx | 2 +- .../javascript.vue.mdx | 2 +- .../node-install/javascript.astro.mdx | 18 ----------------- .../node-install/javascript.aws-lambda.mdx | 18 ----------------- .../node-install/javascript.gcp-functions.mdx | 18 ----------------- .../node-install/javascript.nestjs.mdx | 20 ------------------- .../node-install/javascript.nextjs.mdx | 18 ----------------- .../node-install/javascript.node.mdx | 18 ----------------- .../node-install/javascript.nuxt.mdx | 18 ----------------- .../node-install/javascript.remix.mdx | 18 ----------------- .../node-install/javascript.solidstart.mdx | 18 ----------------- .../node-install/javascript.sveltekit.mdx | 18 ----------------- 23 files changed, 30 insertions(+), 195 deletions(-) create mode 100644 platform-includes/profiling/automatic-instrumentation-intro/javascript.astro.mdx delete mode 100644 platform-includes/profiling/node-install/javascript.astro.mdx delete mode 100644 platform-includes/profiling/node-install/javascript.aws-lambda.mdx delete mode 100644 platform-includes/profiling/node-install/javascript.gcp-functions.mdx delete mode 100644 platform-includes/profiling/node-install/javascript.nestjs.mdx delete mode 100644 platform-includes/profiling/node-install/javascript.nextjs.mdx delete mode 100644 platform-includes/profiling/node-install/javascript.node.mdx delete mode 100644 platform-includes/profiling/node-install/javascript.nuxt.mdx delete mode 100644 platform-includes/profiling/node-install/javascript.remix.mdx delete mode 100644 platform-includes/profiling/node-install/javascript.solidstart.mdx delete mode 100644 platform-includes/profiling/node-install/javascript.sveltekit.mdx diff --git a/docs/platforms/javascript/common/profiling/browser-profiling.mdx b/docs/platforms/javascript/common/profiling/browser-profiling.mdx index a3ece4713705ed..7520bd3eaf5a43 100644 --- a/docs/platforms/javascript/common/profiling/browser-profiling.mdx +++ b/docs/platforms/javascript/common/profiling/browser-profiling.mdx @@ -6,10 +6,9 @@ supported: notSupported: - javascript.bun - javascript.cordova + - javascript.capacitor - javascript.deno - javascript.cloudflare - - javascript.nodejs - - javascript.electron - javascript.node - javascript.aws-lambda - javascript.azure-functions @@ -65,7 +64,7 @@ For the JavaScript browser profiler to start, the document response header needs -## Step 3: Configure the JavaScript SDK +## Step 3: Configure the SDK Configuration should happen as early as possible in your application's lifecycle. Once this is done, Sentry's JavaScript SDK will capture all unhandled exceptions and transactions. diff --git a/docs/platforms/javascript/common/profiling/index.mdx b/docs/platforms/javascript/common/profiling/index.mdx index f23a686c1767c3..dcddf31ebdde44 100644 --- a/docs/platforms/javascript/common/profiling/index.mdx +++ b/docs/platforms/javascript/common/profiling/index.mdx @@ -2,6 +2,12 @@ title: Set Up Profiling sidebar_order: 5000 description: "Collect & view performance insights for JavaScript programs with Sentry's Profiling integrations. Get started with browser and Node.js profiling to understand your application's performance." +notSupported: + - javascript.bun + - javascript.cordova + - javascript.capacitor + - javascript.deno + - javascript.cloudflare --- \ No newline at end of file diff --git a/docs/platforms/javascript/common/profiling/node-profiling.mdx b/docs/platforms/javascript/common/profiling/node-profiling.mdx index be605ddf677de6..42ccf5fb0edd6e 100644 --- a/docs/platforms/javascript/common/profiling/node-profiling.mdx +++ b/docs/platforms/javascript/common/profiling/node-profiling.mdx @@ -29,7 +29,8 @@ If you're adopting Profiling in a high-throughput environment, we recommend test ## Installation - +Node profiling is available starting in `@sentry/profiling-node` version `0.3.0`. +You have to have the (minimum version `7.44.1`) package installed. ## Enabling Profiling diff --git a/platform-includes/profiling/automatic-instrumentation-intro/javascript.astro.mdx b/platform-includes/profiling/automatic-instrumentation-intro/javascript.astro.mdx new file mode 100644 index 00000000000000..ec0315bb012612 --- /dev/null +++ b/platform-includes/profiling/automatic-instrumentation-intro/javascript.astro.mdx @@ -0,0 +1,11 @@ +```bash {tabTitle:npm} +npm install @sentry/astro --save +``` + +```bash {tabTitle:yarn} +yarn add @sentry/astro +``` + +```bash {tabTitle:pnpm} +pnpm add @sentry/astro +``` diff --git a/platform-includes/profiling/automatic-instrumentation-setup/javascript.angular.mdx b/platform-includes/profiling/automatic-instrumentation-setup/javascript.angular.mdx index 33675f59acf565..da1878f10e2f9d 100644 --- a/platform-includes/profiling/automatic-instrumentation-setup/javascript.angular.mdx +++ b/platform-includes/profiling/automatic-instrumentation-setup/javascript.angular.mdx @@ -28,7 +28,7 @@ Sentry.init({ Alternatively, instead of a `profilesSampleRate` your can also provide a `profilesSampler` function: ```javascript -const Sentry = require("@sentry/angular"); +import * as Sentry from "@sentry/angular"; Sentry.init({ dsn: "___PUBLIC_DSN___", diff --git a/platform-includes/profiling/automatic-instrumentation-setup/javascript.astro.mdx b/platform-includes/profiling/automatic-instrumentation-setup/javascript.astro.mdx index 765584e78b63d8..39e0b082933d01 100644 --- a/platform-includes/profiling/automatic-instrumentation-setup/javascript.astro.mdx +++ b/platform-includes/profiling/automatic-instrumentation-setup/javascript.astro.mdx @@ -27,7 +27,7 @@ Sentry.init({ Alternatively, instead of a `profilesSampleRate` your can also provide a `profilesSampler` function: ```javascript -const Sentry = require("@sentry/astro"); +import * as Sentry from "@sentry/astro"; Sentry.init({ dsn: "___PUBLIC_DSN___", diff --git a/platform-includes/profiling/automatic-instrumentation-setup/javascript.nextjs.mdx b/platform-includes/profiling/automatic-instrumentation-setup/javascript.nextjs.mdx index b6e9c7c9b75a26..b972ffb57a6fbd 100644 --- a/platform-includes/profiling/automatic-instrumentation-setup/javascript.nextjs.mdx +++ b/platform-includes/profiling/automatic-instrumentation-setup/javascript.nextjs.mdx @@ -27,7 +27,7 @@ Sentry.init({ Alternatively, instead of a `profilesSampleRate` your can also provide a `profilesSampler` function: ```javascript {filename:sentry.client.config.js|ts} -const Sentry = require("@sentry/nextjs"); +import * as Sentry from "@sentry/nextjs"; Sentry.init({ dsn: "___PUBLIC_DSN___", diff --git a/platform-includes/profiling/automatic-instrumentation-setup/javascript.nuxt.mdx b/platform-includes/profiling/automatic-instrumentation-setup/javascript.nuxt.mdx index c70291ae639130..8179d0de653655 100644 --- a/platform-includes/profiling/automatic-instrumentation-setup/javascript.nuxt.mdx +++ b/platform-includes/profiling/automatic-instrumentation-setup/javascript.nuxt.mdx @@ -27,7 +27,7 @@ Sentry.init({ Alternatively, instead of a `profilesSampleRate` your can also provide a `profilesSampler` function: ```javascript {filename:sentry.client.config.js|ts} -const Sentry = require("@sentry/nuxt"); +import * as Sentry from "@sentry/nuxt"; Sentry.init({ dsn: "___PUBLIC_DSN___", diff --git a/platform-includes/profiling/automatic-instrumentation-setup/javascript.react.mdx b/platform-includes/profiling/automatic-instrumentation-setup/javascript.react.mdx index 6a671c306eaa7e..b3200aa8537634 100644 --- a/platform-includes/profiling/automatic-instrumentation-setup/javascript.react.mdx +++ b/platform-includes/profiling/automatic-instrumentation-setup/javascript.react.mdx @@ -28,7 +28,7 @@ Sentry.init({ Alternatively, instead of a `profilesSampleRate` your can also provide a `profilesSampler` function: ```javascript -const Sentry = require("@sentry/react"); +import * as Sentry from "@sentry/react"; Sentry.init({ dsn: "___PUBLIC_DSN___", diff --git a/platform-includes/profiling/automatic-instrumentation-setup/javascript.remix.mdx b/platform-includes/profiling/automatic-instrumentation-setup/javascript.remix.mdx index a91255da1e74eb..c4bbd438fd13c9 100644 --- a/platform-includes/profiling/automatic-instrumentation-setup/javascript.remix.mdx +++ b/platform-includes/profiling/automatic-instrumentation-setup/javascript.remix.mdx @@ -28,7 +28,7 @@ Sentry.init({ Alternatively, instead of a `profilesSampleRate` your can also provide a `profilesSampler` function: ```javascript {filename:entry.client.tsx} -const Sentry = require("@sentry/remix"); +import * as Sentry from "@sentry/remix"; Sentry.init({ dsn: "___PUBLIC_DSN___", diff --git a/platform-includes/profiling/automatic-instrumentation-setup/javascript.svelte.mdx b/platform-includes/profiling/automatic-instrumentation-setup/javascript.svelte.mdx index fd2796680747dd..7267845d4b6780 100644 --- a/platform-includes/profiling/automatic-instrumentation-setup/javascript.svelte.mdx +++ b/platform-includes/profiling/automatic-instrumentation-setup/javascript.svelte.mdx @@ -28,7 +28,7 @@ Sentry.init({ Alternatively, instead of a `profilesSampleRate` your can also provide a `profilesSampler` function: ```javascript -const Sentry = require("@sentry/svelte"); +import * as Sentry from "@sentry/svelte"; Sentry.init({ dsn: "___PUBLIC_DSN___", diff --git a/platform-includes/profiling/automatic-instrumentation-setup/javascript.sveltekit.mdx b/platform-includes/profiling/automatic-instrumentation-setup/javascript.sveltekit.mdx index 550bbc8c6d8df0..5e15252624bc05 100644 --- a/platform-includes/profiling/automatic-instrumentation-setup/javascript.sveltekit.mdx +++ b/platform-includes/profiling/automatic-instrumentation-setup/javascript.sveltekit.mdx @@ -27,7 +27,7 @@ Sentry.init({ Alternatively, instead of a `profilesSampleRate` your can also provide a `profilesSampler` function: ```javascript {filename:hooks.client.js} -const Sentry = require("@sentry/sveltekit"); +import * as Sentry from "@sentry/sveltekit"; Sentry.init({ dsn: "___PUBLIC_DSN___", diff --git a/platform-includes/profiling/automatic-instrumentation-setup/javascript.vue.mdx b/platform-includes/profiling/automatic-instrumentation-setup/javascript.vue.mdx index 6e711ef27b032a..86dcfb47d9dccd 100644 --- a/platform-includes/profiling/automatic-instrumentation-setup/javascript.vue.mdx +++ b/platform-includes/profiling/automatic-instrumentation-setup/javascript.vue.mdx @@ -28,7 +28,7 @@ Sentry.init({ Alternatively, instead of a `profilesSampleRate` your can also provide a `profilesSampler` function: ```javascript -const Sentry = require("@sentry/vue"); +import * as Sentry from "@sentry/vue"; Sentry.init({ dsn: "___PUBLIC_DSN___", diff --git a/platform-includes/profiling/node-install/javascript.astro.mdx b/platform-includes/profiling/node-install/javascript.astro.mdx deleted file mode 100644 index 0fbc72736f69b0..00000000000000 --- a/platform-includes/profiling/node-install/javascript.astro.mdx +++ /dev/null @@ -1,18 +0,0 @@ - - -Node profiling is available starting in `@sentry/profiling-node` version `0.3.0`. -You have to have the `@sentry/astro` package installed. - - - -```bash {tabTitle:npm} -npm install @sentry/astro @sentry/profiling-node --save -``` - -```bash {tabTitle:yarn} -yarn add @sentry/astro @sentry/profiling-node -``` - -```bash {tabTitle:pnpm} -pnpm add @sentry/astro @sentry/profiling-node -``` diff --git a/platform-includes/profiling/node-install/javascript.aws-lambda.mdx b/platform-includes/profiling/node-install/javascript.aws-lambda.mdx deleted file mode 100644 index d7cc61fa8a8444..00000000000000 --- a/platform-includes/profiling/node-install/javascript.aws-lambda.mdx +++ /dev/null @@ -1,18 +0,0 @@ - - -Node profiling is available starting in `@sentry/profiling-node` version `0.3.0`. -You have to have the `@sentry/aws-serverless` (minimum version `8.0.0`) package installed. - - - -```bash {tabTitle:npm} -npm install @sentry/aws-serverless @sentry/profiling-node --save -``` - -```bash {tabTitle:yarn} -yarn add @sentry/aws-serverless @sentry/profiling-node -``` - -```bash {tabTitle:pnpm} -pnpm add @sentry/aws-serverless @sentry/profiling-node -``` diff --git a/platform-includes/profiling/node-install/javascript.gcp-functions.mdx b/platform-includes/profiling/node-install/javascript.gcp-functions.mdx deleted file mode 100644 index 3844735e6f12d9..00000000000000 --- a/platform-includes/profiling/node-install/javascript.gcp-functions.mdx +++ /dev/null @@ -1,18 +0,0 @@ - - -Node profiling is available starting in `@sentry/profiling-node` version `0.3.0`. -You have to have the `@sentry/google-cloud-serverless` (minimum version `8.0.0`) package installed. - - - -```bash {tabTitle:npm} -npm install @sentry/google-cloud-serverless @sentry/profiling-node --save -``` - -```bash {tabTitle:yarn} -yarn add @sentry/google-cloud-serverless @sentry/profiling-node -``` - -```bash {tabTitle:pnpm} -pnpm add @sentry/google-cloud-serverless @sentry/profiling-node -``` diff --git a/platform-includes/profiling/node-install/javascript.nestjs.mdx b/platform-includes/profiling/node-install/javascript.nestjs.mdx deleted file mode 100644 index e35514b89a59d1..00000000000000 --- a/platform-includes/profiling/node-install/javascript.nestjs.mdx +++ /dev/null @@ -1,20 +0,0 @@ - - - - -Node profiling is available starting in `@sentry/profiling-node` version `0.3.0`. -You have to have the `@sentry/nestjs` package installed. - - - -```bash {tabTitle:npm} -npm install @sentry/nestjs @sentry/profiling-node --save -``` - -```bash {tabTitle:yarn} -yarn add @sentry/nestjs @sentry/profiling-node -``` - -```bash {tabTitle:pnpm} -pnpm add @sentry/nestjs @sentry/profiling-node -``` \ No newline at end of file diff --git a/platform-includes/profiling/node-install/javascript.nextjs.mdx b/platform-includes/profiling/node-install/javascript.nextjs.mdx deleted file mode 100644 index 042e5729261435..00000000000000 --- a/platform-includes/profiling/node-install/javascript.nextjs.mdx +++ /dev/null @@ -1,18 +0,0 @@ - - -Node profiling is available starting in `@sentry/profiling-node` version `0.3.0`. -You have to have the `@sentry/nextjs` (minimum version `7.44.1`) package installed. - - - -```bash {tabTitle:npm} -npm install @sentry/nextjs @sentry/profiling-node --save -``` - -```bash {tabTitle:yarn} -yarn add @sentry/nextjs @sentry/profiling-node -``` - -```bash {tabTitle:pnpm} -pnpm add @sentry/nextjs @sentry/profiling-node -``` \ No newline at end of file diff --git a/platform-includes/profiling/node-install/javascript.node.mdx b/platform-includes/profiling/node-install/javascript.node.mdx deleted file mode 100644 index 5291126f468ec1..00000000000000 --- a/platform-includes/profiling/node-install/javascript.node.mdx +++ /dev/null @@ -1,18 +0,0 @@ - - -Node profiling is available starting in `@sentry/profiling-node` version `0.3.0`. -You have to have the `@sentry/node` (minimum version `7.44.1`) package installed. - - - -```bash {tabTitle:npm} -npm install @sentry/node @sentry/profiling-node --save -``` - -```bash {tabTitle:yarn} -yarn add @sentry/node @sentry/profiling-node -``` - -```bash {tabTitle:pnpm} -pnpm add @sentry/node @sentry/profiling-node -``` \ No newline at end of file diff --git a/platform-includes/profiling/node-install/javascript.nuxt.mdx b/platform-includes/profiling/node-install/javascript.nuxt.mdx deleted file mode 100644 index 441efba901f03c..00000000000000 --- a/platform-includes/profiling/node-install/javascript.nuxt.mdx +++ /dev/null @@ -1,18 +0,0 @@ - - -Node profiling is available starting in `@sentry/profiling-node` version `0.3.0`. -You have to have the `@sentry/nuxt` package installed. - - - -```bash {tabTitle:npm} -npm install @sentry/nuxt @sentry/profiling-node --save -``` - -```bash {tabTitle:yarn} -yarn add @sentry/nuxt @sentry/profiling-node -``` - -```bash {tabTitle:pnpm} -pnpm add @sentry/nuxt @sentry/profiling-node -``` diff --git a/platform-includes/profiling/node-install/javascript.remix.mdx b/platform-includes/profiling/node-install/javascript.remix.mdx deleted file mode 100644 index 1620e6cf6e5812..00000000000000 --- a/platform-includes/profiling/node-install/javascript.remix.mdx +++ /dev/null @@ -1,18 +0,0 @@ - - -Node profiling is available starting in `@sentry/profiling-node` version `0.3.0`. -You have to have the `@sentry/remix` package installed. - - - -```bash {tabTitle:npm} -npm install @sentry/remix @sentry/profiling-node --save -``` - -```bash {tabTitle:yarn} -yarn add @sentry/remix @sentry/profiling-node -``` - -```bash {tabTitle:pnpm} -pnpm add @sentry/remix @sentry/profiling-node -``` diff --git a/platform-includes/profiling/node-install/javascript.solidstart.mdx b/platform-includes/profiling/node-install/javascript.solidstart.mdx deleted file mode 100644 index 60f401168f218b..00000000000000 --- a/platform-includes/profiling/node-install/javascript.solidstart.mdx +++ /dev/null @@ -1,18 +0,0 @@ - - -Node profiling is available starting in `@sentry/profiling-node` version `0.3.0`. -You have to have the `@sentry/solidstart` package installed. - - - -```bash {tabTitle:npm} -npm install @sentry/solidstart @sentry/profiling-node --save -``` - -```bash {tabTitle:yarn} -yarn add @sentry/solidstart @sentry/profiling-node -``` - -```bash {tabTitle:pnpm} -pnpm add @sentry/solidstart @sentry/profiling-node -``` diff --git a/platform-includes/profiling/node-install/javascript.sveltekit.mdx b/platform-includes/profiling/node-install/javascript.sveltekit.mdx deleted file mode 100644 index cf55f4a20d6be7..00000000000000 --- a/platform-includes/profiling/node-install/javascript.sveltekit.mdx +++ /dev/null @@ -1,18 +0,0 @@ - - -Node profiling is available starting in `@sentry/profiling-node` version `0.3.0`. -You have to have the `@sentry/sveltekit` package installed. - - - -```bash {tabTitle:npm} -npm install @sentry/sveltekit @sentry/profiling-node --save -``` - -```bash {tabTitle:yarn} -yarn add @sentry/sveltekit @sentry/profiling-node -``` - -```bash {tabTitle:pnpm} -pnpm add @sentry/sveltekit @sentry/profiling-node -``` From 3f96b8982df35145eb482756c87ed5e64a4a5013 Mon Sep 17 00:00:00 2001 From: Charly Gomez Date: Tue, 17 Dec 2024 12:04:09 +0100 Subject: [PATCH 4/9] remove 404s --- .../integrations/browserprofiling.mdx | 1 + .../integrations/javascript.capacitor.mdx | 25 +++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 platform-includes/configuration/integrations/javascript.capacitor.mdx diff --git a/docs/platforms/javascript/common/configuration/integrations/browserprofiling.mdx b/docs/platforms/javascript/common/configuration/integrations/browserprofiling.mdx index 568c4d43fffc82..8ca9211b7bcec6 100644 --- a/docs/platforms/javascript/common/configuration/integrations/browserprofiling.mdx +++ b/docs/platforms/javascript/common/configuration/integrations/browserprofiling.mdx @@ -3,6 +3,7 @@ title: BrowserProfiling description: "Capture profiling data for the Browser." notSupported: - javascript.cordova + - javascript.capacitor - javascript.node - javascript.aws-lambda - javascript.azure-functions diff --git a/platform-includes/configuration/integrations/javascript.capacitor.mdx b/platform-includes/configuration/integrations/javascript.capacitor.mdx new file mode 100644 index 00000000000000..c14ee21aa1f06b --- /dev/null +++ b/platform-includes/configuration/integrations/javascript.capacitor.mdx @@ -0,0 +1,25 @@ +### Integrations + +| | **Auto Enabled** | **Errors** | **Tracing** | **Replay** | **Additional Context** | +| ----------------------------------------------------- | :--------------: | :--------: | :---------: | :--------: | :--------------------: | +| [`breadcrumbsIntegration`](./breadcrumbs) | ✓ | | | | ✓ | +| [`browserApiErrorsIntegration`](./browserapierrors) | ✓ | ✓ | | | | +| [`dedupeIntegration`](./dedupe) | ✓ | ✓ | | | | +| [`functionToStringIntegration`](./functiontostring) | ✓ | | | | | +| [`globalHandlersIntegration`](./globalhandlers) | ✓ | ✓ | | | | +| [`httpContextIntegration`](./httpcontext) | ✓ | | | | ✓ | +| [`inboundFiltersIntegration`](./inboundfilters) | ✓ | ✓ | | | | +| [`linkedErrorsIntegration`](./linkederrors) | ✓ | ✓ | | | | +| [`browserSessionIntegration`](./browsersession) | ✓ | | | | ✓ | +| [`browserTracingIntegration`](./browsertracing) | | | ✓ | | ✓ | +| [`captureConsoleIntegration`](./captureconsole) | | | | | ✓ | +| [`contextLinesIntegration`](./contextlines) | | ✓ | | | | +| [`debugIntegration`](./debug) | | | | | | +| [`extraErrorDataIntegration`](./extraerrordata) | | | | | ✓ | +| [`httpClientIntegration`](./httpclient) | | ✓ | | | | +| [`moduleMetadataIntegration`](./modulemetadata) | | | | | ✓ | +| [`rewriteFramesIntegration`](./rewriteframes) | | ✓ | | | | +| [`replayIntegration`](./replay) | | | | ✓ | ✓ | +| [`replayCanvasIntegration`](./replaycanvas) | | | | ✓ | | +| [`reportingObserverIntegration`](./reportingobserver) | | ✓ | | | | +| [`sessionTimingIntegration`](./sessiontiming) | | | | | ✓ | From 9db96a1f66e882c3167a3a39940be4df14f8c775 Mon Sep 17 00:00:00 2001 From: Jonas Date: Thu, 19 Dec 2024 12:13:36 -0500 Subject: [PATCH 5/9] Update docs/platforms/javascript/common/profiling/browser-profiling.mdx Co-authored-by: Alex Krawiec --- .../platforms/javascript/common/profiling/browser-profiling.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/platforms/javascript/common/profiling/browser-profiling.mdx b/docs/platforms/javascript/common/profiling/browser-profiling.mdx index 7520bd3eaf5a43..8d45e4e749a22c 100644 --- a/docs/platforms/javascript/common/profiling/browser-profiling.mdx +++ b/docs/platforms/javascript/common/profiling/browser-profiling.mdx @@ -19,7 +19,7 @@ notSupported: - javascript.hapi - javascript.koa - javascript.nestjs -description: "Collect & view performance insights for JavaScript programs with Sentry’s JavaScript Profiling integration. Get started with browser profiling here." +description: "Collect & view performance insights for JavaScript programs with Sentry’s JavaScript Profiling integration. --- From 336f9155e44722e94f037fcefca2ad3e99f6cd4f Mon Sep 17 00:00:00 2001 From: Jonas Date: Thu, 19 Dec 2024 12:13:43 -0500 Subject: [PATCH 6/9] Update docs/platforms/javascript/common/profiling/browser-profiling.mdx Co-authored-by: Alex Krawiec --- .../platforms/javascript/common/profiling/browser-profiling.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/platforms/javascript/common/profiling/browser-profiling.mdx b/docs/platforms/javascript/common/profiling/browser-profiling.mdx index 8d45e4e749a22c..0e4e82f884669d 100644 --- a/docs/platforms/javascript/common/profiling/browser-profiling.mdx +++ b/docs/platforms/javascript/common/profiling/browser-profiling.mdx @@ -28,7 +28,7 @@ Browser Profiling is currently in beta. Beta features are still in progress and -The browser profiling integration is built using [JS Self-Profiling API](https://wicg.github.io/js-self-profiling/) and will likely only move out of beta once the specification progresses and gains adoption. See platform [status](https://chromestatus.com/feature/5170190448852992). +The browser profiling integration is built using the [JS Self-Profiling API](https://wicg.github.io/js-self-profiling/) and will likely only move out of beta once the specification progresses and gains adoption. See [platform status](https://chromestatus.com/feature/5170190448852992). Note that since the profiling API is currently only exposed in Chromium, profiles collected only include that demographic. This is obvious, but should not be forgotten when analyzing the data collected. We hope that as the API gains adoption, other browsers will implement it as well. From 68f46d741f2e9ceb52d3b67887007dde6cf1baf8 Mon Sep 17 00:00:00 2001 From: Jonas Date: Thu, 19 Dec 2024 12:13:53 -0500 Subject: [PATCH 7/9] Update docs/platforms/javascript/common/profiling/browser-profiling.mdx Co-authored-by: Alex Krawiec --- .../platforms/javascript/common/profiling/browser-profiling.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/platforms/javascript/common/profiling/browser-profiling.mdx b/docs/platforms/javascript/common/profiling/browser-profiling.mdx index 0e4e82f884669d..861e721a7918f0 100644 --- a/docs/platforms/javascript/common/profiling/browser-profiling.mdx +++ b/docs/platforms/javascript/common/profiling/browser-profiling.mdx @@ -30,7 +30,7 @@ Browser Profiling is currently in beta. Beta features are still in progress and The browser profiling integration is built using the [JS Self-Profiling API](https://wicg.github.io/js-self-profiling/) and will likely only move out of beta once the specification progresses and gains adoption. See [platform status](https://chromestatus.com/feature/5170190448852992). -Note that since the profiling API is currently only exposed in Chromium, profiles collected only include that demographic. This is obvious, but should not be forgotten when analyzing the data collected. We hope that as the API gains adoption, other browsers will implement it as well. +Note that since the profiling API is currently only exposed in Chromium, profiles collected only include that demographic. We hope that as the API gains adoption, other browsers will implement it as well. From 7de10bd48ac8a6867df99509074036ff6343c16b Mon Sep 17 00:00:00 2001 From: Jonas Date: Thu, 19 Dec 2024 12:14:02 -0500 Subject: [PATCH 8/9] Update docs/platforms/javascript/common/profiling/browser-profiling.mdx Co-authored-by: Alex Krawiec --- .../platforms/javascript/common/profiling/browser-profiling.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/platforms/javascript/common/profiling/browser-profiling.mdx b/docs/platforms/javascript/common/profiling/browser-profiling.mdx index 861e721a7918f0..2d0f4ecc0d8c2d 100644 --- a/docs/platforms/javascript/common/profiling/browser-profiling.mdx +++ b/docs/platforms/javascript/common/profiling/browser-profiling.mdx @@ -74,7 +74,7 @@ Configuration should happen as early as possible in your application's lifecycle What does Sentry's JavaScript browser profile offer that Chrome DevTools does not? -- Sentry JavaScript profiler runs in production and captures real user data, showing real-world performance. DevTools runs locally on your machine and only shows profiles of what's running on your machine. +- Sentry's JavaScript profiler runs in production and captures real user data, showing real-world performance. DevTools runs locally and only shows profiles of what's running on your machine. - Sentry runs at a lower sampling rate of 100Hz with a 10ms sample period versus a sampling rate of 1000Hz and a 1ms sample period for DevTools. - Sentry supports deobfuscation, making it so that all the function names in your code are correct. Typically, when you run JavaScript code, it's minified, meaning that all the function names are replaced with machine-generated abbreviations. From c109471a651999ad4003f37587030898eb162f76 Mon Sep 17 00:00:00 2001 From: Charly Gomez Date: Mon, 23 Dec 2024 13:38:03 +0100 Subject: [PATCH 9/9] fix frontmatter --- .../platforms/javascript/common/profiling/browser-profiling.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/platforms/javascript/common/profiling/browser-profiling.mdx b/docs/platforms/javascript/common/profiling/browser-profiling.mdx index 2d0f4ecc0d8c2d..88ef66583980c6 100644 --- a/docs/platforms/javascript/common/profiling/browser-profiling.mdx +++ b/docs/platforms/javascript/common/profiling/browser-profiling.mdx @@ -19,7 +19,7 @@ notSupported: - javascript.hapi - javascript.koa - javascript.nestjs -description: "Collect & view performance insights for JavaScript programs with Sentry’s JavaScript Profiling integration. +description: "Collect & view performance insights for JavaScript programs with Sentry's JavaScript Profiling integration." ---