Skip to content

Latest commit

 

History

History

README.md

Sentry

Official Sentry Profiling SDK for NodeJS

npm version npm dm npm dt

Profiling for Node.js applications.

Documentation

Building the package from source

Profiling uses native modules to interop with the v8 javascript engine which means that you may be required to build it from source. The libraries required to successfully build the package from source are often the same libraries that are already required to build any other package which uses native modules and if your codebase uses any of those modules, there is a fairly good chance this will work out of the box. The required packages are python, make and g++.

Windows: If you are building on windows, you may need to install Visual Studio's C++ build tools.

macOS: Install Xcode Command Line Tools for the compiler and make.

See the node-gyp prerequisites for supported Python versions and platform-specific requirements.

After you have installed the toolchain, you should be able to build the binaries from source. The native bindings are maintained in the Node CPU profiler repository. Clone that repository, install its dependencies with yarn install --ignore-scripts, and run the following from its root:

# configure node-gyp using yarn
yarn build:bindings:configure
# or using npm
npm run build:bindings:configure

# compile the binaries using yarn
yarn build:bindings
# or using npm
npm run build:bindings

After the binaries are built, you should see them inside that repository's lib folder.

Prebuilt binaries

We currently ship prebuilt binaries for a few of the most common platforms and node versions.

  • macOS x64
  • Linux ARM64 (musl)
  • Linux x64 (glibc)
  • Windows x64

For a more detailed list, see the job_compile job in the native build workflow.

Support