Skip to content

Commit 7bc561f

Browse files
committed
profiler: simplify profiler check
1 parent cbbba00 commit 7bc561f

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

packages/profiling-node/src/integration.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -448,13 +448,8 @@ export const _nodeProfilingIntegration = ((): ProfilingIntegration<NodeClient> =
448448
const profilingAPIVersion = getProfilingMode(options);
449449

450450
if (profilingAPIVersion === 'legacy') {
451-
const mode =
452-
(options.profilesSampleRate === undefined ||
453-
options.profilesSampleRate === null ||
454-
options.profilesSampleRate === 0) &&
455-
!options.profilesSampler
456-
? 'continuous'
457-
: 'span';
451+
const mode = !('profileSessionSampleRate' in options) && !options.profilesSampler ? 'continuous' : 'span';
452+
458453
switch (mode) {
459454
case 'continuous': {
460455
DEBUG_BUILD && logger.log('[Profiling] Continuous profiler mode enabled.');

0 commit comments

Comments
 (0)