未验证 提交 63ae5bd9 编写于 作者: D dragondriver 提交者: GitHub

Expose created time and updated time to querynode metrics (#9738)

Signed-off-by: Ndragondriver <jiquan.long@zilliz.com>
上级 cb01f314
......@@ -44,8 +44,9 @@ func getSystemInfoMetrics(ctx context.Context, req *milvuspb.GetMetricsRequest,
SystemVersion: os.Getenv(metricsinfo.GitCommitEnvKey),
DeployMode: os.Getenv(metricsinfo.DeployModeEnvKey),
},
// TODO(dragondriver): CreatedTime & UpdatedTime, easy but time-costing
Type: typeutil.QueryNodeRole,
CreatedTime: Params.CreatedTime.String(),
UpdatedTime: Params.UpdatedTime.String(),
Type: typeutil.QueryNodeRole,
},
SystemConfigurations: metricsinfo.QueryNodeConfiguration{
SearchReceiveBufSize: Params.SearchReceiveBufSize,
......
......@@ -16,6 +16,7 @@ import (
"strconv"
"strings"
"sync"
"time"
"go.uber.org/zap"
......@@ -76,6 +77,9 @@ type ParamTable struct {
// segcore
ChunkRows int64
SimdType string
CreatedTime time.Time
UpdatedTime time.Time
}
var Params ParamTable
......
......@@ -30,6 +30,7 @@ import (
"strconv"
"sync"
"sync/atomic"
"time"
"unsafe"
"go.uber.org/zap"
......@@ -214,6 +215,9 @@ func (node *QueryNode) Start() error {
node.Stop()
})
Params.CreatedTime = time.Now()
Params.UpdatedTime = time.Now()
node.UpdateStateCode(internalpb.StateCode_Healthy)
return nil
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册