Chapter 2. The Value of Structured Data

Squinting at graphs is not the best way to hunt for correlations. A huge amount of work currently done inside the heads of operators can actually be automated. This frees operators to move quickly among identifying issues, making hypotheses, and validating root causes.

To build better tools, we need better data. Telemetry must have two qualities to support high-quality automated analysis:

  • All data points must be connected in a graph with proper indexing.

  • All data points that represent common operations must have well-defined keys and values.

In this chapter, we will walk through a modern telemetry data model, starting with a basic building block: the attribute.

Attributes: Defining Keys and Values

The most fundamental data structure is an attribute, which is defined as a key and a value. Every data structure in OpenTelemetry contains a list of attributes. Every component of a distributed system (an HTTP request, a SQL client, a serverless function, a Kubernetes Pod) is defined in the OpenTelemetry specification as a specific set of attributes. These definitions are called the OpenTelemetry semantic conventions. Table 2-1 shows a partial list of the HTTP conventions.

Table 2-1. A partial list of HTTP conventions
Attribute Type Description Example
http.method
string HTTP request method GET; POST; HEAD
http.target
string The full request target as passed in an HTTP request line or equivalent /path/12314/
http.host ...

Get The Future of Observability with OpenTelemetry now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.