langchain_core.tracers.context.tracing_enabled¶

langchain_core.tracers.context.tracing_enabled(session_name: str = 'default') Generator[TracerSessionV1, None, None][source]¶

Get the Deprecated LangChainTracer in a context manager.

Parameters

session_name (str, optional) – The name of the session. Defaults to “default”.

Returns

The LangChainTracer session.

Return type

TracerSessionV1

Example

>>> with tracing_enabled() as session:
...     # Use the LangChainTracer session

Examples using tracing_enabled¶