Posted on

Metrics are not the building blocks of Obsv, Structed events are.

First, let's define an event: an event is a record of everything that occurred while one particular request interacted with your service.

To create that record, first we start with an empty map. Then when a request comes in, we capture everything interesting in it such as unique IDs, variable values, headers, every parameter passed by the request, the execution time, any calls made to remote services, etc. Then, when the request is about to exit or error, that entire map is captured as a rich record of what just happened. The data written to that map is organized and formatted, as key-value pairs, so that it’s easily searchable: in other words, the data should be structured. That’s a structured event.

When we refer to metrics, we mean the scalar values collected to represent system state, with tags optionally appended for grouping and searching those numbers. However, the fundamental limitation of a metric is that it is a pre-aggregated measure. The numerical values generated by a metric reflect an aggregated report of system state over a predefined period of time.

Source: From Chapter 5 of the book Observability Engineering by Charity Majors, Liz Fong-Jones, George Miranda

🐍🐍 This blog honours the late great Kobe Bryant. 81 is the highest he ever scored. 🐍🐍