Skip to content

Commit b67be4a

Browse files
committed
fix(nextjs): Add extension methods in wrapServerComponentWithSentry
1 parent 89b5720 commit b67be4a

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

packages/nextjs/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"@sentry/types": "7.44.2",
2626
"@sentry/utils": "7.44.2",
2727
"@sentry/webpack-plugin": "1.20.0",
28+
"@sentry-internal/tracing": "7.44.2",
2829
"chalk": "3.0.0",
2930
"rollup": "2.78.0",
3031
"stacktrace-parser": "^0.1.10",

packages/nextjs/src/server/wrapServerComponentWithSentry.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { captureException, getCurrentHub, startTransaction } from '@sentry/core';
1+
import { addTracingExtensions, captureException, getCurrentHub, startTransaction } from '@sentry/core';
22
import { baggageHeaderToDynamicSamplingContext, extractTraceparentData } from '@sentry/utils';
33
import * as domain from 'domain';
44

@@ -11,6 +11,8 @@ export function wrapServerComponentWithSentry<F extends (...args: any[]) => any>
1111
appDirComponent: F,
1212
context: ServerComponentContext,
1313
): F {
14+
addTracingExtensions();
15+
1416
const { componentRoute, componentType } = context;
1517

1618
// Even though users may define server components as async functions, for the client bundles

0 commit comments

Comments
 (0)