Go has no runtime agent — instrumentation is explicit, which means about twenty lines of
setup and a middleware per framework.
Install
Use the otlptracehttp exporter, not otlptracegrpc. The ingress speaks OTLP over HTTP.
Set up the provider
WithEndpoint takes a host, not a URL — no https:// and no path. Passing a full URL
is the most common Go setup mistake. Use otlptracehttp.WithInsecure() only against a
local collector.
Wire it up and shut it down
Custom spans
Pass ctx down through every call. A span started from a background context is a new
root and will not attach to the request that caused it.