Skip to content

Commit 67ee3bc

Browse files
committed
Deactivate LangSmith
1 parent 146f987 commit 67ee3bc

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

libs/e2e-tests/e2e_tests/test_utils/tracing.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,23 @@
11
import logging
2+
import os
23
import time
34
from typing import Callable
45

56
from langsmith import Client
67

7-
LANGSMITH_CLIENT = Client()
8+
if os.getenv("LANGCHAIN_TRACING_V2", "") == "true":
9+
LANGSMITH_CLIENT = Client()
10+
else:
11+
LANGSMITH_CLIENT = None
812

913

1014
def record_langsmith_sharelink(
1115
run_id: str, record_property: Callable, tries: int = 6
1216
) -> None:
1317
try:
14-
sharelink = LANGSMITH_CLIENT.share_run(run_id)
18+
sharelink = (
19+
LANGSMITH_CLIENT.share_run(run_id) if LANGSMITH_CLIENT else "deactivated"
20+
)
1521
record_property("langsmith_url", sharelink)
1622
logging.info("recorded langsmith link: %s", sharelink)
1723
except Exception:

scripts/ci-common-env.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
22

3-
export LANGCHAIN_TRACING_V2=true
3+
#export LANGCHAIN_TRACING_V2=true
44
export LANGCHAIN_ENDPOINT="https://api.smith.langchain.com"
55
export LANGCHAIN_PROJECT="ragstack-ci"

0 commit comments

Comments
 (0)