From fad76b07734b8970df66d88b3cb50a970bc9ec26 Mon Sep 17 00:00:00 2001 From: Charly Gomez Date: Tue, 15 Sep 2026 11:13:37 +0200 Subject: [PATCH] docs(js): Replace legacy profiling options with session-based API The per-transaction profilesSampleRate and profilesSampler options were removed. Update the Firebase and Hono guides to use profileSessionSampleRate with a trace profileLifecycle, and drop the deprecated profilesSampleRate entries from the options reference. Refs SDK-1489 --- .../common/configuration/options.mdx | 16 ---------------- .../javascript/guides/firebase/index.mdx | 19 ++++++++++++++++--- .../javascript/guides/hono/index.mdx | 4 +++- 3 files changed, 19 insertions(+), 20 deletions(-) diff --git a/docs/platforms/javascript/common/configuration/options.mdx b/docs/platforms/javascript/common/configuration/options.mdx index 00747954306fdf..bf862d1cf6545a 100644 --- a/docs/platforms/javascript/common/configuration/options.mdx +++ b/docs/platforms/javascript/common/configuration/options.mdx @@ -858,14 +858,6 @@ Determines how profiling sessions are controlled. It has two modes: - - -**Deprecated:** Use `profileSessionSampleRate` instead to configure continuous profiling from version `7.4.0` onwards. - -A number between `0` and `1`, controlling the percentage chance a given sampled transaction will be profiled. (`0` represents 0% while `1` represents 100%.) Applies equally to all transactions created in the app. This is relative to the tracing sample rate - e.g. `0.5` means 50% of sampled transactions will be profiled. - - - @@ -897,14 +889,6 @@ Determines how profiling sessions are controlled. It has two modes: - - -**Deprecated:** Use `profileSessionSampleRate` instead to configure continuous profiling from version 10.27.0 onwards. - -A number between `0` and `1`, controlling the percentage chance a given sampled transaction will be profiled. (`0` represents 0% while `1` represents 100%.) Applies equally to all transactions created in the app. This is relative to the tracing sample rate - e.g. `0.5` means 50% of sampled transactions will be profiled. - - - diff --git a/docs/platforms/javascript/guides/firebase/index.mdx b/docs/platforms/javascript/guides/firebase/index.mdx index 95ed06a7e53187..95c285bba32894 100644 --- a/docs/platforms/javascript/guides/firebase/index.mdx +++ b/docs/platforms/javascript/guides/firebase/index.mdx @@ -97,10 +97,20 @@ Create an initialization file (for example, `instrument.js`) that imports and in ```javascript {filename:instrument.js} const Sentry = require("@sentry/node"); +// ___PRODUCT_OPTION_START___ profiling +const { nodeProfilingIntegration } = require("@sentry/profiling-node"); +// ___PRODUCT_OPTION_END___ profiling 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 @@ -112,9 +122,12 @@ Sentry.init({ // ___PRODUCT_OPTION_END___ performance // ___PRODUCT_OPTION_START___ profiling - // Set profilesSampleRate to 1.0 to profile 100% of sampled transactions. - // This is relative to tracesSampleRate - profilesSampleRate: 1.0, + // Enable profiling for a percentage of sessions + // Learn more at + // https://docs.sentry.io/platforms/javascript/configuration/options/#profileSessionSampleRate + profileSessionSampleRate: 1.0, + // Profile automatically while there's an active sampled span + profileLifecycle: "trace", // ___PRODUCT_OPTION_END___ profiling }); ``` diff --git a/docs/platforms/javascript/guides/hono/index.mdx b/docs/platforms/javascript/guides/hono/index.mdx index 66f7248cfb26d0..658d6900f4144e 100644 --- a/docs/platforms/javascript/guides/hono/index.mdx +++ b/docs/platforms/javascript/guides/hono/index.mdx @@ -189,10 +189,12 @@ Sentry.init({ // ___PRODUCT_OPTION_END___ performance // ___PRODUCT_OPTION_START___ profiling - // Set profilesSampleRate relative to tracesSampleRate + // Enable profiling for a percentage of sessions // Learn more at // https://docs.sentry.io/platforms/javascript/configuration/options/#profileSessionSampleRate profileSessionSampleRate: 1.0, + // Profile automatically while there's an active sampled span + profileLifecycle: "trace", // ___PRODUCT_OPTION_END___ profiling }); ```