String Values

Prometheus doesn't support strings as a sample value for metrics, however this can be emulated using labels!

The following example metric taken from Prometheus illustrates this:

prometheus_build_info{branch="dev-2.0",goversion="go1.8",revision="4d3d8ee229cbd7e600405b56267a9e833446c24c",version="2.0.0-beta.0"} 1


In order to have a metric to display the Prometheus build information we create a gauge with a value of 1 and use labels to store the strings we're interested in.


Following on from our previous lecture about cardinality, it's important to use metrics like this sparingly and only for very static information.

Complete and Continue