Skip to content

Commit b3ce32e

Browse files
committed
rename
1 parent 4e98865 commit b3ce32e

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

packages/nextjs/src/common/pages-router-instrumentation/wrapApiHandlerWithSentry.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,11 @@ export function wrapApiHandlerWithSentry(apiHandler: NextApiHandler, parameteriz
6262
return withIsolationScope(isolationScope => {
6363
// Normally, there is an active span here (from Next.js OTEL) and we just use that as parent
6464
// Else, we manually continueTrace from the incoming headers
65-
const continueTraceOrNot = getActiveSpan()
65+
const continueTraceIfNoActiveSpan = getActiveSpan()
6666
? <T>(_opts: unknown, callback: () => T) => callback()
6767
: continueTrace;
6868

69-
return continueTraceOrNot(
69+
return continueTraceIfNoActiveSpan(
7070
{
7171
sentryTrace:
7272
req.headers && isString(req.headers['sentry-trace']) ? req.headers['sentry-trace'] : undefined,

packages/nextjs/src/common/withServerActionInstrumentation.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,11 @@ async function withServerActionInstrumentationImplementation<A extends (...args:
9797

9898
// Normally, there is an active span here (from Next.js OTEL) and we just use that as parent
9999
// Else, we manually continueTrace from the incoming headers
100-
const continueTraceOrNot = getActiveSpan() ? <T>(_opts: unknown, callback: () => T) => callback() : continueTrace;
100+
const continueTraceIfNoActiveSpan = getActiveSpan()
101+
? <T>(_opts: unknown, callback: () => T) => callback()
102+
: continueTrace;
101103

102-
return continueTraceOrNot(
104+
return continueTraceIfNoActiveSpan(
103105
{
104106
sentryTrace: sentryTraceHeader,
105107
baggage: baggageHeader,

0 commit comments

Comments
 (0)