-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[zh] Localize context-propagation.md
Signed-off-by: xin.li <[email protected]>
- Loading branch information
Showing
1 changed file
with
91 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
--- | ||
title: 上下文传播 | ||
weight: 10 | ||
description: 了解实现分布式追踪的概念。 | ||
--- | ||
|
||
<!-- | ||
--- | ||
title: Context Propagation | ||
weight: 10 | ||
description: Learn about the concept that enables Distributed Tracing. | ||
--- | ||
--> | ||
|
||
<!-- | ||
With Context Propagation, [Signals](/docs/concepts/signals) can be correlated | ||
with each other, regardless of where they are generated. Although not limited to | ||
tracing, it is what allows [traces](/docs/concepts/signals/traces) to build | ||
causal information about a system across services that are arbitrarily | ||
distributed across process and network boundaries. | ||
--> | ||
通过上下文传播,[信号](/docs/concepts/signals)可以相互关联, | ||
无论它们是在何处生成的。 | ||
尽管它不仅限于链路追踪,但它允许 [trace](/docs/concepts/signals/traces) | ||
跨进程和网络边界任意分布的服务构建相关系统的关联信息。 | ||
|
||
<!-- | ||
We define Context Propagation by two sub-concepts: Context and Propagation. | ||
--> | ||
我们通过两个子概念来定义上下文传播:上下文和传播。 | ||
|
||
<!-- | ||
## Context | ||
A **Context** is an object that contains the information for the sending and | ||
receiving service (or | ||
[execution unit](/docs/specs/otel/glossary/#execution-unit)) to correlate one | ||
signal with another. | ||
--> | ||
## 上下文 | ||
|
||
**上下文**是一个对象,它包含发送和接收服务 | ||
(或[执行单元](/docs/specs/otel/glossary/#execution-unit)) | ||
用于将一个信号与另一个信号关联起来的信息。 | ||
|
||
<!-- | ||
For example, if Service A calls Service B, then a span from Service A whose ID | ||
is in context will be used as the parent span for the next span created in | ||
Service B. The trace ID that is in context will be used for the next span | ||
created in Service B as well, which signifies that the span is part of the same | ||
trace as the span from Service A. | ||
--> | ||
例如,如果服务 A 调用服务 B,那么服务 A 中 ID 在上下文中的 span 将用作服务 | ||
B 中创建的下一个 span 的父 span。 | ||
上下文中的 trace ID 也将用于服务 B 中创建的下一个 span, | ||
这表示该 span 与服务 A 中的 span 属于同一 trace 的一部分。 | ||
|
||
<!-- | ||
## Propagation | ||
**Propagation** is the mechanism that moves context between services and | ||
processes. It serializes or deserializes the context object and provides the | ||
relevant information to be propagated from one service to another. Propagation | ||
is usually handled by instrumentation libraries and is transparent to the user, | ||
but in the event that you need to manually propagate context, you can use | ||
Propagation APIs. | ||
--> | ||
## 传播 | ||
|
||
**传播**是上下文在服务和进程之间移动的机制。 | ||
它序列化或反序列化上下文对象并提供要从一个服务传播到另一个服务的相关信息。 | ||
传播通常由检测库处理并且对用户是透明的,但如果你需要手动传播上下文,则可以使用传播 API。 | ||
|
||
<!-- | ||
OpenTelemetry maintains several official propagators. The default propagator is | ||
using the headers specified by the | ||
[W3C TraceContext](https://www.w3.org/TR/trace-context/) specification. | ||
--> | ||
OpenTelemetry 维护着几个官方传播器。 | ||
默认传播器使用 [W3C 追踪上下文](https://www.w3.org/TR/trace-context/) | ||
规范指定的标头。 | ||
|
||
<!-- | ||
## Specification | ||
To learn more about Context Propagation, see the | ||
[Context specification](/docs/specs/otel/context/). | ||
--> | ||
## 规范 | ||
|
||
要了解有关上下文传播的更多信息,请参阅[上下文规范](/docs/specs/otel/context/)。 |