kmesh-net / kmesh

High Performance ServiceMesh Data Plane Based on Programmable Kernel
https://kmesh.net
Apache License 2.0
424 stars 59 forks source link

Mismatch of L4 metric name of Kmesh and Istio #738

Closed YaoZengzeng closed 1 month ago

YaoZengzeng commented 1 month ago

Please provide an in-depth description of the question you have:

For example in istio metric istio_tcp_connections_opened_total is used to describe the number of connections opened to target service. However in Kmesh there is a similar metric named kmesh_tcp_connections_opened_total but it seems to describe the number of connections opened to a target pod:

kmesh_tcp_connections_opened_total{connection_security_policy="mutual_tls",destination_app="productpage",destination_canonical_revision="v1",destination_canonical_service="productpage",destination_cluster="Kubernetes",destination_pod_address="10.244.1.27",destination_pod_name="productpage-v1-5bb9985d4d-dqpbc",destination_pod_namespace="default",destination_principal="-",destination_version="v1",destination_workload="productpage-v1",destination_workload_namespace="default",reporter="destination",request_protocol="tcp",response_flags="-",source_app="prometheus",source_canonical_revision="v2.51.1",source_canonical_service="prometheus",source_cluster="Kubernetes",source_principal="-",source_version="v2.51.1",source_workload="prometheus",source_workload_namespace="kmesh-system"} 356

In Kmesh the metric that play a similar function to istio_tcp_connections_opened_total is called kmesh_tcp_service_connections_opened_total:

kmesh_tcp_service_connections_opened_total{connection_security_policy="mutual_tls",destination_app="productpage",destination_canonical_revision="v1",destination_canonical_service="productpage",destination_cluster="Kubernetes",destination_principal="-",destination_service="productpage.default.svc.cluster.local",destination_service_name="productpage.default.svc.cluster.local",destination_service_namespace="default",destination_version="v1",destination_workload="productpage-v1",destination_workload_namespace="default",reporter="destination",request_protocol="tcp",response_flags="-",source_app="prometheus",source_canonical_revision="v2.51.1",source_canonical_service="prometheus",source_cluster="Kubernetes",source_principal="-",source_version="v2.51.1",source_workload="prometheus",source_workload_namespace="kmesh-system"} 404

What do you think about this question?:

We should follow istio's name convention, make kmesh_tcp_connections_opened_total and istio_tcp_connections_opened_total have the same meaning. For additional pod level metrics, we should give them separate names.

@LiZhenCheng9527 @hzxuzhonghu WDYT?

Environment: