From 5a8c8f2bcc79f9d1de1b6a162d8448f46ecbe7d3 Mon Sep 17 00:00:00 2001 From: Nar Saynorath Date: Fri, 8 Nov 2024 13:04:37 -0500 Subject: [PATCH] fix(dashboards): Simplify default EAP query The grouping by span.op was unnecessary and lead to a slow initial query. Simply showing count(span.duration) is the default that's shown in Explore as well. --- static/app/views/dashboards/datasetConfig/spans.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/static/app/views/dashboards/datasetConfig/spans.tsx b/static/app/views/dashboards/datasetConfig/spans.tsx index ef631efa539a84..61303f0f35850f 100644 --- a/static/app/views/dashboards/datasetConfig/spans.tsx +++ b/static/app/views/dashboards/datasetConfig/spans.tsx @@ -41,12 +41,12 @@ import {generateFieldOptions} from 'sentry/views/discover/utils'; const DEFAULT_WIDGET_QUERY: WidgetQuery = { name: '', - fields: ['span.op', 'avg(span.duration)'], - columns: ['span.op'], + fields: ['count(span.duration)'], + columns: [], fieldAliases: [], - aggregates: ['avg(span.duration)'], + aggregates: ['count(span.duration)'], conditions: '', - orderby: '-avg(span.duration)', + orderby: '', }; const EAP_AGGREGATIONS = ALLOWED_EXPLORE_VISUALIZE_AGGREGATES.reduce((acc, aggregate) => {