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

make service graph work with aggregated metrics
This commit is contained in:
Domas 2023-05-18 13:06:14 +03:00 committed by GitHub
parent b7a0313cba
commit e1c2eb8c10
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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,
};
}),