Intermediate

Metrics and Dashboards with Prometheus

Expose a /metrics endpoint from a Node.js service, scrape it with Prometheus, learn PromQL's rate() and histogram_quantile() patterns, and build a Grafana dashboard for requests/sec, p95 latency, and error ratio.

~5h
0 / 7 steps
🚀
Intro

Pull-Based Metrics, in Brief

Prerequisites: Structured Logging Fundamentals.

Prometheus doesn't wait for your app to push data — it scrapes a plain-text /metrics HTTP endpoint on your service at a fixed interval. Each metric is a name plus a set of key/value labels (a multi-dimensional model), and PromQL is the query language you use to slice, rate, and aggregate that data. This project builds the full loop: your app exposes metrics, Prometheus scrapes and stores them, and Grafana turns them into a dashboard.

Current release line: Prometheus is on the 3.x major series (v3.12 was the latest generally-available release verified for this project; a 3.13 release candidate was in progress). If you're following this months later, check prometheus.io/download for the current stable tag before pinning a version.

🔨

Run Prometheus in Docker

🔨

Expose /metrics From Your App

🔨

PromQL Basics

🔨

Build a Grafana Dashboard

🎯
Secret Mission

Secret Mission: Recording Rule + Draft Alert

🧹
Wrap Up

Before You Go

Pro

Test what you just learned

Self-testing is one of the best ways to retain new skills. Unlock project quizzes to check your understanding.

Log in to unlock