Skip to content

Commit

Permalink
[zh] Localize context-propagation.md
Browse files Browse the repository at this point in the history
Signed-off-by: xin.li <xin.li@daocloud.io>
  • Loading branch information
my-git9 committed May 25, 2024
1 parent ddb2212 commit c73ed46
Showing 1 changed file with 91 additions and 0 deletions.
91 changes: 91 additions & 0 deletions content/zh/docs/concepts/context-propagation.md
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.
-->
通过上下文传播,[信号](/zh/docs/concepts/signals)可以相互关联,
无论它们是在何处生成的。
尽管它不仅限于链路追踪,但它允许 [trace](/zh/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.
-->
## 上下文

**上下文**是一个对象,它包含发送和接收服务
(或[执行单元](/zh-cn/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 TraceContext](https://www.w3.org/TR/trace-context/)
规范指定的标头。

<!--
## Specification
To learn more about Context Propagation, see the
[Context specification](/docs/specs/otel/context/).
-->
## 规范

要了解有关上下文传播的更多信息,请参阅[上下文规范](/zh-cn/docs/specs/otel/context/)

0 comments on commit c73ed46

Please sign in to comment.