Skip to main content

Observability

Monitoring tells you whether something is wrong: the CPU is at 95%, the error rate is above 1%. Observability helps you understand why, including for problems nobody predicted. A system is observable when you can answer new questions about its behavior from the data it already produces, without shipping new code to investigate.

In distributed systems, where one user request may pass through dozens of services, queues and databases, observability is not optional. It is what makes it possible to run many independent services without losing control.

As a platform capability, observability should come built in: every service created through a golden path is instrumented, shipped to a central platform, and covered by standard dashboards and alerts from day one.

Telemetry signals​

Telemetry is the data a system emits about its behavior. The classic "three pillars" are logs, metrics and traces. Modern platforms add more signals, and the real value comes from correlating them.

SignalWhat it isAnswersExample
LogsTimestamped records of discrete events, ideally structured (JSON)What exactly happened at this moment?{"level":"error","msg":"payment declined","order_id":"123","trace_id":"ab12..."}
MetricsNumeric measurements aggregated over timeHow much, how fast, how often? Is it getting worse?Requests per second, p95 latency, error rate, CPU usage, queue depth
TracesThe path of one request across services, made of timed spansWhere did this request spend its time, and where did it fail?Checkout request: API gateway 5 ms → order service 40 ms → payment service 900 ms
EventsSignificant changes in the systemWhat changed just before the problem?Deployment, feature flag change, configuration update, scaling event
ProfilesContinuous sampling of code execution in productionWhich function uses the CPU or memory?Flame graph of the order service

How the signals work together​

Each signal has strengths and weaknesses. Metrics are cheap to store and great for alerts and trends, but have little detail. Logs have detail, but are expensive at volume and hard to follow across services. Traces connect services, but are usually sampled.

The investigation typically flows like this:

This only works when the signals share context: the same service name, environment and version on every signal, and a trace ID included in every log line. Without shared context, engineers have to correlate data by hand, by timestamp and guesswork.

Useful metric methods​

Three well-known methods help decide which metrics matter:

  • The four golden signals (Google SRE): latency, traffic, errors and saturation. A good default for any user-facing service.
  • RED method: Rate, Errors and Duration of requests. Focused on services.
  • USE method: Utilization, Saturation and Errors. Focused on resources such as CPU, memory, disks and connection pools.

OpenTelemetry: the standard for collecting telemetry​

OpenTelemetry (OTel) is the open, vendor-neutral standard for producing and collecting telemetry, hosted by the CNCF. It defines:

  • APIs and SDKs for most languages, with automatic instrumentation for common frameworks (HTTP servers and clients, database drivers, messaging)
  • Semantic conventions: standard attribute names such as service.name, http.response.status_code or deployment.environment
  • OTLP, a common protocol for sending logs, metrics and traces
  • The Collector: an agent that receives, processes and exports telemetry to one or more backends

Today, all major observability platforms accept OpenTelemetry data. Instrumenting with OpenTelemetry instead of a vendor-specific agent keeps the option to change platforms without changing application code.

The Collector is a good place for platform-wide rules: adding the owning team from the Software Catalog, removing personal data from logs, sampling traces to control costs, and sending data to more than one backend during a migration.

Types of observability​

Observability is not only about servers. Different types look at the system from different angles.

Technical telemetry​

The view from inside the system, used mainly by engineering teams.

TypeWhat it covers
Infrastructure monitoringHosts, containers, Kubernetes clusters, databases, queues, cloud services: CPU, memory, disk, network, saturation
Application Performance Monitoring (APM)Services and their requests: throughput, latency, errors, slow database queries, dependencies between services, built mostly on traces
Log managementCentral collection, search and retention of logs, with parsing and correlation to traces
Distributed tracingEnd-to-end request flows across services, service maps
Continuous profilingCode-level CPU and memory usage in production, for example with Grafana Pyroscope

End-user monitoring​

The view from outside: what users actually experience. A backend can look perfectly healthy while users suffer from a slow page, a broken script or a failing CDN.

TypeWhat it covers
Real User Monitoring (RUM)A small JavaScript (or mobile) SDK collects data from real users' browsers: page load times, Core Web Vitals (LCP, INP, CLS), JavaScript errors, failed API calls, and user journeys. RUM sessions can be linked to backend traces, so a slow click can be followed into the services behind it
Session replayA video-like reconstruction of what a user saw and clicked, to reproduce issues. Needs careful masking of personal data
Mobile monitoringApp start time, crashes, freezes and network errors on iOS and Android, by device and app version
Synthetic monitoringScripted tests that call APIs or click through key user journeys (login, checkout) from different locations, every few minutes. Detects problems even when there are no real users, such as at night or before a release
tip

RUM and synthetic monitoring complement each other. Synthetic tests tell you that the checkout works from a clean browser in Frankfurt. RUM tells you that it is slow for real users on mobile networks in Spain.

Business observability​

Technical signals linked to business outcomes: orders per minute, payment success rate, sign-up conversion. A drop in orders per minute is often the fastest and most reliable sign that something is wrong, even when every technical metric looks normal. Business metrics should be first-class metrics, shown next to technical ones on the same dashboards.

Observability platforms​

Commercial all-in-one platforms​

These platforms offer all signals, RUM, synthetics and alerting in one product, as SaaS. They are the fastest way to get full observability, but costs need active management: pricing usually combines hosts, data volume (ingested and indexed), and users, and grows quickly with log volume and high-cardinality metrics.

PlatformNotes
DatadogVery broad product range: infrastructure, APM, logs, RUM, synthetics, security. Many integrations, easy start
New RelicAll signals in one data store, queried with NRQL. Browser monitoring and synthetics. Pricing based mainly on data ingested and users
DynatraceStrong automatic discovery and instrumentation with its OneAgent, and AI-assisted root-cause analysis. Popular in large enterprises
Splunk Observability CloudBuilt on OpenTelemetry. Often chosen by organizations already using Splunk for logs and security
HoneycombFocused on traces and high-cardinality event data for exploring unknown problems
SentryDeveloper-focused error tracking and performance monitoring, strong for frontend and mobile

Open source stacks​

Open source stacks can be self-hosted or bought as managed services. They give more control over data and cost, but need people to run them.

StackComponents
Elastic Stack (ELK)Elasticsearch (storage and search), Logstash and Beats/Elastic Agent (collection and processing), Kibana (visualization). Started as the standard for log management and has grown into a full observability solution with APM and RUM. OpenSearch is an open source fork of Elasticsearch and Kibana
Grafana stack (LGTM)Loki for logs, Grafana for dashboards, Tempo for traces, Mimir for metrics, plus Faro for RUM and Pyroscope for profiles. Also available as Grafana Cloud
PrometheusThe standard for metrics in Kubernetes environments, with its own query language (PromQL) and Alertmanager
JaegerDistributed tracing, a CNCF project

Cloud-native services​

Each cloud provider offers built-in observability, which integrates well with its own services and needs no extra contracts.

ProviderServices
AWSAmazon CloudWatch: metrics, logs, alarms, Application Signals (APM), RUM and synthetics
AzureAzure Monitor with Application Insights for APM
Google CloudGoogle Cloud Observability: Cloud Monitoring, Logging and Trace

Choosing a platform​

  • One platform, if possible. Correlating signals across several tools is hard. Many organizations combine a cloud-native service for infrastructure with one central platform for applications.
  • Instrument with OpenTelemetry. It keeps application code independent of the platform and makes later migrations possible.
  • Model the cost early. Estimate log and metric volumes before choosing. Decide what to keep, for how long, and what to sample or drop.
  • Consider data residency. Logs and session replays often contain personal data. Check where the platform stores data, and mask sensitive fields at the source.

Alerting​

Alerts turn telemetry into action. Good alerting wakes people up only when users are affected or will be soon. Bad alerting creates alert fatigue: so many alerts that the important ones are ignored.

Principles​

  • Alert on symptoms, not causes. Alert on "checkout error rate is above 2%" (users are affected), not on "CPU is at 90%" (which may be fine). Use cause metrics on dashboards for diagnosis.
  • Every alert must be actionable. If nobody needs to do anything, it should not be an alert. Turn it into a dashboard panel or a ticket.
  • Every alert has an owner and a runbook. Route the alert to the owning team from the catalog, and link to a runbook that explains what to check first.
  • Match urgency to impact. Not everything needs to wake someone at 3 a.m.
SeverityMeaningNotification
CriticalUsers are affected now, or will be within minutesPage the on-call engineer (phone, push)
WarningDegradation that needs attention within hoursTeam chat channel
InfoSomething to look at during working hoursTicket or dashboard

SLO-based alerting​

The most effective approach for user-facing services is alerting on Service Level Objectives (SLOs):

  • A Service Level Indicator (SLI) measures user experience, for example "the share of checkout requests that succeed in under 500 ms".
  • A Service Level Objective (SLO) sets the target, for example "99.9% over 30 days".
  • The error budget is what remains: 0.1% of requests may fail, about 43 minutes of full outage in 30 days.

Instead of alerting on every spike, you alert when the error budget is used up too quickly (the burn rate). A short, sharp outage pages immediately. A slow, steady degradation raises a ticket. This approach is described in detail in the Google SRE Workbook.

Example of a burn-rate alert as a Prometheus rule:

checkout-slo-alerts.yaml
groups:
- name: checkout-slo
rules:
- alert: CheckoutErrorBudgetBurnFast
# Error rate is more than 14.4x the 0.1% budget, over both 1h and 5m.
# At this rate, 2% of the 30-day budget is used within one hour.
expr: |
(
sum(rate(http_requests_total{service="checkout", code=~"5.."}[1h]))
/ sum(rate(http_requests_total{service="checkout"}[1h]))
) > (14.4 * 0.001)
and
(
sum(rate(http_requests_total{service="checkout", code=~"5.."}[5m]))
/ sum(rate(http_requests_total{service="checkout"}[5m]))
) > (14.4 * 0.001)
labels:
severity: critical
team: team-checkout
annotations:
summary: Checkout is burning its error budget fast
runbook_url: https://wiki.example.com/runbooks/checkout-errors

From alert to incident​

Alerts are routed to the on-call engineer of the owning team through an on-call and incident management tool such as PagerDuty or incident.io, or through the alerting built into the observability platform. These tools handle on-call schedules, escalation when nobody responds, grouping of related alerts, and coordination of the incident.

After an incident, a blameless post-mortem should check whether the alerting worked: did the right alert fire, early enough, to the right people? Each post-mortem is an opportunity to remove a noisy alert or add a missing one.

Observability as a platform capability​

Following the platform mindset, the platform team should make good observability the default, not a task for each team:

  • Instrumentation in the golden path. Templates include the OpenTelemetry SDK, structured logging with trace IDs, and the RUM snippet for frontends.
  • Consistent metadata. Every signal carries service.name, environment, version and owning team, taken from the systems inventory. This makes it possible to route alerts and attribute costs by team.
  • Standard dashboards and alerts. Every new service gets a golden-signals dashboard and default SLO alerts, which teams then tune.
  • Collection as infrastructure. OpenTelemetry Collectors, agents and log shipping are provided by the platform, not set up by each team.
  • Cost guardrails. Default retention periods, sampling rules and volume limits keep the bill predictable.