/opentelemetry-agent-skills:otel-gofrom opentelemetry-agent-skills
Guides OpenTelemetry setup in Go: SDK configuration, contrib instrumentation (otelhttp, otelgrpc, otelmongo), compile-time zero-code instrumentation via otelc, and performance tuning.
Ships in opentelemetry-agent-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Entry point for OpenTelemetry mechanics in Go services. Load a reference below based on the task; each reference is self-contained.
| File | Use when |
|---|---|
references/declarative-setup.md | Configuring the SDK via otelconf and YAML: providers, propagators, shutdown, env-var substitution. |
references/api.md | Looking up import paths, global API access, tracer/meter/logger usage, attributes, propagation, log bridges (zap, slog). |
references/instrumentation-libraries.md | Picking or wiring contrib libraries (otelhttp, otelgrpc, database, AWS, message queues, propagators, resource detectors), and writing manual instrumentation that follows semconv. |
references/performance.md | Tuning sampling, batch processor, metric reader, exporter compression/retry, attribute allocation, log Enabled() short-circuiting, graceful shutdown. |
references/breaking-changes.md | Auditing existing code for deprecated calls, renamed semantic conventions, and removed APIs across recent SDK / contrib releases. |
references/compile-time-instrumentation.md | Zero-code, compile-time instrumentation with otelc: usage modes (otelc go build, tool dependency, toolexec drop-in), subcommands, supported libraries, rule sources/precedence, and pinning via otel.instrumentation.go. |
For upgrade reviews, always finish with a safe local verification path (go mod tidy -diff,
go build ./..., and go test ./...). Test exporter URL or retry changes against a disposable
local receiver, never a deployment endpoint.
opentelemetry-go is split into independently versioned module groups. They do NOT share one version number. Assuming they do is the most common cause of broken builds and version churn:
| Module group | Example modules | Version line |
|---|---|---|
| Stable (traces, metrics, logs API/SDK) | go.opentelemetry.io/otel, otel/sdk, otel/trace, otel/metric, otel/log, otel/sdk/log, OTLP trace/metric exporters | v1.x (e.g. v1.47.0; logs API/SDK joined at v1.47.0) |
| Log exporters and test helpers | otel/exporters/otlp/otlplog/otlploghttp, .../otlploggrpc, otel/exporters/stdout/stdoutlog, otel/log/logtest, otel/sdk/log/logtest | v0.x (separate, lower line, e.g. v0.23.0) |
| Contrib instrumentation | contrib/instrumentation/net/http/otelhttp, .../otelgrpc | v0.x (separate line, e.g. v0.72.0) |
| Contrib log bridges | contrib/bridges/otelslog, otelzap, otellogrus, otellogr | v0.x |
The trap: pinning every module to the core version (e.g. go get go.opentelemetry.io/otel/exporters/otlp/otlplog/[email protected])
fails — log exporter, log test-helper, and bridge modules have no v1.x tag. Hand-picking and re-guessing each @vX
is the churn to avoid.
Do this instead — add each module with @latest and let Go resolve a compatible set:
go get go.opentelemetry.io/otel@latest go.opentelemetry.io/otel/sdk@latest
# logs (API/SDK are v1.x; log exporters stay on a 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 ./...
If exact versions are required, fetch each module group's tag from its own source (see below) — never infer one group's version from another's.
For YAML schema details, fetch the upstream sources listed in the otel-declarative-config skill.
For Go-specific facts:
| Fact | Fetch |
|---|---|
Latest go.opentelemetry.io/otel core release | gh api repos/open-telemetry/opentelemetry-go/releases/latest -q '.tag_name' |
Latest go.opentelemetry.io/contrib release | gh api repos/open-telemetry/opentelemetry-go-contrib/releases/latest -q '.tag_name' |
Latest otelconf module tag | the version-sorted tag command below the table |
| Latest Go semconv package | Search the selected core release's CHANGELOG for Add the go.opentelemetry.io/otel/semconv/; do not infer package availability from the upstream semantic-conventions release. Offline: otel v1.47.0 ships semconv/v1.43.0 (record: the otel-semantic-conventions skill's references/sdk-semconv-packages.md). |
otel-go CHANGELOG | WebFetch https://raw.githubusercontent.com/open-telemetry/opentelemetry-go/main/CHANGELOG.md |
otel-go-contrib CHANGELOG | WebFetch https://raw.githubusercontent.com/open-telemetry/opentelemetry-go-contrib/main/CHANGELOG.md |
gh api repos/open-telemetry/opentelemetry-go-contrib/git/matching-refs/tags/otelconf -q '.[].ref' | sort -V | tail -1
otel-declarative-config skill (language-agnostic YAML schema sources).otel-sdk-versions skill.otel-semantic-conventions skill.evals/evals.json (opens in a new tab)evals/files/go-v145-upgrade.md (opens in a new tab)evals/results.md (opens in a new tab)references/api.md (opens in a new tab)references/breaking-changes.md (opens in a new tab)references/compile-time-instrumentation.md (opens in a new tab)references/declarative-setup.md (opens in a new tab)references/instrumentation-libraries.md (opens in a new tab)references/performance.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
20 skills in this plugin
/otel-browserOpenTelemetry browser/RUM mechanics for SPAs and MPAs. Use for “browser OTel,” “frontend observability,” “Web Vitals,” `sdk-trace-web`, `WebTracerProvider`, `browser-sdk`, browser instrumentations, page-load or route tracing, sessions, clicks, console capture, JavaScript errors, or frontend-to-backend trace correlation. Browser telemetry is privacy- and volume-sensitive, and experimental packages move quickly. Not for Node.js service instrumentation or Collector-only configuration./otel-cicdObserve CI/CD pipelines with OpenTelemetry. Use when turning GitHub Actions or GitLab CI/CD runs, jobs and steps into traces with the Collector `github` or `gitlab` receiver (workflow_run and pipeline webhooks, the GitHub scraper), or keeping raw webhook payloads as logs with `webhook_event`; collecting pull-request, branch and repository (VCS) or DORA metrics such as lead time for changes; joining build or test processes to the pipeline trace through `TRACEPARENT` or otel-cli; exporting OTLP from Jenkins, Argo Workflows, Tekton, Buildkite, Concourse or Dagger; or applying the `cicd.*` and `vcs.*` semantic conventions. Triggers on "trace our GitHub Actions workflows", "GitLab pipeline traces in the Collector", "make test spans join the CI trace", and "instrument our pipeline runner". Not for testing OpenTelemetry changes in CI, dependency-update automation, or deployment verification.Generated from the plugin's indexed repository (ollygarden/opentelemetry-agent-skills) — no native marketplace selected
npx claudepluginhub p/ollygarden-opentelemetry-agent-skillsOther plugins' skills for the same job