Course contentsShow
← System Design
Lesson 856 of 1,91922. Service MeshFree lesson

Observability: Metrics Collection

Service mesh generates golden signals (latency, traffic, errors, saturation) without code instrumentation.

Observability: Metrics Collection

What you'll learn: How service meshes automatically collect critical performance metrics without requiring changes to your application code.


The Power of Automatic Metrics

In traditional architectures, developers must manually instrument their code to track metrics like response times, error rates, and request volumes. With a service mesh, the sidecar proxy intercepts every request, giving you automatic visibility into your services' health and performance—no logging libraries or SDK installations required.

The Golden Signals Without Code Changes

Service meshes automatically generate the four golden signals that SRE teams rely on:

  1. Latency: How long requests take (P50, P95, P99 percentiles)
  2. Traffic: Request volume and rate over time
  3. Errors: HTTP error codes (4xx, 5xx) and failed requests
  4. Saturation: Resource utilization like connection pool usage

Since every request passes through the proxy (from the sidecar proxy pattern and data plane responsibilities), these metrics are collected consistently across all services—whether written in Java, Python, Go, or any other language. This builds directly on the polyglot microservices support capability.

How It Works

The data plane proxies (like Envoy) track each request's path, duration, and outcome. The control plane then aggregates this telemetry data and exposes it to monitoring systems like Prometheus, Grafana, or cloud-native tools. This seamless telemetry collection happens transparently, without any application code awareness.

Think of it like having automatic speed cameras on every highway intersection—you don't need drivers to self-report their speeds; the infrastructure captures everything automatically.

Key Takeaway:
Service meshes provide automatic, consistent metrics across all services by collecting golden signals at the proxy level, eliminating the need for manual code instrumentation and ensuring uniform observability in polyglot environments.