未验证 提交 019f18dd 编写于 作者: D dragondriver 提交者: GitHub

Expose created time and updated time to datacoord metrics (#8172)

Signed-off-by: Ndragondriver <jiquan.long@zilliz.com>
上级 8b82d875
......@@ -99,8 +99,9 @@ func (s *Server) getDataCoordMetrics() metricsinfo.DataCoordInfos {
SystemVersion: os.Getenv(metricsinfo.GitCommitEnvKey),
DeployMode: os.Getenv(metricsinfo.DeployModeEnvKey),
},
// TODO(dragondriver): CreatedTime & UpdatedTime, easy but time-costing
Type: typeutil.DataCoordRole,
CreatedTime: Params.CreatedTime.String(),
UpdatedTime: Params.UpdatedTime.String(),
Type: typeutil.DataCoordRole,
},
SystemConfigurations: metricsinfo.DataCoordConfiguration{
SegmentMaxSize: Params.SegmentMaxSize,
......
......@@ -16,6 +16,7 @@ import (
"strconv"
"strings"
"sync"
"time"
"github.com/milvus-io/milvus/internal/log"
......@@ -59,6 +60,9 @@ type ParamTable struct {
SegmentInfoChannelName string
DataCoordSubscriptionName string
CreatedTime time.Time
UpdatedTime time.Time
Log log.Config
}
......
......@@ -236,8 +236,13 @@ func (s *Server) Start() error {
if err := helper.Execute(); err != nil {
return err
}
Params.CreatedTime = time.Now()
Params.UpdatedTime = time.Now()
atomic.StoreInt64(&s.isServing, ServerStateHealthy)
log.Debug("dataCoordinator startup success")
return nil
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册