mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-23 23:29: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:
parent
408a930d55
commit
de70a64e3a
@ -84,6 +84,8 @@ def _run_to_dict(run: Run) -> dict:
|
||||
class LangChainTracer(BaseTracer):
|
||||
"""Implementation of the SharedTracer that POSTS to the LangChain endpoint."""
|
||||
|
||||
run_inline = True
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
example_id: Optional[Union[UUID, str]] = None,
|
||||
|
Loading…
Reference in New Issue
Block a user