The Go SDK (Documentation Index
Fetch the complete documentation index at: https://docs.trulayer.ai/llms.txt
Use this file to discover all available pages before exploring further.
github.com/trulayer/client-go) is the primary way to send traces to TruLayer from Go services. It has zero external dependencies in production code, is safe for concurrent use from multiple goroutines, and ships optional auto-instrumentation sub-modules for OpenAI and Anthropic.
Requirements
Go 1.22 or later.Install
Minimal usage
Zero-dependency guarantee
Thegithub.com/trulayer/client-go module itself uses only the Go standard library (net/http, encoding/json, context, sync). The optional instrument sub-modules under instruments/ introduce dependencies on the respective provider SDKs, but only when you import them.
Offline / CI mode
SetTRULAYER_DRY_RUN=true to disable all network calls. Traces are recorded in memory as normal but never shipped. Useful for unit tests and CI pipelines that run without a TruLayer API key.
Where to go next
Quickstart
Send your first trace in under five minutes.
Reference
Every public type and function, with signatures and examples.
Auto-instrumentation
Wrap OpenAI and Anthropic clients so every call is traced automatically.
Concepts
Understand the trace and span data model.