mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-09 15:03:21 +00:00
core: Run LangChainTracer inline (#26797)
- this flag ensures the tracer always runs in the same thread as the run being traced for both sync and async runs - pro: less chance for ordering bugs and other oddities - blocking the event loop is not a concern given all code in the tracer holds the GIL anyway
This commit is contained in:
@@ -84,6 +84,8 @@ def _run_to_dict(run: Run) -> dict:
|
|||||||
class LangChainTracer(BaseTracer):
|
class LangChainTracer(BaseTracer):
|
||||||
"""Implementation of the SharedTracer that POSTS to the LangChain endpoint."""
|
"""Implementation of the SharedTracer that POSTS to the LangChain endpoint."""
|
||||||
|
|
||||||
|
run_inline = True
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
example_id: Optional[Union[UUID, str]] = None,
|
example_id: Optional[Union[UUID, str]] = None,
|
||||||
|
Reference in New Issue
Block a user