mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-28 14:35:27 +08:00
enhance: Align the monitoring of last_replicated_time_tick with wal_last_confirm_time_tick (#46469)
issue: https://github.com/milvus-io/milvus/issues/46116 Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
This commit is contained in:
parent
9345caa135
commit
d03b9cc052
@ -23,6 +23,7 @@ import (
|
||||
"github.com/milvus-io/milvus/pkg/v2/proto/streamingpb"
|
||||
"github.com/milvus-io/milvus/pkg/v2/streaming/util/message"
|
||||
"github.com/milvus-io/milvus/pkg/v2/util/timerecord"
|
||||
"github.com/milvus-io/milvus/pkg/v2/util/tsoutil"
|
||||
"github.com/milvus-io/milvus/pkg/v2/util/typeutil"
|
||||
)
|
||||
|
||||
@ -90,7 +91,7 @@ func (m *replicateMetrics) OnConfirmed(msg message.ImmutableMessage) {
|
||||
metrics.CDCLastReplicatedTimeTick.WithLabelValues(
|
||||
m.replicateInfo.GetSourceChannelName(),
|
||||
m.replicateInfo.GetTargetChannelName(),
|
||||
).Set(float64(msg.TimeTick()))
|
||||
).Set(tsoutil.PhysicalTimeSeconds(msg.TimeTick()))
|
||||
}
|
||||
|
||||
func (m *replicateMetrics) OnInitiate() {
|
||||
|
||||
@ -33,7 +33,7 @@ const (
|
||||
|
||||
// CDC metric labels
|
||||
CDCLabelTargetCluster = "target_cluster"
|
||||
CDCLabelSourceChannelName = "source_channel_name"
|
||||
CDCLabelSourceChannelName = WALChannelLabelName
|
||||
CDCLabelTargetChannelName = "target_channel_name"
|
||||
CDCLabelMsgType = msgTypeLabelName
|
||||
CDCLabelConnectionStatus = "connection_status"
|
||||
@ -87,7 +87,7 @@ var CDCLastReplicatedTimeTick = prometheus.NewGaugeVec(
|
||||
Namespace: milvusNamespace,
|
||||
Subsystem: typeutil.CDCRole,
|
||||
Name: CDCMetricLastReplicatedTimeTick,
|
||||
Help: "The time tick of the last replicated message",
|
||||
Help: "The time tick in seconds of the last replicated message",
|
||||
}, []string{
|
||||
CDCLabelSourceChannelName,
|
||||
CDCLabelTargetChannelName,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user