Skip to content

Commit 71c9643

Browse files
committed
update with internal prefix
1 parent cb77f26 commit 71c9643

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

packages/core/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ export type { ReportDialogOptions } from './report-dialog';
118118
export { _INTERNAL_captureLog, _INTERNAL_flushLogsBuffer, _INTERNAL_captureSerializedLog } from './logs/exports';
119119
export { consoleLoggingIntegration } from './logs/console-integration';
120120
export { addVercelAiProcessors } from './utils/vercel-ai';
121-
export { getSpanForToolCallId, cleanupToolCallSpan } from './utils/vercel-ai/utils';
121+
export { _INTERNAL_getSpanForToolCallId, _INTERNAL_cleanupToolCallSpan } from './utils/vercel-ai/utils';
122122
export { instrumentOpenAiClient } from './utils/openai';
123123
export { OPENAI_INTEGRATION_NAME } from './utils/openai/constants';
124124
export type { OpenAiClient, OpenAiOptions, InstrumentedMethod } from './utils/openai/types';

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,13 @@ export function applyAccumulatedTokens(
6060
/**
6161
* Get the span associated with a tool call ID
6262
*/
63-
export function getSpanForToolCallId(toolCallId: string): Span | undefined {
63+
export function _INTERNAL_getSpanForToolCallId(toolCallId: string): Span | undefined {
6464
return toolCallSpanMap.get(toolCallId);
6565
}
6666

6767
/**
6868
* Clean up the span mapping for a tool call ID
6969
*/
70-
export function cleanupToolCallSpan(toolCallId: string): void {
70+
export function _INTERNAL_cleanupToolCallSpan(toolCallId: string): void {
7171
toolCallSpanMap.delete(toolCallId);
7272
}

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ import type { Span } from '@sentry/core';
44
import {
55
addNonEnumerableProperty,
66
captureException,
7-
cleanupToolCallSpan,
7+
_INTERNAL_cleanupToolCallSpan,
88
getActiveSpan,
99
getCurrentScope,
10-
getSpanForToolCallId,
10+
_INTERNAL_getSpanForToolCallId,
1111
handleCallbackErrors,
1212
SDK_VERSION,
1313
withScope,
@@ -84,7 +84,7 @@ function checkResultForToolErrors(result: unknown | Promise<unknown>): void {
8484
for (const item of resultObj.content) {
8585
if (isToolError(item)) {
8686
// Try to get the span associated with this tool call ID
87-
const associatedSpan = getSpanForToolCallId(item.toolCallId) as Span;
87+
const associatedSpan = _INTERNAL_getSpanForToolCallId(item.toolCallId) as Span;
8888

8989
if (associatedSpan) {
9090
// We have the span, so link the error using span and trace IDs from the span
@@ -112,7 +112,7 @@ function checkResultForToolErrors(result: unknown | Promise<unknown>): void {
112112

113113
// Clean up the span mapping since we've processed this tool error
114114
// We won't get multiple { type: 'tool-error' } parts for the same toolCallId.
115-
cleanupToolCallSpan(item.toolCallId);
115+
_INTERNAL_cleanupToolCallSpan(item.toolCallId);
116116
} else {
117117
// Fallback: capture without span linking
118118
withScope(scope => {

0 commit comments

Comments
 (0)