Skip to content

Commit

Permalink
store request in sdkProcessingMetadata
Browse files Browse the repository at this point in the history
  • Loading branch information
lobsterkatie committed Oct 21, 2022
1 parent 0576852 commit 8b338c5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/remix/src/utils/instrumentServer.ts
Expand Up @@ -353,6 +353,11 @@ function wrapRequestHandler(origRequestHandler: RequestHandler, build: ServerBui
return local.bind(async () => {
const hub = getCurrentHub();
const options = hub.getClient()?.getOptions();
const scope = hub.getScope();

if (scope) {
scope.setSDKProcessingMetadata({ request });
}

if (!options || !hasTracingEnabled(options)) {
return origRequestHandler.call(this, request, loadContext);
Expand Down

0 comments on commit 8b338c5

Please sign in to comment.