Skip to content

Commit

Permalink
[APM] always prefer url over trasaction.page.url (#107613) (#107634)
Browse files Browse the repository at this point in the history
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.

Co-authored-by: Andrew Wilkins <[email protected]>
  • Loading branch information
kibanamachine and axw authored Aug 4, 2021
1 parent 23e3037 commit 0491ea2
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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;
Expand Down

0 comments on commit 0491ea2

Please sign in to comment.