LANGSMITH_TRACING
LANGSMITH_API_KEY
LANGSMITH_ENDPOINT
LANGSMITH_PROJECT
trace
context manager, we changed the behavior of with trace
to honor the LANGSMITH_TRACING
environment variable in version 0.1.95 of the Python SDK. You can find more details in the release notes. The recommended way to disable/enable tracing without setting environment variables is to use the with tracing_context
context manager, as shown in the example below.tracing_context
context manager. This works for both code annotated with traceable
and code within the trace
context manager.