Skip to content

Commit 9214034

Browse files
committed
rename
1 parent 82d683c commit 9214034

4 files changed

Lines changed: 7 additions & 7 deletions

File tree

packages/core/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ export * as metrics from './metrics/public-api';
146146
export type { MetricOptions } from './metrics/public-api';
147147
export { createConsolaReporter } from './integrations/consola';
148148
export { addVercelAiProcessors } from './tracing/vercel-ai';
149-
export { _INTERNAL_getSpanContextForToolCallId, _INTERNAL_cleanupToolCallSpan } from './tracing/vercel-ai/utils';
149+
export { _INTERNAL_getSpanContextForToolCallId, _INTERNAL_cleanupToolCallSpanContext } from './tracing/vercel-ai/utils';
150150
export { instrumentOpenAiClient } from './tracing/openai';
151151
export { OPENAI_INTEGRATION_NAME } from './tracing/openai/constants';
152152
export { instrumentAnthropicAiClient } from './tracing/anthropic-ai';

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export function _INTERNAL_getSpanContextForToolCallId(toolCallId: string): ToolC
8484
/**
8585
* Clean up the span mapping for a tool call ID
8686
*/
87-
export function _INTERNAL_cleanupToolCallSpan(toolCallId: string): void {
87+
export function _INTERNAL_cleanupToolCallSpanContext(toolCallId: string): void {
8888
toolCallSpanContextMap.delete(toolCallId);
8989
}
9090

packages/core/test/lib/tracing/vercel-ai-tool-call-span-map.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { beforeEach, describe, expect, it } from 'vitest';
22
import { addVercelAiProcessors } from '../../../src/tracing/vercel-ai';
33
import { toolCallSpanContextMap } from '../../../src/tracing/vercel-ai/constants';
4-
import { _INTERNAL_cleanupToolCallSpan, _INTERNAL_getSpanContextForToolCallId } from '../../../src/tracing/vercel-ai/utils';
4+
import { _INTERNAL_cleanupToolCallSpanContext, _INTERNAL_getSpanContextForToolCallId } from '../../../src/tracing/vercel-ai/utils';
55
import {
66
AI_TOOL_CALL_ID_ATTRIBUTE,
77
AI_TOOL_CALL_NAME_ATTRIBUTE,
@@ -102,7 +102,7 @@ describe('vercel-ai tool call span context map', () => {
102102
spanId: 'span-id-1',
103103
});
104104

105-
_INTERNAL_cleanupToolCallSpan('tool-call-1');
105+
_INTERNAL_cleanupToolCallSpanContext('tool-call-1');
106106
expect(_INTERNAL_getSpanContextForToolCallId('tool-call-1')).toBeUndefined();
107107
});
108108
});

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { InstrumentationConfig, InstrumentationModuleDefinition } from '@opentelemetry/instrumentation';
22
import { InstrumentationBase, InstrumentationNodeModuleDefinition } from '@opentelemetry/instrumentation';
33
import {
4-
_INTERNAL_cleanupToolCallSpan,
4+
_INTERNAL_cleanupToolCallSpanContextContext,
55
_INTERNAL_getSpanContextForToolCallId,
66
addNonEnumerableProperty,
77
captureException,
@@ -99,7 +99,7 @@ function checkResultForToolErrors(result: unknown): void {
9999
for (const item of resultObj.content) {
100100
// Successful tool calls should not keep toolCallId -> span context mappings alive.
101101
if (isToolResultPart(item)) {
102-
_INTERNAL_cleanupToolCallSpan(item.toolCallId);
102+
_INTERNAL_cleanupToolCallSpanContext(item.toolCallId);
103103
continue;
104104
}
105105

@@ -149,7 +149,7 @@ function checkResultForToolErrors(result: unknown): void {
149149

150150
// Clean up the span mapping since we've processed this tool error
151151
// We won't get multiple { type: 'tool-error' } parts for the same toolCallId.
152-
_INTERNAL_cleanupToolCallSpan(item.toolCallId);
152+
_INTERNAL_cleanupToolCallSpanContext(item.toolCallId);
153153
}
154154
}
155155

0 commit comments

Comments
 (0)