Skip to content

Commit

Permalink
fix(tracing): initialize server side tracing correctly (#517)
Browse files Browse the repository at this point in the history
  • Loading branch information
rchl authored Mar 7, 2023
1 parent 5472233 commit c7eda63
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/core/hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,8 @@ export async function initializeServerSentry (moduleContainer, moduleOptions, se
sentryHandlerProxy.errorHandler = Sentry.Handlers.errorHandler()
sentryHandlerProxy.requestHandler = Sentry.Handlers.requestHandler(moduleOptions.requestHandlerConfig)
if (serverOptions.tracing) {
// Triggers initialization of the tracing integration as a side effect.
await import('@sentry/tracing')
sentryHandlerProxy.tracingHandler = Sentry.Handlers.tracingHandler()
}
}
Expand Down
1 change: 1 addition & 0 deletions lib/core/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ export async function resolveServerOptions (moduleContainer, moduleOptions, logg
apiMethods,
lazy: options.lazy,
logMockCalls: options.logMockCalls, // for mocked only
tracing: options.tracing,
}
}

Expand Down

0 comments on commit c7eda63

Please sign in to comment.