Skip to content

Commit 87910e6

Browse files
authored
Merge branch 'develop' into cg-next-manifest-turbopack
2 parents 36322c3 + 16d95cd commit 87910e6

File tree

70 files changed

+832
-586
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+832
-586
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
- "You miss 100 percent of the chances you don't take. — Wayne Gretzky" — Michael Scott
66

7+
Work in this release was contributed by @janpapenbrock. Thank you for your contribution!
8+
79
## 9.38.0
810

911
### Important Changes

dev-packages/browser-integration-tests/suites/replay/logger/test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ sentryTest('should output logger messages', async ({ getLocalTestUrl, page }) =>
2121
await Promise.all([page.goto(url), reqPromise0]);
2222

2323
expect(messages).toContain('Sentry Logger [log]: Integration installed: Replay');
24-
expect(messages).toContain('Sentry Logger [info]: [Replay] Creating new session');
25-
expect(messages).toContain('Sentry Logger [info]: [Replay] Starting replay in session mode');
26-
expect(messages).toContain('Sentry Logger [info]: [Replay] Using compression worker');
24+
expect(messages).toContain('Sentry Logger [log]: [Replay] Creating new session');
25+
expect(messages).toContain('Sentry Logger [log]: [Replay] Starting replay in session mode');
26+
expect(messages).toContain('Sentry Logger [log]: [Replay] Using compression worker');
2727
});

dev-packages/e2e-tests/run.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,10 @@ async function run(): Promise<void> {
8484
const cwd = tmpDirPath;
8585

8686
console.log(`Building ${testAppPath} in ${tmpDirPath}...`);
87-
await asyncExec('pnpm test:build', { env, cwd });
87+
await asyncExec('volta run pnpm test:build', { env, cwd });
8888

8989
console.log(`Testing ${testAppPath}...`);
90-
await asyncExec('pnpm test:assert', { env, cwd });
90+
await asyncExec('volta run pnpm test:assert', { env, cwd });
9191

9292
// clean up (although this is tmp, still nice to do)
9393
await rm(tmpDirPath, { recursive: true });

dev-packages/e2e-tests/test-applications/nextjs-14/app/generation-functions/with-redirect/page.tsx

Lines changed: 0 additions & 11 deletions
This file was deleted.

dev-packages/e2e-tests/test-applications/nextjs-14/tests/generation-functions.test.ts

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -108,20 +108,3 @@ test('Should send a transaction and an error event for a faulty generateViewport
108108

109109
expect(errorEvent.transaction).toBe('Page.generateViewport (/generation-functions)');
110110
});
111-
112-
test('Should send a transaction event with correct status for a generateMetadata() function invocation with redirect()', async ({
113-
page,
114-
}) => {
115-
const testTitle = 'redirect-foobar';
116-
117-
const transactionPromise = waitForTransaction('nextjs-14', async transactionEvent => {
118-
return (
119-
transactionEvent.contexts?.trace?.data?.['http.target'] ===
120-
`/generation-functions/with-redirect?metadataTitle=${testTitle}`
121-
);
122-
});
123-
124-
await page.goto(`/generation-functions/with-redirect?metadataTitle=${testTitle}`);
125-
126-
expect((await transactionPromise).contexts?.trace?.status).toBe('ok');
127-
});

dev-packages/e2e-tests/test-applications/nextjs-15/tests/ai-test.test.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,34 +31,34 @@ test('should create AI spans with correct attributes', async ({ page }) => {
3131

3232
// First AI call - should have telemetry enabled and record inputs/outputs (sendDefaultPii: true)
3333
/* const firstPipelineSpan = aiPipelineSpans[0];
34-
expect(firstPipelineSpan?.data?.['ai.model.id']).toBe('mock-model-id');
35-
expect(firstPipelineSpan?.data?.['ai.model.provider']).toBe('mock-provider');
36-
expect(firstPipelineSpan?.data?.['ai.prompt']).toContain('Where is the first span?');
34+
expect(firstPipelineSpan?.data?.['vercel.ai.model.id']).toBe('mock-model-id');
35+
expect(firstPipelineSpan?.data?.['vercel.ai.model.provider']).toBe('mock-provider');
36+
expect(firstPipelineSpan?.data?.['vercel.ai.prompt']).toContain('Where is the first span?');
3737
expect(firstPipelineSpan?.data?.['gen_ai.response.text']).toBe('First span here!');
3838
expect(firstPipelineSpan?.data?.['gen_ai.usage.input_tokens']).toBe(10);
3939
expect(firstPipelineSpan?.data?.['gen_ai.usage.output_tokens']).toBe(20); */
4040

4141
// Second AI call - explicitly enabled telemetry
4242
const secondPipelineSpan = aiPipelineSpans[0];
43-
expect(secondPipelineSpan?.data?.['ai.prompt']).toContain('Where is the second span?');
43+
expect(secondPipelineSpan?.data?.['vercel.ai.prompt']).toContain('Where is the second span?');
4444
expect(secondPipelineSpan?.data?.['gen_ai.response.text']).toContain('Second span here!');
4545

4646
// Third AI call - with tool calls
4747
/* const thirdPipelineSpan = aiPipelineSpans[2];
48-
expect(thirdPipelineSpan?.data?.['ai.response.finishReason']).toBe('tool-calls');
48+
expect(thirdPipelineSpan?.data?.['vercel.ai.response.finishReason']).toBe('tool-calls');
4949
expect(thirdPipelineSpan?.data?.['gen_ai.usage.input_tokens']).toBe(15);
5050
expect(thirdPipelineSpan?.data?.['gen_ai.usage.output_tokens']).toBe(25); */
5151

5252
// Tool call span
5353
/* const toolSpan = toolCallSpans[0];
54-
expect(toolSpan?.data?.['ai.toolCall.name']).toBe('getWeather');
55-
expect(toolSpan?.data?.['ai.toolCall.id']).toBe('call-1');
56-
expect(toolSpan?.data?.['ai.toolCall.args']).toContain('San Francisco');
57-
expect(toolSpan?.data?.['ai.toolCall.result']).toContain('Sunny, 72°F'); */
54+
expect(toolSpan?.data?.['vercel.ai.toolCall.name']).toBe('getWeather');
55+
expect(toolSpan?.data?.['vercel.ai.toolCall.id']).toBe('call-1');
56+
expect(toolSpan?.data?.['vercel.ai.toolCall.args']).toContain('San Francisco');
57+
expect(toolSpan?.data?.['vercel.ai.toolCall.result']).toContain('Sunny, 72°F'); */
5858

5959
// Verify the fourth call was not captured (telemetry disabled)
6060
const promptsInSpans = spans
61-
.map(span => span.data?.['ai.prompt'])
61+
.map(span => span.data?.['vercel.ai.prompt'])
6262
.filter((prompt): prompt is string => prompt !== undefined);
6363
const hasDisabledPrompt = promptsInSpans.some(prompt => prompt.includes('Where is the third span?'));
6464
expect(hasDisabledPrompt).toBe(false);

dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/route-handlers/[param]/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ export async function GET() {
55
}
66

77
export async function POST() {
8-
return NextResponse.json({ name: 'John Doe' }, { status: 403 });
8+
return NextResponse.json({ name: 'John Doe' }, { status: 400 });
99
}

dev-packages/e2e-tests/test-applications/nextjs-app-dir/tests/route-handlers.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ test('Should create a transaction for route handlers and correctly set span stat
2828

2929
const routehandlerTransaction = await routehandlerTransactionPromise;
3030

31-
expect(routehandlerTransaction.contexts?.trace?.status).toBe('permission_denied');
31+
expect(routehandlerTransaction.contexts?.trace?.status).toBe('invalid_argument');
3232
expect(routehandlerTransaction.contexts?.trace?.op).toBe('http.server');
3333
});
3434

dev-packages/e2e-tests/test-applications/node-express/src/app.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,8 @@ export const appRouter = t.router({
143143
.mutation(() => {
144144
throw new Error('I crashed in a trpc handler');
145145
}),
146-
unauthorized: procedure.mutation(() => {
147-
throw new TRPCError({ code: 'UNAUTHORIZED', cause: new Error('Unauthorized') });
146+
badRequest: procedure.mutation(() => {
147+
throw new TRPCError({ code: 'BAD_REQUEST', cause: new Error('Bad Request') });
148148
}),
149149
});
150150

dev-packages/e2e-tests/test-applications/node-express/tests/trpc.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,12 @@ test('Should record transaction and error for a trpc handler that returns a stat
109109
const transactionEventPromise = waitForTransaction('node-express', transactionEvent => {
110110
return (
111111
transactionEvent.transaction === 'POST /trpc' &&
112-
!!transactionEvent.spans?.find(span => span.description === 'trpc/unauthorized')
112+
!!transactionEvent.spans?.find(span => span.description === 'trpc/badRequest')
113113
);
114114
});
115115

116116
const errorEventPromise = waitForError('node-express', errorEvent => {
117-
return !!errorEvent?.exception?.values?.some(exception => exception.value?.includes('Unauthorized'));
117+
return !!errorEvent?.exception?.values?.some(exception => exception.value?.includes('Bad Request'));
118118
});
119119

120120
const trpcClient = createTRPCProxyClient<AppRouter>({
@@ -125,7 +125,7 @@ test('Should record transaction and error for a trpc handler that returns a stat
125125
],
126126
});
127127

128-
await expect(trpcClient.unauthorized.mutate()).rejects.toBeDefined();
128+
await expect(trpcClient.badRequest.mutate()).rejects.toBeDefined();
129129

130130
await expect(transactionEventPromise).resolves.toBeDefined();
131131
await expect(errorEventPromise).resolves.toBeDefined();

0 commit comments

Comments
 (0)