Skip to content

Commit

Permalink
Update x-pack/plugins/observability_solution/exploratory_view/public/…
Browse files Browse the repository at this point in the history
…components/shared/exploratory_view/hooks/use_ebt_telemetry.ts
  • Loading branch information
shahzad31 committed Jun 20, 2024
1 parent dbd002c commit 411b42f
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ export const useEBTTelemetry = ({
if (requests && analytics) {
const listReq = requests.getRequests();
if (listReq.length > 0) {
// find the highest query time
// find the highest query time, since a lens chart can contains more than on query, it doesn't make sense to
// report all of them , only the query with highest latency needs to be reported
const duration = listReq.reduce((acc, req) => {
const queryTime = Number(req.stats?.queryTime.value.split('ms')?.[0]);
return queryTime > acc ? queryTime : acc;
Expand Down

0 comments on commit 411b42f

Please sign in to comment.