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 2022/07/25 02:47:32 UTC

[GitHub] [incubator-brpc] jenrryyou commented on pull request #1854: support customized server bvar prefix

jenrryyou commented on PR #1854:
URL: https://github.com/apache/incubator-brpc/pull/1854#issuecomment-1193495911

   > 百度内部是通过gflag来自定义server prefix的,代码大致如下:
   > 
   > ```c++
   > std::string Server::ServerPrefix() const {
   >     if (FLAGS_customized_server_prefix.empty()) {
   >          return base::string_printf("%s_%d", g_server_info_prefix, listen_address().port);
   >     } else {
   >         return FLAGS_customized_server_prefix;
   >     }
   > }
   > ```
   > 
   > 可以看下哪种方式更方便一些。
   用gflag的话如果有多个server的话不能区分各自server的指标,我觉得这类server spefic的属性放server option更合理一些


-- 
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