How to Set Up Prometheus & Grafana: Monitoring an API with Golang



How to Set Up Prometheus & Grafana: Monitoring an API with Golang

How to Set Up Prometheus & Grafana: Monitoring an API with Golang

A tutorial on how to set up server / application monitoring with Prometheus and Grafana.
We’ll instrument our Golang API to collect response time latencies using the Prometheus Golang client library, and proceed to graph the metrics using a Grafana dashboard.

Part 1: https://medium.com/code-uncomplicated/building-apis-in-go-beyond-hello-world-5d501d6403de
Part 2: https://www.youtube.com/watch?v=tTz7b2AongA

Source Code: https://github.com/oliversavio/youtube-vid-code/tree/server-monitoring/go-api-starter

00:00 – Intro
00:21 – Prometheus Architecture
02:44 – Instrumenting the Code (Tunes start here, put on your headphones!)
06:36 – Setting up a custom summary metric to track response latencies
11:11 – Installing Prometheus Server
13:30 – Installing Grafana
15:12 – Code walk-through
20:30 – Setting up Grafana dashboards

—————–
Support
—————–
Buy me a coffee: https://www.buymeacoffee.com/4xdMY36Ek
—————–
Blogs
—————–
Personal: http://olivermascarenhas.com/
Medium: https://medium.com/code-uncomplicated/
———————-
Mentoring
———————-
Find me on Code Mentor and book a 1:1 Mentoring Session
https://www.codementor.io/@oliversavio?refer=badge
—————–
Social
—————–
Twitter: https://twitter.com/olly0808/
LinkedIn: https://www.linkedin.com/in/olivermascarenhas/

#prometheus #grafana #monitoring #golang #api #microservices

Comments are closed.