diff --git a/packages/profiling-node/bindings/cpu_profiler.cc b/packages/profiling-node/bindings/cpu_profiler.cc index d51a1e747e93..458447e9ebc1 100644 --- a/packages/profiling-node/bindings/cpu_profiler.cc +++ b/packages/profiling-node/bindings/cpu_profiler.cc @@ -331,11 +331,12 @@ void SentryProfile::Start(Profiler *profiler) { started_at = uv_hrtime(); timestamp = timestamp_milliseconds(); + v8::CpuProfilingOptions options = v8::CpuProfilingOptions( + v8::CpuProfilingMode::kCallerLineNumbers, + v8::CpuProfilingOptions::kNoSampleLimit, kSamplingInterval); + // Initialize the CPU Profiler - profiler->cpu_profiler->StartProfiling( - profile_title, - {v8::CpuProfilingMode::kCallerLineNumbers, - v8::CpuProfilingOptions::kNoSampleLimit, kSamplingInterval}); + profiler->cpu_profiler->StartProfiling(profile_title, &options); // listen for memory sample ticks profiler->measurements_ticker.add_cpu_listener(id, cpu_sampler_cb);