mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-07 19:31:51 +08:00
Expose created time and updated time to datacoord metrics (#8172)
Signed-off-by: dragondriver <jiquan.long@zilliz.com>
This commit is contained in:
parent
8b82d8755a
commit
019f18ddf9
@ -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
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user