diff --git a/x-pack/plugins/apm/public/components/app/TraceOverview/index.tsx b/x-pack/plugins/apm/public/components/app/TraceOverview/index.tsx index 9a3282d878c16e..cdebb3aac129b6 100644 --- a/x-pack/plugins/apm/public/components/app/TraceOverview/index.tsx +++ b/x-pack/plugins/apm/public/components/app/TraceOverview/index.tsx @@ -16,7 +16,7 @@ import { APIReturnType } from '../../../services/rest/createCallApmApi'; type TracesAPIResponse = APIReturnType<'/api/apm/traces'>; const DEFAULT_RESPONSE: TracesAPIResponse = { - transactionGroups: [], + items: [], isAggregationAccurate: true, bucketSize: 0, }; @@ -64,7 +64,7 @@ export function TraceOverview() { diff --git a/x-pack/plugins/apm/public/components/app/TransactionOverview/index.tsx b/x-pack/plugins/apm/public/components/app/TransactionOverview/index.tsx index 2ea3152578644a..d6aaf1731faf84 100644 --- a/x-pack/plugins/apm/public/components/app/TransactionOverview/index.tsx +++ b/x-pack/plugins/apm/public/components/app/TransactionOverview/index.tsx @@ -12,10 +12,10 @@ import { EuiFlexItem, EuiHorizontalRule, EuiCallOut, - EuiLink, EuiCode, } from '@elastic/eui'; import { Location } from 'history'; +import { FormattedMessage } from '@kbn/i18n/react'; import { first } from 'lodash'; import React, { useMemo } from 'react'; import { i18n } from '@kbn/i18n'; @@ -25,6 +25,7 @@ import { IUrlParams } from '../../../context/UrlParamsContext/types'; import { TransactionCharts } from '../../shared/charts/TransactionCharts'; import { TransactionBreakdown } from '../../shared/TransactionBreakdown'; import { TransactionList } from './List'; +import { ElasticDocsLink } from '../../shared/Links/ElasticDocsLink'; import { useRedirect } from './useRedirect'; import { useFetcher } from '../../../hooks/useFetcher'; import { getHasMLJob } from '../../../services/rest/ml'; @@ -161,7 +162,7 @@ export function TransactionOverview() { {!transactionListData.isAggregationAccurate && (

- The number of unique transaction names exceeds the configured - value of {transactionListData.bucketSize}. Try reconfiguring - your agents to group similar transactions or increase the - value of - - xpack.apm.ui.transactionGroupBucketSize - .{' '} - Learn more in the docs.. + + xpack.apm.ui.transactionGroupBucketSize + + ), + }} + /> + + + {i18n.translate( + 'xpack.apm.transactionCardinalityWarning.docsLink', + { defaultMessage: 'Learn more in the docs' } + )} +

)}
diff --git a/x-pack/plugins/apm/public/hooks/useTransactionList.ts b/x-pack/plugins/apm/public/hooks/useTransactionList.ts index b61b6446b03bb4..ed6bb9309a557c 100644 --- a/x-pack/plugins/apm/public/hooks/useTransactionList.ts +++ b/x-pack/plugins/apm/public/hooks/useTransactionList.ts @@ -24,9 +24,7 @@ type TransactionsAPIResponse = APIReturnType< '/api/apm/services/{serviceName}/transaction_groups' >; -function getWithRelativeImpact( - items: TransactionsAPIResponse['transactionGroups'] -) { +function getWithRelativeImpact(items: TransactionsAPIResponse['items']) { const impacts = items .map(({ impact }) => impact) .filter((impact) => impact !== null) as number[]; @@ -46,7 +44,7 @@ function getWithRelativeImpact( } const DEFAULT_RESPONSE: TransactionsAPIResponse = { - transactionGroups: [], + items: [], isAggregationAccurate: true, bucketSize: 0, }; @@ -76,7 +74,7 @@ export function useTransactionList(urlParams: IUrlParams) { const memoizedData = useMemo( () => ({ - transactionGroups: getWithRelativeImpact(data.transactionGroups), + items: getWithRelativeImpact(data.items), isAggregationAccurate: data.isAggregationAccurate, bucketSize: data.bucketSize, }), diff --git a/x-pack/plugins/apm/server/lib/transaction_groups/transform.ts b/x-pack/plugins/apm/server/lib/transaction_groups/transform.ts index d405d9fc5576c6..2128d3f37ab291 100644 --- a/x-pack/plugins/apm/server/lib/transaction_groups/transform.ts +++ b/x-pack/plugins/apm/server/lib/transaction_groups/transform.ts @@ -67,7 +67,7 @@ export function transactionGroupsTransformer({ end: number; bucketSize: number; }): { - transactionGroups: ITransactionGroup[]; + items: ITransactionGroup[]; isAggregationAccurate: boolean; bucketSize: number; } { @@ -83,7 +83,7 @@ export function transactionGroupsTransformer({ ); return { - transactionGroups: transactionGroupsWithRelativeImpact, + items: transactionGroupsWithRelativeImpact, // The aggregation is considered accurate if the configured bucket size is larger or equal to the number of buckets returned // the actual number of buckets retrieved are `bucketsize + 1` to detect whether it's above the limit