Observability
Seeing what the mesh is doing, metrics, distributed traces across products, and the live view of traffic between them.
Learning objectives
By the end of this chapter you can:
- Name the three observability signals (metrics, traces, logs) and the question each answers about a request crossing products.
- Explain why the service mesh’s sidecars provide inter-product metrics without any application instrumentation.
- Trace a single GraphQL query as a multi-span trace crossing three protocols (HTTP, REST, and gRPC) through the gateway.
- Explain what a live mesh-visualization tool like Kiali adds beyond metrics and traces.
Why this matters
The previous page ended on scaling and recovery: the platform doing things automatically in response to demand and failure. But “the platform does things automatically” is only reassuring if you can see it happening.
This page is about observability: the metrics that show a product’s load and the autoscaler’s response, the distributed traces that follow a single request across several products, and the live view of traffic moving through the mesh. In a system of independently-owned products talking to each other, observability isn’t a dashboard you add at the end. It’s how anyone understands behavior that no single product fully contains.
The three signals, and why a mesh needs all of them
Watch a GraphQL query fan out from the gateway to order-service and inventory-service, and you need three different kinds of evidence to understand what happened. Metrics are aggregate numbers over time: request rates, error rates, consumer lag, replica counts. They’re what show you that the autoscaler woke the gateway, or that one product’s error rate is climbing. Traces follow a single request as it crosses product boundaries, so you can see that a slow GraphQL query was slow because the gRPC call it made downstream was slow, something no single product’s own logs would reveal. Logs are the detailed per-event record you reach for once metrics and traces have told you where to look.
A mesh needs all three, not just per-service logs, because the interesting behavior lives between products. A request that touches the gateway, an order service, and an inventory service is a single user-facing operation spread across three independently-owned products. Understanding it means correlating signals that no one product owns in full.
Metrics from the mesh, no instrumentation needed
Open order-service’s code and you won’t find a line of metrics instrumentation in it, yet Grafana still shows its request rate climbing under load. That’s the first pleasant surprise: how much you get without instrumenting anything. Because the services are in the service mesh, the sidecars already emit request-level metrics (counts, latencies, error rates for the traffic flowing between products), and a Prometheus that scrapes them gets a detailed picture of inter-product traffic without a single line of metrics code in the services.
This final project leans on exactly that. The metrics half of observability adds nothing to the application code, because the mesh is already measuring the traffic it carries. Grafana then turns those metrics into the dashboards you’d actually watch: the gateway’s request volume rising, KEDA spinning up replicas in response, the canary’s traffic split landing where the weights say it should.
That property is the self-serve platform principle showing up again. A domain team gets request metrics for its product because the platform’s mesh provides them, not because the team instrumented anything.
Traces across products
Metrics tell you that something is slow or failing; traces tell you where. Distributed tracing assigns a request an identity that propagates as it crosses product boundaries, so the work each product does on its behalf becomes a connected tree of spans: one request, many products, one trace.
This final project collects traces in Tempo and instruments the gateway as the trace source. The gateway is the entry point for the federated read path, so a single GraphQL query there produces the most instructive trace there is in this system: an HTTP server span for the query itself, a REST client span for the call out to order-service, and a gRPC client span for the call to inventory-service. All three protocols from the data planes page show up as nested spans in one trace.
You can see the composition happen: the gateway fanning out to two products over two different protocols and assembling the result. One well-chosen instrumentation point illuminates the whole read path.
Instrumenting the entry point first, and leaving deeper per-service instrumentation as a follow-on, is the same incremental discipline the rest of the build follows: one new capability at a time, each verifiable before the next.
The live mesh view
Metrics and traces are recorded and queried after the fact. The other thing you want with a mesh is a live picture of the topology: which products are talking to which, right now, with traffic rates and health on the edges between them. That’s what a mesh-visualization layer such as Kiali provides: a real-time graph of the products and the traffic between them, drawn from the same mesh telemetry the metrics come from.
During a canary it shows the v1/v2 split as live traffic on the graph. When a product is struggling, the unhealthy edges are visible in the topology. For a system whose defining behavior is products talking to each other, a live map of exactly that is the single most legible view available.
What it all adds up to
Put the pieces together and the mesh becomes legible end to end. A single GraphQL query appears as a trace whose spans cross three products and three protocols. The metrics show the gateway’s load and the autoscaler’s response to it. The catalog records the lineage of which products feed which. The mesh view shows the live topology, canary split and all.
None of these is the system. They’re the instruments through which you understand a system too distributed for any single vantage point to capture. That’s the acceptance bar the final project is built toward: not just that the mesh runs, but that you can watch it run. See a request thread across products, see a product scale to meet demand, see a contract roll out version by version, and see where every product’s data came from.
That completes the implementation. The build is a working data mesh: services that own their data as products, contracts and a catalog that make them discoverable, two data planes moving current state and propagating change, progressive delivery with mTLS, elastic scaling with recovery, and the observability to see all of it. The one thing left is to step back from how and look at what goes wrong: the conceptual and organizational failure modes that derail data-mesh efforts even when the technology is sound.
For deeper coverage
- Designing Data-Intensive Applications, 2nd ed. by Martin Kleppmann & Chris Riccomini: reasoning about the behavior of distributed systems built from independently-owned parts.
- OpenTelemetry documentation: the metrics/traces/logs signal model this chapter applies to a mesh.
- Grafana documentation: Tempo for traces, Mimir/Prometheus for metrics, and correlating the two.
- Cloud Native Patterns by Cornelia Davis: observability as a platform-provided concern rather than a per-service add-on.