RocMarshal commented on a change in pull request #19023:
URL: https://github.com/apache/flink/pull/19023#discussion_r832827432



##########
File path: docs/content.zh/docs/deployment/metric_reporters.md
##########
@@ -221,26 +226,27 @@ metrics.reporter.stsd.port: 8125
 metrics.reporter.stsd.interval: 60 SECONDS
 ```
 
+<a name="datadog"></a>
+
 ### Datadog
 #### (org.apache.flink.metrics.datadog.DatadogHttpReporter)
 
-Note any variables in Flink metrics, such as `<host>`, `<job_name>`, 
`<tm_id>`, `<subtask_index>`, `<task_name>`, and `<operator_name>`,
-will be sent to Datadog as tags. Tags will look like `host:localhost` and 
`job_name:myjobname`.
+注意,使用 Datadog 时候,Flink 运行指标中的任何变量,例如`<host>`、`<job_name>`、 `<tm_id>`、 
`<subtask_index>`、`<task_name>`、 
`<operator_name>`,都会被当作`host:localhost`、`job_name:myjobname` 这样的 tag 发送。
 
-<span class="label label-info">Note</span> Histograms are exposed as a series 
of gauges following the naming convention of Datadog histograms 
(`<metric_name>.<aggregation>`).
-The `min` aggregation is reported by default, whereas `sum` is not available.
-In contrast to Datadog-provided Histograms the reported aggregations are not 
computed for a specific reporting interval.
+<span class="label label-info">注意</span> 按照 Datedog 的 Histograms 
命名约定,Histograms 类的运行指标会作为一系列 gauges 显示(`<metric_name>.<aggregation>`)。
+默认情况下 `min` 即最小值被发送到 Datedog,`sum` 不会被发送。
+与 Datadog 提供的 Histograms 相比,Histograms 类的运行指标不会按照指定的发送间隔进行聚合计算  。

Review comment:
       ```suggestion
   与 Datadog 提供的 Histograms 相比,Histograms 类的运行指标不会按照指定的发送间隔进行聚合计算。
   ```

##########
File path: docs/content.zh/docs/deployment/metric_reporters.md
##########
@@ -63,60 +65,57 @@ metrics.reporter.my_other_reporter.host: 192.168.1.1
 metrics.reporter.my_other_reporter.port: 10000
 ```
 
-**Important:** The jar containing the reporter must be accessible when Flink 
is started. Reporters that support the
- `factory.class` property can be loaded as [plugins]({{< ref 
"docs/deployment/filesystems/plugins" >}}). Otherwise the jar must be placed
- in the /lib folder. Reporters that are shipped with Flink (i.e., all 
reporters documented on this page) are available
- by default.
+**注意**:Flink 在启动时必须能访问到发送器所属的 jar 包。支持 `factory.class` 配置的发送器可以被加载为 
[plugins]({{< ref "zh/docs/deployment/filesystems/plugins" >}}),没有该项配置的发送器需要保证 
jar 包在 /lib 目录下。Flink 自带的发送器(文档中已经列出的发送器)无需做其他配置,开箱即用。
+
+你可以实现 `org.apache.flink.metrics.reporter.MetricReporter` 接口来自定义发送器,并实现 
`Scheduled` 接口让发送器周期性地将运行时指标发送出去。
+另外也可以实现 `MetricReporterFactory` 接口,让发送器作为插件被 Flink 导入。
 
-You can write your own `Reporter` by implementing the 
`org.apache.flink.metrics.reporter.MetricReporter` interface.
-If the Reporter should send out reports regularly you have to implement the 
`Scheduled` interface as well.
-By additionally implementing a `MetricReporterFactory` your reporter can also 
be loaded as a plugin.
+接下来的部分列出了 Flink 支持的发送器。
 
-The following sections list the supported reporters.
+<a name="jmx"></a>
 
-### JMX 
+### JMX
 #### (org.apache.flink.metrics.jmx.JMXReporter)
 
-You don't have to include an additional dependency since the JMX reporter is 
available by default
-but not activated.
+JMX 发送器默认可直接使用,无需引入其他依赖。
 
-Parameters:
+参数:
 
-- `port` - (optional) the port on which JMX listens for connections.
-In order to be able to run several instances of the reporter on one host (e.g. 
when one TaskManager is colocated with the JobManager) it is advisable to use a 
port range like `9250-9260`.
-When a range is specified the actual port is shown in the relevant job or task 
manager log.
-If this setting is set Flink will start an extra JMX connector for the given 
port/range.
-Metrics are always available on the default local JMX interface.
+- `port` -(可选的) JMX 监听的端口。
+  如果需要在一台机器上运行多个发送器示例进行监控时(比如 TaskManger 与 JobManager 在一台机器上运行时),建议将端口号配置为 
`9250-9260` 这样的区间,
+  实际使用的端口会在相关作业 或 TaskManger 的日志中显示。如果设置了这个选项, Flink 会按照配置的端口号或端口区间开启 JMX 发送器,
+  这些运行时指标可以通过本地的 JMX 默认接口访问到。
 
-Example configuration:
+配置示例:
 
 ```yaml
 metrics.reporter.jmx.factory.class: 
org.apache.flink.metrics.jmx.JMXReporterFactory
 metrics.reporter.jmx.port: 8789
 ```
 
-Metrics exposed through JMX are identified by a domain and a list of 
key-properties, which together form the object name.
+通过 JMX 发送的指标由“域“和”key-properties”列表组成,”域“总以 `org.apache.flink` 
开头,后跟一个“通用指标标识符”。
+
+“通用指标标识符”不像一般系统的指标度量那样按照所度量范围的形式进行命名,而是不包含任何变量,如同常量一样,每个作业都有。
+例如,`org.apache.flink.job.task.numBytesOut` 就是一个”域“。
+
+“key-property”列表包含所有指标的具体变量值,无论配置的度量范围格式如何,都能关联到指定的指标。
 
-The domain always begins with `org.apache.flink` followed by a generalized 
metric identifier. In contrast to the usual
-identifier it is not affected by scope-formats, does not contain any variables 
and is constant across jobs.
-An example for such a domain would be `org.apache.flink.job.task.numBytesOut`.
+例如`host=localhost,job_name=MyJob,task_name=MyTask` 就是一个“key-property”列表。
 
-The key-property list contains the values for all variables, regardless of 
configured scope formats, that are associated
-with a given metric.
-An example for such a list would be 
`host=localhost,job_name=MyJob,task_name=MyTask`.
+总结来说,”域“标注出了某个指标的类,“key-property”列表标注出了该指标的一个(或者多个)实例。

Review comment:
       ```suggestion
   总结来说,”域“标注出了某个指标的类,“key-property” 列表标注出了该指标的一个(或者多个)实例。
   ```

##########
File path: docs/content.zh/docs/deployment/metric_reporters.md
##########
@@ -221,26 +226,27 @@ metrics.reporter.stsd.port: 8125
 metrics.reporter.stsd.interval: 60 SECONDS
 ```
 
+<a name="datadog"></a>
+
 ### Datadog
 #### (org.apache.flink.metrics.datadog.DatadogHttpReporter)
 
-Note any variables in Flink metrics, such as `<host>`, `<job_name>`, 
`<tm_id>`, `<subtask_index>`, `<task_name>`, and `<operator_name>`,
-will be sent to Datadog as tags. Tags will look like `host:localhost` and 
`job_name:myjobname`.
+注意,使用 Datadog 时候,Flink 运行指标中的任何变量,例如`<host>`、`<job_name>`、 `<tm_id>`、 
`<subtask_index>`、`<task_name>`、 
`<operator_name>`,都会被当作`host:localhost`、`job_name:myjobname` 这样的 tag 发送。
 
-<span class="label label-info">Note</span> Histograms are exposed as a series 
of gauges following the naming convention of Datadog histograms 
(`<metric_name>.<aggregation>`).
-The `min` aggregation is reported by default, whereas `sum` is not available.
-In contrast to Datadog-provided Histograms the reported aggregations are not 
computed for a specific reporting interval.
+<span class="label label-info">注意</span> 按照 Datedog 的 Histograms 
命名约定,Histograms 类的运行指标会作为一系列 gauges 显示(`<metric_name>.<aggregation>`)。
+默认情况下 `min` 即最小值被发送到 Datedog,`sum` 不会被发送。
+与 Datadog 提供的 Histograms 相比,Histograms 类的运行指标不会按照指定的发送间隔进行聚合计算  。
 
-Parameters:
+参数:
 
-- `apikey` - the Datadog API key
-- `tags` - (optional) the global tags that will be applied to metrics when 
sending to Datadog. Tags should be separated by comma only
-- `proxyHost` - (optional) The proxy host to use when sending to Datadog.
-- `proxyPort` - (optional) The proxy port to use when sending to Datadog, 
defaults to 8080.
-- `dataCenter` - (optional) The data center (`EU`/`US`) to connect to, 
defaults to `US`.
-- `maxMetricsPerRequest` - (optional) The maximum number of metrics to include 
in each request, defaults to 2000.
+- `apikey` - Datadog 的 API KEY。
+- `tags` - (可选的) 发送到 Datadog 时将会转换为指标的全局 tag。tag 间只能以逗号分隔。
+- `proxyHost` - (可选的) 发送到 Datadog 时使用的代理主机。
+- `proxyPort` - (可选的) 发送到 Datadog 时使用的代理端口,默认为 8080。
+- `dataCenter` - (可选的) 要连接的数据中心 (`EU`/`US`),默认为 `US`。
+- `maxMetricsPerRequest` - (可选的) 每次请求携带的最大运行指标个数,默认为 2000。

Review comment:
       ```suggestion
   - `maxMetricsPerRequest` - (可选的)每次请求携带的最大运行指标个数,默认为 2000。
   ```

##########
File path: docs/content.zh/docs/deployment/metric_reporters.md
##########
@@ -221,26 +226,27 @@ metrics.reporter.stsd.port: 8125
 metrics.reporter.stsd.interval: 60 SECONDS
 ```
 
+<a name="datadog"></a>
+
 ### Datadog
 #### (org.apache.flink.metrics.datadog.DatadogHttpReporter)
 
-Note any variables in Flink metrics, such as `<host>`, `<job_name>`, 
`<tm_id>`, `<subtask_index>`, `<task_name>`, and `<operator_name>`,
-will be sent to Datadog as tags. Tags will look like `host:localhost` and 
`job_name:myjobname`.
+注意,使用 Datadog 时候,Flink 运行指标中的任何变量,例如`<host>`、`<job_name>`、 `<tm_id>`、 
`<subtask_index>`、`<task_name>`、 
`<operator_name>`,都会被当作`host:localhost`、`job_name:myjobname` 这样的 tag 发送。
 
-<span class="label label-info">Note</span> Histograms are exposed as a series 
of gauges following the naming convention of Datadog histograms 
(`<metric_name>.<aggregation>`).
-The `min` aggregation is reported by default, whereas `sum` is not available.
-In contrast to Datadog-provided Histograms the reported aggregations are not 
computed for a specific reporting interval.
+<span class="label label-info">注意</span> 按照 Datedog 的 Histograms 
命名约定,Histograms 类的运行指标会作为一系列 gauges 显示(`<metric_name>.<aggregation>`)。
+默认情况下 `min` 即最小值被发送到 Datedog,`sum` 不会被发送。
+与 Datadog 提供的 Histograms 相比,Histograms 类的运行指标不会按照指定的发送间隔进行聚合计算  。
 
-Parameters:
+参数:
 
-- `apikey` - the Datadog API key
-- `tags` - (optional) the global tags that will be applied to metrics when 
sending to Datadog. Tags should be separated by comma only
-- `proxyHost` - (optional) The proxy host to use when sending to Datadog.
-- `proxyPort` - (optional) The proxy port to use when sending to Datadog, 
defaults to 8080.
-- `dataCenter` - (optional) The data center (`EU`/`US`) to connect to, 
defaults to `US`.
-- `maxMetricsPerRequest` - (optional) The maximum number of metrics to include 
in each request, defaults to 2000.
+- `apikey` - Datadog 的 API KEY。
+- `tags` - (可选的) 发送到 Datadog 时将会转换为指标的全局 tag。tag 间只能以逗号分隔。

Review comment:
       ```suggestion
   - `tags` - (可选的)发送到 Datadog 时将会转换为指标的全局 tag。tag 间只能以逗号分隔。
   ```

##########
File path: docs/content.zh/docs/deployment/metric_reporters.md
##########
@@ -221,26 +226,27 @@ metrics.reporter.stsd.port: 8125
 metrics.reporter.stsd.interval: 60 SECONDS
 ```
 
+<a name="datadog"></a>
+
 ### Datadog
 #### (org.apache.flink.metrics.datadog.DatadogHttpReporter)
 
-Note any variables in Flink metrics, such as `<host>`, `<job_name>`, 
`<tm_id>`, `<subtask_index>`, `<task_name>`, and `<operator_name>`,
-will be sent to Datadog as tags. Tags will look like `host:localhost` and 
`job_name:myjobname`.
+注意,使用 Datadog 时候,Flink 运行指标中的任何变量,例如`<host>`、`<job_name>`、 `<tm_id>`、 
`<subtask_index>`、`<task_name>`、 
`<operator_name>`,都会被当作`host:localhost`、`job_name:myjobname` 这样的 tag 发送。
 
-<span class="label label-info">Note</span> Histograms are exposed as a series 
of gauges following the naming convention of Datadog histograms 
(`<metric_name>.<aggregation>`).
-The `min` aggregation is reported by default, whereas `sum` is not available.
-In contrast to Datadog-provided Histograms the reported aggregations are not 
computed for a specific reporting interval.
+<span class="label label-info">注意</span> 按照 Datedog 的 Histograms 
命名约定,Histograms 类的运行指标会作为一系列 gauges 显示(`<metric_name>.<aggregation>`)。
+默认情况下 `min` 即最小值被发送到 Datedog,`sum` 不会被发送。
+与 Datadog 提供的 Histograms 相比,Histograms 类的运行指标不会按照指定的发送间隔进行聚合计算  。
 
-Parameters:
+参数:
 
-- `apikey` - the Datadog API key
-- `tags` - (optional) the global tags that will be applied to metrics when 
sending to Datadog. Tags should be separated by comma only
-- `proxyHost` - (optional) The proxy host to use when sending to Datadog.
-- `proxyPort` - (optional) The proxy port to use when sending to Datadog, 
defaults to 8080.
-- `dataCenter` - (optional) The data center (`EU`/`US`) to connect to, 
defaults to `US`.
-- `maxMetricsPerRequest` - (optional) The maximum number of metrics to include 
in each request, defaults to 2000.
+- `apikey` - Datadog 的 API KEY。
+- `tags` - (可选的) 发送到 Datadog 时将会转换为指标的全局 tag。tag 间只能以逗号分隔。
+- `proxyHost` - (可选的) 发送到 Datadog 时使用的代理主机。
+- `proxyPort` - (可选的) 发送到 Datadog 时使用的代理端口,默认为 8080。
+- `dataCenter` - (可选的) 要连接的数据中心 (`EU`/`US`),默认为 `US`。

Review comment:
       ```suggestion
   - `dataCenter` - (可选的)要连接的数据中心(`EU`/`US`),默认为 `US`。
   ```

##########
File path: docs/content.zh/docs/deployment/metric_reporters.md
##########
@@ -221,26 +226,27 @@ metrics.reporter.stsd.port: 8125
 metrics.reporter.stsd.interval: 60 SECONDS
 ```
 
+<a name="datadog"></a>
+
 ### Datadog
 #### (org.apache.flink.metrics.datadog.DatadogHttpReporter)
 
-Note any variables in Flink metrics, such as `<host>`, `<job_name>`, 
`<tm_id>`, `<subtask_index>`, `<task_name>`, and `<operator_name>`,
-will be sent to Datadog as tags. Tags will look like `host:localhost` and 
`job_name:myjobname`.
+注意,使用 Datadog 时候,Flink 运行指标中的任何变量,例如`<host>`、`<job_name>`、 `<tm_id>`、 
`<subtask_index>`、`<task_name>`、 
`<operator_name>`,都会被当作`host:localhost`、`job_name:myjobname` 这样的 tag 发送。
 
-<span class="label label-info">Note</span> Histograms are exposed as a series 
of gauges following the naming convention of Datadog histograms 
(`<metric_name>.<aggregation>`).
-The `min` aggregation is reported by default, whereas `sum` is not available.
-In contrast to Datadog-provided Histograms the reported aggregations are not 
computed for a specific reporting interval.
+<span class="label label-info">注意</span> 按照 Datedog 的 Histograms 
命名约定,Histograms 类的运行指标会作为一系列 gauges 显示(`<metric_name>.<aggregation>`)。
+默认情况下 `min` 即最小值被发送到 Datedog,`sum` 不会被发送。
+与 Datadog 提供的 Histograms 相比,Histograms 类的运行指标不会按照指定的发送间隔进行聚合计算  。
 
-Parameters:
+参数:
 
-- `apikey` - the Datadog API key
-- `tags` - (optional) the global tags that will be applied to metrics when 
sending to Datadog. Tags should be separated by comma only
-- `proxyHost` - (optional) The proxy host to use when sending to Datadog.
-- `proxyPort` - (optional) The proxy port to use when sending to Datadog, 
defaults to 8080.
-- `dataCenter` - (optional) The data center (`EU`/`US`) to connect to, 
defaults to `US`.
-- `maxMetricsPerRequest` - (optional) The maximum number of metrics to include 
in each request, defaults to 2000.
+- `apikey` - Datadog 的 API KEY。
+- `tags` - (可选的) 发送到 Datadog 时将会转换为指标的全局 tag。tag 间只能以逗号分隔。
+- `proxyHost` - (可选的) 发送到 Datadog 时使用的代理主机。

Review comment:
       ```suggestion
   - `proxyHost` - (可选的)发送到 Datadog 时使用的代理主机。
   ```

##########
File path: docs/content.zh/docs/deployment/metric_reporters.md
##########
@@ -221,26 +226,27 @@ metrics.reporter.stsd.port: 8125
 metrics.reporter.stsd.interval: 60 SECONDS
 ```
 
+<a name="datadog"></a>
+
 ### Datadog
 #### (org.apache.flink.metrics.datadog.DatadogHttpReporter)
 
-Note any variables in Flink metrics, such as `<host>`, `<job_name>`, 
`<tm_id>`, `<subtask_index>`, `<task_name>`, and `<operator_name>`,
-will be sent to Datadog as tags. Tags will look like `host:localhost` and 
`job_name:myjobname`.
+注意,使用 Datadog 时候,Flink 运行指标中的任何变量,例如`<host>`、`<job_name>`、 `<tm_id>`、 
`<subtask_index>`、`<task_name>`、 
`<operator_name>`,都会被当作`host:localhost`、`job_name:myjobname` 这样的 tag 发送。
 
-<span class="label label-info">Note</span> Histograms are exposed as a series 
of gauges following the naming convention of Datadog histograms 
(`<metric_name>.<aggregation>`).
-The `min` aggregation is reported by default, whereas `sum` is not available.
-In contrast to Datadog-provided Histograms the reported aggregations are not 
computed for a specific reporting interval.
+<span class="label label-info">注意</span> 按照 Datedog 的 Histograms 
命名约定,Histograms 类的运行指标会作为一系列 gauges 显示(`<metric_name>.<aggregation>`)。
+默认情况下 `min` 即最小值被发送到 Datedog,`sum` 不会被发送。
+与 Datadog 提供的 Histograms 相比,Histograms 类的运行指标不会按照指定的发送间隔进行聚合计算  。
 
-Parameters:
+参数:
 
-- `apikey` - the Datadog API key
-- `tags` - (optional) the global tags that will be applied to metrics when 
sending to Datadog. Tags should be separated by comma only
-- `proxyHost` - (optional) The proxy host to use when sending to Datadog.
-- `proxyPort` - (optional) The proxy port to use when sending to Datadog, 
defaults to 8080.
-- `dataCenter` - (optional) The data center (`EU`/`US`) to connect to, 
defaults to `US`.
-- `maxMetricsPerRequest` - (optional) The maximum number of metrics to include 
in each request, defaults to 2000.
+- `apikey` - Datadog 的 API KEY。
+- `tags` - (可选的) 发送到 Datadog 时将会转换为指标的全局 tag。tag 间只能以逗号分隔。
+- `proxyHost` - (可选的) 发送到 Datadog 时使用的代理主机。
+- `proxyPort` - (可选的) 发送到 Datadog 时使用的代理端口,默认为 8080。

Review comment:
       ```suggestion
   - `proxyPort` - (可选的)发送到 Datadog 时使用的代理端口,默认为 8080。
   ```

##########
File path: docs/content.zh/docs/deployment/metric_reporters.md
##########
@@ -153,42 +152,46 @@ metrics.reporter.influxdb.writeTimeout: 60000
 metrics.reporter.influxdb.interval: 60 SECONDS
 ```
 
-The reporter would send metrics using http protocol to the InfluxDB server 
with the specified retention policy (or the default policy specified on the 
server).
-All Flink metrics variables (see [List of all Variables]({{< ref 
"docs/ops/metrics" >}}#list-of-all-variables)) are exported as InfluxDB tags.
+InfluxDB 发送器会使用 http 协议按照将指标发送到 InfluxDB 服务器。指标的保留策略可通过配置指定,或按照 InfluxDB 
服务端的保留策略决定。
+所有的 Flink 运行指标变量(见 [List of all Variables]({{< ref "zh/docs/ops/metrics" 
>}}#list-of-all-variables))都会按照 tag 形式上报给 InfluxDB。
+
+<a name="prometheus"></a>
 
 ### Prometheus
 #### (org.apache.flink.metrics.prometheus.PrometheusReporter)
 
-Parameters:
+参数:
 
-- `port` - (optional) the port the Prometheus exporter listens on, defaults to 
[9249](https://github.com/prometheus/prometheus/wiki/Default-port-allocations). 
In order to be able to run several instances of the reporter on one host (e.g. 
when one TaskManager is colocated with the JobManager) it is advisable to use a 
port range like `9250-9260`.
-- `filterLabelValueCharacters` - (optional) Specifies whether to filter label 
value characters. If enabled, all characters not matching \[a-zA-Z0-9:_\] will 
be removed, otherwise no characters will be removed. Before disabling this 
option please ensure that your label values meet the [Prometheus 
requirements](https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels).
+- `port` - (可选的)Prometheus 
发送器监听的端口,默认为[9249](https://github.com/prometheus/prometheus/wiki/Default-port-allocations)。如果需要在一台机器上运行多个发送器示例进行监控时(比如
 TaskManger 与 JobManager 在一台机器上运行时),建议将端口号配置为 `9250-9260` 这样的区间,
+- `filterLabelValueCharacters`(可选的)指定是否过滤 label 中的非法字符。如果设置过滤,所有没有匹配 
\[a-zA-Z0-9:_\] 的字符都会被过滤掉,如果设置不过滤,则不会有字符被过滤掉。设置不过滤前,请确保你的 label 符合[Prometheus 
的命名规范](https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels)

Review comment:
       ```suggestion
   - `filterLabelValueCharacters`(可选的)指定是否过滤 label 中的非法字符。如果设置过滤,所有没有匹配 
\[a-zA-Z0-9:_\] 的字符都会被过滤掉,如果设置不过滤,则不会有字符被过滤掉。设置不过滤前,请确保你的 label 符合 [Prometheus 
的命名规范](https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels)
   ```




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to