hemin1020 opened a new issue #1500:
URL: https://github.com/apache/incubator-brpc/issues/1500


   **场景描述:**
   
   我们目前以brpc为基础rpc框架,并利用bvar记录和查看程序中的各类数值,后期期望通过Prometheus抓取自定义的各个值。
   但是在实践过程中发现,我们定义的 bvar::Status<std::string> 
的var(通过expose_as的方式expose,set_value的方式赋值)可以在/vars中正常显示,但无法在/brpc_metrics中显示出来。而对于自定义的数值类型的var在两者中均可以正常展示,示例如下:
   
   =======/vars中的情况=======
   string类型
   
![image](https://user-images.githubusercontent.com/42594916/127298922-4ef9ba2b-af1c-4b47-a358-07576d8cc06a.png)
   ----------------------------------------
   int类型
   
![image](https://user-images.githubusercontent.com/42594916/127299303-f830b79e-a0b9-4a36-b76e-cdde542f6833.png)
   =======/brpc_metrics中的情况=======
   
![image](https://user-images.githubusercontent.com/42594916/127300499-451f77dc-ef20-4bd1-86db-ae06c1437879.png)
   
   这就导致Prometheus无法抓取我们所有的值。
   
   **问题:**
   
   1. 是否是我们的使用方式不对,导致metrics中显示失败?还是brpc暂时无法支持string类型的数值在metrics中显示?
   2. 如果brpc目前不支持string类型的value在metrics中显示,那这类值应该如何对接到Prometheus?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org
For additional commands, e-mail: dev-h...@brpc.apache.org

Reply via email to