Skip to content

[BUG]: DD profile shows high heap size and hight CPU Wall time under dd-trace fastify handler. #6594

@kovacss

Description

@kovacss

Tracer Version(s)

5.67.0

Node.js Version(s)

22.20.0

Bug Report

Profiles of our node-js applications show high heap size and high CPU Wall time and under the dd-trace fastify pre-handler and specifically under key.
I wasn't too sure what this key relates to as looking in the code, there is nothing like key (expect Object.keys)

Image Image

I'm not super familiar with node-js profiles so this might be the expected behaviour but I find it odd that it spends as much resource on just dd-trace. This also seem to be related with spike of latency at the HTTP level

For context, we only use dd-trace for profiles and metrics as we already have an open-telemetry configuration separately.

Thank you for your help and guidance.

Reproduction Code

No response

Error Logs

No response

Tracer Config

const config = {
  service: process.env.APPLICATION_NAME,
  env: process.env.ENVIRONMENT ?? 'development',
  hostname: process.env.DD_AGENT_HOST || 'localhost',

  // 🎯 DISABLE TRACING - Keep your existing OpenTelemetry setup
  apmTracingEnabled: false,
  sampleRate: 0,

  // ✅ ENABLE PROFILING - This is what we want!
  profiling: true,
  runtimeMetrics: true,

  plugins: false
}

Operating System

Linux 2ab85c96af6f 4.14.355-271.569.amzn2.x86_64

Bundling

No Bundling

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions