Skip to main content
In v0.4.0, tracing integrations under trace/contrib/* moved from being bundled in the root SDK module to separate Go modules. Your source code and import paths don’t change. Follow the steps below to update your dependencies for the new module structure.
Breaking change: If your code imports any trace/contrib/* packages and you skip the steps below, your build will fail to compile.
1

Upgrade the core SDK

go get github.com/braintrustdata/braintrust-sdk-go@v0.4.0
go mod tidy
2

Install the integration modules you use

Previously, the root SDK module bundled all trace/contrib/* packages. Now each one is its own Go module, so you must explicitly go get the ones your app imports:
go get github.com/braintrustdata/braintrust-sdk-go/trace/contrib/openai@v0.4.0
go get github.com/braintrustdata/braintrust-sdk-go/trace/contrib/anthropic@v0.4.0
go get github.com/braintrustdata/braintrust-sdk-go/trace/contrib/genai@v0.4.0
go get github.com/braintrustdata/braintrust-sdk-go/trace/contrib/genkit@v0.4.0
go get github.com/braintrustdata/braintrust-sdk-go/trace/contrib/adk@v0.4.0
go get github.com/braintrustdata/braintrust-sdk-go/trace/contrib/cloudwego/eino@v0.4.0
go get github.com/braintrustdata/braintrust-sdk-go/trace/contrib/langchaingo@v0.4.0
go get github.com/braintrustdata/braintrust-sdk-go/trace/contrib/github.com/sashabaranov/go-openai@v0.4.0
go mod tidy
Or, to install all integrations at once, use the trace/contrib/all meta-module (this also includes LangChainGo, which is new in v0.4.0):
go get github.com/braintrustdata/braintrust-sdk-go/trace/contrib/all@v0.4.0
go mod tidy
3

Verify your build config

Your existing trace/contrib/* import paths work exactly as before — no source code changes are needed.If you use Orchestrion for auto-instrumentation, make sure your orchestrion.tool.go imports trace/contrib/all or each individual integration module:
#skip-compile
//go:build tools

package main

import (
	_ "github.com/DataDog/orchestrion"
	_ "github.com/braintrustdata/braintrust-sdk-go/trace/contrib/all"
)
4

Rebuild and verify

Run go build ./... (or orchestrion go build if you use Orchestrion) and confirm your traced integrations still appear in Braintrust.
For more detail on what changed in v0.4.0, see the GitHub release notes.