Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: improve zipkin plugin docs #11891

Merged
merged 13 commits into from
Jan 15, 2025
Prev Previous commit
Next Next commit
fix comments
  • Loading branch information
Yilialinn committed Jan 8, 2025
commit 3f41ac1a6b7b4cf2ba3077b9b8a240c148e69f22
2 changes: 1 addition & 1 deletion docs/en/latest/plugins/prometheus.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ Reload APISIX for changes to take effect.

| Name | Type | Required | Default | Valid values | Description |
| ------------- | ------- | -------- | ------- | ------------ | ------------------------------------------ |
| `prefer_name` | boolean | | False | | If true, export Route/Service name instead of their ID in Prometheus metrics. |
| prefer_name | boolean | | False | | If true, export Route/Service name instead of their ID in Prometheus metrics. |

## Metrics

Expand Down
12 changes: 6 additions & 6 deletions docs/en/latest/plugins/zipkin.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ keywords:
- API Gateway
- Plugin
- Zipkin
description: This document contains information about the Apache zipkin Plugin.
description: Zipkin is an open-source distributed tracing system. The `zipkin` Plugin instruments APISIX and sends traces to Zipkin based on the Zipkin API specification.
Yilialinn marked this conversation as resolved.
Show resolved Hide resolved
---

<!--
Expand Down Expand Up @@ -57,11 +57,11 @@ See the configuration file for configuration options available to all Plugins.

| Name | Type | Required | Default | Valid values | Description |
Yilialinn marked this conversation as resolved.
Show resolved Hide resolved
|--------------|---------|----------|----------------|--------------|---------------------------------------------------------------------------------|
| `string` | string | True | | | Zipkin span endpoint to POST to, such as `http://127.0.0.1:9411/api/v2/spans`. |
|`sample_ratio`| number | True | | [0.00001, 1] | Frequency to sample requests. Setting to `1` means sampling every request. |
|`service_name`| string | False | "APISIX" | | Service name for the Zipkin reporter to be displayed in Zipkin. |
|`server_addr` | string | False |the value of `$server_addr` | IPv4 address | IPv4 address for the Zipkin reporter. For example, you can set this to your external IP address. |
| span_version | integer | False | 2 | [1, 2] | Version of the span type. |
| endpoint | string | True | | | Zipkin span endpoint to POST to, such as `http://127.0.0.1:9411/api/v2/spans`. |
|sample_ratio| number | True | | [0.00001, 1] | Frequency to sample requests. Setting to `1` means sampling every request. |
|service_name| string | False | "APISIX" | | Service name for the Zipkin reporter to be displayed in Zipkin. |
|server_addr | string | False |the value of `$server_addr` | IPv4 address | IPv4 address for the Zipkin reporter. For example, you can set this to your external IP address. |
|span_version | integer | False | 2 | [1, 2] | Version of the span type. |

## Examples

Expand Down
2 changes: 1 addition & 1 deletion docs/zh/latest/plugins/prometheus.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ plugin_attr:

| 名称 | 类型 | 必选项 | 默认值 | 描述 |
| ------------ | --------| ------ | ------ | ----------------------------------------------------- |
|`prefer_name` | boolean | 否 | False | 当设置为 `true` 时,则在`prometheus` 指标中导出路由/服务名称而非它们的 `id`。 |
|prefer_name | boolean | 否 | False | 当设置为 `true` 时,则在`prometheus` 指标中导出路由/服务名称而非它们的 `id`。 |

## 指标

Expand Down
14 changes: 7 additions & 7 deletions docs/zh/latest/plugins/zipkin.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ keywords:
- API 网关
- Plugin
- Zipkin
description: 本文介绍了关于 Apache APISIX zipkin 插件的基本信息及使用方法
description: Zipkin 是一个开源的分布式链路追踪系统。`zipkin` 插件为 APISIX 提供了追踪功能,并根据 Zipkin API 规范将追踪数据上报给 Zipkin
---

<!--
Expand Down Expand Up @@ -57,11 +57,11 @@ plugin_attr:

| 名称 | 类型 | 是否必需 | 默认值 | 有效值 | 描述 |
|--------------|---------|----------|----------------|-------------|------------------|
| `string` | 字符串 | 是 | | | 要 POST 的 Zipkin span 端点,例如 `http://127.0.0.1:9411/api/v2/spans`。 |
|`sample_ratio`| 数字 | 是 | | [0.00001, 1] | 请求采样频率。设置为 `1` 表示对每个请求进行采样。 |
|`service_name`| 字符串 | 否 | "APISIX" | | 在 Zipkin 中显示的服务名称。 |
|`server_addr` | 字符串 | 否 | `$server_addr` 的值 | IPv4 地址 | Zipkin 报告器的 IPv4 地址。例如,可以将其设置为你的外部 IP 地址。 |
|`span_version`| 整数 | 否 | `2` | [1, 2] | span 类型的版本。 |
| endpoint | string | 是 | | | 要 POST 的 Zipkin span 端点,例如 `http://127.0.0.1:9411/api/v2/spans`。 |
|sample_ratio| number | 是 | | [0.00001, 1] | 请求采样频率。设置为 `1` 表示对每个请求进行采样。 |
|service_name| string | 否 | "APISIX" | | 在 Zipkin 中显示的服务名称。 |
|server_addr | string | 否 | `$server_addr` 的值 | IPv4 地址 | Zipkin 报告器的 IPv4 地址。例如,可以将其设置为你的外部 IP 地址。 |
|span_version| integer | 否 | `2` | [1, 2] | span 类型的版本。 |

## 示例

Expand Down Expand Up @@ -243,7 +243,7 @@ curl "http://127.0.0.1:9080/anything"
- `zipkin_trace_id`: 当前 span 的 trace_id
- `zipkin_span_id`: 当前 span 的 span_id

按照以下方式更新配置文件(`./conf/config.yaml`)。你可以自定义访问日志格式以使用 `zipkin` 插件变量,并在 `set_ngx_var` 字段中设置 `zipkin` 变量。
按照以下方式更新配置文件。你可以自定义访问日志格式以使用 `zipkin` 插件变量,并在 `set_ngx_var` 字段中设置 `zipkin` 变量。

```yaml title="conf/config.yaml"
nginx_config:
Expand Down
Loading