Skip to content

Commit 8874e17

Browse files
roggenkemperandrewshie-sentry
authored andcommitted
fix(llm-detector): Fix transaction row in span evidence (#103251)
llm detected issues have different event payloads than the other performance issues so the default transaction row function doesn't work properly. updates it to work correctly for these issues . fixes https://linear.app/getsentry/issue/ID-1087/transaction-in-span-evidence-is-incorrect
1 parent 346c62a commit 8874e17

File tree

1 file changed

+36
-1
lines changed

1 file changed

+36
-1
lines changed

static/app/components/events/interfaces/performance/spanEvidenceKeyValueList.tsx

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,10 +354,45 @@ function AIDetectedSpanEvidence({
354354
projectSlug,
355355
}: SpanEvidenceKeyValueListProps) {
356356
const evidenceData = event?.occurrence?.evidenceData ?? {};
357+
const transactionName = evidenceData.transaction ?? event.title;
358+
359+
const transactionSummaryLocation = transactionSummaryRouteWithQuery({
360+
organization,
361+
projectID: event.projectID,
362+
transaction: transactionName,
363+
query: {},
364+
});
365+
366+
const traceSlug = event.contexts?.trace?.trace_id ?? '';
367+
368+
const eventDetailsLocation = generateLinkToEventInTraceView({
369+
traceSlug,
370+
eventId: event.eventID,
371+
timestamp: event.endTimestamp ?? '',
372+
location,
373+
organization,
374+
});
375+
376+
const actionButton = projectSlug ? (
377+
<LinkButton size="xs" to={eventDetailsLocation}>
378+
{t('View Full Trace')}
379+
</LinkButton>
380+
) : undefined;
381+
382+
const transactionRow = makeRow(
383+
t('Transaction'),
384+
<pre>
385+
<Tooltip title={t('View Transaction Summary')} skipWrapper>
386+
<Link to={transactionSummaryLocation}>{transactionName}</Link>
387+
</Tooltip>
388+
</pre>,
389+
actionButton
390+
);
391+
357392
return (
358393
<PresortedKeyValueList
359394
data={[
360-
makeTransactionNameRow(event, organization, location, projectSlug),
395+
transactionRow,
361396
makeRow(t('Explanation'), evidenceData.explanation),
362397
makeRow(t('Impact'), evidenceData.impact),
363398
makeRow(t('Evidence'), evidenceData.evidence),

0 commit comments

Comments
 (0)