Skip to content

Commit 2d433b2

Browse files
authored
fix(insights): Fix empty txn summary when transaction.op is default (#113099)
Relay [doesn't extract transaction ops when they have the default value of `default`](https://github.com/getsentry/relay/blob/ae5a27cb9c7571c821099e778ce921d3b908df77/relay-event-normalization/src/normalize/utils.rs#L158-L165). Since links into the transaction summary from insights include the transaction op as a filter, `transaction.op:default` was returning an empty screen. Instead, use `span.op` when linking into transaction summary: - `default` is populated here correctly, so the page works - it's span first/span streaming compatible This fixes both the Insights and Prebuilt Dashboard versions of the transaction link rendering (and removes an old comment calling out the `span.op`/`transaction.op` name discrepancy).
1 parent 42a379c commit 2d433b2

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

static/app/views/dashboards/datasetConfig/spans.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -474,12 +474,14 @@ function renderTransactionAsLinkable(data: EventData, baggage: RenderFunctionBag
474474

475475
const filters = new MutableSearch('');
476476

477-
// Filters on the transaction summary page won't match the dashboard because transaction summary isn't on eap yet.
477+
const isEap = organization.features.includes('performance-transaction-summary-eap');
478478
if (data[SpanFields.SPAN_OP]) {
479-
filters.addFilterValue('transaction.op', data[SpanFields.SPAN_OP]);
479+
filters.addFilterValue(
480+
isEap ? SpanFields.SPAN_OP : SpanFields.TRANSACTION_OP,
481+
data[SpanFields.SPAN_OP]
482+
);
480483
}
481484
if (data[SpanFields.REQUEST_METHOD]) {
482-
const isEap = organization.features.includes('performance-transaction-summary-eap');
483485
filters.addFilterValue(
484486
isEap ? 'request.method' : 'http.method',
485487
data[SpanFields.REQUEST_METHOD]

static/app/views/insights/pages/transactionCell.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ import {useOrganization} from 'sentry/utils/useOrganization';
88
import {useProjects} from 'sentry/utils/useProjects';
99
import {OverflowEllipsisTextContainer} from 'sentry/views/insights/common/components/textAlign';
1010
import {useDomainViewFilters} from 'sentry/views/insights/pages/useFilters';
11+
import {SpanFields} from 'sentry/views/insights/types';
12+
import {useTransactionSummaryEAP} from 'sentry/views/performance/eap/useTransactionSummaryEAP';
1113
import {generateTransactionSummaryRoute} from 'sentry/views/performance/transactionSummary/utils';
1214

1315
interface Props {
@@ -21,12 +23,16 @@ export function TransactionCell({project, transaction, transactionMethod}: Props
2123
const organization = useOrganization();
2224
const location = useLocation();
2325
const {view} = useDomainViewFilters();
26+
const isEAP = useTransactionSummaryEAP();
2427

2528
const projectId = projects.projects.find(p => p.slug === project)?.id;
2629

2730
const searchQuery = new MutableSearch('');
2831
if (transactionMethod) {
29-
searchQuery.addFilterValue('transaction.op', transactionMethod);
32+
searchQuery.addFilterValue(
33+
isEAP ? SpanFields.SPAN_OP : SpanFields.TRANSACTION_OP,
34+
transactionMethod
35+
);
3036
}
3137

3238
if (!transaction || !projectId) {

0 commit comments

Comments
 (0)