golang-observability

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

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

It solves the risk of shipping Go features that are not measurable in production, so you can’t diagnose latency, errors, saturation, or user experience issues quickly.

Core Features & Use Cases

  • Structured logging with log/slog: production-ready JSON logs, correct level usage, and trace correlation via *Context logging.
  • Prometheus metrics: metric type selection (Counter/Gauge/Histogram/Summary), low-cardinality labels, latency histograms with percentile querying, and PromQL-as-comments for discoverability.
  • OpenTelemetry tracing: early TracerProvider setup, spans for meaningful operations, context propagation across boundaries, and correct error recording on spans.
  • Profiling (pprof + continuous profiling): secure pprof exposure patterns and environment-variable toggling, plus Pyroscope continuous profiling guidance.
  • Server-side RUM event tracking: backend event capture, identity rules using immutable user_id, consent-aware tracking, and privacy compliance considerations (GDPR/CCPA).
  • Alerting and dashboards: Golden signals coverage (latency/traffic/errors/saturation), multi-window burn-rate SLO alerts, runtime alerts, and Grafana dashboard alignment.

Quick Start

Add observability to your Go service by instrumenting logs, metrics, traces, profiling, and (when needed) server-side RUM with the skill’s production-grade rules and verification checklist.

Frequently Asked Questions about golang-observability

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

FAQPage Schema
How do I instrument Go services for production observability with logs, metrics, and traces?

Instrument Go services by setting up structured slog logging, Prometheus metrics, and OpenTelemetry tracing together. This correlated observability setup ensures you can diagnose latency, errors, and saturation issues quickly during production incidents.

What's the best way to secure pprof profiling endpoints in a Go application?

Secure pprof profiling endpoints by using environment-variable toggling to control exposure and applying secure routing patterns. This prevents unauthorized access to sensitive runtime profiling data while allowing continuous profiling when needed.

How do I correlate OpenTelemetry traces with structured slog logs in Go?

Correlate OpenTelemetry traces with slog logs by passing the request context into your logging calls. This context propagation links trace IDs and span IDs directly to log entries for unified incident diagnosis.

How do I prevent high-cardinality label issues when defining Prometheus metrics in Go?

Prevent high-cardinality issues by following Prometheus best practices for label selection, using Histograms for latency distributions, and avoiding user IDs or unbounded values as metric labels to protect database performance.

Can I implement GDPR-compliant server-side Real User Monitoring (RUM) in Go services?

Implement GDPR-compliant server-side RUM by capturing backend events with immutable user IDs and enforcing consent-aware tracking rules. This approach handles privacy compliance requirements while monitoring user experience events.

How do I set up multi-window burn-rate SLO alerts using Prometheus and PromQL?

Set up multi-window burn-rate SLO alerts by defining PromQL queries for golden signals coverage and aligning them with Grafana dashboards. This enables precise detection of service level objective violations across latency and error rate thresholds.