feat: Add option to deactivate tracing in service settings (#4527)

* Add option to deactivate tracing in service settings

* Add fixture to automatically deactivate tracing in tests using monkeypatch
This commit is contained in:
Gabriel Luiz Freitas Almeida 2024-11-12 23:41:07 -03:00 • committed by GitHub
commit 7c0c881488
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 16 additions and 1 deletions

View file

@ -277,6 +277,13 @@ def json_memory_chatbot_no_llm():
return pytest.MEMORY_CHATBOT_NO_LLM.read_text(encoding="utf-8")
@pytest.fixture(autouse=True)
def deactivate_tracing(monkeypatch):
monkeypatch.setenv("LANGFLOW_DEACTIVATE_TRACING", "true")
yield
monkeypatch.undo()
@pytest.fixture(name="client")
async def client_fixture(
session: Session, # noqa: ARG001