LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
  • Client
  • AsyncClient
  • Run Helpers
  • Run Trees
  • Evaluation
  • Schemas
  • Utilities
  • Wrappers
  • Anonymizer
  • Testing
  • Expect API
  • Middleware
  • Pytest Plugin
  • Deployment SDK
⌘I

LangChain Assistant

Ask a question to get started

Enter to send•Shift+Enter new line

Menu

OverviewClientAsyncClientRun HelpersRun TreesEvaluationSchemasUtilitiesWrappersAnonymizerTestingExpect APIMiddlewarePytest PluginDeployment SDK
Language
Theme
Pythonlangsmithrun_treesWriteReplica
Class●Since v0.4

WriteReplica

Configuration for a write replica endpoint.

Copy
WriteReplica()

Bases

TypedDict

Used in Docs

  • Log traces to a specific project

Constructors

Attributes

View source on GitHub
constructor
__init__
NameType
api_urlOptional[str]
api_keyNotRequired[str]
authAuthHeaders
project_nameOptional[str]
updatesOptional[dict]
clientOptional[Client]
attribute
api_url: Optional[str]
attribute
api_key: NotRequired[str]
attribute
auth: AuthHeaders
attribute
project_name: Optional[str]
attribute
updates: Optional[dict]
attribute
client: Optional[Client]

Optional dedicated :class:~langsmith.Client for this replica.

When set, the replica's runs are enqueued on this client's tracing queue (and dispatched by its background thread) instead of the RunTree's default client. This lets each replica use a different tracing mode — for example, one replica with Client(tracing_mode="otel") and another with the default LangSmith-only client.

The field is not propagated in distributed-tracing baggage (each service must construct its own clients).