This is an automated email from the ASF dual-hosted git repository.

Yilialinn pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git


The following commit(s) were added to refs/heads/master by this push:
     new c3a5aad61 docs: fix opentelemetry plugin documentation (#13276)
c3a5aad61 is described below

commit c3a5aad61a27085a627e278d5c51e29602a1d0dd
Author: Yilia Lin <[email protected]>
AuthorDate: Wed Apr 29 09:09:11 2026 +0800

    docs: fix opentelemetry plugin documentation (#13276)
---
 docs/en/latest/plugins/opentelemetry.md |  8 ++++----
 docs/zh/latest/plugins/opentelemetry.md | 14 ++++++++------
 2 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/docs/en/latest/plugins/opentelemetry.md 
b/docs/en/latest/plugins/opentelemetry.md
index e0ab3eb71..298563a13 100644
--- a/docs/en/latest/plugins/opentelemetry.md
+++ b/docs/en/latest/plugins/opentelemetry.md
@@ -5,7 +5,7 @@ keywords:
   - API Gateway
   - Plugin
   - OpenTelemetry
-description: The opentelemetry Plugin instruments APISIX and sends traces to 
OpenTelemetry collector based on the OpenTelemetry specification, in 
binary-encoded OLTP over HTTP.
+description: The opentelemetry Plugin instruments APISIX and sends traces to 
OpenTelemetry collector based on the OpenTelemetry specification, in 
binary-encoded OTLP over HTTP.
 ---
 <!--
 #
@@ -34,7 +34,7 @@ description: The opentelemetry Plugin instruments APISIX and 
sends traces to Ope
 
 The `opentelemetry` Plugin can be used to report tracing data according to the 
[OpenTelemetry 
Specification](https://opentelemetry.io/docs/reference/specification/).
 
-The Plugin only supports binary-encoded [OLTP over 
HTTP](https://opentelemetry.io/docs/reference/specification/protocol/otlp/#otlphttp).
+The Plugin only supports binary-encoded [OTLP over 
HTTP](https://opentelemetry.io/docs/reference/specification/protocol/otlp/#otlphttp).
 
 ## Configurations
 
@@ -52,7 +52,7 @@ admin_key=$(yq '.deployment.admin.admin_key[0].key' 
conf/config.yaml | sed 's/"/
 :::
 
 ```shell
-curl http://127.0.0.1:9180/apisix/admin/plugin_metadata/opentelemetry -H 
"X-API-KEY: $admin_key" -X PUT -d '
+curl http://127.0.0.1:9180/apisix/admin/plugin_metadata/opentelemetry -H 
"X-API-KEY: ${admin_key}" -X PUT -d '
 {
     "trace_id_source": "x-request-id",
     "resource": {
@@ -300,7 +300,7 @@ The following example demonstrates how to configure the 
`opentelemetry` Plugin t
 Configure the plugin metadata to set `set_ngx_var` as true:
 
 ```shell
-curl http://127.0.0.1:9180/apisix/admin/plugin_metadata/opentelemetry -H 
"X-API-KEY: $admin_key" -X PUT -d '
+curl http://127.0.0.1:9180/apisix/admin/plugin_metadata/opentelemetry -H 
"X-API-KEY: ${admin_key}" -X PUT -d '
 {
     "set_ngx_var": true
 }'
diff --git a/docs/zh/latest/plugins/opentelemetry.md 
b/docs/zh/latest/plugins/opentelemetry.md
index ec5769704..fe15e7488 100644
--- a/docs/zh/latest/plugins/opentelemetry.md
+++ b/docs/zh/latest/plugins/opentelemetry.md
@@ -5,7 +5,7 @@ keywords:
   - API 网关
   - Plugin
   - OpenTelemetry
-description: opentelemetry 插件可用于根据 OpenTelemetry 协议规范上报 Traces 数据,该插件仅支持二进制编码的 
OLTP over HTTP。
+description: opentelemetry 插件可用于根据 OpenTelemetry 协议规范上报 Traces 数据,该插件仅支持二进制编码的 
OTLP over HTTP。
 ---
 
 <!--
@@ -33,16 +33,16 @@ description: opentelemetry 插件可用于根据 OpenTelemetry 协议规范上
 
 ## 描述
 
-`opentelemetry` 插件可用于根据 [OpenTelemetry 
Specification](https://opentelemetry.io/docs/reference/specification/) 协议规范上报 
Traces 数据。该插件仅支持二进制编码的 OLTP over HTTP,即请求类型为 `application/x-protobuf` 的数据上报。
+`opentelemetry` 插件可用于根据 [OpenTelemetry 
Specification](https://opentelemetry.io/docs/reference/specification/) 协议规范上报 
Traces 数据。该插件仅支持二进制编码的 OTLP over HTTP,即请求类型为 `application/x-protobuf` 的数据上报。
 
 ## 配置
 
 默认情况下,服务名称、租户 ID、collector 和 batch span processor 
的配置已预配置在[默认配置](https://github.com/apache/apisix/blob/master/apisix/cli/config.lua)中。
 
-您可以通过端点 `apisix/admin/plugin_metadata/opentelemetry` 更改插件的配置,例如:
+你可以通过端点 `apisix/admin/plugin_metadata/opentelemetry` 更改插件的配置,例如:
 
 :::note
-您可以从“config.yaml”获取“admin_key”,并使用以下命令保存到环境变量中:
+你可以从 `config.yaml` 中获取 `admin_key` 并存入环境变量:
 
 ```bash
 admin_key=$(yq '.deployment.admin.admin_key[0].key' conf/config.yaml | sed 
's/"//g')
@@ -51,7 +51,7 @@ admin_key=$(yq '.deployment.admin.admin_key[0].key' 
conf/config.yaml | sed 's/"/
 :::
 
 ```shell
-curl http://127.0.0.1:9180/apisix/admin/plugin_metadata/opentelemetry -H 
"X-API-KEY: $admin_key" -X PUT -d '
+curl http://127.0.0.1:9180/apisix/admin/plugin_metadata/opentelemetry -H 
"X-API-KEY: ${admin_key}" -X PUT -d '
 {
     "trace_id_source": "x-request-id",
     "resource": {
@@ -299,7 +299,7 @@ Attributes:
 配置插件元数据以将 `set_ngx_var` 设置为 true:
 
 ```shell
-curl http://127.0.0.1:9180/apisix/admin/plugin_metadata/opentelemetry -H 
"X-API-KEY: $admin_key" -X PUT -d '
+curl http://127.0.0.1:9180/apisix/admin/plugin_metadata/opentelemetry -H 
"X-API-KEY: ${admin_key}" -X PUT -d '
 {
     "set_ngx_var": true
 }'
@@ -317,6 +317,8 @@ nginx_config:
 
 重新加载 APISIX 以使配置更改生效。
 
+发送请求后,你应该看到如下所示的访问日志条目:
+
 ```text
 {"time": "18/Feb/2024:15:09:00 +0000","opentelemetry_context_traceparent": 
"00-fbd0a38d4ea4a128ff1a688197bc58b0-8f4b9d9970a02629-01","opentelemetry_trace_id":
 "fbd0a38d4ea4a128ff1a688197bc58b0","opentelemetry_span_id": 
"af3dc7642104748a","remote_addr": "172.10.0.1"}
 ```

Reply via email to