# Go observability

> Go observability is an open-source agent skill for developer tools. Guides Go services toward structured logs, OpenTelemetry tracing and Prometheus metrics. It is available on Claude Code.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code
- **Website:** https://github.com/eduardo-sl/go-agent-skills/tree/main/skills/(safety)/go-observability
- **Repository:** https://github.com/eduardo-sl/go-agent-skills
- **GitHub stars:** 90
- **License:** MIT
- **Skill name:** go-observability
- **Collection:** https://github.com/eduardo-sl/go-agent-skills
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-02

## About

This skill sets the conventions an agent follows when instrumenting a Go service: logging with the standard library's log/slog package using a JSON handler, injecting loggers as dependencies, and keeping passwords, tokens and personal data out of log output. It also covers creating spans for significant operations with OpenTelemetry, recording errors on them, and passing context through call chains so traces stay linked.

For metrics it describes counter, gauge and histogram choices, Prometheus-style naming with unit and _total suffixes, and keeping label cardinality bounded to route patterns rather than user or request IDs. It also points to alerting practices such as RED and USE measures, histogram latency and SLO burn-rate alerts, plus flushing telemetry providers on shutdown.

The skill is guidance only: it ships no scripts, and its frontmatter allows the agent to read, edit and write files, run go and gofmt, and search the codebase. Detailed examples live in reference files for slog, tracing, metrics and alerting, loaded as needed. It expects a Go project with the Go toolchain installed.

## When your agent uses it

> Structured logging, distributed tracing, metrics, and health checks for Go services. Covers slog, OpenTelemetry, Prometheus, and observability best practices. Use when: "add logging", "structured logs", "add tracing", "OpenTelemetry", "add metrics", "Prometheus", "observability", "instrument this code". Not for: pprof profiling (go-performance-review), error handling (go-error-handling), health endpoints (go-api-design).

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/eduardo-sl/go-agent-skills/tree/HEAD/skills/(safety)/go-observability)
- [Asks for: Read, Edit, Write, Glob, Grep, Bash(go:*), Bash(gofmt:*)](https://github.com/eduardo-sl/go-agent-skills/blob/HEAD/skills/(safety)/go-observability/SKILL.md)
- [License: MIT](https://github.com/eduardo-sl/go-agent-skills/tree/HEAD/skills/(safety)/go-observability)

## Features

- **Structured slog logging:** Covers leveled key-value logging with log/slog, child loggers and injected logger dependencies.
- **Sensitive data redaction:** Explains which data must never be logged and how LogValuer keeps redaction on the type.
- **OpenTelemetry tracing:** Describes span naming, error recording, context propagation and parent-based sampling.
- **Prometheus-style metrics:** Sets metric types, naming conventions and bounded label cardinality for counters, gauges and histograms.
- **Log and trace correlation:** Shows how to attach trace and span IDs to log lines so entries can be joined to requests.
- **SLO alerting guidance:** Summarizes RED and USE measures, histogram latency and burn-rate alerts with runbooks.

## Good for

- Add structured logging to an existing Go HTTP service
- Instrument a database layer with OpenTelemetry spans
- Expose Prometheus metrics for request latency and error counts
- Make logs include trace IDs so they can be matched to requests
- Check a Go codebase for logs that leak credentials or personal data

## Install

### Any agent

Download the skill folder from https://github.com/eduardo-sl/go-agent-skills and copy it into your agent's skills folder.

## FAQ

### What does Go observability need to run?

It requires the Go toolchain, and its instructions are designed for Claude Code or similar AI coding agents working on Go projects.

### Does Go observability cover pprof profiling or health endpoints?

No. Its description directs pprof profiling to go-performance-review, error handling to go-error-handling and health endpoints to go-api-design.

### Are there scripts Go observability runs?

No, the skill has no scripts. It relies on the agent's allowed tools, which include Read, Edit, Write, Glob, Grep, and go and gofmt commands.

### Which logging library does Go observability use?

It uses the standard library log/slog package with a JSON handler in production, along with OpenTelemetry for tracing and metrics.

### Does Go observability run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Go observability?

Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.

### What are the best alternatives to Go observability?

The closest alternatives to Go observability are Spring observability, Go performance review, Ollygarden otel go setup, API health monitoring and LLM observability.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Spring observability](https://ai-powered.com/skills/spring-observability): Spring observability is an open-source agent skill for developer tools.
- [Go performance review](https://ai-powered.com/skills/go-performance-review): Go performance review is an open-source agent skill for developer tools.
- [Ollygarden otel go setup](https://ai-powered.com/skills/ollygarden-otel-go-setup): Ollygarden otel go setup is an open-source agent skill for developer tools.
- [API health monitoring](https://ai-powered.com/skills/api-health-monitoring): API health monitoring is an open-source agent skill for health and science.
- [LLM observability](https://ai-powered.com/skills/llm-observability): LLM observability is an open-source agent skill for developer tools.
- [Go documentation](https://ai-powered.com/skills/go-documentation): Go documentation is an open-source agent skill for developer tools.
- [Go semantic tools](https://ai-powered.com/skills/go-semantic-tools): Go semantic tools is an open-source agent skill for developer tools.
- [Go backend](https://ai-powered.com/skills/go-backend): Go backend is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/go-observability
