logo
banner image
abstract image of computer

Observability Costs - Glossary

Metrics Series

A time series metric typically consists of a set of key-value pairs (labels) and a series of timestamped values. Each time series is uniquely identified by its metric name and the key/value combinations of its labels. To understand how this works it is best if we look at a concrete example.

Let us imagine we have a Kubernetes cluster and we want to record metrics on % cpu usage for each cpu in each node. We might have a metric which is defined as follows:

name: percent_cpu_usage
labels:
- instance
- cpu

So, for the first CPU of an instance called "instance 1", the metric name and combination will be:

name: percent_cpu_usage
labels:
- instance: "instance 1"
- cpu: "0"

For each instance/cpu combination, we will retrieve time series data consisting of a timestamp and a value:

timestamp: 1625235600, value: 60

So over the course of four minutes our time series might look like this:

timestamp: 1625235600, value: 60
timestamp: 1625235660, value: 59
timestamp: 1625235720, value: 62
timestamp: 1625235780, value: 73

So this is what a time series for one metric looks like. If we have four instances then we will and we collect our cpu usage at one minute intervals then we will have four active time series per minute. If each instance has 8 cpus then we will have 32 active time series per minute.

Top