Skip to content

Commit 98c6196

Browse files
authored
fix(tracemetrics): Don't show metrics on error (#103516)
### Summary Don't show trace metrics section on error (such as timeout)
1 parent 41b1259 commit 98c6196

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

static/app/components/events/metrics/metricsSection.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ function MetricsSectionContent({
7070
const organization = useOrganization();
7171
const {openDrawer} = useDrawer();
7272
const viewAllButtonRef = useRef<HTMLButtonElement>(null);
73-
const {result} = useMetricsIssueSection({traceId});
73+
const {result, error} = useMetricsIssueSection({traceId});
7474
const abbreviatedTableData = result.data
7575
? result.data.slice(0, NUMBER_ABBREVIATED_METRICS)
7676
: undefined;
@@ -105,7 +105,7 @@ function MetricsSectionContent({
105105
[group, event, project, openDrawer, organization, traceId]
106106
);
107107

108-
if (!result.data || result.data.length === 0) {
108+
if (!result.data || result.data.length === 0 || error) {
109109
// Don't show the metrics section if there are no metrics
110110
return null;
111111
}

0 commit comments

Comments
 (0)