From fcd6baf1aad0e139647fb49da0393290d96c3317 Mon Sep 17 00:00:00 2001 From: Andrew Wilkins Date: Wed, 4 Aug 2021 13:32:21 +0800 Subject: [PATCH] [APM] always prefer url over trasaction.page.url Since 7.9.0, APM Server has been copying the `transaction.page.url` value to the ECS `url` field. We should still use `transaction.page.url` if it exists and `url` does not (i.e. for very old docs), but we should stop expecting it in newly written documents. --- .../public/components/shared/Summary/TransactionSummary.tsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/x-pack/plugins/apm/public/components/shared/Summary/TransactionSummary.tsx b/x-pack/plugins/apm/public/components/shared/Summary/TransactionSummary.tsx index 6939aaf49373e..dc1a62e591b17 100644 --- a/x-pack/plugins/apm/public/components/shared/Summary/TransactionSummary.tsx +++ b/x-pack/plugins/apm/public/components/shared/Summary/TransactionSummary.tsx @@ -11,7 +11,6 @@ import { Summary } from './'; import { TimestampTooltip } from '../TimestampTooltip'; import { DurationSummaryItem } from './DurationSummaryItem'; import { ErrorCountSummaryItemBadge } from './error_count_summary_item_badge'; -import { isRumAgentName } from '../../../../common/agent_name'; import { HttpInfoSummaryItem } from './http_info_summary_item'; import { TransactionResultSummaryItem } from './TransactionResultSummaryItem'; import { UserAgentSummaryItem } from './UserAgentSummaryItem'; @@ -24,10 +23,7 @@ interface Props { function getTransactionResultSummaryItem(transaction: Transaction) { const result = transaction.transaction.result; - const isRumAgent = isRumAgentName(transaction.agent.name); - const url = isRumAgent - ? transaction.transaction.page?.url - : transaction.url?.full; + const url = transaction.url?.full || transaction.transaction?.page?.url; if (url) { const method = transaction.http?.request?.method;