googleapis / googleapis/google-cloud-java
[sdk-platform-java] Metrics related to gax
- 主要语言
- Java
- 星标
- 2.1k
- 派生
- 1.2k
- 平均合并
- 1 天 23 小时
- 30 天内合并 PR
- 157
描述
## Question
This is a general question regarding how to get metrics around gax. (Or, maybe this is a feature request?)
Recently we realized that gax (transitive dependencies introduced by `java-bigtable` client library) tends to create a fairly large thread pool of many system threads to handle IO with Bigtable server. These threads are named with prefix `Gax-` so we think it is probably related to this `gax-java` library according to [this line](https://github.com/googleapis/gax-java/blob/1c4d535917cb1642f8da38a2a2c23ada4c15f394/gax/src/main/java/com/google/api/gax/core/InstantiatingExecutorProvider.java#L52).
We're not sure if the size of the thread pool is the culprit of causing regression of our service performance when the traffic goes high. Thus we'd like gain some observability into the gax threads first. However, I cannot find a good way to export the metrics such as "the number of gax threads" from time to time. For example, an option to register this metric to prometheus-metric client would be great.
We also noticed that Gax has a [channel pool resizing behavior](https://github.com/googleapis/gax-java/blob/fff2babaf2620686c2e0be1b6d338ac088248cf6/gax-grpc/src/main/java/com/google/api/gax/grpc/ChannelPool.java#L112-L125) over the time. It would also be nice to get metrics of channel pool size over the time and watch how the pool size get resized under different traffic patterns.
贡献指南
调研方向
该 issue 指出了 gax 中的 InstantiatingExecutorProvider.java 和 gax-grpc 中的 ChannelPool.java,认为它们是相关的入口点。首先检查这些链接的部分以及现有的 metrics 集成,然后确定随时间暴露 GAX 线程数和 channel pool 大小的范围。当所请求的 observability 路径及其支持的 metrics 得到明确定义并实现后,即视为完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- java, prometheus
- 领域
- observability
- Issue 类型
- 功能
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 25/100