Functions for tracing and observability, including the traceable decorator, trace context manager, and tracing context management utilities.
Trace a function with langsmith.
address is in beta. It is enabled per workspace; a
workspace without it rejects the runs, so tracing is lost rather than
fall
Get the current run tree.
Uses a weakref-based lookup to avoid memory leaks from captured contexts. The RunTree may return None if it has been garbage collected.
Set a RunTree as the active tracing parent within this block.
Unlike tracing_context, this only sets the parent run tree and nothing
else, making it safe to use in isolated threads where you want p
Update metadata on the current run tree.
Get the current tracing context.
Set the tracing context for a block of code.
address is in beta. It is enabled per workspace; a
workspace without it rejects the runs, so tracing is lost rather t
Check if a function is @traceable decorated.
Ensure that a function is traceable.
Convert a function wrapped by the LangSmith @traceable decorator to a Runnable.