Node profiling can be enabled through an integration provided by the @sentry/profiling-node dependency that does not come with this module by default.


Install required dependency:

yarn add @sentry/profiling-node
npm install @sentry/profiling-node

Include the following options in the module's configuration:

sentry: {
  dsn: '...',
  tracing: {
    tracesSampleRate: 1.0,
  serverIntegrations: {
    ProfilingIntegration: {},
  serverConfig: {
    // Set sampling rate for profiling - this is relative to tracesSampleRate
    profilesSampleRate: 1.0,

Note that the tracesSampleRate value can be between 0.0 and 1.0 (percentage of requests to capture) and Sentry documentation strongly recommends reducing the value from the default 1.0.


See Sentry's Profiling pages for additional information.

Edit this page on GitHub Updated at Mon, Nov 27, 2023