Skip to content

Commit 874122b

Browse files
authored
fix: instrumentation (#842)
1 parent 544a8d9 commit 874122b

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

apps/studio/src/instrumentation.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { env } from "./env.mjs"
2+
3+
export async function register() {
4+
// make sure you only run on nodejs runtime or you will have errors with built-in modules not being defined
5+
if (env.NODE_ENV === "production") {
6+
console.log("Instrumenting Next.js Server")
7+
await import("~/server/modules/tracer")
8+
}
9+
}

apps/studio/src/server/modules/_app.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/**
22
* This file contains the root router of your tRPC-backend
33
*/
4-
import "./tracer"
54

65
import { publicProcedure, router } from "../trpc"
76
import { assetRouter } from "./asset/asset.router"

0 commit comments

Comments
 (0)