You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by GitBox <gi...@apache.org> on 2023/01/05 10:13:27 UTC

[GitHub] [incubator-brpc] cmdmspaint opened a new issue, #2069: 如何将brpc controller中的信息传递到上层应用程序?

cmdmspaint opened a new issue, #2069:
URL: https://github.com/apache/incubator-brpc/issues/2069

   背景:在程序压测过程中发现了性能瓶颈,对程序进行打点分析。一开始是通过traceprintf打印到rpcz中,但是rpcz打印到浏览器的信息一直在刷新。我们想把统计的耗时,传到我们上层的程序中进行统一分析。
   这是在controller中添加了一个map
   ![image](https://user-images.githubusercontent.com/50624748/210754597-7389aa2e-d391-4b83-80e2-b94d2f053aba.png)
   
   ![image](https://user-images.githubusercontent.com/50624748/210754695-ab12d468-fb3a-4260-85f0-48341b86ba57.png)
   
   有类似 endpoint2str的方法将map传到上层程序吗?
   ![image](https://user-images.githubusercontent.com/50624748/210754923-ac98a309-62bc-4502-ad1d-f3c2d4320bc0.png)
   


-- 
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-unsubscribe@brpc.apache.org.apache.org

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


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


[GitHub] [incubator-brpc] cmdmspaint commented on issue #2069: 如何将brpc controller中的信息传递到上层应用程序?

Posted by GitBox <gi...@apache.org>.
cmdmspaint commented on issue #2069:
URL: https://github.com/apache/incubator-brpc/issues/2069#issuecomment-1372135886

   > 应该是服务端打点,想在客户端获取打点信息吧? 这种的话只能通过 修改 PB协议,增加对应的repeat类型字段,传递给客户端,在客户端ProcessXXXResponse函数中解包,从PB对象中获取打点数据,然后设置到cntl中。
   
   我们是一个存储程序,远程过程调用使用的是brpc。想把在bprc controller中的信息打印到我们自己程序的日志中去。


-- 
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-unsubscribe@brpc.apache.org

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


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


[GitHub] [incubator-brpc] cmdmspaint commented on issue #2069: 如何将brpc controller中的信息传递到上层应用程序?

Posted by GitBox <gi...@apache.org>.
cmdmspaint commented on issue #2069:
URL: https://github.com/apache/incubator-brpc/issues/2069#issuecomment-1372212270

   > > 
   > 
   > 是不是头文件没有更新?
   这是我们程序中的头文件
   ![image](https://user-images.githubusercontent.com/50624748/210789815-81b33547-afd2-48fb-b656-8ff734574d98.png)
   这是在controller.h中添加的部分
   ![image](https://user-images.githubusercontent.com/50624748/210789988-ee3b3af5-4439-4b11-b896-b195ac7648e3.png)
   
   我们使用的brpc版本是1.0.0


-- 
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-unsubscribe@brpc.apache.org

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


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


[GitHub] [incubator-brpc] cmdmspaint closed issue #2069: 如何将brpc controller中的信息传递到上层应用程序?

Posted by GitBox <gi...@apache.org>.
cmdmspaint closed issue #2069: 如何将brpc controller中的信息传递到上层应用程序?
URL: https://github.com/apache/incubator-brpc/issues/2069


-- 
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-unsubscribe@brpc.apache.org

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


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


[GitHub] [incubator-brpc] serverglen commented on issue #2069: 如何将brpc controller中的信息传递到上层应用程序?

Posted by GitBox <gi...@apache.org>.
serverglen commented on issue #2069:
URL: https://github.com/apache/incubator-brpc/issues/2069#issuecomment-1372200305

   > 
   
   是不是头文件没有更新?


-- 
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-unsubscribe@brpc.apache.org

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


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


[GitHub] [incubator-brpc] cmdmspaint commented on issue #2069: 如何将brpc controller中的信息传递到上层应用程序?

Posted by GitBox <gi...@apache.org>.
cmdmspaint commented on issue #2069:
URL: https://github.com/apache/incubator-brpc/issues/2069#issuecomment-1372209552

   > > 
   > 
   > 是不是头文件没有更新?
   指的的controller.h 更新吗  还是我们程序中的头文件
   


-- 
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-unsubscribe@brpc.apache.org

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


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


[GitHub] [incubator-brpc] serverglen commented on issue #2069: 如何将brpc controller中的信息传递到上层应用程序?

Posted by GitBox <gi...@apache.org>.
serverglen commented on issue #2069:
URL: https://github.com/apache/incubator-brpc/issues/2069#issuecomment-1372099116

   应该是服务端打点,想在客户端获取打点信息吧?
   这种的话只能通过 修改 PB协议,增加对应的repeat类型字段,传递给客户端,在客户端ProcessXXXResponse函数中解包,从PB对象中获取打点数据,然后设置到cntl中。


-- 
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-unsubscribe@brpc.apache.org

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


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


[GitHub] [incubator-brpc] cmdmspaint commented on issue #2069: 如何将brpc controller中的信息传递到上层应用程序?

Posted by GitBox <gi...@apache.org>.
cmdmspaint commented on issue #2069:
URL: https://github.com/apache/incubator-brpc/issues/2069#issuecomment-1372196211

   > 应该是服务端打点,想在客户端获取打点信息吧? 这种的话只能通过 修改 PB协议,增加对应的repeat类型字段,传递给客户端,在客户端ProcessXXXResponse函数中解包,从PB对象中获取打点数据,然后设置到cntl中。
   
   在controller中添加方法需要类似 register的操作吗
   


-- 
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-unsubscribe@brpc.apache.org

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


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


[GitHub] [incubator-brpc] cmdmspaint commented on issue #2069: 如何将brpc controller中的信息传递到上层应用程序?

Posted by GitBox <gi...@apache.org>.
cmdmspaint commented on issue #2069:
URL: https://github.com/apache/incubator-brpc/issues/2069#issuecomment-1372113352

   > 应该是服务端打点,想在客户端获取打点信息吧? 这种的话只能通过 修改 PB协议,增加对应的repeat类型字段,传递给客户端,在客户端ProcessXXXResponse函数中解包,从PB对象中获取打点数据,然后设置到cntl中。
   
   正常情况下 是直接取用就可以吗


-- 
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-unsubscribe@brpc.apache.org

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


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


[GitHub] [incubator-brpc] cmdmspaint commented on issue #2069: 如何将brpc controller中的信息传递到上层应用程序?

Posted by GitBox <gi...@apache.org>.
cmdmspaint commented on issue #2069:
URL: https://github.com/apache/incubator-brpc/issues/2069#issuecomment-1372112897

   > 应该是服务端打点,想在客户端获取打点信息吧? 这种的话只能通过 修改 PB协议,增加对应的repeat类型字段,传递给客户端,在客户端ProcessXXXResponse函数中解包,从PB对象中获取打点数据,然后设置到cntl中。
   
   cntl中已经设置上信息了 但是取的时候 编译报错了
   ![image](https://user-images.githubusercontent.com/50624748/210772410-9652bd33-483b-4868-b86a-ab3d0563f980.png)
   ![image](https://user-images.githubusercontent.com/50624748/210772525-11aaedcb-8bc2-4ec7-bee7-47e3c76068cf.png)
   


-- 
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-unsubscribe@brpc.apache.org

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


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


[GitHub] [incubator-brpc] cmdmspaint commented on issue #2069: 如何将brpc controller中的信息传递到上层应用程序?

Posted by GitBox <gi...@apache.org>.
cmdmspaint commented on issue #2069:
URL: https://github.com/apache/incubator-brpc/issues/2069#issuecomment-1372139568

   > 应该是服务端打点,想在客户端获取打点信息吧? 这种的话只能通过 修改 PB协议,增加对应的repeat类型字段,传递给客户端,在客户端ProcessXXXResponse函数中解包,从PB对象中获取打点数据,然后设置到cntl中。
   
   但是 在我们程序中通过brpc::controller取用的时候就出现了 编译报错的情况  .a和.so 确认过了是新编译的  


-- 
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-unsubscribe@brpc.apache.org

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


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


[GitHub] [incubator-brpc] cmdmspaint commented on issue #2069: 如何将brpc controller中的信息传递到上层应用程序?

Posted by GitBox <gi...@apache.org>.
cmdmspaint commented on issue #2069:
URL: https://github.com/apache/incubator-brpc/issues/2069#issuecomment-1372185670

   还有一个疑问是controller.h 中   Client-side methods   Server-side methods. Both-side methods.的区别是什么呢,为什么要划分client sever 和both 。是因为client server特点导致 还是有什么限制呢?


-- 
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-unsubscribe@brpc.apache.org

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


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