📈Distributed Tracing
Also known as Tracing, Trace, Span, Request Tracing
Following one request through each part of an app. Each step shows its time.
Think of it like
It is like a parcel tracker. You see every stop the box made and how long it waited at each one.
Example
Checkout takes 3 seconds. The trace shows 2.6 of them are one database query in the stock service, so Jack fixes that query.
Why it matters
Many apps are made of lots of small parts. This is the one way to see which part made a request slow.
Definition
Example code
http
traceparent: 00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01Common mistake
Key takeaways
- 1One request. A trace follows a single journey.
- 2Spans. Each step has its own start and end.
- 3Pass the ID. Every service sends the trace ID on.