Using exemplars in Grafana
Exemplars are functions in Grafana that allow us to pivot from an aggregated view of the system, given by metrics, to a detailed view of a single request, given by traces. Exemplars need to be configured at the collection layer and then sent to the storage layer.
When they are available, you can view exemplars by doing the following:
- Open Options under the query, and toggle the Exemplars slider:
Figure 5.12 – The Exemplars toggle
- Exemplars will appear as stars on the metrics chart:
Figure 5.13 – An exemplar in metrics
Hovering over an individual exemplar will expand on the metrics data by showing information from the exemplar trace in the metrics view. We will explain these fields in more detail in Chapter 6, but some notable fields are the name and version of the process runtime and span_id
, which would not usually be available in a purely metric view:
...