diff --git a/libs/e2e-tests/e2e_tests/test_utils/tracing.py b/libs/e2e-tests/e2e_tests/test_utils/tracing.py index f11ab8b73..0aa4411b9 100644 --- a/libs/e2e-tests/e2e_tests/test_utils/tracing.py +++ b/libs/e2e-tests/e2e_tests/test_utils/tracing.py @@ -1,17 +1,20 @@ import logging +import os import time from typing import Callable from langsmith import Client -LANGSMITH_CLIENT = Client() +LANGSMITH_CLIENT = Client() if os.getenv("LANGCHAIN_TRACING_V2", "") == "true" else None def record_langsmith_sharelink( run_id: str, record_property: Callable, tries: int = 6 ) -> None: try: - sharelink = LANGSMITH_CLIENT.share_run(run_id) + sharelink = ( + LANGSMITH_CLIENT.share_run(run_id) if LANGSMITH_CLIENT else "deactivated" + ) record_property("langsmith_url", sharelink) logging.info("recorded langsmith link: %s", sharelink) except Exception: diff --git a/scripts/ci-common-env.sh b/scripts/ci-common-env.sh index 6901fba68..1123a6bb4 100755 --- a/scripts/ci-common-env.sh +++ b/scripts/ci-common-env.sh @@ -1,5 +1,5 @@ #!/bin/bash -export LANGCHAIN_TRACING_V2=true +#export LANGCHAIN_TRACING_V2=true export LANGCHAIN_ENDPOINT="https://api.smith.langchain.com" export LANGCHAIN_PROJECT="ragstack-ci" \ No newline at end of file