Skip to content

Added local observability stack with Prometheus, Grafana, and HTTP metrics dashboard#3

Open
GeorgeDiNicola wants to merge 5 commits into
mainfrom
devops/observability
Open

Added local observability stack with Prometheus, Grafana, and HTTP metrics dashboard#3
GeorgeDiNicola wants to merge 5 commits into
mainfrom
devops/observability

Conversation

@GeorgeDiNicola
Copy link
Copy Markdown
Owner

@GeorgeDiNicola GeorgeDiNicola commented May 10, 2026

Goal: To add observability using Prometheus & Grafana to a production-quality Go application, generate application traffic, and inspect core service health signals without additional manual setup. This repository can serve as boilerplate for running a Go application with CI/CD testing and observability best practices.

What Changed:

  • Added Prometheus and Grafana docker images for local Docker-Compose coordination for the 3 services (including the go app)
  • Added Prometheus scrape configuration and Grafana provisioning for datasources and dashboards
  • Added HTTP metrics middleware for request counting and latency measurement
  • Added tests for the metrics middleware
  • Exposed the app metrics endpoint for Prometheus scraping
  • Added a debug endpoint that intentionally returns a 500 response for observability testing
  • Added a Grafana dashboard
  • Updated the README with setup instructions, example queries, and guidance for using the local observability stack

Metric displays for the Grafana dashboard

  • total request rate
  • total request count by endpoint
  • success rate
  • request rate by endpoint and status grouping
  • latency panels for average, p90, p95, and p99
  • saturation/runtime panels for CPU, memory, goroutines, heap, GC pause, and file descriptor usage

Example visuals from the Grafana dashboard:
request-rates
latency-by-endpoint
saturation-metrics

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant