1. Sign up
If you don’t have a Braintrust account, sign up for free at braintrust.dev.2. Instrument your app
In your project directory, run the Braintrust CLI setup script:3. View traces
Once instrumented, your app logs traces to Braintrust for every AI call. To view your traces in the Braintrust UI, open your project and go to the Logs page. Click into any trace to see:- Complete input prompt and model output
- Token counts, latency, and cost
- Model configuration (temperature, max tokens, etc.)
- Request and response metadata
Instrument with wrap functions
To learn how to instrument your code using explicit wrap functions, see Trace LLM calls.Troubleshoot
Not seeing traces in the UI?
Not seeing traces in the UI?
- Verify
BRAINTRUST_API_KEYis set and starts withsk-(echo $BRAINTRUST_API_KEY) - Check that the project name in your code matches the project you’re looking at in the UI
- Check your console for error messages — common issues are invalid API key, network connectivity, or firewall blocking
api.braintrust.dev
TypeScript auto-instrumentation not working?
TypeScript auto-instrumentation not working?
- Run with
node --import braintrust/hook.mjs(not--loader, which is deprecated) - Verify
braintrustis installed (npm list braintrust) - Call
initLogger()with a project name before making any LLM calls - Verify
BRAINTRUST_API_KEYis set in your environment - Using a bundler (Vite, Webpack, esbuild, Rollup)? Use the bundler plugin instead of
--import. See TypeScript SDK documentation - Requires Node.js 18.19.0+ or 20.6.0+ for
--importflag support (node --version)
Python auto-instrumentation not working?
Python auto-instrumentation not working?
- Call
braintrust.auto_instrument()at the start of your application, before any AI library imports or client creation - Verify
BRAINTRUST_API_KEYis set in your environment
Ruby auto-instrumentation not working?
Ruby auto-instrumentation not working?
- Ensure your Gemfile has
gem "braintrust", require: "braintrust/setup"(note therequire:option) - Your application must load Bundler with
require 'bundler/setup'andBundler.require(default in Rails, may need to be added in Sinatra/Rack) - Verify
BRAINTRUST_API_KEYis set in your environment
Go auto-instrumentation not working?
Go auto-instrumentation not working?
- Ensure you have a
go.modfile (go mod init your-project-nameif not) - Verify Orchestrion is installed (
orchestrion version). If not, reinstall withgo install github.com/DataDog/orchestrion@v1.6.1 - Ensure
orchestrion.tool.goexists in your project root with the correct imports - Build with
orchestrion go build— regulargo buildwon’t instrument your code - Verify
BRAINTRUST_API_KEYis set in your environment - Requires Go 1.26 or later (
go version)
Need help?
Need help?
- Join our Discord
- Email us at support@braintrust.dev
- Use the Loop agent in the Braintrust UI
Next steps
- Explore the full Braintrust workflow
- Go deeper with tracing:
- Explore integrations with AI providers, SDKs, and developer tools
- Trace application logic for application logic
- Capture user feedback like thumbs up/down
- Analyze logs for patterns and issues