|
@@ -43,7 +43,8 @@ import {
|
|
|
SpanTransactionsTable,
|
|
|
} from 'sentry/views/starfish/views/spanSummaryPage/spanTransactionsTable';
|
|
|
|
|
|
-const {SPAN_SELF_TIME} = SpanMetricsFields;
|
|
|
+const {SPAN_SELF_TIME, SPAN_OP, SPAN_DESCRIPTION, SPAN_ACTION, SPAN_DOMAIN} =
|
|
|
+ SpanMetricsFields;
|
|
|
|
|
|
const DEFAULT_SORT: Sort = {
|
|
|
kind: 'desc',
|
|
@@ -74,10 +75,10 @@ function SpanSummaryPage({params, location}: Props) {
|
|
|
{group: groupId},
|
|
|
queryFilter,
|
|
|
[
|
|
|
- 'span.op',
|
|
|
- 'span.description',
|
|
|
- 'span.action',
|
|
|
- 'span.domain',
|
|
|
+ SPAN_OP,
|
|
|
+ SPAN_DESCRIPTION,
|
|
|
+ SPAN_ACTION,
|
|
|
+ SPAN_DOMAIN,
|
|
|
'count()',
|
|
|
'sps()',
|
|
|
`sum(${SPAN_SELF_TIME})`,
|
|
@@ -101,7 +102,7 @@ function SpanSummaryPage({params, location}: Props) {
|
|
|
useSynchronizeCharts([!areSpanMetricsSeriesLoading]);
|
|
|
|
|
|
const spanMetricsThroughputSeries = {
|
|
|
- seriesName: span?.['span.op']?.startsWith('db') ? 'Queries' : 'Requests',
|
|
|
+ seriesName: span?.[SPAN_OP]?.startsWith('db') ? 'Queries' : 'Requests',
|
|
|
data: spanMetricsSeriesData?.['sps()'].data,
|
|
|
};
|
|
|
|
|
@@ -153,7 +154,7 @@ function SpanSummaryPage({params, location}: Props) {
|
|
|
<StarfishDatePicker />
|
|
|
</FilterOptionsContainer>
|
|
|
<BlockContainer>
|
|
|
- <Block title={t('Operation')}>{span?.['span.op']}</Block>
|
|
|
+ <Block title={t('Operation')}>{span?.[SPAN_OP]}</Block>
|
|
|
<Block
|
|
|
title={t('Throughput')}
|
|
|
description={t('Throughput of this span per second')}
|
|
@@ -168,7 +169,7 @@ function SpanSummaryPage({params, location}: Props) {
|
|
|
milliseconds={spanMetrics?.[`p95(${SPAN_SELF_TIME})`]}
|
|
|
/>
|
|
|
</Block>
|
|
|
- {span?.['span.op']?.startsWith('http') && (
|
|
|
+ {span?.[SPAN_OP]?.startsWith('http') && (
|
|
|
<Block
|
|
|
title={t('5XX Responses')}
|
|
|
description={t('5XX responses in this span')}
|
|
@@ -190,7 +191,7 @@ function SpanSummaryPage({params, location}: Props) {
|
|
|
</BlockContainer>
|
|
|
</BlockContainer>
|
|
|
|
|
|
- {span?.['span.description'] && (
|
|
|
+ {span?.[SPAN_DESCRIPTION] && (
|
|
|
<BlockContainer>
|
|
|
<Block>
|
|
|
<Panel>
|
|
@@ -241,7 +242,7 @@ function SpanSummaryPage({params, location}: Props) {
|
|
|
</ChartPanel>
|
|
|
</Block>
|
|
|
|
|
|
- {span?.['span.op']?.startsWith('http') && (
|
|
|
+ {span?.[SPAN_OP]?.startsWith('http') && (
|
|
|
<Block>
|
|
|
<ChartPanel title={DataTitles.errorCount}>
|
|
|
<Chart
|
|
@@ -373,7 +374,7 @@ const getDescriptionLabel = (location: Location, spanMeta: SpanMeta, title?: boo
|
|
|
return title ? t('Query Summary') : t('Query');
|
|
|
}
|
|
|
|
|
|
- const spanOp = spanMeta['span.op'];
|
|
|
+ const spanOp = spanMeta[SPAN_OP];
|
|
|
let label;
|
|
|
if (spanOp?.startsWith('http')) {
|
|
|
label = title ? t('URL Request Summary') : t('URL Request');
|