Skip to content

Commit c7438a2

Browse files
JonasBaandreiborzalizokm
authored
ref: document all profiler runtime flags (#11382)
* ref: document all profiler runtime flags * Update docs/platforms/javascript/guides/aws-lambda/profiling/index.mdx Co-authored-by: Andrei <[email protected]> * Update docs/platforms/javascript/guides/aws-lambda/profiling/index.mdx Co-authored-by: Andrei <[email protected]> * use note for advanced use case warning * use include * Update includes/profiling-node-runtime-flags.mdx Co-authored-by: Liza Mock <[email protected]> * Update includes/profiling-node-runtime-flags.mdx Co-authored-by: Liza Mock <[email protected]> * link to v8 --------- Co-authored-by: Andrei <[email protected]> Co-authored-by: Liza Mock <[email protected]>
1 parent 63ca5a7 commit c7438a2

File tree

11 files changed

+35
-120
lines changed

11 files changed

+35
-120
lines changed

docs/platforms/javascript/guides/aws-lambda/profiling/index.mdx

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -71,18 +71,7 @@ Sentry.startSpan(
7171

7272
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.
7373

74-
## Runtime Flags
75-
76-
The default mode of the v8 CpuProfiler is [kEagerLogging](https://v8docs.nodesource.com/node-18.2/d2/dc3/namespacev8.html#a874b4921ddee43bef58d8538e3149374) which enables the profiler even when no profiles are active—this is good because it makes calls to `startProfiling` fast with the tradeoff of constant CPU overhead. This behavior can be controlled via the `SENTRY_PROFILER_LOGGING_MODE` environment variable with values of `eager|lazy`. If you opt to use the lazy logging mode, calls to `startProfiling` may be slow. (Depending on environment and node version, it can be in the order of a few hundred ms.)
77-
78-
Here's an example of starting a server with lazy logging mode:
79-
80-
```bash
81-
# Run profiler in lazy mode
82-
SENTRY_PROFILER_LOGGING_MODE=lazy node server.js
83-
```
84-
85-
We recommend you have your own CPU resource-monitoring in place, because the actual resource use could be environment-dependent.
74+
<Include name="profiling-node-runtime-flags.mdx" />
8675

8776
## Precompiled Binaries
8877

docs/platforms/javascript/guides/azure-functions/profiling/index.mdx

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -71,18 +71,7 @@ Sentry.startSpan(
7171

7272
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.
7373

74-
## Runtime Flags
75-
76-
The default mode of the v8 CpuProfiler is [kEagerLogging](https://v8docs.nodesource.com/node-18.2/d2/dc3/namespacev8.html#a874b4921ddee43bef58d8538e3149374) which enables the profiler even when no profiles are active—this is good because it makes calls to `startProfiling` fast with the tradeoff of constant CPU overhead. This behavior can be controlled via the `SENTRY_PROFILER_LOGGING_MODE` environment variable with values of `eager|lazy`. If you opt to use the lazy logging mode, calls to `startProfiling` may be slow. (Depending on environment and node version, it can be in the order of a few hundred ms.)
77-
78-
Here's an example of starting a server with lazy logging mode:
79-
80-
```bash
81-
# Run profiler in lazy mode
82-
SENTRY_PROFILER_LOGGING_MODE=lazy node server.js
83-
```
84-
85-
We recommend you have your own CPU resource-monitoring in place, because the actual resource use could be environment-dependent.
74+
<Include name="profiling-node-runtime-flags.mdx" />
8675

8776
## Precompiled Binaries
8877

docs/platforms/javascript/guides/connect/profiling/index.mdx

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -71,18 +71,7 @@ Sentry.startSpan(
7171

7272
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.
7373

74-
## Runtime Flags
75-
76-
The default mode of the v8 CpuProfiler is [kEagerLogging](https://v8docs.nodesource.com/node-18.2/d2/dc3/namespacev8.html#a874b4921ddee43bef58d8538e3149374) which enables the profiler even when no profiles are active—this is good because it makes calls to `startProfiling` fast with the tradeoff of constant CPU overhead. This behavior can be controlled via the `SENTRY_PROFILER_LOGGING_MODE` environment variable with values of `eager|lazy`. If you opt to use the lazy logging mode, calls to `startProfiling` may be slow. (Depending on environment and node version, it can be in the order of a few hundred ms.)
77-
78-
Here's an example of starting a server with lazy logging mode:
79-
80-
```bash
81-
# Run profiler in lazy mode
82-
SENTRY_PROFILER_LOGGING_MODE=lazy node server.js
83-
```
84-
85-
We recommend you have your own CPU resource-monitoring in place, because the actual resource use could be environment-dependent.
74+
<Include name="profiling-node-runtime-flags.mdx" />
8675

8776
## Precompiled Binaries
8877

docs/platforms/javascript/guides/express/profiling/index.mdx

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -71,18 +71,7 @@ Sentry.startSpan(
7171

7272
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.
7373

74-
## Runtime Flags
75-
76-
The default mode of the v8 CpuProfiler is [kEagerLogging](https://v8docs.nodesource.com/node-18.2/d2/dc3/namespacev8.html#a874b4921ddee43bef58d8538e3149374) which enables the profiler even when no profiles are active—this is good because it makes calls to `startProfiling` fast with the tradeoff of constant CPU overhead. This behavior can be controlled via the `SENTRY_PROFILER_LOGGING_MODE` environment variable with values of `eager|lazy`. If you opt to use the lazy logging mode, calls to `startProfiling` may be slow. (Depending on environment and node version, it can be in the order of a few hundred ms.)
77-
78-
Here's an example of starting a server with lazy logging mode:
79-
80-
```bash
81-
# Run profiler in lazy mode
82-
SENTRY_PROFILER_LOGGING_MODE=lazy node server.js
83-
```
84-
85-
We recommend you have your own CPU resource-monitoring in place, because the actual resource use could be environment-dependent.
74+
<Include name="profiling-node-runtime-flags.mdx" />
8675

8776
## Precompiled Binaries
8877

docs/platforms/javascript/guides/fastify/profiling/index.mdx

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -71,18 +71,7 @@ Sentry.startSpan(
7171

7272
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.
7373

74-
## Runtime Flags
75-
76-
The default mode of the v8 CpuProfiler is [kEagerLogging](https://v8docs.nodesource.com/node-18.2/d2/dc3/namespacev8.html#a874b4921ddee43bef58d8538e3149374) which enables the profiler even when no profiles are active—this is good because it makes calls to `startProfiling` fast with the tradeoff of constant CPU overhead. This behavior can be controlled via the `SENTRY_PROFILER_LOGGING_MODE` environment variable with values of `eager|lazy`. If you opt to use the lazy logging mode, calls to `startProfiling` may be slow. (Depending on environment and node version, it can be in the order of a few hundred ms.)
77-
78-
Here's an example of starting a server with lazy logging mode:
79-
80-
```bash
81-
# Run profiler in lazy mode
82-
SENTRY_PROFILER_LOGGING_MODE=lazy node server.js
83-
```
84-
85-
We recommend you have your own CPU resource-monitoring in place, because the actual resource use could be environment-dependent.
74+
<Include name="profiling-node-runtime-flags.mdx" />
8675

8776
## Precompiled Binaries
8877

docs/platforms/javascript/guides/gcp-functions/profiling/index.mdx

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -71,18 +71,7 @@ Sentry.startSpan(
7171

7272
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.
7373

74-
## Runtime Flags
75-
76-
The default mode of the v8 CpuProfiler is [kEagerLogging](https://v8docs.nodesource.com/node-18.2/d2/dc3/namespacev8.html#a874b4921ddee43bef58d8538e3149374) which enables the profiler even when no profiles are active—this is good because it makes calls to `startProfiling` fast with the tradeoff of constant CPU overhead. This behavior can be controlled via the `SENTRY_PROFILER_LOGGING_MODE` environment variable with values of `eager|lazy`. If you opt to use the lazy logging mode, calls to `startProfiling` may be slow. (Depending on environment and node version, it can be in the order of a few hundred ms.)
77-
78-
Here's an example of starting a server with lazy logging mode:
79-
80-
```bash
81-
# Run profiler in lazy mode
82-
SENTRY_PROFILER_LOGGING_MODE=lazy node server.js
83-
```
84-
85-
We recommend you have your own CPU resource-monitoring in place, because the actual resource use could be environment-dependent.
74+
<Include name="profiling-node-runtime-flags.mdx" />
8675

8776
## Precompiled Binaries
8877

docs/platforms/javascript/guides/hapi/profiling/index.mdx

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -71,18 +71,7 @@ Sentry.startSpan(
7171

7272
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.
7373

74-
## Runtime Flags
75-
76-
The default mode of the v8 CpuProfiler is [kEagerLogging](https://v8docs.nodesource.com/node-18.2/d2/dc3/namespacev8.html#a874b4921ddee43bef58d8538e3149374) which enables the profiler even when no profiles are active—this is good because it makes calls to `startProfiling` fast with the tradeoff of constant CPU overhead. This behavior can be controlled via the `SENTRY_PROFILER_LOGGING_MODE` environment variable with values of `eager|lazy`. If you opt to use the lazy logging mode, calls to `startProfiling` may be slow. (Depending on environment and node version, it can be in the order of a few hundred ms.)
77-
78-
Here's an example of starting a server with lazy logging mode:
79-
80-
```bash
81-
# Run profiler in lazy mode
82-
SENTRY_PROFILER_LOGGING_MODE=lazy node server.js
83-
```
84-
85-
We recommend you have your own CPU resource-monitoring in place, because the actual resource use could be environment-dependent.
74+
<Include name="profiling-node-runtime-flags.mdx" />
8675

8776
## Precompiled Binaries
8877

docs/platforms/javascript/guides/koa/profiling/index.mdx

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -71,18 +71,7 @@ Sentry.startSpan(
7171

7272
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.
7373

74-
## Runtime Flags
75-
76-
The default mode of the v8 CpuProfiler is [kEagerLogging](https://v8docs.nodesource.com/node-18.2/d2/dc3/namespacev8.html#a874b4921ddee43bef58d8538e3149374) which enables the profiler even when no profiles are active—this is good because it makes calls to `startProfiling` fast with the tradeoff of constant CPU overhead. This behavior can be controlled via the `SENTRY_PROFILER_LOGGING_MODE` environment variable with values of `eager|lazy`. If you opt to use the lazy logging mode, calls to `startProfiling` may be slow. (Depending on environment and node version, it can be in the order of a few hundred ms.)
77-
78-
Here's an example of starting a server with lazy logging mode:
79-
80-
```bash
81-
# Run profiler in lazy mode
82-
SENTRY_PROFILER_LOGGING_MODE=lazy node server.js
83-
```
84-
85-
We recommend you have your own CPU resource-monitoring in place, because the actual resource use could be environment-dependent.
74+
<Include name="profiling-node-runtime-flags.mdx" />
8675

8776
## Precompiled Binaries
8877

docs/platforms/javascript/guides/nestjs/profiling/index.mdx

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -71,18 +71,7 @@ Sentry.startSpan(
7171

7272
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.
7373

74-
## Runtime Flags
75-
76-
The default mode of the v8 CpuProfiler is [kEagerLogging](https://v8docs.nodesource.com/node-18.2/d2/dc3/namespacev8.html#a874b4921ddee43bef58d8538e3149374) which enables the profiler even when no profiles are active—this is good because it makes calls to `startProfiling` fast with the tradeoff of constant CPU overhead. This behavior can be controlled via the `SENTRY_PROFILER_LOGGING_MODE` environment variable with values of `eager|lazy`. If you opt to use the lazy logging mode, calls to `startProfiling` may be slow. (Depending on environment and node version, it can be in the order of a few hundred ms.)
77-
78-
Here's an example of starting a server with lazy logging mode:
79-
80-
```bash
81-
# Run profiler in lazy mode
82-
SENTRY_PROFILER_LOGGING_MODE=lazy node server.js
83-
```
84-
85-
We recommend you have your own CPU resource-monitoring in place, because the actual resource use could be environment-dependent.
74+
<Include name="profiling-node-runtime-flags.mdx" />
8675

8776
## Precompiled Binaries
8877

docs/platforms/javascript/guides/node/profiling/index.mdx

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -131,18 +131,7 @@ Continuous profiling has implications for your org's billing structure. This fea
131131

132132
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.
133133

134-
## Runtime Flags
135-
136-
The default mode of the v8 CpuProfiler is [kEagerLogging](https://v8docs.nodesource.com/node-18.2/d2/dc3/namespacev8.html#a874b4921ddee43bef58d8538e3149374) which enables the profiler even when no profiles are active—this is good because it makes calls to `startProfiling` fast with the tradeoff of constant CPU overhead. This behavior can be controlled via the `SENTRY_PROFILER_LOGGING_MODE` environment variable with values of `eager|lazy`. If you opt to use the lazy logging mode, calls to `startProfiling` may be slow. (Depending on environment and node version, it can be in the order of a few hundred ms.)
137-
138-
Here's an example of starting a server with lazy logging mode:
139-
140-
```bash
141-
# Run profiler in lazy mode
142-
SENTRY_PROFILER_LOGGING_MODE=lazy node server.js
143-
```
144-
145-
We recommend you have your own CPU resource-monitoring in place, because the actual resource use could be environment-dependent.
134+
<Include name="profiling-node-runtime-flags.mdx" />
146135

147136
## Precompiled Binaries
148137

0 commit comments

Comments
 (0)