From 2ccdfbe862c603e1be20d459c1838685ebba56f5 Mon Sep 17 00:00:00 2001 From: Jonas Date: Thu, 19 Sep 2024 14:55:24 -0400 Subject: [PATCH] Update includes/profiling-node-runtime-flags.mdx Co-authored-by: Liza Mock --- includes/profiling-node-runtime-flags.mdx | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/includes/profiling-node-runtime-flags.mdx b/includes/profiling-node-runtime-flags.mdx index 62fd0377b934a..eb39816e644be 100644 --- a/includes/profiling-node-runtime-flags.mdx +++ b/includes/profiling-node-runtime-flags.mdx @@ -8,20 +8,18 @@ These flags are intended for advanced use cases only. Setting them isn't require - SENTRY_PROFILER_BINARY_PATH - This flag sets the profiler binary path and bypasses arch, platform and libc checks. It can be useful in some build configurations if you want to override which binary is required at runtime. +This flag sets the profiler binary path and bypasses arch, platform, and libc checks. It can be useful in some build configurations if you want to override which binary is required at runtime. + - SENTRY_PROFILER_BINARY_DIR - Acts similarly as the flag above, however this flag only specifies the directory where the binaries are located and defers to the runtime to resolve the correct binary depending on the arch, platform and libc version. +Acts similarly to the flag above, however, this flag only specifies the directory where the binaries are located and defers to the runtime to resolve the correct binary depending on the arch, platform, and libc version. - SENTRY_PROFILER_LOGGING_MODE - 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.) +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.) - Here's an example of starting a server with lazy logging mode: +Here's an example of starting a server with lazy-logging mode: ```bash # Run profiler in lazy mode SENTRY_PROFILER_LOGGING_MODE=lazy node server.js - ``` - -We recommend you have your own CPU resource-monitoring in place, because the actual resource use could be environment-dependent.