Distributed tracing
2019-12-10
Overview
The distributed tracing system like the perf in for process, the distributed tracing trace the RPC but perf trace the function calling.
Basic concepts
- Trace, a whole RPC chain tracing, consist by spans (DAG structured)
- Span, a once RPC tracing
- Tow relationship inter span,
ChildOf
,FollowOf
Inter-Process
To tracing inter process, we must record the relationship inter span. So the one method is to propagating the context of span with RPC calling as below:
A --SpanA_context-> B
|--SpanA_context-> C --SpanC_context-> D
| --SpanC_context-> E
Transfer:
context --inject-> Writer/Reader --Extract-> context
The context maybe consists by TraceId
, SpanId
and ParentId
etc.