Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ref: document all profiler runtime flags #11382

Merged
merged 8 commits into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 20 additions & 6 deletions docs/platforms/javascript/guides/aws-lambda/profiling/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,31 @@ Under the hood, the Sentry profiler uses V8's [CpuProfiler](https://v8docs.nodes

## Runtime Flags

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.)
There are three runtime flags that you can set which the behavior of the profiler. Two of the flags relate to how the SDK resolves the profiler binaries and another flag which alters how the underlying profiler is initialized by v8.
JonasBa marked this conversation as resolved.
Show resolved Hide resolved
JonasBa marked this conversation as resolved.
Show resolved Hide resolved

Here's an example of starting a server with lazy logging mode:
These flags are for advanced used cases and setting them is not required in majority of the cases.
JonasBa marked this conversation as resolved.
Show resolved Hide resolved

```bash
# Run profiler in lazy mode
SENTRY_PROFILER_LOGGING_MODE=lazy node server.js
```
- SENTRY_PROFILER_BINARY_PATH

This flag sets the profiler binary path and bypasses arch, platform and libc checks. It is useful if you want to override which binary is required at runtime, which can be useful in some build configurations.
JonasBa marked this conversation as resolved.
Show resolved Hide resolved
- 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.

- 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.)

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.


## 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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,31 @@ Under the hood, the Sentry profiler uses V8's [CpuProfiler](https://v8docs.nodes

## Runtime Flags

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.)
There are three runtime flags that you can set which the behavior of the profiler. Two of the flags relate to how the SDK resolves the profiler binaries and another flag which alters how the underlying profiler is initialized by v8.

Here's an example of starting a server with lazy logging mode:
These flags are for advanced used cases and setting them is not required in majority of the cases.

```bash
# Run profiler in lazy mode
SENTRY_PROFILER_LOGGING_MODE=lazy node server.js
```
- SENTRY_PROFILER_BINARY_PATH

This flag sets the profiler binary path and bypasses arch, platform and libc checks. It is useful if you want to override which binary is required at runtime, which can be useful in some build configurations.
- 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.

- 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.)

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.


## 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:
Expand Down
26 changes: 20 additions & 6 deletions docs/platforms/javascript/guides/connect/profiling/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,31 @@ Under the hood, the Sentry profiler uses V8's [CpuProfiler](https://v8docs.nodes

## Runtime Flags

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.)
There are three runtime flags that you can set which the behavior of the profiler. Two of the flags relate to how the SDK resolves the profiler binaries and another flag which alters how the underlying profiler is initialized by v8.

Here's an example of starting a server with lazy logging mode:
These flags are for advanced used cases and setting them is not required in majority of the cases.

```bash
# Run profiler in lazy mode
SENTRY_PROFILER_LOGGING_MODE=lazy node server.js
```
- SENTRY_PROFILER_BINARY_PATH

This flag sets the profiler binary path and bypasses arch, platform and libc checks. It is useful if you want to override which binary is required at runtime, which can be useful in some build configurations.
- 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.

- 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.)

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.


## 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:
Expand Down
26 changes: 20 additions & 6 deletions docs/platforms/javascript/guides/express/profiling/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,31 @@ Under the hood, the Sentry profiler uses V8's [CpuProfiler](https://v8docs.nodes

## Runtime Flags

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.)
There are three runtime flags that you can set which the behavior of the profiler. Two of the flags relate to how the SDK resolves the profiler binaries and another flag which alters how the underlying profiler is initialized by v8.

Here's an example of starting a server with lazy logging mode:
These flags are for advanced used cases and setting them is not required in majority of the cases.

```bash
# Run profiler in lazy mode
SENTRY_PROFILER_LOGGING_MODE=lazy node server.js
```
- SENTRY_PROFILER_BINARY_PATH

This flag sets the profiler binary path and bypasses arch, platform and libc checks. It is useful if you want to override which binary is required at runtime, which can be useful in some build configurations.
- 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.

- 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.)

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.


## 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:
Expand Down
26 changes: 20 additions & 6 deletions docs/platforms/javascript/guides/fastify/profiling/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,31 @@ Under the hood, the Sentry profiler uses V8's [CpuProfiler](https://v8docs.nodes

## Runtime Flags

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.)
There are three runtime flags that you can set which the behavior of the profiler. Two of the flags relate to how the SDK resolves the profiler binaries and another flag which alters how the underlying profiler is initialized by v8.

Here's an example of starting a server with lazy logging mode:
These flags are for advanced used cases and setting them is not required in majority of the cases.

```bash
# Run profiler in lazy mode
SENTRY_PROFILER_LOGGING_MODE=lazy node server.js
```
- SENTRY_PROFILER_BINARY_PATH

This flag sets the profiler binary path and bypasses arch, platform and libc checks. It is useful if you want to override which binary is required at runtime, which can be useful in some build configurations.
- 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.

- 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.)

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.


## 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:
Expand Down
26 changes: 20 additions & 6 deletions docs/platforms/javascript/guides/gcp-functions/profiling/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,31 @@ Under the hood, the Sentry profiler uses V8's [CpuProfiler](https://v8docs.nodes

## Runtime Flags

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.)
There are three runtime flags that you can set which the behavior of the profiler. Two of the flags relate to how the SDK resolves the profiler binaries and another flag which alters how the underlying profiler is initialized by v8.

Here's an example of starting a server with lazy logging mode:
These flags are for advanced used cases and setting them is not required in majority of the cases.

```bash
# Run profiler in lazy mode
SENTRY_PROFILER_LOGGING_MODE=lazy node server.js
```
- SENTRY_PROFILER_BINARY_PATH

This flag sets the profiler binary path and bypasses arch, platform and libc checks. It is useful if you want to override which binary is required at runtime, which can be useful in some build configurations.
- 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.

- 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.)

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.


## 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:
Expand Down
Loading
Loading