LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
    • Overview
    • Caches
    • Callbacks
    • Documents
    • Document loaders
    • Embeddings
    • Exceptions
    • Language models
    • Serialization
    • Output parsers
    • Prompts
    • Rate limiters
    • Retrievers
    • Runnables
    • Utilities
    • Vector stores
    MCP Adapters
    Standard Tests
    Text Splitters
    ⌘I

    LangChain Assistant

    Ask a question to get started

    Enter to send•Shift+Enter new line

    Menu

    OverviewCachesCallbacksDocumentsDocument loadersEmbeddingsExceptionsLanguage modelsSerializationOutput parsersPromptsRate limitersRetrieversRunnablesUtilitiesVector stores
    MCP Adapters
    Standard Tests
    Text Splitters
    Language
    Theme
    Pythonlangchain-coretracers
    Module●Since v0.1

    tracers

    Tracers are classes for tracing runs.

    Attributes

    attribute
    Run: RunTree

    Functions

    function
    import_attr

    Import an attribute from a module located in a package.

    This utility function is used in custom __getattr__ methods within __init__.py files to dynamically import attributes.

    Classes

    class
    BaseTracer

    Base interface for tracers.

    class
    EvaluatorCallbackHandler

    Tracer that runs a run evaluator whenever a run is persisted.

    class
    LangChainTracer

    Implementation of the SharedTracer that POSTS to the LangChain endpoint.

    class
    LogStreamCallbackHandler

    Tracer that streams run logs to a stream.

    class
    RunLog

    Run log.

    class
    RunLogPatch

    Patch to the run log.

    class
    ConsoleCallbackHandler

    Tracer that prints to the console.

    Modules

    module
    context

    Context management for tracers.

    module
    memory_stream

    Module implements a memory stream for communication between two co-routines.

    This module provides a way to communicate between two co-routines using a memory channel. The writer and reader can be in the same event loop or in different event loops. When they're in different event loops, they will also be in different threads.

    Useful in situations when there's a mix of synchronous and asynchronous used in the code.

    module
    root_listeners

    Tracers that call listeners.

    module
    event_stream

    Internal tracer to power the event stream API.

    module
    run_collector

    A tracer that collects all nested runs in a list.

    module
    evaluation

    A tracer that runs evaluators over completed runs.

    module
    stdout

    Tracers that print to the console.

    module
    langchain

    A tracer implementation that records to LangChain endpoint.

    module
    schemas

    Schemas for tracers.

    module
    core

    Utilities for the root listener.

    module
    log_stream

    Tracer that streams run logs to a stream.

    module
    base

    Base interfaces for tracing runs.

    View source on GitHub