mirror of https://github.com/milvus-io/milvus.git
Expose created time and updated time to querycoord metrics (#9732)
Signed-off-by: dragondriver <jiquan.long@zilliz.com>pull/9747/head
parent
e3ce1696e7
commit
5bbffeacfd
|
@ -50,8 +50,9 @@ func getSystemInfoMetrics(
|
|||
SystemVersion: os.Getenv(metricsinfo.GitCommitEnvKey),
|
||||
DeployMode: os.Getenv(metricsinfo.DeployModeEnvKey),
|
||||
},
|
||||
// TODO(dragondriver): CreatedTime & UpdatedTime, easy but time-costing
|
||||
Type: typeutil.QueryCoordRole,
|
||||
CreatedTime: Params.CreatedTime.String(),
|
||||
UpdatedTime: Params.UpdatedTime.String(),
|
||||
Type: typeutil.QueryCoordRole,
|
||||
},
|
||||
SystemConfigurations: metricsinfo.QueryCoordConfiguration{
|
||||
SearchChannelPrefix: Params.SearchChannelPrefix,
|
||||
|
|
|
@ -16,6 +16,7 @@ import (
|
|||
"strconv"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/milvus-io/milvus/internal/log"
|
||||
"github.com/milvus-io/milvus/internal/util/paramtable"
|
||||
|
@ -57,6 +58,9 @@ type ParamTable struct {
|
|||
MinioSecretAccessKey string
|
||||
MinioUseSSLStr bool
|
||||
MinioBucketName string
|
||||
|
||||
CreatedTime time.Time
|
||||
UpdatedTime time.Time
|
||||
}
|
||||
|
||||
// Params are variables of the ParamTable type
|
||||
|
|
|
@ -135,6 +135,10 @@ func (qc *QueryCoord) Init() error {
|
|||
func (qc *QueryCoord) Start() error {
|
||||
qc.scheduler.Start()
|
||||
log.Debug("start scheduler ...")
|
||||
|
||||
Params.CreatedTime = time.Now()
|
||||
Params.UpdatedTime = time.Now()
|
||||
|
||||
qc.UpdateStateCode(internalpb.StateCode_Healthy)
|
||||
|
||||
qc.loopWg.Add(1)
|
||||
|
|
Loading…
Reference in New Issue