enhance: add segment state on data coord bin log size metrics (#35153)

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
pull/34942/head^2
wei liu 2024-08-02 14:48:14 +08:00 committed by GitHub
parent 3dd3749f0b
commit f466129924
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View File

@ -412,7 +412,7 @@ func (m *meta) GetQuotaInfo() *metricsinfo.DataCoordQuotaMetrics {
coll, ok := m.collections[segment.GetCollectionID()]
if ok {
metrics.DataCoordStoredBinlogSize.WithLabelValues(coll.DatabaseName,
fmt.Sprint(segment.GetCollectionID()), fmt.Sprint(segment.GetID())).Set(float64(segmentSize))
fmt.Sprint(segment.GetCollectionID()), fmt.Sprint(segment.GetID()), segment.GetState().String()).Set(float64(segmentSize))
} else {
log.Warn("not found database name", zap.Int64("collectionID", segment.GetCollectionID()))
}

View File

@ -138,6 +138,7 @@ var (
databaseLabelName,
collectionIDLabelName,
segmentIDLabelName,
segmentStateLabelName,
})
DataCoordSegmentBinLogFileCount = prometheus.NewGaugeVec(
prometheus.GaugeOpts{