You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/04/01 06:34:06 UTC

[GitHub] [apisix] moonming commented on a change in pull request #6616: docs: add datadog document(zh)

moonming commented on a change in pull request #6616:
URL: https://github.com/apache/apisix/pull/6616#discussion_r840273097



##########
File path: docs/zh/latest/plugins/datadog.md
##########
@@ -0,0 +1,147 @@
+---
+title: datadog
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## 简介
+
+`datadog` 是 Apache APISIX 内置的监控插件,可与 [Datadog](https://www.datadoghq.com/)(云应用最常用的监控和可观测性平台之一)无缝集成。`datadog` 插件支持对每个请求和响应周期进行多种指标参数的获取,这些指标参数基本反映了系统的行为和健康状况。
+
+`datadog` 插件通过 UDP 协议将其自定义指标推送给 DogStatsD 服务器,该服务器通过 UDP 连接与 Datadog Agent 捆绑在一起(关于如何安装 Datadog Agent,请参考[Agent](https://docs.datadoghq.com/agent/) )。DogStatsD 基本上是 StatsD 协议的实现,它为 Apache APISIX Agent 收集自定义指标,并将其聚合成单个数据点,发送到配置的 Datadog 服务器。更多关于 DogStatsD 的信息,请参考 [DogStatsD](https://docs.datadoghq.com/developers/dogstatsd/?tab=hostagent) 。
+
+`datadog` 插件具有将多个指标参数组成一个批处理统一推送给外部 Datadog Agent 的能力,并且可以重复使用同一个数据包套接字。
+
+此功能可以有效解决日志数据发送不及时的问题。在创建批处理器之后,如果对 `inactive_timeout` 参数进行配置,那么批处理器会在配置好的时间内自动发送日志数据。如果不进行配置,时间默认为 5s。
+
+关于 Apache APISIX 的批处理程序的更多信息,请参考 [Batch-Processor](../batch-processor.md#配置)
+
+## 属性
+
+| 名称             | 类型   | 必选项  | 默认值      | 有效值       | 描述                                                                                |
+| -----------      | ------ | -----------  | -------      | -----       | ------------------------------------------------------------                               |
+| prefer_name      | boolean | optional    | true         | true/false  | 如果设置为 `false`,将使用路由/服务的 id 值作为插件的 `route_name`,而不是带有参数的标签名称。   |
+
+该插件支持使用批处理程序来聚集和处理条目(日志/数据)的批次。这就避免了插件频繁地提交数据,默认情况下,批处理程序每 `5` 秒或当队列中的数据达到 `1000` 时提交数据。有关信息或自定义批处理程序的参数设置,请参阅[批处理程序](../batch-processor.md#configuration) 配置部分。
+
+## 元数据
+
+| 名称        | 类型    | 必选项 |     默认值        | 有效值         | 描述                                                            |

Review comment:
       all `有效值` are empty, why we need this?

##########
File path: docs/zh/latest/plugins/datadog.md
##########
@@ -0,0 +1,147 @@
+---
+title: datadog
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## 简介
+
+`datadog` 是 Apache APISIX 内置的监控插件,可与 [Datadog](https://www.datadoghq.com/)(云应用最常用的监控和可观测性平台之一)无缝集成。`datadog` 插件支持对每个请求和响应周期进行多种指标参数的获取,这些指标参数基本反映了系统的行为和健康状况。
+
+`datadog` 插件通过 UDP 协议将其自定义指标推送给 DogStatsD 服务器,该服务器通过 UDP 连接与 Datadog Agent 捆绑在一起(关于如何安装 Datadog Agent,请参考[Agent](https://docs.datadoghq.com/agent/) )。DogStatsD 基本上是 StatsD 协议的实现,它为 Apache APISIX Agent 收集自定义指标,并将其聚合成单个数据点,发送到配置的 Datadog 服务器。更多关于 DogStatsD 的信息,请参考 [DogStatsD](https://docs.datadoghq.com/developers/dogstatsd/?tab=hostagent) 。
+
+`datadog` 插件具有将多个指标参数组成一个批处理统一推送给外部 Datadog Agent 的能力,并且可以重复使用同一个数据包套接字。
+
+此功能可以有效解决日志数据发送不及时的问题。在创建批处理器之后,如果对 `inactive_timeout` 参数进行配置,那么批处理器会在配置好的时间内自动发送日志数据。如果不进行配置,时间默认为 5s。
+
+关于 Apache APISIX 的批处理程序的更多信息,请参考 [Batch-Processor](../batch-processor.md#配置)
+
+## 属性
+
+| 名称             | 类型   | 必选项  | 默认值      | 有效值       | 描述                                                                                |
+| -----------      | ------ | -----------  | -------      | -----       | ------------------------------------------------------------                               |
+| prefer_name      | boolean | optional    | true         | true/false  | 如果设置为 `false`,将使用路由/服务的 id 值作为插件的 `route_name`,而不是带有参数的标签名称。   |
+
+该插件支持使用批处理程序来聚集和处理条目(日志/数据)的批次。这就避免了插件频繁地提交数据,默认情况下,批处理程序每 `5` 秒或当队列中的数据达到 `1000` 时提交数据。有关信息或自定义批处理程序的参数设置,请参阅[批处理程序](../batch-processor.md#configuration) 配置部分。
+
+## 元数据
+
+| 名称        | 类型    | 必选项 |     默认值        | 有效值         | 描述                                                            |
+| ----------- | ------  | ----------- |      -------       | -----         | ---------------------------------------------------------------------- |
+| host        | string  | optional    |  "127.0.0.1"       |               | DogStatsD 服务器的主机地址                                      |
+| port        | integer | optional    |    8125            |               | DogStatsD 服务器的主机端口                                         |
+| namespace   | string  | optional    |    "apisix"        |               | 由 APISIX 代理发送的所有自定义参数的前缀。对寻找指标图的实体很有帮助,例如:(apisix.request.counter)。                                        |

Review comment:
       `(apisix.request.counter)` why need brackets?

##########
File path: docs/zh/latest/plugins/datadog.md
##########
@@ -0,0 +1,147 @@
+---
+title: datadog
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## 简介
+
+`datadog` 是 Apache APISIX 内置的监控插件,可与 [Datadog](https://www.datadoghq.com/)(云应用最常用的监控和可观测性平台之一)无缝集成。`datadog` 插件支持对每个请求和响应周期进行多种指标参数的获取,这些指标参数基本反映了系统的行为和健康状况。
+
+`datadog` 插件通过 UDP 协议将其自定义指标推送给 DogStatsD 服务器,该服务器通过 UDP 连接与 Datadog Agent 捆绑在一起(关于如何安装 Datadog Agent,请参考[Agent](https://docs.datadoghq.com/agent/) )。DogStatsD 基本上是 StatsD 协议的实现,它为 Apache APISIX Agent 收集自定义指标,并将其聚合成单个数据点,发送到配置的 Datadog 服务器。更多关于 DogStatsD 的信息,请参考 [DogStatsD](https://docs.datadoghq.com/developers/dogstatsd/?tab=hostagent) 。
+
+`datadog` 插件具有将多个指标参数组成一个批处理统一推送给外部 Datadog Agent 的能力,并且可以重复使用同一个数据包套接字。
+
+此功能可以有效解决日志数据发送不及时的问题。在创建批处理器之后,如果对 `inactive_timeout` 参数进行配置,那么批处理器会在配置好的时间内自动发送日志数据。如果不进行配置,时间默认为 5s。
+
+关于 Apache APISIX 的批处理程序的更多信息,请参考 [Batch-Processor](../batch-processor.md#配置)
+
+## 属性
+
+| 名称             | 类型   | 必选项  | 默认值      | 有效值       | 描述                                                                                |
+| -----------      | ------ | -----------  | -------      | -----       | ------------------------------------------------------------                               |
+| prefer_name      | boolean | optional    | true         | true/false  | 如果设置为 `false`,将使用路由/服务的 id 值作为插件的 `route_name`,而不是带有参数的标签名称。   |
+
+该插件支持使用批处理程序来聚集和处理条目(日志/数据)的批次。这就避免了插件频繁地提交数据,默认情况下,批处理程序每 `5` 秒或当队列中的数据达到 `1000` 时提交数据。有关信息或自定义批处理程序的参数设置,请参阅[批处理程序](../batch-processor.md#configuration) 配置部分。
+
+## 元数据
+
+| 名称        | 类型    | 必选项 |     默认值        | 有效值         | 描述                                                            |
+| ----------- | ------  | ----------- |      -------       | -----         | ---------------------------------------------------------------------- |
+| host        | string  | optional    |  "127.0.0.1"       |               | DogStatsD 服务器的主机地址                                      |
+| port        | integer | optional    |    8125            |               | DogStatsD 服务器的主机端口                                         |
+| namespace   | string  | optional    |    "apisix"        |               | 由 APISIX 代理发送的所有自定义参数的前缀。对寻找指标图的实体很有帮助,例如:(apisix.request.counter)。                                        |
+| constant_tags | array | optional    | [ "source:apisix" ] |              | 静态标签嵌入到生成的指标中。这对某些信号的度量进行分组很有用。 |
+
+要了解更多关于如何有效地编写标签,请访问[这里](https://docs.datadoghq.com/getting_started/tagging/#defining-tags)
+
+## 输出指标
+
+Apache APISIX 代理,对于每个请求响应周期,如果启用了 datadog 插件,就会向 DogStatsD 服务器输出以下指标。
+
+| Metric Name               | StatsD Type   | Description               |
+| -----------               | -----------   | -------                   |
+| Request Counter           | Counter       | 收到的请求数量。   |

Review comment:
       DataDog do NOT has the `Counter` type. https://docs.datadoghq.com/metrics/types/?tab=count#metric-types

##########
File path: docs/zh/latest/plugins/datadog.md
##########
@@ -0,0 +1,147 @@
+---
+title: datadog
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## 简介
+
+`datadog` 是 Apache APISIX 内置的监控插件,可与 [Datadog](https://www.datadoghq.com/)(云应用最常用的监控和可观测性平台之一)无缝集成。`datadog` 插件支持对每个请求和响应周期进行多种指标参数的获取,这些指标参数基本反映了系统的行为和健康状况。
+
+`datadog` 插件通过 UDP 协议将其自定义指标推送给 DogStatsD 服务器,该服务器通过 UDP 连接与 Datadog Agent 捆绑在一起(关于如何安装 Datadog Agent,请参考[Agent](https://docs.datadoghq.com/agent/) )。DogStatsD 基本上是 StatsD 协议的实现,它为 Apache APISIX Agent 收集自定义指标,并将其聚合成单个数据点,发送到配置的 Datadog 服务器。更多关于 DogStatsD 的信息,请参考 [DogStatsD](https://docs.datadoghq.com/developers/dogstatsd/?tab=hostagent) 。
+
+`datadog` 插件具有将多个指标参数组成一个批处理统一推送给外部 Datadog Agent 的能力,并且可以重复使用同一个数据包套接字。
+
+此功能可以有效解决日志数据发送不及时的问题。在创建批处理器之后,如果对 `inactive_timeout` 参数进行配置,那么批处理器会在配置好的时间内自动发送日志数据。如果不进行配置,时间默认为 5s。
+
+关于 Apache APISIX 的批处理程序的更多信息,请参考 [Batch-Processor](../batch-processor.md#配置)
+
+## 属性
+
+| 名称             | 类型   | 必选项  | 默认值      | 有效值       | 描述                                                                                |
+| -----------      | ------ | -----------  | -------      | -----       | ------------------------------------------------------------                               |
+| prefer_name      | boolean | optional    | true         | true/false  | 如果设置为 `false`,将使用路由/服务的 id 值作为插件的 `route_name`,而不是带有参数的标签名称。   |
+
+该插件支持使用批处理程序来聚集和处理条目(日志/数据)的批次。这就避免了插件频繁地提交数据,默认情况下,批处理程序每 `5` 秒或当队列中的数据达到 `1000` 时提交数据。有关信息或自定义批处理程序的参数设置,请参阅[批处理程序](../batch-processor.md#configuration) 配置部分。
+
+## 元数据
+
+| 名称        | 类型    | 必选项 |     默认值        | 有效值         | 描述                                                            |
+| ----------- | ------  | ----------- |      -------       | -----         | ---------------------------------------------------------------------- |
+| host        | string  | optional    |  "127.0.0.1"       |               | DogStatsD 服务器的主机地址                                      |
+| port        | integer | optional    |    8125            |               | DogStatsD 服务器的主机端口                                         |
+| namespace   | string  | optional    |    "apisix"        |               | 由 APISIX 代理发送的所有自定义参数的前缀。对寻找指标图的实体很有帮助,例如:(apisix.request.counter)。                                        |
+| constant_tags | array | optional    | [ "source:apisix" ] |              | 静态标签嵌入到生成的指标中。这对某些信号的度量进行分组很有用。 |
+
+要了解更多关于如何有效地编写标签,请访问[这里](https://docs.datadoghq.com/getting_started/tagging/#defining-tags)
+
+## 输出指标
+
+Apache APISIX 代理,对于每个请求响应周期,如果启用了 datadog 插件,就会向 DogStatsD 服务器输出以下指标。
+
+| Metric Name               | StatsD Type   | Description               |
+| -----------               | -----------   | -------                   |
+| Request Counter           | Counter       | 收到的请求数量。   |
+| Request Latency           | Histogram     | 处理该请求所需的时间(以毫秒为单位)。 |
+| Upstream latency          | Histogram     | 代理请求到上游服务器直到收到响应所需的时间(以毫秒为单位)。 |
+| APISIX Latency            | Histogram     | APISIX 代理处理该请求的时间(以毫秒为单位)。|
+| Ingress Size              | Timer         | 以字节为单位的请求体大小。 |

Review comment:
       ditto

##########
File path: docs/zh/latest/plugins/datadog.md
##########
@@ -0,0 +1,147 @@
+---
+title: datadog
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## 简介
+
+`datadog` 是 Apache APISIX 内置的监控插件,可与 [Datadog](https://www.datadoghq.com/)(云应用最常用的监控和可观测性平台之一)无缝集成。`datadog` 插件支持对每个请求和响应周期进行多种指标参数的获取,这些指标参数基本反映了系统的行为和健康状况。
+
+`datadog` 插件通过 UDP 协议将其自定义指标推送给 DogStatsD 服务器,该服务器通过 UDP 连接与 Datadog Agent 捆绑在一起(关于如何安装 Datadog Agent,请参考[Agent](https://docs.datadoghq.com/agent/) )。DogStatsD 基本上是 StatsD 协议的实现,它为 Apache APISIX Agent 收集自定义指标,并将其聚合成单个数据点,发送到配置的 Datadog 服务器。更多关于 DogStatsD 的信息,请参考 [DogStatsD](https://docs.datadoghq.com/developers/dogstatsd/?tab=hostagent) 。
+
+`datadog` 插件具有将多个指标参数组成一个批处理统一推送给外部 Datadog Agent 的能力,并且可以重复使用同一个数据包套接字。
+
+此功能可以有效解决日志数据发送不及时的问题。在创建批处理器之后,如果对 `inactive_timeout` 参数进行配置,那么批处理器会在配置好的时间内自动发送日志数据。如果不进行配置,时间默认为 5s。
+
+关于 Apache APISIX 的批处理程序的更多信息,请参考 [Batch-Processor](../batch-processor.md#配置)
+
+## 属性
+
+| 名称             | 类型   | 必选项  | 默认值      | 有效值       | 描述                                                                                |
+| -----------      | ------ | -----------  | -------      | -----       | ------------------------------------------------------------                               |
+| prefer_name      | boolean | optional    | true         | true/false  | 如果设置为 `false`,将使用路由/服务的 id 值作为插件的 `route_name`,而不是带有参数的标签名称。   |
+
+该插件支持使用批处理程序来聚集和处理条目(日志/数据)的批次。这就避免了插件频繁地提交数据,默认情况下,批处理程序每 `5` 秒或当队列中的数据达到 `1000` 时提交数据。有关信息或自定义批处理程序的参数设置,请参阅[批处理程序](../batch-processor.md#configuration) 配置部分。
+
+## 元数据
+
+| 名称        | 类型    | 必选项 |     默认值        | 有效值         | 描述                                                            |
+| ----------- | ------  | ----------- |      -------       | -----         | ---------------------------------------------------------------------- |
+| host        | string  | optional    |  "127.0.0.1"       |               | DogStatsD 服务器的主机地址                                      |
+| port        | integer | optional    |    8125            |               | DogStatsD 服务器的主机端口                                         |
+| namespace   | string  | optional    |    "apisix"        |               | 由 APISIX 代理发送的所有自定义参数的前缀。对寻找指标图的实体很有帮助,例如:(apisix.request.counter)。                                        |
+| constant_tags | array | optional    | [ "source:apisix" ] |              | 静态标签嵌入到生成的指标中。这对某些信号的度量进行分组很有用。 |
+
+要了解更多关于如何有效地编写标签,请访问[这里](https://docs.datadoghq.com/getting_started/tagging/#defining-tags)
+
+## 输出指标
+
+Apache APISIX 代理,对于每个请求响应周期,如果启用了 datadog 插件,就会向 DogStatsD 服务器输出以下指标。

Review comment:
       Do not understand

##########
File path: docs/zh/latest/plugins/datadog.md
##########
@@ -0,0 +1,147 @@
+---
+title: datadog
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## 简介
+
+`datadog` 是 Apache APISIX 内置的监控插件,可与 [Datadog](https://www.datadoghq.com/)(云应用最常用的监控和可观测性平台之一)无缝集成。`datadog` 插件支持对每个请求和响应周期进行多种指标参数的获取,这些指标参数基本反映了系统的行为和健康状况。
+
+`datadog` 插件通过 UDP 协议将其自定义指标推送给 DogStatsD 服务器,该服务器通过 UDP 连接与 Datadog Agent 捆绑在一起(关于如何安装 Datadog Agent,请参考[Agent](https://docs.datadoghq.com/agent/) )。DogStatsD 基本上是 StatsD 协议的实现,它为 Apache APISIX Agent 收集自定义指标,并将其聚合成单个数据点,发送到配置的 Datadog 服务器。更多关于 DogStatsD 的信息,请参考 [DogStatsD](https://docs.datadoghq.com/developers/dogstatsd/?tab=hostagent) 。
+
+`datadog` 插件具有将多个指标参数组成一个批处理统一推送给外部 Datadog Agent 的能力,并且可以重复使用同一个数据包套接字。
+
+此功能可以有效解决日志数据发送不及时的问题。在创建批处理器之后,如果对 `inactive_timeout` 参数进行配置,那么批处理器会在配置好的时间内自动发送日志数据。如果不进行配置,时间默认为 5s。
+
+关于 Apache APISIX 的批处理程序的更多信息,请参考 [Batch-Processor](../batch-processor.md#配置)
+
+## 属性
+
+| 名称             | 类型   | 必选项  | 默认值      | 有效值       | 描述                                                                                |
+| -----------      | ------ | -----------  | -------      | -----       | ------------------------------------------------------------                               |
+| prefer_name      | boolean | optional    | true         | true/false  | 如果设置为 `false`,将使用路由/服务的 id 值作为插件的 `route_name`,而不是带有参数的标签名称。   |
+
+该插件支持使用批处理程序来聚集和处理条目(日志/数据)的批次。这就避免了插件频繁地提交数据,默认情况下,批处理程序每 `5` 秒或当队列中的数据达到 `1000` 时提交数据。有关信息或自定义批处理程序的参数设置,请参阅[批处理程序](../batch-processor.md#configuration) 配置部分。
+
+## 元数据
+
+| 名称        | 类型    | 必选项 |     默认值        | 有效值         | 描述                                                            |
+| ----------- | ------  | ----------- |      -------       | -----         | ---------------------------------------------------------------------- |
+| host        | string  | optional    |  "127.0.0.1"       |               | DogStatsD 服务器的主机地址                                      |
+| port        | integer | optional    |    8125            |               | DogStatsD 服务器的主机端口                                         |
+| namespace   | string  | optional    |    "apisix"        |               | 由 APISIX 代理发送的所有自定义参数的前缀。对寻找指标图的实体很有帮助,例如:(apisix.request.counter)。                                        |
+| constant_tags | array | optional    | [ "source:apisix" ] |              | 静态标签嵌入到生成的指标中。这对某些信号的度量进行分组很有用。 |
+
+要了解更多关于如何有效地编写标签,请访问[这里](https://docs.datadoghq.com/getting_started/tagging/#defining-tags)
+
+## 输出指标
+
+Apache APISIX 代理,对于每个请求响应周期,如果启用了 datadog 插件,就会向 DogStatsD 服务器输出以下指标。
+
+| Metric Name               | StatsD Type   | Description               |
+| -----------               | -----------   | -------                   |
+| Request Counter           | Counter       | 收到的请求数量。   |
+| Request Latency           | Histogram     | 处理该请求所需的时间(以毫秒为单位)。 |
+| Upstream latency          | Histogram     | 代理请求到上游服务器直到收到响应所需的时间(以毫秒为单位)。 |
+| APISIX Latency            | Histogram     | APISIX 代理处理该请求的时间(以毫秒为单位)。|
+| Ingress Size              | Timer         | 以字节为单位的请求体大小。 |

Review comment:
       `TIMER metric type in DogStatsD is an implementation of HISTOGRAM metric type (not to be confused with timers in the standard StatsD). It measures timing data only: for example, the amount of time a section of code takes to execute.
   `
   why the type is Timer? https://docs.datadoghq.com/metrics/dogstatsd_metrics_submission/#timer

##########
File path: docs/zh/latest/plugins/datadog.md
##########
@@ -0,0 +1,147 @@
+---
+title: datadog
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## 简介
+
+`datadog` 是 Apache APISIX 内置的监控插件,可与 [Datadog](https://www.datadoghq.com/)(云应用最常用的监控和可观测性平台之一)无缝集成。`datadog` 插件支持对每个请求和响应周期进行多种指标参数的获取,这些指标参数基本反映了系统的行为和健康状况。
+
+`datadog` 插件通过 UDP 协议将其自定义指标推送给 DogStatsD 服务器,该服务器通过 UDP 连接与 Datadog Agent 捆绑在一起(关于如何安装 Datadog Agent,请参考[Agent](https://docs.datadoghq.com/agent/) )。DogStatsD 基本上是 StatsD 协议的实现,它为 Apache APISIX Agent 收集自定义指标,并将其聚合成单个数据点,发送到配置的 Datadog 服务器。更多关于 DogStatsD 的信息,请参考 [DogStatsD](https://docs.datadoghq.com/developers/dogstatsd/?tab=hostagent) 。
+
+`datadog` 插件具有将多个指标参数组成一个批处理统一推送给外部 Datadog Agent 的能力,并且可以重复使用同一个数据包套接字。
+
+此功能可以有效解决日志数据发送不及时的问题。在创建批处理器之后,如果对 `inactive_timeout` 参数进行配置,那么批处理器会在配置好的时间内自动发送日志数据。如果不进行配置,时间默认为 5s。
+
+关于 Apache APISIX 的批处理程序的更多信息,请参考 [Batch-Processor](../batch-processor.md#配置)
+
+## 属性
+
+| 名称             | 类型   | 必选项  | 默认值      | 有效值       | 描述                                                                                |
+| -----------      | ------ | -----------  | -------      | -----       | ------------------------------------------------------------                               |
+| prefer_name      | boolean | optional    | true         | true/false  | 如果设置为 `false`,将使用路由/服务的 id 值作为插件的 `route_name`,而不是带有参数的标签名称。   |
+
+该插件支持使用批处理程序来聚集和处理条目(日志/数据)的批次。这就避免了插件频繁地提交数据,默认情况下,批处理程序每 `5` 秒或当队列中的数据达到 `1000` 时提交数据。有关信息或自定义批处理程序的参数设置,请参阅[批处理程序](../batch-processor.md#configuration) 配置部分。
+
+## 元数据
+
+| 名称        | 类型    | 必选项 |     默认值        | 有效值         | 描述                                                            |
+| ----------- | ------  | ----------- |      -------       | -----         | ---------------------------------------------------------------------- |
+| host        | string  | optional    |  "127.0.0.1"       |               | DogStatsD 服务器的主机地址                                      |
+| port        | integer | optional    |    8125            |               | DogStatsD 服务器的主机端口                                         |
+| namespace   | string  | optional    |    "apisix"        |               | 由 APISIX 代理发送的所有自定义参数的前缀。对寻找指标图的实体很有帮助,例如:(apisix.request.counter)。                                        |
+| constant_tags | array | optional    | [ "source:apisix" ] |              | 静态标签嵌入到生成的指标中。这对某些信号的度量进行分组很有用。 |
+
+要了解更多关于如何有效地编写标签,请访问[这里](https://docs.datadoghq.com/getting_started/tagging/#defining-tags)
+
+## 输出指标
+
+Apache APISIX 代理,对于每个请求响应周期,如果启用了 datadog 插件,就会向 DogStatsD 服务器输出以下指标。
+
+| Metric Name               | StatsD Type   | Description               |
+| -----------               | -----------   | -------                   |
+| Request Counter           | Counter       | 收到的请求数量。   |
+| Request Latency           | Histogram     | 处理该请求所需的时间(以毫秒为单位)。 |

Review comment:
       why Latency's type is Histogram?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org