Skip to content
This repository was archived by the owner on Oct 7, 2023. It is now read-only.
/ metric-types Public archive

Accompanying repo to tutorial video where you’ll discover what are the 4 different types of Prometheus metrics, how to decide which one is right for a specific scenario, and how to query them.

Notifications You must be signed in to change notification settings

tkgregory/metric-types

Repository files navigation

CI

Repository to accompany The Four Types Of Prometheus Metrics (YouTube video | article).

It contains an application that has 4 controllers to simulate the 4 different types of Prometheus metric:

  • Counter - hit /hello to increment the request_count counter
  • Gauge - hit /push to increment the queue_size gauge and /pop to decrement it
  • Histogram - hit /wait to record the response time in the request_duration histogram
  • Gauge - hit /waitSummary to record the response time in the request_duration_summary summary

All metrics are exposed at /actuator/prometheus.

This repository also contains a configuration for Prometheus, which scrapes the application. Both the application and Prometheus are brought up using Docker Compose.

Pre-requisites

  • JDK 17+
  • Docker (unless you just want to run the application without Prometheus)

Running

./gradlew build docker dockerComposeUp

Stopping

./gradlew dockerComposeDown

Need further support?

Contact me if you need help at tom@tomgregory.com.

About

Accompanying repo to tutorial video where you’ll discover what are the 4 different types of Prometheus metrics, how to decide which one is right for a specific scenario, and how to query them.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •