Skip to content

Commit c7eda63

Browse files
authored
fix(tracing): initialize server side tracing correctly (#517)
1 parent 5472233 commit c7eda63

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

lib/core/hooks.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,8 @@ export async function initializeServerSentry (moduleContainer, moduleOptions, se
169169
sentryHandlerProxy.errorHandler = Sentry.Handlers.errorHandler()
170170
sentryHandlerProxy.requestHandler = Sentry.Handlers.requestHandler(moduleOptions.requestHandlerConfig)
171171
if (serverOptions.tracing) {
172+
// Triggers initialization of the tracing integration as a side effect.
173+
await import('@sentry/tracing')
172174
sentryHandlerProxy.tracingHandler = Sentry.Handlers.tracingHandler()
173175
}
174176
}

lib/core/options.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,7 @@ export async function resolveServerOptions (moduleContainer, moduleOptions, logg
258258
apiMethods,
259259
lazy: options.lazy,
260260
logMockCalls: options.logMockCalls, // for mocked only
261+
tracing: options.tracing,
261262
}
262263
}
263264

0 commit comments

Comments
 (0)