Loading...
Loading...
OpenTelemetry in Go — SDK setup, API surface, breaking changes, contrib instrumentation libraries (otelhttp, otelgrpc, otelmongo), compile-time zero-code instrumentation (otelc), and performance tuning. Use when adding, reviewing, or configuring OpenTelemetry in a Go service. Triggers on "setup otel in go", "go telemetry", "go tracing", "otelconf go", "otelhttp", "otelgrpc", "TracerProvider go", "MeterProvider go", "otelc", "compile-time instrumentation go", "zero-code go instrumentation", "go build instrumentation", or any Go-related OTel question.
npx skill4agent add ollygarden/opentelemetry-agent-skills otel-go| File | Use when |
|---|---|
| Configuring the SDK via |
| Looking up import paths, global API access, tracer/meter/logger usage, attributes, propagation, log bridges (zap, slog). |
| Picking or wiring contrib libraries (otelhttp, otelgrpc, database, AWS, message queues, propagators, resource detectors), and writing manual instrumentation that follows semconv. |
| Tuning sampling, batch processor, metric reader, exporter compression/retry, attribute allocation, log |
| Auditing existing code for deprecated calls, renamed semantic conventions, and removed APIs across recent SDK / contrib releases. |
| Zero-code, compile-time instrumentation with |
go mod tidy -diffgo build ./...go test ./...| Module group | Example modules | Version line |
|---|---|---|
| Stable signals (traces, metrics) | | v1.x (e.g. v1.45.0) |
| Logs | | v0.x (separate, lower line) |
| Contrib instrumentation | | v0.x (separate line, e.g. v0.70.0) |
| Contrib log bridges | | v0.x |
go get go.opentelemetry.io/otel/log@v1.45.0@vX@latestgo get go.opentelemetry.io/otel@latest go.opentelemetry.io/otel/sdk@latest
# logs (separate v0.x line — do NOT force the core version):
go get go.opentelemetry.io/otel/log@latest go.opentelemetry.io/otel/sdk/log@latest \
go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp@latest
# contrib (instrumentation and bridges each resolve to their own v0.x line):
go get go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp@latest \
go.opentelemetry.io/contrib/bridges/otelslog@latest
go mod tidy && go build ./...otel-declarative-config| Fact | Fetch |
|---|---|
Latest | |
Latest | |
Latest | |
| Latest semconv package version | |
| |
| |
otel-declarative-configotel-sdk-versionsotel-semantic-conventions