Commit 7320fa5b authored by Ge Jun's avatar Ge Jun

Show metrics of thrift_service on /status

parent e6bf9210
......@@ -22,6 +22,7 @@
#include "brpc/details/method_status.h" // MethodStatus
#include "brpc/builtin/status_service.h"
#include "brpc/nshead_service.h" // NsheadService
#include "brpc/thrift_service.h" // ThriftService
#include "brpc/rtmp.h" // RtmpService
#include "brpc/builtin/common.h"
......@@ -187,6 +188,17 @@ void StatusService::default_method(::google::protobuf::RpcController* cntl_base,
nshead_svc->_status->Describe(os, desc_options);
os << '\n';
}
const ThriftService* thrift_svc = server->options().thrift_service;
if (thrift_svc && thrift_svc->_status) {
DescribeOptions options;
options.verbose = false;
options.use_html = use_html;
os << (use_html ? "<h3>" : "[");
thrift_svc->Describe(os, options);
os << (use_html ? "</h3>\n" : "]\n");
thrift_svc->_status->Describe(os, desc_options);
os << '\n';
}
if (policy::g_server_msg_status) {
DescribeOptions options;
options.verbose = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment