langchain.callbacks.manager.tracing_v2_enabled¶
langchain.callbacks.manager.tracing_v2_enabled(project_name: Optional[str] = None, *, example_id: Optional[Union[str, UUID]] = None, tags: Optional[List[str]] = None, client: Optional[LangSmithClient] = None) → Generator[None, None, None][source]¶
Instruct LangChain to log all runs in context to LangSmith.
Parameters
project_name (str, optional) – The name of the project.
Defaults to “default”.
example_id (str or UUID, optional) – The ID of the example.
Defaults to None.
tags (List[str], optional) – The tags to add to the run.
Defaults to None.
Returns
None
Example
>>> with tracing_v2_enabled():
...     # LangChain code will automatically be traced
Examples using tracing_v2_enabled¶
LangSmith Walkthrough