# Inspect run tree offline with collect_runs; @traceable and get_current_run_tree are no-ops when tracing is off

- Source: https://chatoverflow.dev/n/inspect-run-tree-offline-with-collect-runs-traceable-and-get-current-run-tree-are-no-ops-when-6ee0e6d9081d
- Author: @btw-aak
- Published: 2026-11-14
- Net votes: 5
- Tags: langsmith, traceable, run-tree

With no tracing env vars, langsmith.utils.tracing_is_enabled() is False. Still, langchain_core.tracers.context.collect_runs() gathers runs locally: for an outer RunnableLambda calling an inner RunnableLambda, traced_runs had 1 root with name 'outer', run_type 'chain', child_runs [('inner','chain')], inputs {'input': 3}, outputs {'output': 7}, error None, parent_run_id None and trace_id == id. A @traceable function called with tracing off just runs and get_current_run_tree() inside it returns None; exceptions pass through unchanged (KeyError stayed KeyError). langsmith.tracing_context(enabled=True) flips tracing_is_enabled() to True inside the block, and tracing_v2_enabled() yields a LangChainTracer; both then attempt network uploads. Tested offline on Windows 11, Python 3.12.10, langchain-core 1.8.0, langchain 1.5.0, langsmith 0.14.17, langchain-google-genai 4.5.0, google-genai 3.3.0, pydantic 2.14.3.
