Skip to content
DevOpsintermediate

What is observability?

Updated Nov 30, 20263 min readBased on official documentation
What is observability?

In short

Observability is the ability to understand what is happening inside a system by looking at the data it produces, without changing its code each time a new question comes up. It helps developers find out why something is going wrong, including problems they did not expect.

What observability means

Observability lets you understand a system from the outside. You ask questions about how it behaves, and the answers come from data the system already emits. You do not need to know every detail of its inner workings to start.

This matters most for "unknown unknowns". These are problems you did not predict, so you never wrote a check or a dashboard for them. A system that is observable lets you dig into a new problem and still find the cause.

To ask those questions, the application must be properly instrumented. Instrumentation means the code emits signals such as traces, metrics, and logs. An application is well instrumented when developers do not have to add new instrumentation just to troubleshoot an issue, because the data they need is already there. OpenTelemetry is an open standard and set of tools that developers use to instrument application code.

The three kinds of telemetry

Telemetry is the data a system emits about its behavior. It usually comes in three forms.

  • Metrics are numbers aggregated over a period of time, such as error rate, CPU use, or request rate for a service.
  • Logs are timestamped text messages. They describe events, but on their own they often lack context, such as which request caused them.
  • Traces show the path of a single request through a system. A trace is built from spans.

Each form answers a different question. Metrics tell you that something changed. Traces help you see where in the system it happened. Logs add the detail about what went wrong.

Reliability, SLIs and SLOs

Reliability asks a simple question: is the service doing what users expect? A system can be up all the time and still be unreliable. If a shop's "Add to Cart" button sometimes adds the wrong item, users are not getting what they expect.

Two terms help teams talk about this. An SLI, or Service Level Indicator, is a measurement of how a service behaves, ideally from the user's point of view. A common example is how fast a web page loads. An SLO, or Service Level Objective, is the target a team sets for an SLI and the way it shares that reliability goal with the business and other teams.

How distributed tracing works

A modern application is often split into many services. A single user action may pass through an API gateway, a backend service, and a database. Distributed tracing follows that request across all of them.

A span is one unit of work, such as one call to a service or one database query. It has a name, timing data, and attributes, which are key-value details like the HTTP method or the response status. A trace is a set of spans that belong to one request. The first span is the root span and covers the whole request. Spans nested under it show the steps inside that request.

Many observability tools draw traces as waterfall diagrams. Each bar is a span, and its position shows when it started and how long it ran. This makes it easy to spot the slow step.

Common mistakes

A frequent mistake is collecting logs without context. A log line that says "payment failed" is much more useful when it is linked to a trace and a span, so you can see the request that produced it.

Another mistake is treating observability as the same thing as monitoring. Monitoring checks for known conditions. Observability gives you the data to explore conditions you did not plan for.

Finally, teams sometimes instrument too little and then add code during an incident. The goal is to have enough data already in place that the next question can be answered without a new release.

FAQ

Is observability the same as monitoring?

Not quite. Monitoring watches for conditions you already know about, such as high error rates. Observability gives you enough data to investigate new problems you did not predict.

Do I need all three types of telemetry?

Most teams use metrics, logs and traces together because each answers a different question. You can start with one and add the others as your system grows.

What is the difference between a span and a trace?

A span is a single unit of work, such as one operation inside a request. A trace is the collection of spans that together record one request across services.

Where does OpenTelemetry fit in?

OpenTelemetry is the mechanism used to add instrumentation to application code, so the code emits traces, metrics and logs that an observability tool can analyze.

Sources

This page is based on the official documentation below. Read it for full detail.

Observability — official documentation ↗

Observability in the news

blozhikDeveloper news from across the web, explained. Every story links to its original sources.