Skip to content

Commit 2177968

Browse files
committed
feat: querier add table in_process_metrics
1 parent c53349e commit 2177968

File tree

12 files changed

+187
-11
lines changed

12 files changed

+187
-11
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Field , DBField , Type , Category , Permission
2+
profile_value , profile_value , counter , APP Profile , 111
3+
row , , other , Other , 111
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Field , DisplayName , Unit , Description
2+
profile_value , profile_value , ,
3+
row , 行数 , 个 ,
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Field , DisplayName , Unit , Description
2+
profile_value , profile_value , ,
3+
row , Row Count , ,

server/querier/db_descriptions/clickhouse/tag/profile/in_process.ch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ span_name , Span名称 ,
5353
vtap , 采集器 , 已废弃,请使用 agent。
5454
agent , 采集器 ,
5555

56-
profile_value_unit , 单位 ,
56+
profile_value_unit , 指标单位 ,
5757
profile_event_type , 剖析类型 ,
5858
profile_create_timestamp , 聚合时间 ,
5959
profile_in_timestamp , 写入时间 ,

server/querier/db_descriptions/clickhouse/tag/profile/in_process.en

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ span_name , Span Name ,
5353
vtap , DeepFlow Agent , Deprecated,please use agent.
5454
agent , DeepFlow Agent ,
5555

56-
profile_value_unit , 单位 ,
57-
profile_event_type , 剖析类型 ,
58-
profile_create_timestamp , 聚合时间 ,
59-
profile_in_timestamp , 写入时间 ,
60-
profile_language_type , 语言类型 ,
56+
profile_value_unit , Metric Unit ,
57+
profile_event_type , Profile Type ,
58+
profile_create_timestamp , Aggregate Time ,
59+
profile_in_timestamp , Ingest Time ,
60+
profile_language_type , Language Type ,
6161
profile_id , ProfileID ,
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Name , ClientName , ServerName , Type , EnumFile , Category , Permission , Deprecated
2+
time , time , time , time , , Timestamp , 111 , 0
3+
4+
region , region , region , resource , , Universal Tag , 110 , 0
5+
az , az , az , resource , , Universal Tag , 110 , 0
6+
host , host , host , resource , , Universal Tag , 100 , 0
7+
chost , chost , chost , resource , , Universal Tag , 111 , 0
8+
vpc , vpc , vpc , resource , , Universal Tag , 111 , 0
9+
router , router , router , resource , , Universal Tag , 110 , 0
10+
dhcpgw , dhcpgw , dhcpgw , resource , , Universal Tag , 110 , 0
11+
lb , lb , lb , resource , , Universal Tag , 110 , 0
12+
lb_listener , lb_listener , lb_listener , resource , , Universal Tag , 110 , 0
13+
natgw , natgw , natgw , resource , , Universal Tag , 110 , 0
14+
redis , redis , redis , resource , , Universal Tag , 110 , 0
15+
rds , rds , rds , resource , , Universal Tag , 110 , 0
16+
pod_cluster , pod_cluster , pod_cluster , resource , , Universal Tag , 111 , 0
17+
pod_ns , pod_ns , pod_ns , resource , , Universal Tag , 111 , 0
18+
pod_node , pod_node , pod_node , resource , , Universal Tag , 111 , 0
19+
pod_ingress , pod_ingress , pod_ingress , resource , , Universal Tag , 111 , 0
20+
pod_service , pod_service , pod_service , resource , , Universal Tag , 111 , 0
21+
pod_group_type , pod_group_type , pod_group_type , int_enum , pod_group_type , Universal Tag , 111 , 0
22+
pod_group , pod_group , pod_group , resource , , Universal Tag , 111 , 0
23+
pod , pod , pod , resource , , Universal Tag , 111 , 0
24+
service , service , service , resource , , Universal Tag , 111 , 1
25+
auto_instance_type , auto_instance_type , auto_instance_type , int_enum , auto_instance_type , Universal Tag , 111 , 0
26+
auto_instance , auto_instance , auto_instance , resource , , Universal Tag , 111 , 0
27+
auto_service_type , auto_service_type , auto_service_type , int_enum , auto_service_type , Universal Tag , 111 , 0
28+
auto_service , auto_service , auto_service , resource , , Universal Tag , 111 , 0
29+
gprocess , gprocess , gprocess , resource , , Universal Tag , 111 , 0
30+
host_ip , host_ip , host_ip , resource , , Universal Tag , 111 , 0
31+
host_hostname , host_hostname , host_hostname , resource , , Universal Tag , 111 , 0
32+
chost_ip , chost_ip , chost_ip , resource , , Universal Tag , 111 , 0
33+
chost_hostname , chost_hostname , chost_hostname , resource , , Universal Tag , 111 , 0
34+
pod_node_ip , pod_node_ip , pod_node_ip , resource , , Universal Tag , 111 , 0
35+
pod_node_hostname , pod_node_hostname , pod_node_hostname , resource , , Universal Tag , 111 , 0
36+
37+
k8s.label , k8s.label , k8s.label , map , , Custom Tag , 111 , 0
38+
k8s.annotation , k8s.annotation , k8s.annotation , map , , Custom Tag , 111 , 0
39+
k8s.env , k8s.env , k8s.env , map , , Custom Tag , 111 , 0
40+
cloud.tag , cloud.tag , cloud.tag , map , , Custom Tag , 111 , 0
41+
42+
ip , ip , ip , ip , , Network Layer , 111 , 0
43+
is_ipv4 , is_ipv4 , is_ipv4 , int_enum , ip_type , Network Layer , 111 , 0
44+
45+
app_service , app_service , app_service , string_enum , , Service Info , 111 , 0
46+
app_instance , app_instance , app_instance , string_enum , , Service Info , 111 , 0
47+
process_id , process_id , process_id , int , , Service Info , 111 , 0
48+
49+
vtap , vtap , vtap , resource , , Capture Info , 111 , 1
50+
agent , agent , agent , resource , , Capture Info , 111 , 0
51+
52+
profile_event_type , profile_event_type , profile_event_type , string , , Profile Info , 111 , 0
53+
profile_language_type , profile_language_type , profile_language_type , string_enum , profile_language_type , Profile Info , 111 , 0
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Name , DisplayName , Description
2+
time , 时间 ,
3+
4+
region , 区域 ,
5+
az , 可用区 ,
6+
host , 宿主机 , 承载虚拟机的宿主机。
7+
chost , 云主机 , 包括虚拟机、裸金属服务器。
8+
vpc , VPC ,
9+
router , 路由器 ,
10+
dhcpgw , DHCP 网关 ,
11+
lb , 负载均衡器 ,
12+
lb_listener , 负载均衡监听器 ,
13+
natgw , NAT 网关 ,
14+
redis , Redis ,
15+
rds , RDS ,
16+
pod_cluster , K8s 容器集群 ,
17+
pod_ns , K8s 命名空间 ,
18+
pod_node , K8s 容器节点 ,
19+
pod_ingress , K8s Ingress ,
20+
pod_service , K8s 容器服务 ,
21+
pod_group_type , K8s 工作负载类型 ,
22+
pod_group , K8s 工作负载 , 例如 Deployment、StatefulSet、Daemonset 等。
23+
pod , K8s 容器 POD ,
24+
service , 服务 , 已废弃,请使用 pod_service
25+
auto_instance_type , 自动实例类型 , `auto_instance`实例对应的类型。
26+
auto_instance , 自动实例 , IP 对应的实例,实例为IP时,auto_instance_id显示为子网ID。
27+
auto_service_type , 自动服务类型 , `auto_service`实例对应的类型。
28+
auto_service , 自动服务 , 在`auto_instance`基础上,将容器服务的 ClusterIP 与工作负载聚合为服务,实例为IP时,auto_service_id显示为子网ID。
29+
gprocess , 进程 ,
30+
host_ip , 宿主机 , 宿主机的管理 IP。
31+
host_hostname , 宿主机 , 宿主机的 Hostname。
32+
chost_ip , 云主机 , 云主机的主 IP。
33+
chost_hostname , 云主机 , 云主机的 Hostname。
34+
pod_node_ip , K8s 容器节点 , 容器节点的主 IP。
35+
pod_node_hostname , K8s 容器节点 , 容器节点的 Hostname。
36+
37+
k8s.label , K8s Label ,
38+
k8s.annotation , K8s Annotation ,
39+
k8s.env , K8s Env ,
40+
cloud.tag , Cloud Tag ,
41+
42+
ip , IP 地址 ,
43+
is_ipv4 , IPv4 标志 ,
44+
45+
app_service , 应用服务 ,
46+
app_instance , 应用实例 ,
47+
process_id , 进程 ID ,
48+
49+
vtap , 采集器 , 已废弃,请使用 agent。
50+
agent , 采集器 ,
51+
52+
profile_event_type , 剖析类型 ,
53+
profile_language_type , 语言类型 ,
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Name , DisplayName , Description
2+
time , Time , Round end_time to seconds.
3+
4+
region , Region ,
5+
az , Availability Zone ,
6+
host , VM Hypervisor , Host running virtual machine.
7+
chost , Cloud Host , Including virtual machines, bare metal servers.
8+
vpc , VPC ,
9+
router , Router ,
10+
dhcpgw , DHCP Gateway ,
11+
lb , Load Balancer ,
12+
lb_listener , Load Balancer Listener ,
13+
natgw , NAT Gateway ,
14+
redis , Redis ,
15+
rds , RDS ,
16+
pod_cluster , K8s Cluster ,
17+
pod_ns , K8s Namespace ,
18+
pod_node , K8s Node ,
19+
pod_ingress , K8s Ingress ,
20+
pod_service , K8s Service ,
21+
pod_group_type , K8s Workload Type ,
22+
pod_group , K8s Workload , Such as Deployment, StatefulSet, Daemonset, etc.
23+
pod , K8s POD ,
24+
service , Service , Deprecated,please use pod_service
25+
auto_instance_type , Auto Instance Type , The type of 'auto_instance'.
26+
auto_instance , Auto Instance Tag , The instance of IP, when the instance is an IP, auto_instance_id displayed as a subnet ID.
27+
auto_service_type , Auto Service Type , The type of 'auto_service'.
28+
auto_service , Auto Service Tag , On the basis of 'auto_instance', aggregate K8s service ClusterIP and workload into service, when the instance is an IP, auto_service_id displayed as a subnet ID.
29+
gprocess , Process ,
30+
host_ip , VM Hypervisor , The management IP address of VM Hypervisor.
31+
host_hostname , VM Hypervisor , The hostname of VM Hypervisor.
32+
chost_ip , Cloud Host , The primary IP address of Cloud Host.
33+
chost_hostname , Cloud Host , The hostname of Cloud Host.
34+
pod_node_ip , K8s Node , The primary IP address of K8s Node.
35+
pod_node_hostname , K8s Node , The hostname of K8s Node.
36+
37+
k8s.label , K8s Label ,
38+
k8s.annotation , K8s Annotation ,
39+
k8s.env , K8s Env ,
40+
cloud.tag , Cloud Tag ,
41+
42+
ip , IP Address ,
43+
is_ipv4 , IPv4 Flag ,
44+
45+
app_service , Application Service ,
46+
app_instance , Application Instance ,
47+
process_id , Process ID ,
48+
49+
vtap , DeepFlow Agent , Deprecated,please use agent.
50+
agent , DeepFlow Agent ,
51+
52+
profile_event_type , Profile Type ,
53+
profile_language_type , Language Type ,

server/querier/engine/clickhouse/clickhouse.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1319,6 +1319,12 @@ func (e *CHEngine) TransFrom(froms sqlparser.TableExprs) error {
13191319
newDB = fmt.Sprintf("%04d_%s", orgIDInt, e.DB)
13201320
}
13211321
}
1322+
1323+
// profile.in_process_metrics.1s
1324+
if e.Table == chCommon.TABLE_NAME_IN_PROCESS_METRICS {
1325+
e.DataSource = "1s"
1326+
}
1327+
13221328
if e.DataSource != "" {
13231329
e.AddTable(fmt.Sprintf("%s.`%s.%s`", newDB, table, e.DataSource))
13241330
} else {

server/querier/engine/clickhouse/common/const.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ const TABLE_NAME_SPAN_WITH_TRACE_ID = "span_with_trace_id"
3434
const TABLE_NAME_L7_FLOW_LOG = "l7_flow_log"
3535
const TABLE_NAME_EVENT = "event"
3636
const TABLE_NAME_FILE_EVENT = "file_event"
37+
const TABLE_NAME_IN_PROCESS = "in_process"
38+
const TABLE_NAME_IN_PROCESS_METRICS = "in_process_metrics"
3739
const IndexTypeIncremetalId = "incremental-id"
3840
const FormatHex = "hex"
3941
const TagServerChPrefix = "服务端"
@@ -57,7 +59,7 @@ var DB_TABLE_MAP = map[string][]string{
5759
DB_NAME_DEEPFLOW_ADMIN: []string{"deepflow_server"},
5860
DB_NAME_DEEPFLOW_TENANT: []string{"deepflow_collector"},
5961
DB_NAME_EVENT: []string{"event", "file_event", "alert_event"},
60-
DB_NAME_PROFILE: []string{"in_process"},
62+
DB_NAME_PROFILE: []string{"in_process", TABLE_NAME_IN_PROCESS_METRICS},
6163
DB_NAME_PROMETHEUS: []string{"samples"},
6264
DB_NAME_APPLICATION_LOG: []string{"log"},
6365
}

0 commit comments

Comments
 (0)