STAGE 08 / LESSON 03
Tracing with OpenTelemetry
OpenTelemetry provides tools and conventions for producing telemetry.
THE IDEA
Understand it.
A trace is made of spans that represent operations, such as handling an API request or calling a database. Context propagation connects related spans across process or service boundaries.
Instrumentation can be automatic, manual or a combination. Choose a backend to receive and analyze telemetry, and control sampling, sensitive attributes and the cost of collection.
SEE IT IN CONTEXT
A trace with nested spans
Trace: GET /tasks
├─ API request handler
│ ├─ authorization check
│ └─ PostgreSQL query
└─ response serializationThis is a conceptual trace. Span timings can show where the request spent time, but you still need context to explain the cause.
LEARN FROM REAL WEBSITES
See it in the real world.
These simplified structures come from public sources. Company systems change, and the sources may describe only one project or an earlier design.
GitHub
GitHub engineering, 2021Adopt a shared tracing standard
GitHub described adopting OpenTelemetry to make telemetry more consistent across infrastructure.
- Instrumented services
- OpenTelemetry tracing
- Connected investigation
What to learn: A common telemetry standard helps connect a request's work across systems; the linked article records the 2021 effort.
Read the source: GitHub OpenTelemetry adoptionChoice Hotels
AWS customer story, date not statedCollect application telemetry
An AWS case study reports Choice Hotels using the AWS Distro for OpenTelemetry to collect traces and metrics.
- Application
- AWS Distro for OpenTelemetry
- Monitoring services
What to learn: Instrumentation produces telemetry that can be sent to monitoring systems. The case study is a vendor account of a particular deployment.
Read the source: Choice Hotels observability case studyTRY IT YOURSELF
Practice.
Why propagate trace context from the API to a worker?
Show one possible answer
It helps relate the worker’s operation to the originating request or job, making a multi-step flow easier to investigate.
GO DEEPER