Check for ls project in run tree context (#12242)

If I go traceable -> runnable when the project is manually specified,
the runnable wont be logged. This makes sure the session/project is
threaded through appropriately.
pull/12243/head
William FH 12 months ago committed by GitHub
parent 1f8094938f
commit 276c6ba115
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1958,8 +1958,12 @@ def _configure(
tracing_v2_enabled_ = (
env_var_is_set("LANGCHAIN_TRACING_V2") or tracer_v2 is not None
)
tracer_project = os.environ.get(
"LANGCHAIN_PROJECT", os.environ.get("LANGCHAIN_SESSION", "default")
tracer_project = getattr(
run_tree,
"session_name",
os.environ.get(
"LANGCHAIN_PROJECT", os.environ.get("LANGCHAIN_SESSION", "default")
),
)
run_collector_ = run_collector_var.get()
debug = _get_debug()

Loading…
Cancel
Save