Skip to content

Commit 4541f69

Browse files
dcramerclaude
andcommitted
fix(runtime): Add nitro.ts to build include, remove no-op span wrap
Add src/nitro.ts to tsconfig.build.json include array so declaration generation works for the ./nitro export. Remove Sentry.withActiveSpan wrapping in webhook waitUntil — wrapping an already-created Promise is a no-op for span propagation since the async work was already scheduled outside the span context. Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 49e9342 commit 4541f69

2 files changed

Lines changed: 7 additions & 9 deletions

File tree

packages/junior/src/handlers/webhooks.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import * as Sentry from "@/chat/sentry";
21
import { getProductionBot } from "@/chat/app/production";
32
import {
43
createRequestContext,
@@ -49,14 +48,8 @@ export async function POST(
4948
requestContext,
5049
async () => {
5150
try {
52-
const activeSpan = Sentry.getActiveSpan();
5351
const response = await handler(request, {
54-
waitUntil: (task: Promise<unknown>) =>
55-
waitUntil(
56-
activeSpan
57-
? Sentry.withActiveSpan(activeSpan, () => task)
58-
: task,
59-
),
52+
waitUntil: (task: Promise<unknown>) => waitUntil(task),
6053
} as Parameters<typeof handler>[1]);
6154
if (response.status >= 400) {
6255
let responseBodySnippet: string | undefined;

packages/junior/tsconfig.build.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,10 @@
66
"incremental": false,
77
"outDir": "dist"
88
},
9-
"include": ["src/app.ts", "src/handlers/**/*.ts", "src/instrumentation.ts"]
9+
"include": [
10+
"src/app.ts",
11+
"src/handlers/**/*.ts",
12+
"src/instrumentation.ts",
13+
"src/nitro.ts"
14+
]
1015
}

0 commit comments

Comments
 (0)