Skip to content

Commit 265b4a5

Browse files
authored
fix(remix): Move instrumentBuild inside fetch callback. (#12957)
1 parent 297f706 commit 265b4a5

File tree

1 file changed

+4
-4
lines changed
  • docs/platforms/javascript/guides/remix/frameworks

1 file changed

+4
-4
lines changed

docs/platforms/javascript/guides/remix/frameworks/hydrogen.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,6 @@ import { instrumentBuild } from "@sentry/remix/cloudflare";
4949
// Virtual entry point for the app
5050
import * as remixBuild from 'virtual:remix/server-build';
5151

52-
// Instrument your server build with Sentry
53-
// and use the instrumented build inside the fetch handler
54-
const instrumentedBuild = instrumentBuild(remixBuild)
55-
5652
/**
5753
* Export a fetch handler in module format.
5854
*/
@@ -73,6 +69,10 @@ export default {
7369
context: executionContext,
7470
},
7571
async () => {
72+
// Instrument your server build with Sentry
73+
// and use the instrumented build inside the fetch handler
74+
const instrumentedBuild = instrumentBuild(remixBuild)
75+
7676
// request handling logic
7777
}
7878
);

0 commit comments

Comments
 (0)