OpenTracing provides two functions to propagate the trace context: “extract (format, carrier)” and “inject (SpanContext, format, carrier)”. “extract()” retrieves the tracing context from a carrier, usually it is the HTTP header. “inject” puts the tracing context into a carrier, so the tracing chain won’t break. The following is the diagram for “b3-propagation”, which I took from Zipkin.

Trace链路笔记

通过上面的描述,想要了解在 trace 中抽象的两个方法:inject 和 extract。用来关联整个 trace 链路的操作


In OpenTracing, an important concept is called “trace”, which represents one calling chain of a request from the beginning to the end and the identifier is “traceID”. Under a trace, there are many spans, each captures a unit of work inside the calling chain and it is identified by “spanId”. Each span has one parent and all spans of a trace formed a directed acyclic graph(DAG).

Trace链路笔记

通过上面的描述,主要了解到 trace 和 span 的关系


参考文章:

相关文章:

  • 2021-10-27
  • 2021-04-18
  • 2021-06-14
  • 2021-07-07
  • 2021-07-13
  • 2022-03-07
  • 2021-09-13
  • 2021-11-28
猜你喜欢
  • 2021-06-10
  • 2022-12-23
  • 2021-05-02
  • 2021-09-04
  • 2021-11-16
  • 2022-12-23
相关资源
相似解决方案