Skip to content

Commit 55223f3

Browse files
committed
update response code chart to use eap
1 parent aa00530 commit 55223f3

File tree

3 files changed

+12
-293
lines changed

3 files changed

+12
-293
lines changed

static/app/views/insights/common/queries/useSpanMetricsTopNSeries.spec.tsx

Lines changed: 0 additions & 172 deletions
This file was deleted.

static/app/views/insights/common/queries/useSpanMetricsTopNSeries.tsx

Lines changed: 0 additions & 109 deletions
This file was deleted.

static/app/views/insights/http/components/httpSamplesPanel.tsx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ import {
4040
useSpansIndexed,
4141
} from 'sentry/views/insights/common/queries/useDiscover';
4242
import {useSpanMetricsSeries} from 'sentry/views/insights/common/queries/useDiscoverSeries';
43-
import {useSpanMetricsTopNSeries} from 'sentry/views/insights/common/queries/useSpanMetricsTopNSeries';
43+
import {useTopNSpanMetricsSeries} from 'sentry/views/insights/common/queries/useTopNDiscoverSeries';
4444
import {
4545
DataTitles,
4646
getDurationChartTitle,
@@ -205,20 +205,20 @@ export function HTTPSamplesPanel() {
205205
isFetching: isResponseCodeDataLoading,
206206
data: responseCodeData,
207207
error: responseCodeError,
208-
} = useSpanMetricsTopNSeries({
209-
search,
210-
fields: ['span.status_code', 'count()'],
211-
yAxis: ['count()'],
212-
topEvents: 5,
213-
sorts: [
214-
{
208+
} = useTopNSpanMetricsSeries(
209+
{
210+
search,
211+
fields: ['span.status_code', 'count()'],
212+
yAxis: ['count()'],
213+
topN: 5,
214+
sort: {
215215
kind: 'desc',
216216
field: 'count()',
217217
},
218-
],
219-
enabled: isPanelOpen && query.panel === 'status',
220-
referrer: Referrer.SAMPLES_PANEL_RESPONSE_CODE_CHART,
221-
});
218+
enabled: isPanelOpen && query.panel === 'status',
219+
},
220+
Referrer.SAMPLES_PANEL_RESPONSE_CODE_CHART
221+
);
222222

223223
const durationAxisMax = computeAxisMax([durationData?.[`avg(span.self_time)`]]);
224224

0 commit comments

Comments
 (0)