File tree Expand file tree Collapse file tree
node/src/integrations/tracing/langchain Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -161,7 +161,7 @@ export { ANTHROPIC_AI_INTEGRATION_NAME } from './tracing/anthropic-ai/constants'
161161export { instrumentGoogleGenAIClient } from './tracing/google-genai' ;
162162export { GOOGLE_GENAI_INTEGRATION_NAME } from './tracing/google-genai/constants' ;
163163export type { GoogleGenAIResponse } from './tracing/google-genai/types' ;
164- export { createLangChainCallbackHandler , instrumentEmbeddingMethod , instrumentLangChainEmbeddings } from './tracing/langchain' ;
164+ export { createLangChainCallbackHandler , instrumentLangChainEmbeddings } from './tracing/langchain' ;
165165export { LANGCHAIN_INTEGRATION_NAME } from './tracing/langchain/constants' ;
166166export type { LangChainOptions , LangChainIntegration } from './tracing/langchain/types' ;
167167export { instrumentStateGraphCompile , instrumentLangGraph } from './tracing/langgraph' ;
Original file line number Diff line number Diff line change @@ -335,4 +335,4 @@ export function createLangChainCallbackHandler(options: LangChainOptions = {}):
335335 return handler ;
336336}
337337
338- export { instrumentEmbeddingMethod , instrumentLangChainEmbeddings } from './embeddings' ;
338+ export { instrumentLangChainEmbeddings } from './embeddings' ;
Original file line number Diff line number Diff line change @@ -11,9 +11,9 @@ import {
1111 ANTHROPIC_AI_INTEGRATION_NAME ,
1212 createLangChainCallbackHandler ,
1313 GOOGLE_GENAI_INTEGRATION_NAME ,
14+ instrumentLangChainEmbeddings ,
1415 OPENAI_INTEGRATION_NAME ,
1516 SDK_VERSION ,
16- instrumentEmbeddingMethod ,
1717} from '@sentry/core' ;
1818
1919const supportedVersions = [ '>=0.1.0 <2.0.0' ] ;
@@ -277,15 +277,6 @@ export class SentryLangChainInstrumentation extends InstrumentationBase<LangChai
277277 }
278278 targetProto . __sentry_patched_embeddings__ = true ;
279279
280- // Duck-type detection already verified these are functions
281- targetProto . embedQuery = instrumentEmbeddingMethod (
282- targetProto . embedQuery as ( ...args : unknown [ ] ) => Promise < unknown > ,
283- options ,
284- ) ;
285-
286- targetProto . embedDocuments = instrumentEmbeddingMethod (
287- targetProto . embedDocuments as ( ...args : unknown [ ] ) => Promise < unknown > ,
288- options ,
289- ) ;
280+ instrumentLangChainEmbeddings ( targetProto , options ) ;
290281 }
291282}
You can’t perform that action at this time.
0 commit comments