- Hazelcast cache statistics
- API performance metrics
- JVM
- System Metrics
Prometheus Metric Types
Cache metrics are collected using four metric types of Prometheus. These types are designed to best represent different data types and behaviors. Each metric type serves different purposes depending on how you collect and analyze the data.Counter
Counter is a value that only increases. It starts from zero when the application runs and increases, and is reset only when the application is restarted. Counter type metrics are ideal for tracking continuously increasing values such as total request count, error count, or number of completed operations.Available Operations:
sum: The total value itselfrate: Calculates the rate of increase over time (such as how much it increases per second)increase: Calculates the total increase in a specific time range
Gauge
Gauge represents an instant value. This value can increase, decrease, or remain constant. Gauge type metrics are used to monitor an instant state or level such as current memory usage, instant CPU usage, or number of active threads.Available Operations:
sum: Sum of Gauge values grouped by labelsmean: Average of Gauge values grouped by labelsmin/max: Minimum or maximum of values grouped by labels
Timer
Timer measures how long an operation takes (usually in milliseconds or seconds). Although technically not a special type in Prometheus, it is a metric created by libraries such as Micrometer with a combination of DistributionSummary and Counter. These metrics provide information such as average duration, maximum duration, and percentile slices.Available Operations:
sum: Gives the total durationcount: Gives how many times the operation was performed in totalmean: Calculates the average duration of the operationmax: Gives the longest duration observedhistogram_quantile: Calculates percentile slices
Summary
Summary is a metric that calculates both the total of observed values and predetermined percentile slices (quantiles). Its difference from Timer and DistributionSummary is that it collects percentile slices directly; since these are calculated when the metric is collected, not at query time, percentile slices are more accurate.Available Operations:
sum: Total of observed valuescount: Number of observed values- Predetermined percentile slices (
<metric_name>{quantile="0.99"})

