Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

question ask, why meta protocol proxy not support metric like istio_request_total? #196

Closed
huanghuangzym opened this issue May 5, 2022 · 16 comments
Labels
enhancement New feature or request wontfix This will not be worked on

Comments

@huanghuangzym
Copy link
Member

istio_request_total metric name is set regular, and label provices source and destination workload ,port ,request path and so on
but when i use aeraki metaprotocol ,it provides like
image

it is difficult to use the metric to statistics ,analyze , and Alarm notification
can meta protocol proxy support feature like this ?
provide stats filter ?

@huanghuangzym
Copy link
Member Author

i think like duboo, source envoy can set some metadata inthe annotation?

@zhaohuabing
Copy link
Member

zhaohuabing commented May 5, 2022

@huanghuangzym it's a great suggestion, I'd like to put this on the backlog.

Before we have the stats filter, please try to make the most of the current metrics generated by the MetaProtocol Proxy. They still can provide some very useful information about the services at the request level, such as Pxx latency, error rate, etc. https://www.aeraki.net/zh/docs/v1.0/tutorials/metrics/

@zhaohuabing
Copy link
Member

i think like duboo, source envoy can set some metadata in the annotation?

Could you please elaborate on your use case? What labels do we need to add to the metrics?

Istio adds the following labels to a metric:

纬度 含义 示例 备注
source_cluster 集群-请求源端   请求跨集群时才会有该label
source_app 应用名称-请求源端 reviews 来源于deployment的 app label,如没有则是 unknown
source_canonical_service 标准服务名称-请求源端 reviews 来源于label service.istio.io/canonical-name
source_workload_namespace namespace-请求源端 default  
source_workload deployment-请求源端 reviews-v3  
source_principal 服务身份-请求源端 spiffe://cluster.local/ns/default/sa/bookinfo-reviews  
source_canonical_revision 标准版本号-请求源端 v3 来源于label service.istio.io/canonical-version
source_version 版本号-请求源端 v3 来源于label version,可能和source_canonical_revision
destination_cluster 集群-请求目的端   请求跨集群时才会有该label
destination_app 应用名称-请求目的端 ratings 来源于deployment的 app label,如没有则是 unknown
destination_service_namespace 服务所在namespace-请求目的端 default 如果采用 VS 进行路由,service和实际的workload的namespace可以不同
destination_workload_namespace deployment所在namespace-请求目的端 default  
destination_canonical_service 标准服务名-请求目的端 ratings 来源于label service.istio.io/canonical-name
destination_service_name 实际服务名-请求目的端 ratings 目的端实际服务名,可能和destination_canonical_service不同
destination_service 服务全限定名称-请求目的端 ratings.default.svc.cluster.local  
destination_principal 服务身份-请求目的端 spiffe://cluster.local/ns/default/sa/bookinfo-ratings  
destination_workload deployment-请求目的端 ratings-v1  
destination_canonical_revision 标准版本号-请求目的端 v1 来源于label service.istio.io/canonical-version
destination_version 版本号-请求目的端 v1 来源于label version,可能和destination_canonical_revision
response_code http/grpc 返回码 200  
response_status 调用是否成功 0 0 成功,非 0表示失败。该取值根据协议类型是 http 还是 grpc 分别进行判断,remote writer向云监控中台上报时添加
connection_security_policy 链接安全策略 mutual_tls  
instance 服务实例 172.16.0.7:15090  
response_flags 返回标准(出错时的具体信息) UR  
request_protocol 应用层协议 http  
reporter 本metrics的上报端 destination

@huanghuangzym
Copy link
Member Author

usally we use source and destination app,workload,namespace,cluster; destination svc ,response code, status in alauda.

@zhaohuabing
Copy link
Member

zhaohuabing commented May 6, 2022 via email

@huanghuangzym
Copy link
Member Author

That's something we can do. Do you also need metrics on both sides (reporter=source/destination)?

On Fri, May 6, 2022 at 11:11 AM lihuang @.> wrote: usally we use source and destination app,workload,namespace,cluster; destination svc ,response code, status in alauda. — Reply to this email directly, view it on GitHub <#196 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKCWITDMPUB5WLZANEM2WTVISEW5ANCNFSM5VETMMHQ . You are receiving this because you commented.Message ID: @.>

usally we use source, because there are many self protocol server have not injected sidecar
in future, it is better to provicde both

@zhaohuabing
Copy link
Member

We can do it in two steps:

  1. First, try to add needed labels to the metrics generated by MetaProtocol proxy framework. It would meet your current requirements.
  2. The long term goal is to create a dedicated stats filter to generate metrics at the service level on both sides.

@zhaohuabing zhaohuabing added the enhancement New feature or request label May 6, 2022
@stale
Copy link

stale bot commented Jul 7, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Jul 7, 2022
@zhaohuabing zhaohuabing removed the wontfix This will not be worked on label Jul 11, 2022
@stale
Copy link

stale bot commented Sep 10, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Sep 10, 2022
@stale stale bot closed this as completed Sep 17, 2022
@zhaohuabing zhaohuabing reopened this Nov 9, 2022
@stale stale bot removed the wontfix This will not be worked on label Nov 9, 2022
@stale
Copy link

stale bot commented Jan 8, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Jan 8, 2023
@stale stale bot closed this as completed Jan 19, 2023
@zhaohuabing zhaohuabing reopened this Jan 26, 2023
@stale stale bot removed the wontfix This will not be worked on label Jan 26, 2023
zhaohuabing added a commit to aeraki-mesh/meta-protocol-proxy that referenced this issue Jan 26, 2023
send node metadata via metaprotocol headers to the other side, as we need it to generate source labels in the metrics.

This pr is part of aeraki-mesh/aeraki#196

Signed-off-by: zhaohuabing <zhaohuabing@gmail.com>
@huanghuangzym
Copy link
Member Author

image
it seems only destination metric has all value ,but in source metric ,the destination lable value are all unknown

@huanghuangzym
Copy link
Member Author

@zhaohuabing can help me?

@huanghuangzym
Copy link
Member Author

huanghuangzym commented Mar 6, 2023

it seems in the document,the metric is also has many unknown @zhaohuabing

@zhaohuabing
Copy link
Member

@huanghuangzym Currently only mutation in the dubbo request is handled, we need alose to encode the mutated header here :https://github.com/aeraki-mesh/meta-protocol-proxy/blob/8cd2ac4a7b43e165ba9d70d78c054fdf525d1523/src/application_protocols/dubbo/dubbo_codec.cc#L70

@huanghuangzym
Copy link
Member Author

@huanghuangzym Currently only mutation in the dubbo request is handled, we need alose to encode the mutated header here :https://github.com/aeraki-mesh/meta-protocol-proxy/blob/8cd2ac4a7b43e165ba9d70d78c054fdf525d1523/src/application_protocols/dubbo/dubbo_codec.cc#L70

ok let me try

@stale
Copy link

stale bot commented May 7, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants