Skip to content

Commit

Permalink
Unblock profiler/control benchmark run
Browse files Browse the repository at this point in the history
  • Loading branch information
szegedi committed Oct 15, 2024
1 parent ffc736c commit cbe194f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/dd-trace/src/profiling/profiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,10 @@ class Profiler extends EventEmitter {
const encodedProfiles = {}

try {
if (Object.keys(this._config.profilers).length === 0) {
throw new Error('No profile types configured.')
}

// collect profiles synchronously so that profilers can be safely stopped asynchronously
for (const profiler of this._config.profilers) {
const profile = profiler.profile(restart, startDate, endDate)
Expand Down

0 comments on commit cbe194f

Please sign in to comment.