Engineering for Reliability
Automatic instrumentation with OpenTelemetry
Twenty-three substantive episodes on SLOs, telemetry, alerting, investigation, and operations
Twenty-three 2021–2022 episodes connect user-facing reliability targets to metrics, logs, traces, and alerts. Examples show instrumentation, Prometheus collection, quota monitoring, GKE investigation, and observability cost controls.
In this collection Browse 23 summaries 22 of 23
When a request passes through several services, tracing helps show which part is slow. A trace follows the whole request; spans record the time spent in individual operations. Yuri, a site reliability engineer at Google Cloud, uses a Python frontend and backend to compare automatic tracing with application-specific instrumentation using OpenTelemetry 00:00–01:05(opens in a new tab).
Key Points Covered
- Automatic tracing connects the request across services without code changes: The instrumentation command detects supported packages. With Flask and the Requests library in this example, Cloud Trace shows the overall user request and its backend call as spans in one trace 01:05–03:10(opens in a new tab).
- Manual spans reveal work inside a request: Automatic request tracing does not separately time the example's backend-processing task. Yuri adds a span around that task so its duration can be distinguished from the duration of the complete backend call 02:08–04:13(opens in a new tab).
- The manual version explicitly connects its spans: The frontend puts trace context in HTTP headers; the backend extracts it and uses it when creating its processing span. That context tells the backend which trace to join. The resulting view contains the root request, backend call, and backend-processing spans, showing where the time went 03:10–05:16(opens in a new tab).
Full video: https://www.youtube.com/watch?v=RuyUXBOdjGI(opens in a new tab)