[v9.5.x] Service graph: Fix error when service graph metrics are aggregated (#68691)

Service graph: Fix error when service graph metrics are aggregated (#68613)

make service graph work with aggregated metrics

(cherry picked from commit e1c2eb8c10)

Co-authored-by: Domas <domasx2@gmail.com>
This commit is contained in:
Grot (@grafanabot)
2023-05-18 13:22:31 +03:00
committed by GitHub
co-authored by Domas
parent f811cbc5a7
commit 38fdb3f1ee
@@ -744,7 +744,7 @@ function makePromServiceMapRequest(options: DataQueryRequest<TempoQuery>): DataQ
refId: metric,
// options.targets[0] is not correct here, but not sure what should happen if you have multiple queries for
// service map at the same time anyway
expr: `rate(${metric}${options.targets[0].serviceMapQuery || ''}[$__range])`,
expr: `sum by (client, server) (rate(${metric}${options.targets[0].serviceMapQuery || ''}[$__range]))`,
instant: true,
};
}),