Configure global LangSmith tracing context.
This function allows you to set global configuration options for LangSmith tracing that will be applied to all subsequent traced operations. It modifies context variables that control tracing behavior across your application.
Do this once at startup to configure the global settings in code.
If, instead, you wish to only configure tracing for a single invocation,
use the tracing_context context manager instead.
configure(
client: Optional[Client] = _SENTINEL,
enabled: Optional[bool] = _SENTINEL,
project_name: Optional[str] = _SENTINEL,
tags: Optional[list[str]] = _SENTINEL,
metadata: Optional[dict[str, Any]] = _SENTINEL
)| Name | Type | Description |
|---|---|---|
client | Optional[Client] | Default: _SENTINELA LangSmith Client instance to use for all tracing operations. If provided, this client will be used instead of creating new clients. Pass |
enabled | Optional[bool] | Default: _SENTINELWhether tracing is enabled. Can be:
|
project_name | Optional[str] | Default: _SENTINELThe LangSmith project name where traces will be sent. This determines which project dashboard will display your traces. Pass |
tags | Optional[list[str]] | Default: _SENTINELA list of tags to be applied to all traced runs. Tags are useful for filtering and organizing runs in the LangSmith UI. Pass |
metadata | Optional[dict[str, Any]] | Default: _SENTINELA dictionary of metadata to attach to all traced runs. Metadata can store any additional context about your runs. Pass |