Skip to content

Commit 2d7beeb

Browse files
committed
use hasTracingEnabled()
1 parent cd43cfd commit 2d7beeb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/nextjs/src/index.server.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { RewriteFrames } from '@sentry/integrations';
22
import { configureScope, getCurrentHub, init as nodeInit, Integrations } from '@sentry/node';
3+
import { hasTracingEnabled } from '@sentry/tracing';
34
import { escapeStringForRegex, logger } from '@sentry/utils';
45

56
import { instrumentServer } from './utils/instrumentServer';
@@ -65,7 +66,7 @@ function addServerIntegrations(options: NextjsOptions): void {
6566
options.integrations = [defaultRewriteFramesIntegration];
6667
}
6768

68-
if (options.tracesSampleRate !== undefined || options.tracesSampler !== undefined) {
69+
if (hasTracingEnabled(options)) {
6970
options.integrations = addIntegration(defaultHttpTracingIntegration, options.integrations, {
7071
Http: { keyPath: '_tracing', value: true },
7172
});

0 commit comments

Comments
 (0)