diff --git a/packages/dd-trace/src/profiling/profilers/wall.js b/packages/dd-trace/src/profiling/profilers/wall.js index 3d7041cfec..dc3c0ba61b 100644 --- a/packages/dd-trace/src/profiling/profilers/wall.js +++ b/packages/dd-trace/src/profiling/profilers/wall.js @@ -301,7 +301,8 @@ class NativeWallProfiler { const labels = { ...getThreadLabels() } - const { context: { ref: { spanId, rootSpanId, webTags, endpoint } }, timestamp } = context + const { context: { ref }, timestamp } = context + const { spanId, rootSpanId, webTags, endpoint } = ref ?? {} if (this._timelineEnabled) { // Incoming timestamps are in microseconds, we emit nanos.