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

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


The following commit(s) were added to refs/heads/master by this push:
     new e34b64062 [improve] add shenyu\spring gateway i18n (#2511)
e34b64062 is described below

commit e34b64062ec4dba6a10a21d4a4e9756b154be359
Author: aias00 <[email protected]>
AuthorDate: Mon Aug 12 22:56:46 2024 +0800

    [improve] add shenyu\spring gateway i18n (#2511)
---
 manager/src/main/resources/define/app-shenyu.yml   | 60 ++++++++++++++++
 .../main/resources/define/app-spring_gateway.yml   | 84 ++++++++++++++++++++++
 2 files changed, 144 insertions(+)

diff --git a/manager/src/main/resources/define/app-shenyu.yml 
b/manager/src/main/resources/define/app-shenyu.yml
index 5d686f2e5..21789e2a9 100644
--- a/manager/src/main/resources/define/app-shenyu.yml
+++ b/manager/src/main/resources/define/app-shenyu.yml
@@ -51,6 +51,9 @@ params:
     defaultValue: 6000
 metrics:
   - name: shenyu_request_total
+    i18n:
+      zh-CN: ShenYu请求总量
+      en-US: ShenYu Request Total
     priority: 0
     fields:
       - field: value
@@ -70,6 +73,9 @@ metrics:
       parseType: prometheus
 
   - name: shenyu_request_throw_created
+    i18n:
+      zh-CN: ShenYu请求异常总量
+      en-US: ShenYu Request Exception Total
     priority: 1
     fields:
       # field-metric name, type-metric type(0-number,1-string), unit-metric 
unit('%','ms','MB'), label-whether it is a metrics label field
@@ -90,6 +96,9 @@ metrics:
       parseType: prometheus
 
   - name: process_cpu_seconds_total
+    i18n:
+      zh-CN: 进程 CPU 时间总量 (秒)
+      en-US: Process CPU Time Total
     priority: 1
     fields:
       # field-metric name, type-metric type(0-number,1-string), unit-metric 
unit('%','ms','MB'), label-whether it is a metrics label field
@@ -111,6 +120,9 @@ metrics:
       parseType: prometheus
 
   - name: process_open_fds
+    i18n:
+      zh-CN: 进程打开的文件描述符数量
+      en-US: Process Open Fds
     priority: 1
     fields:
       # field-metric name, type-metric type(0-number,1-string), unit-metric 
unit('%','ms','MB'), label-whether it is a metrics label field
@@ -131,6 +143,9 @@ metrics:
       parseType: prometheus
 
   - name: process_max_fds
+    i18n:
+      zh-CN: 进程最大文件描述符数量
+      en-US: Process Max Fds
     priority: 1
     fields:
       # field-metric name, type-metric type(0-number,1-string), unit-metric 
unit('%','ms','MB'), label-whether it is a metrics label field
@@ -151,15 +166,27 @@ metrics:
       parseType: prometheus
 
   - name: jvm_info
+    i18n:
+      zh-CN: JVM 信息
+      en-US: JVM Info
     priority: 1
     fields:
       # Metric information includes field name, type field type (0-number 
number, 1-string string), label-whether it is a metric label field, unit: 
metric unit
       - field: runtime
         type: 1
+        i18n:
+          zh-CN: 运行时
+          en-US: Runtime
       - field: vendor
         type: 1
+        i18n:
+          zh-CN: 供应商
+          en-US: Vendor
       - field: version
         type: 1
+        i18n:
+          zh-CN: 版本
+          en-US: Version
     # Monitoring and collection usage protocol eg: sql, ssh, http, telnet, 
wmi, snmp, sdk
     protocol: http
     # Specific collection configuration when protocol is http protocol
@@ -175,12 +202,18 @@ metrics:
       parseType: prometheus
 
   - name: jvm_memory_bytes_used
+    i18n:
+      zh-CN: JVM 内存使用字节数
+      en-US: JVM Memory Bytes Used
     priority: 1
     fields:
       # Metric information includes field name, type field type (0-number 
number, 1-string string), label-whether it is a metric label field, unit: 
metric unit
       - field: area
         type: 1
         label: true
+        i18n:
+          zh-CN: 区域
+          en-US: Area
       - field: value
         type: 0
         unit: MB
@@ -201,12 +234,18 @@ metrics:
       parseType: prometheus
 
   - name: jvm_memory_pool_bytes_used
+    i18n:
+      zh-CN: JVM 内存池使用字节数
+      en-US: JVM Memory Pool Bytes Used
     priority: 1
     fields:
       # Metric information includes field name, type field type (0-number 
number, 1-string string), label-whether it is a metric label field, unit: 
metric unit
       - field: pool
         type: 1
         label: true
+        i18n:
+          zh-CN: 池
+          en-US: Pool
       - field: value
         type: 0
         unit: MB
@@ -227,12 +266,18 @@ metrics:
       parseType: prometheus
 
   - name: jvm_memory_pool_bytes_committed
+    i18n:
+      zh-CN: JVM 内存池提交字节数
+      en-US: JVM Memory Pool Bytes Committed
     priority: 1
     fields:
       # Metric information includes field name, type field type (0-number 
number, 1-string string), label-whether it is a metric label field, unit: 
metric unit
       - field: pool
         type: 1
         label: true
+        i18n:
+          zh-CN: 池
+          en-US: Pool
       - field: value
         type: 0
         unit: MB
@@ -253,12 +298,18 @@ metrics:
       parseType: prometheus
 
   - name: jvm_memory_pool_bytes_max
+    i18n:
+      zh-CN: JVM 内存池最大字节数
+      en-US: JVM Memory Pool Bytes Max
     priority: 1
     fields:
       # Metric information includes field name, type field type (0-number 
number, 1-string string), label-whether it is a metric label field, unit: 
metric unit
       - field: pool
         type: 1
         label: true
+        i18n:
+          zh-CN: 池
+          en-US: Pool
       - field: value
         type: 0
         unit: MB
@@ -279,14 +330,23 @@ metrics:
       parseType: prometheus
 
   - name: jvm_threads_state
+    i18n:
+      zh-CN: JVM 线程状态
+      en-US: JVM Threads State
     priority: 1
     fields:
       # Metric information includes field name, type field type (0-number 
number, 1-string string), label-whether it is a metric label field, unit: 
metric unit
       - field: state
         type: 1
         label: true
+        i18n:
+          zh-CN: 状态
+          en-US: State
       - field: count
         type: 0
+        i18n:
+          zh-CN: 数量
+          en-US: Count
     aliasFields:
       - state
       - value
diff --git a/manager/src/main/resources/define/app-spring_gateway.yml 
b/manager/src/main/resources/define/app-spring_gateway.yml
index 4c8253e63..d7333237c 100644
--- a/manager/src/main/resources/define/app-spring_gateway.yml
+++ b/manager/src/main/resources/define/app-spring_gateway.yml
@@ -109,6 +109,9 @@ params:
 metrics:
   # metrics - available
   - name: available
+    i18n:
+      zh-CN: 可用性
+      en-US: Availability
     # metrics scheduling priority(0->127)->(high->low), metrics with the same 
priority will be scheduled in parallel
     # priority 0's metrics is availability metrics, it will be scheduled 
first, only availability metrics collect success will the scheduling continue
     priority: 0
@@ -118,6 +121,9 @@ metrics:
       - field: responseTime
         type: 0
         unit: ms
+        i18n:
+          zh-CN: 响应时间
+          en-US: Response Time
     # the protocol used for monitoring, eg: sql, ssh, http, telnet, wmi, snmp, 
sdk
     protocol: http
     # Specific collection configuration when protocol is http protocol
@@ -142,21 +148,42 @@ metrics:
       parseType: default
 
   - name: environment
+    i18n:
+      zh-CN: 环境
+      en-US: Environment
     priority: 1
     fields:
       # The metric information, including field name, type of the field 
(0-number, 1-string), whether it is an instance primary key, and the unit of 
the metric.
       - field: profile
         type: 1
+        i18n:
+          zh-CN: 配置文件
+          en-US: Profile
       - field: port
         type: 0
+        i18n:
+          zh-CN: 端口
+          en-US: Port
       - field: os
         type: 1
+        i18n:
+          zh-CN: 操作系统
+          en-US: Operating System
       - field: os_arch
         type: 1
+        i18n:
+          zh-CN: 操作系统架构
+          en-US: Operating System Architecture
       - field: jdk_vendor
         type: 1
+        i18n:
+          zh-CN: JDK 供应商
+          en-US: JDK Vendor
       - field: jvm_version
         type: 1
+        i18n:
+          zh-CN: JVM 版本
+          en-US: JVM Version
     # metric alias list, used to identify metrics in query results
     aliasFields:
       - $.activeProfiles[0]
@@ -199,11 +226,17 @@ metrics:
       parseScript: '$'
 
   - name: thread_state
+    i18n:
+      zh-CN: 线程状态
+      en-US: Thread State
     visible: false
     priority: 2
     fields:
       - field: state
         type: 1
+        i18n:
+          zh-CN: 状态
+          en-US: State
     protocol: http
     http:
       host: ^_^host^_^
@@ -219,13 +252,22 @@ metrics:
       parseScript: '$.availableTags[?(@.tag == "state")].values[*]'
 
   - name: threads
+    i18n:
+      zh-CN: 线程
+      en-US: Threads
     priority: 3
     fields:
       - field: state
         type: 1
+        i18n:
+          zh-CN: 状态
+          en-US: State
         instance: true
       - field: size
         type: 0
+        i18n:
+          zh-CN: 数量
+          en-US: Size
     aliasFields:
       - $.measurements[?(@.statistic == "VALUE")].value
     calculates:
@@ -246,11 +288,17 @@ metrics:
       parseScript: '$'
 
   - name: space_name
+    i18n:
+      zh-CN: 空间名称
+      en-US: Space Name
     visible: false
     priority: 4
     fields:
       - field: id
         type: 1
+        i18n:
+          zh-CN: 主键
+          en-US: ID
     protocol: http
     http:
       host: ^_^host^_^
@@ -266,13 +314,22 @@ metrics:
       parseScript: '$.availableTags[?(@.tag == "id")].values[*]'
 
   - name: memory_used
+    i18n:
+      zh-CN: 内存使用
+      en-US: Memory Used
     priority: 5
     fields:
       - field: space
         type: 1
+        i18n:
+          zh-CN: 空间
+          en-US: Space
         instance: true
       - field: mem_used
         type: 0
+        i18n:
+          zh-CN: 内存使用
+          en-US: Memory Used
         unit: MB
     aliasFields:
       - $.measurements[?(@.statistic == "VALUE")].value
@@ -296,10 +353,16 @@ metrics:
       parseScript: '$'
 
   - name: health
+    i18n:
+      zh-CN: 健康
+      en-US: Health
     priority: 6
     fields:
       - field: status
         type: 1
+        i18n:
+          zh-CN: 状态
+          en-US: Status
     protocol: http
     http:
       host: ^_^host^_^
@@ -314,11 +377,17 @@ metrics:
       parseType: default
 
   - name: route_id
+    i18n:
+      zh-CN: 路由 ID
+      en-US: Route ID
     visible: false
     priority: 7
     fields:
       - field: name
         type: 1
+        i18n:
+          zh-CN: 名称
+          en-US: Name
     protocol: http
     http:
       host: ^_^host^_^
@@ -334,17 +403,32 @@ metrics:
       parseScript: '$[*].route_id'
 
   - name: route_info
+    i18n:
+      zh-CN: 路由信息
+      en-US: Route Info
     priority: 8
     fields:
       - field: route_id
         type: 1
+        i18n:
+          zh-CN: 路由 ID
+          en-US: Route ID
         instance: true
       - field: predicate
         type: 1
+        i18n:
+          zh-CN: 断言
+          en-US: Predicate
       - field: uri
         type: 1
+        i18n:
+          zh-CN: URI
+          en-US: URI
       - field: order
         type: 0
+        i18n:
+          zh-CN: 顺序
+          en-US: Order
     aliasFields:
       - $.predicate
       - $.uri


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to