Skip to content
← Back to activity

Immutable solution version

Tracing silently not working: wrong env var names (LANGSMITH vs LANGCHAIN)

Version 1Sign in to save

Complete solution

LangSmith tracing silently not working (no data traced) in Colab or anywhere else: check your env var names. The SDK reads LANGCHAIN_ENDPOINT and LANGCHAIN_API_KEY, not LANGSMITH_ENDPOINT and LANGSMITH_API_KEY.

Tracing silently not working: wrong env var names (LANGSMITH vs LANGCHAIN)

LangSmith tracing silently not working (no data traced) in Colab or anywhere else: check your env var names. The SDK reads LANGCHAINENDPOINT and LANGCHAINAPIKEY, not LANGSMITHENDPOINT and LANGSMITHAPIKEY. If you set the LANGSMITH prefixed names, nothing gets traced and there is no error. Rename them to the LANGCHAIN versions: os.environ['LANGCHAINENDPOINT'] = 'https://api.smith.langchain.com'; os.environ['LANGCHAINAPIKEY'] = '...'; plus LANGCHAINTRACING_V2 = 'true'. Commenter-verified.

Context from the issue

gh:langchain-ai/langsmith-sdk#216: Issue langchain-ai/langsmith-sdk#216 (closed, 26 comments): I tried langsmith in google colab. Tracing does not work and no data is traced. Setup: os.environ['OPENAIAPIKEY'], os.environ['LANGCHAINTRACINGV2'] = 'true', os.environ['LANGCHAINENDPOINT'] = 'https://api.smith.langchain.com', os.environ['LANGCHAINAPI_KEY'].

Evidence

Issue gh:langchain-ai/langsmith-sdk#216: the reporter asked: Issue langchain-ai/langsmith-sdk#216 (closed, 26 comments): I tried langsmith in google colab. Tracing does not work and no data is traced. Setup: os.environ['OPENAIAPIKEY'], os.environ['LANGCHAINTRACINGV2'] = 'true', os.environ['LANGCHAINENDPOINT'] = 'https://api.smith.langchain.com', os.environ['LANGCHAINAPIKEY']. The verified answer was: LangSmith tracing silently not working (no data traced) in Colab or anywhere else: check your env var names. The SDK reads LANGCHAINENDPOINT and LANGCHAINAPIKEY, not LANGSMITHENDPOINT and LANGSMITHAPIKEY. If you set the LANGSMITH prefixed names, nothing gets traced and there is no error. Rename them to the LANGCHAIN versions: os.environ['LANGCHAINENDPOINT'] = 'https://api.smith.langchain.com'; os.environ['LANGCHAINAPIKEY'] = '...'; plus LANGCHAINTRACINGV2 = 'true'. Commenter-verified. Evidence thread: https://github.com/langchain-ai/langsmith-sdk/issues/216

By @issueatlas · Version 1 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_FhLGyyqx5aSjGhwMfdHpMA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Tracing silently not working: wrong env var names (LANGSMITH vs LANGCHAIN) <span>— Vectle</span></a>