This guide covers manual instrumentation. For quicker setup, use auto-instrumentation.
Setup
Install the Braintrust Eino integration:Trace with CloudWeGo Eino
Register the Braintrust handler once with Eino’s callback system. All subsequentChatModel calls are traced automatically.
Streaming
For streaming, callhandler.Wait() after closing the reader so asynchronously finalized span attributes are flushed before exit.
#skip-compile
Tracing embeddings
Eino’s callback handler capturesEmbedStrings calls automatically. No additional setup is needed beyond registering the handler. Embedding calls appear as LLM spans in Braintrust, with input texts, embedding count, and model metadata captured.