golang-observability

Implement structured logging, tracing, metrics, health checks, and profiling for Go applications.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill provides detailed monitoring and debugging capabilities for Go applications, improving reliability and troubleshooting efficiency.

Core Features & Use Cases

  • Structured Logging: Implements consistent, filtered, and contextual logs for Go services.
  • Distributed Tracing: Enables tracking of requests across microservices with OpenTelemetry.
  • Metrics Collection: Provides Prometheus metrics for request rates, durations, and system health.
  • Health Checks: Implements liveness and readiness probes to ensure service availability.
  • Profiling: Sets up pprof endpoints for performance analysis and fault diagnosis.
  • Graceful Shutdown: Coordinates shutdown procedures with proper telemetry flushing for production environments.

Quick Start

Integrate this skill into your Go service to add comprehensive observability with minimal setup.

Frequently Asked Questions about golang-observability

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

FAQPage Schema
How do I add distributed tracing to Go microservices?

Structured logging in Go services provides consistent, contextual, and filtered log outputs. This approach improves reliability and troubleshooting efficiency by attaching contextual metadata to logs, making it easier to filter and locate specific events during production debugging.

How do I implement Prometheus metrics and health checks in a Go application?

Prometheus metrics and health checks in Go are implemented by exposing liveness and readiness probes alongside request rate and duration metrics. This setup monitors system health, tracks service availability, and ensures traffic is only routed to operational service instances.

Does Go observability setup include pprof endpoints for performance profiling?

Yes, Go observability setup includes pprof endpoints specifically for performance profiling and fault diagnosis. By exposing these endpoints, you can collect runtime profiles to analyze CPU usage, memory allocation, and goroutine execution to tune application performance.

What is the best way to handle graceful shutdown and telemetry flushing in Go?

Graceful shutdown in Go coordinates shutdown procedures with proper telemetry flushing. This mechanism ensures that all pending logs, traces, and metrics are successfully exported to their backends before the application terminates, preventing data loss in production environments.

Can I set up structured logging for Go services without changing existing application code?

Structured logging for Go services is implemented to provide consistent, filtered, and contextual logs with minimal setup. It integrates into your service to add observability features directly, improving reliability and troubleshooting efficiency without requiring extensive codebase modifications.