|
@@ -24,11 +24,14 @@ import {TimeSpentCell} from 'sentry/views/starfish/components/tableCells/timeSpe
|
|
|
import {useSpanMeta} from 'sentry/views/starfish/queries/useSpanMeta';
|
|
|
import {useSpanMetrics} from 'sentry/views/starfish/queries/useSpanMetrics';
|
|
|
import {useSpanMetricsSeries} from 'sentry/views/starfish/queries/useSpanMetricsSeries';
|
|
|
+import {SpanMetricsFields} from 'sentry/views/starfish/types';
|
|
|
import formatThroughput from 'sentry/views/starfish/utils/chartValueFormatters/formatThroughput';
|
|
|
import {DataTitles} from 'sentry/views/starfish/views/spans/types';
|
|
|
import {SampleList} from 'sentry/views/starfish/views/spanSummaryPage/sampleList';
|
|
|
import {SpanTransactionsTable} from 'sentry/views/starfish/views/spanSummaryPage/spanTransactionsTable';
|
|
|
|
|
|
+const {SPAN_SELF_TIME} = SpanMetricsFields;
|
|
|
+
|
|
|
type Props = {
|
|
|
location: Location;
|
|
|
} & RouteComponentProps<{groupId: string}, {transaction: string}>;
|
|
@@ -55,7 +58,12 @@ function SpanSummaryPage({params, location}: Props) {
|
|
|
const {data: spanMetrics} = useSpanMetrics(
|
|
|
{group: groupId},
|
|
|
queryFilter,
|
|
|
- ['sps()', 'sum(span.duration)', 'p95(span.duration)', 'time_spent_percentage()'],
|
|
|
+ [
|
|
|
+ 'sps()',
|
|
|
+ `sum(${SPAN_SELF_TIME})`,
|
|
|
+ `p95(${SPAN_SELF_TIME})`,
|
|
|
+ 'time_spent_percentage()',
|
|
|
+ ],
|
|
|
'span-summary-page-metrics'
|
|
|
);
|
|
|
|
|
@@ -63,7 +71,7 @@ function SpanSummaryPage({params, location}: Props) {
|
|
|
useSpanMetricsSeries(
|
|
|
{group: groupId},
|
|
|
queryFilter,
|
|
|
- ['p95(span.duration)', 'sps()'],
|
|
|
+ [`p95(${SPAN_SELF_TIME})`, 'sps()'],
|
|
|
'sidebar-span-metrics'
|
|
|
);
|
|
|
|
|
@@ -94,7 +102,9 @@ function SpanSummaryPage({params, location}: Props) {
|
|
|
<ThroughputCell throughputPerSecond={spanMetrics?.['sps()']} />
|
|
|
</Block>
|
|
|
<Block title={t('Duration')} description={t('Time spent in this span')}>
|
|
|
- <DurationCell milliseconds={spanMetrics?.['p95(span.duration)']} />
|
|
|
+ <DurationCell
|
|
|
+ milliseconds={spanMetrics?.[`p95(${SPAN_SELF_TIME})`]}
|
|
|
+ />
|
|
|
</Block>
|
|
|
<Block
|
|
|
title={t('Time Spent')}
|
|
@@ -104,7 +114,7 @@ function SpanSummaryPage({params, location}: Props) {
|
|
|
>
|
|
|
<TimeSpentCell
|
|
|
timeSpentPercentage={spanMetrics?.['time_spent_percentage()']}
|
|
|
- totalSpanTime={spanMetrics?.['sum(span.duration)']}
|
|
|
+ totalSpanTime={spanMetrics?.[`p95(${SPAN_SELF_TIME})`]}
|
|
|
/>
|
|
|
</Block>
|
|
|
</BlockContainer>
|
|
@@ -147,7 +157,7 @@ function SpanSummaryPage({params, location}: Props) {
|
|
|
<Chart
|
|
|
statsPeriod="24h"
|
|
|
height={140}
|
|
|
- data={[spanMetricsSeriesData?.['p95(span.duration)']]}
|
|
|
+ data={[spanMetricsSeriesData?.[`p95(${SPAN_SELF_TIME})`]]}
|
|
|
start=""
|
|
|
end=""
|
|
|
loading={areSpanMetricsSeriesLoading}
|