golang-observability

Instrument Go services with slog, Prometheus, OpenTelemetry, pprof, and RUM.

Updated May 28, 2026
One-click install
npx skills add https://github.com/vanstinator/semantic-search --skill golang-observability-vanstinator
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: golang-observability
Source: https://github.com/vanstinator/semantic-search/tree/main/.agents/skills/golang-observability
Command: npx skills add https://github.com/vanstinator/semantic-search --skill golang-observability-vanstinator

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you instrument Go services so failures, latency, and user experience issues are detectable and diagnosable in production rather than discovered via guesswork.

Core Features & Use Cases

  • Structured logging with slog: Use JSON logging and context-aware variants to ensure logs correlate cleanly with traces.
  • Production-grade metrics with Prometheus: Prefer Histograms for latency percentiles, keep label cardinality bounded, and document metrics with PromQL comments.
  • Distributed tracing with OpenTelemetry: Create spans for meaningful operations and propagate context across boundaries for end-to-end visibility.
  • Profiling and continuous profiling: Enable pprof securely and use Pyroscope toggles for always-on performance insight.
  • RUM and compliance-aware event tracking: Track backend user events, enforce consent, and use a stable user_id identity key.

Quick Start

Instrument your Go service for production monitoring by adding slog JSON logging, Prometheus metrics (including latency histograms with safe labels), OpenTelemetry spans with proper context propagation, and secure profiling/RUM hooks.

Frequently Asked Questions about golang-observability

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

FAQPage Schema
How do I instrument a Go service for production observability with slog and OpenTelemetry?

Instrument Go services for observability by using slog for structured JSON logging with context propagation, and create OpenTelemetry spans for meaningful operations to ensure logs correlate cleanly with traces end-to-end.

What is the best way to design Prometheus metrics for Go latency tracking?

Design Prometheus metrics by preferring Histograms for latency percentiles, keeping label cardinality bounded to prevent unbounded series growth, and documenting metrics with PromQL-as-comments.

How do I securely expose pprof endpoints in a Go application?

Securely expose pprof endpoints in Go applications by implementing profiling toggles and access protection mechanisms, preventing unauthorized access to sensitive runtime performance data.

Does observability instrumentation handle GDPR and CCPA compliance for user tracking?

Observability instrumentation handles GDPR and CCPA compliance by enforcing user consent, using stable user_id identity keys, and implementing compliance-aware RUM event tracking patterns.

Can I audit observability coverage in an existing Go codebase?

Audit observability coverage in existing Go codebases by reviewing instrumentation changes across logs, metrics, traces, profiling, and RUM to prevent untraceable incidents and blind debugging.

How do I propagate context across distributed boundaries in Go tracing?

Propagate context across distributed boundaries in Go tracing by creating OpenTelemetry spans for meaningful operations and recording errors and status codes within those spans for end-to-end visibility.