Skip to content

Commit 2d814ef

Browse files
committed
yarn fix
1 parent f698420 commit 2d814ef

3 files changed

Lines changed: 7 additions & 1 deletion

File tree

packages/core/src/tracing/vercel-ai/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable max-lines */
12
import type { Client } from '../../client';
23
import { SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from '../../semanticAttributes';
34
import type { Event } from '../../types-hoist/event';

packages/node/src/integrations/tracing/vercelai/instrumentation.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,9 @@ function captureToolErrors(content: Array<object>): void {
135135
}
136136
}
137137

138+
/**
139+
* Remove span context entries for all completed tool calls in the content array.
140+
*/
138141
export function cleanupToolCallSpanContexts(content: Array<object>): void {
139142
for (const item of content) {
140143
if (

packages/node/test/integrations/tracing/vercelai/instrumentation.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,9 @@ describe('cleanupToolCallSpanContexts', () => {
235235
test('cleans up span context for tool-error items', () => {
236236
_INTERNAL_toolCallSpanContextMap.set('tool-1', { traceId: 't1', spanId: 's1' });
237237

238-
cleanupToolCallSpanContexts([{ type: 'tool-error', toolCallId: 'tool-1', toolName: 'bash', error: new Error('fail') }]);
238+
cleanupToolCallSpanContexts([
239+
{ type: 'tool-error', toolCallId: 'tool-1', toolName: 'bash', error: new Error('fail') },
240+
]);
239241

240242
expect(_INTERNAL_getSpanContextForToolCallId('tool-1')).toBeUndefined();
241243
});

0 commit comments

Comments
 (0)