LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
LangChain
  • Browser
  • Universal
  • Hub
  • Node
  • Load
  • Serializable
  • Encoder Backed
  • File System
  • In Memory
  • Tools
LangChain Core
  • Agents
  • Caches
  • Base
  • Dispatch
  • Web
  • Manager
  • Promises
  • Chat History
  • Context
  • Base
  • Langsmith
  • Documents
  • Embeddings
  • Errors
  • Example Selectors
  • Indexing
  • Base
  • Chat Models
  • Compat
  • Event
  • Llms
  • Openai Completions Stream
  • Profile
  • Stream
  • Structured Output
  • Load
  • Serializable
  • Memory
  • Messages
  • Tool
  • Output Parsers
  • Openai Functions
  • Openai Tools
  • Outputs
  • Prompt Values
  • Prompts
  • Retrievers
  • Document Compressors
  • Runnables
  • Graph
  • Singletons
  • Stores
  • Structured Query
  • Testing
  • Tools
  • Base
  • Console
  • Log Stream
  • Run Collector
  • Tracer Langchain
  • Stream
  • Async Caller
  • Chunk Array
  • Context
  • Env
  • Event Source Parse
  • Format
  • Function Calling
  • Hash
  • Json Patch
  • Json Schema
  • Math
  • Ssrf
  • Standard Schema
  • Stream
  • Testing
  • Tiktoken
  • Types
  • Uuid
  • Vectorstores
Text Splitters
MCP Adapters
⌘I

LangChain Assistant

Ask a question to get started

Enter to send•Shift+Enter new line

Menu

LangChain
BrowserUniversalHubNodeLoadSerializableEncoder BackedFile SystemIn MemoryTools
LangChain Core
AgentsCachesBaseDispatchWebManagerPromisesChat HistoryContextBaseLangsmithDocumentsEmbeddingsErrorsExample SelectorsIndexingBaseChat ModelsCompatEventLlmsOpenai Completions StreamProfileStreamStructured OutputLoadSerializableMemoryMessagesToolOutput ParsersOpenai FunctionsOpenai ToolsOutputsPrompt ValuesPromptsRetrieversDocument CompressorsRunnablesGraphSingletonsStoresStructured QueryTestingToolsBaseConsoleLog StreamRun CollectorTracer LangchainStreamAsync CallerChunk ArrayContextEnvEvent Source ParseFormatFunction CallingHashJson PatchJson SchemaMathSsrfStandard SchemaStreamTestingTiktokenTypesUuidVectorstores
Text Splitters
MCP Adapters
Language
Theme
JavaScript@langchain/coretracerstracer_langchainLangChainTracer
Class●Since v1.0

LangChainTracer

Copy
class LangChainTracer

Bases

BaseTracer

Used in Docs

  • LangSmith Observability
  • Log traces to a specific project
  • Trace LangChain applications (Python and JS/TS)

Constructors

Properties

Methods

Inherited fromBaseTracer

Properties

PawaitHandlersPignoreAgentPignoreChainPignoreCustomEventPignoreLLM
View source on GitHub
PignoreRetriever
Plc_kwargs
Plc_serializable
Pname
PraiseError
PrunMap
PrunTreeMap
PusesRunTreeMap
Plc_aliases
Plc_attributes
Plc_id
Plc_namespace
Plc_secrets
Plc_serializable_keys

Methods

M_addChildRunM_addRunToRunMapM_createRunForChainStartM_createRunForChatModelStartM_createRunForLLMStartM_createRunForRetrieverStartM_createRunForToolStartM_endTraceM_getExecutionOrderMcopyMgetRunByIdMhandleAgentActionMhandleAgentEndMhandleChainEndMhandleChainErrorMhandleChainStartMhandleChatModelStartMhandleChatModelStreamEventMhandleCustomEventMhandleLLMEndMhandleLLMErrorMhandleLLMNewTokenMhandleLLMStartMhandleRetrieverEndMhandleRetrieverErrorMhandleRetrieverStartMhandleTextMhandleToolEndMhandleToolErrorMhandleToolEventMhandleToolStartMonAgentActionMonAgentEndMonChainEndMonChainErrorMonChainStartMonLLMEndMonLLMErrorMonLLMNewTokenMonLLMStartMonRetrieverEndMonRetrieverErrorMonRetrieverStartMonRunCreateMonRunUpdateMonTextMonToolEndMonToolErrorMonToolStartMpersistRunMstringifyErrorMtoJSONMtoJSONNotImplementedMfromMethodsMlc_name

Inherited fromBaseCallbackHandler

Properties

PawaitHandlersPignoreAgentPignoreChainPignoreCustomEventPignoreLLMPignoreRetrieverPlc_kwargsPlc_serializablePnamePraiseErrorPlc_aliasesPlc_attributesPlc_idPlc_namespacePlc_secretsPlc_serializable_keys

Methods

McopyMhandleAgentActionMhandleAgentEndMhandleChainEndMhandleChainErrorMhandleChainStart
constructor
constructor
property
awaitHandlers: boolean
property
client: LangSmithTracingClientInterface
property
exampleId: string
property
fields: LangChainTracerFields
property
ignoreAgent: boolean
property
ignoreChain: boolean
property
ignoreCustomEvent: boolean
property
ignoreLLM: boolean
property
ignoreRetriever: boolean
property
lc_kwargs: SerializedFields
property
lc_serializable: boolean
property
name: string
property
projectName: string
property
raiseError: boolean
property
replicas: Replica[]
property
runMap: Map<string, Run>
property
runTreeMap: Map<string, RunTree>
property
tracingMetadata: Record<string, unknown>
property
tracingTags: string[]
property
usesRunTreeMap: boolean
property
lc_aliases
property
lc_attributes
property
lc_id
property
lc_namespace
property
lc_secrets
property
lc_serializable_keys
method
_addChildRun
method
_addRunToRunMap
method
_createRunForChainStart
method
_createRunForChatModelStart
method
_createRunForLLMStart
method
_createRunForRetrieverStart
method
_createRunForToolStart
method
_endTrace
method
_getExecutionOrder
method
copy
method
copyWithTracingConfig
method
getRun
method
getRunById
method
getRunTreeWithTracingConfig
method
handleAgentAction
method
handleAgentEnd
method
handleChainEnd
method
handleChainError
method
handleChainStart
method
handleChatModelStart
method
handleChatModelStreamEvent
method
handleCustomEvent
method
handleLLMEnd
method
handleLLMError
method
handleLLMNewToken
method
handleLLMStart
method
handleRetrieverEnd
method
handleRetrieverError
method
handleRetrieverStart
method
handleText
method
handleToolEnd
method
handleToolError
method
handleToolEvent
method
handleToolStart
method
onAgentAction
method
onAgentEnd
method
onChainEnd
method
onChainError
method
onChainStart
method
onLLMEnd
method
onLLMError
method
onLLMNewToken
method
onLLMStart
method
onRetrieverEnd
method
onRetrieverError
method
onRetrieverStart
method
onRunCreate
method
onRunUpdate
method
onText
method
onToolEnd
method
onToolError
method
onToolStart
method
persistRun
method
stringifyError
method
toJSON
method
toJSONNotImplemented
method
updateFromRunTree
method
[hasInstance]
method
fromMethods
method
getTraceableRunTree
method
lc_name

Interface for the input parameters of the BaseCallbackHandler class. It allows to specify which types of events should be ignored by the callback handler.

MhandleChatModelStart
MhandleChatModelStreamEvent
MhandleCustomEvent
MhandleLLMEnd
MhandleLLMError
MhandleLLMNewToken
MhandleLLMStart
MhandleRetrieverEnd
MhandleRetrieverError
MhandleRetrieverStart
MhandleText
MhandleToolEnd
MhandleToolError
MhandleToolEvent
MhandleToolStart
MtoJSON
MtoJSONNotImplemented
MfromMethods
Mlc_name