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
  • Decisions
  • 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
  • Gateway
  • Hash
  • Json Patch
  • Json Schema
  • Math
  • Ssrf
  • Standard Schema
  • Stream
  • Testing
  • Tiktoken
  • Types
  • Uuid
  • Vectorstores
Text Splitters
MCP Adapters
⌘I

Chat LangChain

What can I help with?

Enter to sendĀ·Shift+Enter new line

Menu

LangChain
BrowserUniversalHubNodeLoadSerializableEncoder BackedFile SystemIn MemoryTools
LangChain Core
AgentsCachesBaseDispatchWebManagerPromisesChat HistoryContextDecisionsBaseLangsmithDocumentsEmbeddingsErrorsExample SelectorsIndexingBaseChat ModelsCompatEventLlmsOpenai Completions StreamProfileStreamStructured OutputLoadSerializableMemoryMessagesToolOutput ParsersOpenai FunctionsOpenai ToolsOutputsPrompt ValuesPromptsRetrieversDocument CompressorsRunnablesGraphSingletonsStoresStructured QueryTestingToolsBaseConsoleLog StreamRun CollectorTracer LangchainStreamAsync CallerChunk ArrayContextEnvEvent Source ParseFormatFunction CallingGatewayHashJson PatchJson SchemaMathSsrfStandard SchemaStreamTestingTiktokenTypesUuidVectorstores
Text Splitters
MCP Adapters
Language
Theme
JavaScript@langchain/coretracerstracer_langchain
Moduleā—Since v1.4

tracers/tracer_langchain

Copy
import { ... } from "@langchain/core/tracers/tracer_langchain";

Functions

function
omitPayload→ KVMap

Records an empty payload while keeping the run, its timing, and its children. Use as processInputs and/or processOutputs in a TracePolicy.

Classes

class
LangChainTracer

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

Interfaces

interface
LangChainTracerFields

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

interface
Run
interface
RunCreate2
interface
RunUpdate
interface
TracePolicy

Transforms what LangChainTracer sends to LangSmith for a run. Execution values and every other callback handler (including streamEvents) still see the raw inputs and outputs. Processors receive the recorded values by reference and must not mutate them.

Variables

variable
OVERRIDABLE_LANGSMITH_INHERITABLE_METADATA_KEYS: Set<string>

Keys that should be inherited from tracerInheritableMetadata even when the run already has a value for them. This lets nested contexts (e.g. a subagent invoked from inside a parent agent) override a LangSmith-only tracing metadata value that was set by an ancestor.

Keep this list very small: every key here loses the default "first wins" protection and is always clobbered by the nearest enclosing tracer config. Only keys that are strictly for LangSmith tracing bookkeeping should be added.

View source on GitHub