golang-observability

Instrument Go services with logs, metrics, traces, and profiling.

2.9k|191|Updated Mar 21, 2026
One-click install
npx skills add https://github.com/samber/cc-skills-golang --skill golang-observability
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: golang-observability
Source: https://github.com/samber/cc-skills-golang/tree/main/skills/golang-observability
Command: npx skills add https://github.com/samber/cc-skills-golang --skill golang-observability

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Go services often run without cohesive, end-to-end production visibility across logs, metrics, traces, profiling, and user-facing analytics. This Skill bundles best-practice instrumentation and guidance to help teams instrument production Go applications for reliable observability, faster triage, and compliance-conscious data handling.

Core Features & Use Cases

  • Structured logging with slog, Prometheus metrics, OpenTelemetry distributed tracing, continuous profiling with pprof/Pyroscope, server-side Real User Monitoring (RUM), and Grafana dashboards.
  • Guidance for migrating from legacy loggers (zap/logrus/zerolog) to slog and for aligning logging with traces.
  • Creation and maintenance of dashboards and alerts to monitor Go services, including GDPR/CCPA-compliant tracking considerations.
  • End-to-end instrumentation workflows: add signals, correlate logs with traces, and ensure a feature is observable before release.

Quick Start

Instrument a Go service by enabling slog-based structured logging, Prometheus metrics, OpenTelemetry tracing, and optional Pyroscope profiling, then set up dashboards and alerts as needed.

Frequently Asked Questions about golang-observability

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up observability for a Go service using slog, Prometheus, and OpenTelemetry?

Migrating legacy Go logging to slog involves replacing zap, logrus, or zerolog implementations while aligning log entries with OpenTelemetry traces. This standardizes structured logging and ensures logs correlate directly with distributed traces for faster triage.

Can I correlate Go application logs with OpenTelemetry traces?

Yes, you can correlate Go application logs with OpenTelemetry traces by aligning slog structured logging with trace context. This ensures every log entry contains corresponding trace identifiers, enabling end-to-end visibility and faster triage across production services.

Does this observability instrumentation handle GDPR and CCPA compliance tracking?

Yes, this observability instrumentation handles GDPR and CCPA compliance by integrating privacy considerations into tracking toggles. It ensures server-side analytics and Real User Monitoring (RUM) data collection comply with data protection regulations during Go service instrumentation.

What's the best way to add continuous profiling to Go services?

The best way to add continuous profiling to Go services is integrating pprof and Pyroscope alongside metrics and tracing. This enables always-on production profiling, allowing you to identify CPU and memory bottlenecks without manual sampling or restarting deployments.

How do I migrate Go logging from zap or logrus to slog?

Migrating Go logging from zap or logrus to slog involves replacing legacy logger implementations while aligning log entries with OpenTelemetry traces. This standardizes structured logging and ensures logs correlate directly with distributed traces for faster triage.