Skip to content

Commit 114e21e

Browse files
committed
lint
1 parent 90fd6db commit 114e21e

6 files changed

Lines changed: 34 additions & 11 deletions

File tree

‎packages/core/src/index.ts‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -165,11 +165,7 @@ export { instrumentStateGraphCompile, instrumentLangGraph } from './tracing/lang
165165
export { LANGGRAPH_INTEGRATION_NAME } from './tracing/langgraph/constants';
166166
export type { LangGraphOptions, LangGraphIntegration, CompiledGraph } from './tracing/langgraph/types';
167167
export type { OpenAiClient, OpenAiOptions } from './tracing/openai/types';
168-
export type {
169-
AnthropicAiClient,
170-
AnthropicAiOptions,
171-
AnthropicAiResponse,
172-
} from './tracing/anthropic-ai/types';
168+
export type { AnthropicAiClient, AnthropicAiOptions, AnthropicAiResponse } from './tracing/anthropic-ai/types';
173169
export type { GoogleGenAIClient, GoogleGenAIChat, GoogleGenAIOptions } from './tracing/google-genai/types';
174170
export type { FeatureFlag } from './utils/featureFlags';
175171

‎packages/core/src/tracing/ai/utils.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ export function resolveAIRecordingOptions<T extends AIRecordingOptions>(options?
4848
} as T & Required<AIRecordingOptions>;
4949
}
5050

51-
5251
/**
5352
* Build method path from current traversal
5453
*/

‎packages/core/src/tracing/anthropic-ai/index.ts‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,13 @@ function createDeepProxy<T extends object>(target: T, currentPath = '', options:
341341

342342
const instrumentedMethod = ANTHROPIC_METHOD_REGISTRY[methodPath];
343343
if (typeof value === 'function' && instrumentedMethod) {
344-
return instrumentMethod(value as (...args: unknown[]) => unknown | Promise<unknown>, methodPath, instrumentedMethod, obj, options);
344+
return instrumentMethod(
345+
value as (...args: unknown[]) => unknown | Promise<unknown>,
346+
methodPath,
347+
instrumentedMethod,
348+
obj,
349+
options,
350+
);
345351
}
346352

347353
if (typeof value === 'function') {

‎packages/core/src/tracing/google-genai/index.ts‎

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,13 @@ function createDeepProxy<T extends object>(target: T, currentPath = '', options:
338338
if (typeof value === 'function' && instrumentedMethod) {
339339
// Special case: chats.create is synchronous but needs both instrumentation AND result proxying
340340
if (methodPath === CHATS_CREATE_METHOD) {
341-
const wrappedMethod = instrumentMethod(value as (...args: unknown[]) => unknown, methodPath, instrumentedMethod, t, options);
341+
const wrappedMethod = instrumentMethod(
342+
value as (...args: unknown[]) => unknown,
343+
methodPath,
344+
instrumentedMethod,
345+
t,
346+
options,
347+
);
342348
return function instrumentedAndProxiedCreate(...args: unknown[]): unknown {
343349
const result = wrappedMethod(...args);
344350
// If the result is an object (like a chat instance), proxy it too
@@ -349,7 +355,13 @@ function createDeepProxy<T extends object>(target: T, currentPath = '', options:
349355
};
350356
}
351357

352-
return instrumentMethod(value as (...args: unknown[]) => Promise<unknown>, methodPath, instrumentedMethod, t, options);
358+
return instrumentMethod(
359+
value as (...args: unknown[]) => Promise<unknown>,
360+
methodPath,
361+
instrumentedMethod,
362+
t,
363+
options,
364+
);
353365
}
354366

355367
if (typeof value === 'function') {

‎packages/core/src/tracing/openai/index.ts‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,13 @@ function createDeepProxy<T extends object>(target: T, currentPath = '', options:
274274

275275
const instrumentedMethod = OPENAI_METHOD_REGISTRY[methodPath];
276276
if (typeof value === 'function' && instrumentedMethod) {
277-
return instrumentMethod(value as (...args: unknown[]) => Promise<unknown>, methodPath, instrumentedMethod, obj, options);
277+
return instrumentMethod(
278+
value as (...args: unknown[]) => Promise<unknown>,
279+
methodPath,
280+
instrumentedMethod,
281+
obj,
282+
options,
283+
);
278284
}
279285

280286
if (typeof value === 'function') {

‎packages/core/test/lib/utils/anthropic-utils.test.ts‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
import { describe, expect, it } from 'vitest';
2-
import { mapAnthropicErrorToStatusMessage, messagesFromParams, setMessagesAttribute } from '../../../src/tracing/anthropic-ai/utils';
2+
import {
3+
mapAnthropicErrorToStatusMessage,
4+
messagesFromParams,
5+
setMessagesAttribute,
6+
} from '../../../src/tracing/anthropic-ai/utils';
37
import type { Span } from '../../../src/types-hoist/span';
48

59
describe('anthropic-ai-utils', () => {

0 commit comments

Comments
 (0)