fix: do not show services without any data for select interval (#1521)

This commit is contained in:
Srikanth Chekuri 2022-08-17 15:11:08 +05:30 committed by GitHub
parent 166e5612eb
commit 32fba00aa8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -762,11 +762,16 @@ func (r *ClickHouseReader) GetServices(ctx context.Context, queryParams *model.G
args...,
).ScanStruct(&serviceItem)
if serviceItem.NumCalls == 0 {
return
}
if err != nil {
zap.S().Error("Error in processing sql query: ", err)
return
}
args, errStatus = buildQueryWithTagParams(ctx, queryParams.Tags, &errorQuery, args)
err = r.db.QueryRow(ctx, errorQuery, args...).Scan(&numErrors)
if err != nil {
zap.S().Error("Error in processing sql query: ", err)