Skip to content
Veltoryx Technologies
ProLesson 12.3Intermediate3 min readUpdated 31 October 2026

Metrics Collection with Prometheus & Grafana

Instrument Spring Boot 3 microservices with Micrometer, configure Prometheus pull-based scraping, and build production Grafana dashboards.

Logs tell you what happened to a single user. Traces show you the path of a single transaction.

Metrics provide the high-level statistical aggregates that tell you how your overall platform is behaving across millions of concurrent users.

01The 4 Core Metric Types in Micrometer

Micrometer is the vendor-neutral metrics instrumentation facade for Java (often called the "SLF4J for metrics").

  1. Counter: A monotonically increasing numerical value that only ever increases or resets to zero on reboot (e.g. orders_placed_total, http_requests_total).
  2. Gauge: An instantaneous snapshot of a fluctuating value that can go up or down (e.g. jvm_memory_used_bytes, hikaricp_active_connections, cpu_usage_percentage).
  3. Timer: Measures both the rate (frequency) and duration (latency distribution) of short-duration events (e.g. time spent executing database queries or HTTP calls).
  4. Distribution Summary: Tracks the statistical distribution of non-time events (e.g. size of uploaded files in bytes, number of items in shopping carts).

Loading the rest of the lesson…