Prometheus stores time series: streams of timestamped values. These streams have an identifier and a set of sample values.
Every series is uniquely identified by a metric name and a set of key/value pairs called "labels".
- The metric name identifies the overall aspect of a system that is being measured (like
http_requests_total, the total number of HTTP requests handled by a given server process).
- Labels help to differentiate subdimensions (like
method="POST"telling you how many requests for each HTTP method type were handled).
The metric name and labels that form the series identifiers are indexed in Prometheus's TSDB and used for looking up series when querying data.
Samples form the bulk data of a series and are appended to an indexed series over time:
- Timestamps are 64-bit integers in millisecond precision.
- Sample values are 64-bit floating point numbers.