mirror of https://github.com/milvus-io/milvus.git
Expose created time and updated time to proxy metrics (#9727)
Signed-off-by: dragondriver <jiquan.long@zilliz.com>pull/9746/head
parent
3437761108
commit
7543122186
|
@ -65,8 +65,9 @@ func getSystemInfoMetrics(
|
|||
SystemVersion: os.Getenv(metricsinfo.GitCommitEnvKey),
|
||||
DeployMode: os.Getenv(metricsinfo.DeployModeEnvKey),
|
||||
},
|
||||
// TODO(dragondriver): CreatedTime & UpdatedTime, easy but time-costing
|
||||
Type: typeutil.ProxyRole,
|
||||
CreatedTime: Params.CreatedTime.String(),
|
||||
UpdatedTime: Params.UpdatedTime.String(),
|
||||
Type: typeutil.ProxyRole,
|
||||
},
|
||||
SystemConfigurations: metricsinfo.ProxyConfiguration{
|
||||
DefaultPartitionName: Params.DefaultPartitionName,
|
||||
|
|
|
@ -65,6 +65,9 @@ type ParamTable struct {
|
|||
MaxTaskNum int64
|
||||
|
||||
PulsarMaxMessageSize int
|
||||
|
||||
CreatedTime time.Time
|
||||
UpdatedTime time.Time
|
||||
}
|
||||
|
||||
var Params ParamTable
|
||||
|
|
|
@ -316,6 +316,9 @@ func (node *Proxy) Start() error {
|
|||
cb()
|
||||
}
|
||||
|
||||
Params.CreatedTime = time.Now()
|
||||
Params.UpdatedTime = time.Now()
|
||||
|
||||
node.UpdateStateCode(internalpb.StateCode_Healthy)
|
||||
log.Debug("Proxy", zap.Any("State", node.stateCode.Load()))
|
||||
|
||||
|
|
Loading…
Reference in New Issue