langchain_core.tracers.context.tracing_enabled¶

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

[Deprecated] 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[*Deprecated*] 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

Notes

Deprecated since version 0.1.0: Use tracing_v2_enabled instead.

Examples using tracing_enabled¶