mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-07 09:38:39 +08:00
Ignore gather c metrics fail (#23366)
Signed-off-by: Yudong Cai <yudong.cai@zilliz.com>
This commit is contained in:
parent
43a9e175a3
commit
178559a875
@ -39,14 +39,15 @@ type MilvusRegistry struct {
|
|||||||
// Gather implements Gatherer.
|
// Gather implements Gatherer.
|
||||||
func (r *MilvusRegistry) Gather() ([]*dto.MetricFamily, error) {
|
func (r *MilvusRegistry) Gather() ([]*dto.MetricFamily, error) {
|
||||||
var res []*dto.MetricFamily
|
var res []*dto.MetricFamily
|
||||||
res1, err := r.GoRegistry.Gather()
|
resGo, err := r.GoRegistry.Gather()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return res, err
|
return res, err
|
||||||
}
|
}
|
||||||
res2, err := r.CRegistry.Gather()
|
resC, err := r.CRegistry.Gather()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return res, err
|
// if gather c metrics fail, ignore the error and return go metrics
|
||||||
|
return resGo, nil
|
||||||
}
|
}
|
||||||
res = append(res1, res2...)
|
res = append(resGo, resC...)
|
||||||
return res, nil
|
return res, nil
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user