1. fix CommonQuerySeries.Warning range nil pointer err (#759)

This commit is contained in:
ning1875 2021-08-05 11:04:50 +08:00 committed by GitHub
parent e29407486d
commit c38d595cb8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -530,8 +530,8 @@ func (pd *PromeDataSource) QueryMetrics(recv vos.MetricQueryParam) *vos.MetricQu
respD := &vos.MetricQueryResp{} respD := &vos.MetricQueryResp{}
respD.Metrics = make([]string, 0) respD.Metrics = make([]string, 0)
s := pd.CommonQuerySeries(cj) s := pd.CommonQuerySeries(cj)
for _, x := range s.Warnings() { if s.Warnings() != nil {
logger.Warningf("[prome_query_error][series_set_iter_error][warning:%+v]\n", x.Error()) logger.Warningf("[prome_query_error][series_set_iter_error][warning:%+v]", s.Warnings())
} }