From 4e21dabe42b1b549ac7c78b372152f128b6f7021 Mon Sep 17 00:00:00 2001 From: Nathan L Smith Date: Thu, 10 Dec 2020 14:02:17 -0600 Subject: [PATCH 1/5] Ensure transactionType is used in overview Fix the places where it was not being used: - Transactions table - Error rate chart - Errors table Also fix broken column sorting on transaction table. --- .../service_overview.test.tsx | 32 ++++++++++++------- .../service_overview_errors_table/index.tsx | 9 ++++-- .../index.tsx | 15 +++++---- .../transaction_error_rate_chart/index.tsx | 5 +-- .../get_service_error_groups/index.ts | 5 +++ ..._timeseries_data_for_transaction_groups.ts | 3 ++ .../get_transaction_groups_for_page.ts | 5 +++ .../get_service_transaction_groups/index.ts | 4 +++ x-pack/plugins/apm/server/routes/services.ts | 11 ++++++- .../plugins/apm/server/routes/transactions.ts | 12 ++++++- .../tests/service_overview/error_groups.ts | 7 ++++ .../basic/tests/transactions/error_rate.ts | 23 +++++++------ .../transactions_groups_overview.ts | 7 ++++ 13 files changed, 104 insertions(+), 34 deletions(-) diff --git a/x-pack/plugins/apm/public/components/app/service_overview/service_overview.test.tsx b/x-pack/plugins/apm/public/components/app/service_overview/service_overview.test.tsx index 3db857ad32190..492294aee8528 100644 --- a/x-pack/plugins/apm/public/components/app/service_overview/service_overview.test.tsx +++ b/x-pack/plugins/apm/public/components/app/service_overview/service_overview.test.tsx @@ -21,7 +21,8 @@ import * as useTransactionBreakdownHooks from '../../shared/charts/transaction_b import { renderWithTheme } from '../../../utils/testHelpers'; import { ServiceOverview } from './'; import { waitFor } from '@testing-library/dom'; -import * as callApmApi from '../../../services/rest/createCallApmApi'; +import * as callApmApiModule from '../../../services/rest/createCallApmApi'; +import * as useApmServiceContextHooks from '../../../context/apm_service/use_apm_service_context'; const KibanaReactContext = createKibanaReactContext({ usageCollection: { reportUiCounter: () => {} }, @@ -56,6 +57,13 @@ function Wrapper({ children }: { children?: ReactNode }) { describe('ServiceOverview', () => { it('renders', async () => { + jest + .spyOn(useApmServiceContextHooks, 'useApmServiceContext') + .mockReturnValue({ + agentName: 'java', + transactionType: 'request', + transactionTypes: ['request'], + }); jest .spyOn(useAnnotationsHooks, 'useAnnotationsContext') .mockReturnValue({ annotations: [] }); @@ -80,15 +88,19 @@ describe('ServiceOverview', () => { 'GET /api/apm/services/{serviceName}/dependencies': [], }; - jest.spyOn(callApmApi, 'createCallApmApi').mockImplementation(() => {}); + jest + .spyOn(callApmApiModule, 'createCallApmApi') + .mockImplementation(() => {}); - jest.spyOn(callApmApi, 'callApmApi').mockImplementation(({ endpoint }) => { - const response = calls[endpoint as keyof typeof calls]; + const callApmApi = jest + .spyOn(callApmApiModule, 'callApmApi') + .mockImplementation(({ endpoint }) => { + const response = calls[endpoint as keyof typeof calls]; - return response - ? Promise.resolve(response) - : Promise.reject(`Response for ${endpoint} is not defined`); - }); + return response + ? Promise.resolve(response) + : Promise.reject(`Response for ${endpoint} is not defined`); + }); jest .spyOn(useTransactionBreakdownHooks, 'useTransactionBreakdown') .mockReturnValue({ @@ -105,9 +117,7 @@ describe('ServiceOverview', () => { ); await waitFor(() => - expect(callApmApi.callApmApi).toHaveBeenCalledTimes( - Object.keys(calls).length - ) + expect(callApmApi).toHaveBeenCalledTimes(Object.keys(calls).length) ); expect((await findAllByText('Latency')).length).toBeGreaterThan(0); diff --git a/x-pack/plugins/apm/public/components/app/service_overview/service_overview_errors_table/index.tsx b/x-pack/plugins/apm/public/components/app/service_overview/service_overview_errors_table/index.tsx index 6e183924a80a7..4e889f953afa5 100644 --- a/x-pack/plugins/apm/public/components/app/service_overview/service_overview_errors_table/index.tsx +++ b/x-pack/plugins/apm/public/components/app/service_overview/service_overview_errors_table/index.tsx @@ -14,8 +14,9 @@ import { i18n } from '@kbn/i18n'; import React, { useState } from 'react'; import styled from 'styled-components'; import { asInteger } from '../../../../../common/utils/formatters'; -import { FETCH_STATUS, useFetcher } from '../../../../hooks/use_fetcher'; +import { useApmServiceContext } from '../../../../context/apm_service/use_apm_service_context'; import { useUrlParams } from '../../../../context/url_params_context/use_url_params'; +import { FETCH_STATUS, useFetcher } from '../../../../hooks/use_fetcher'; import { callApmApi } from '../../../../services/rest/createCallApmApi'; import { px, truncate, unit } from '../../../../style/variables'; import { SparkPlotWithValueLabel } from '../../../shared/charts/spark_plot/spark_plot_with_value_label'; @@ -66,7 +67,7 @@ export function ServiceOverviewErrorsTable({ serviceName }: Props) { urlParams: { start, end }, uiFilters, } = useUrlParams(); - + const { transactionType } = useApmServiceContext(); const [tableOptions, setTableOptions] = useState<{ pageIndex: number; sort: { @@ -152,7 +153,7 @@ export function ServiceOverviewErrorsTable({ serviceName }: Props) { }, status, } = useFetcher(() => { - if (!start || !end) { + if (!start || !end || !transactionType) { return; } @@ -169,6 +170,7 @@ export function ServiceOverviewErrorsTable({ serviceName }: Props) { pageIndex: tableOptions.pageIndex, sortField: tableOptions.sort.field, sortDirection: tableOptions.sort.direction, + transactionType, }, }, }).then((response) => { @@ -192,6 +194,7 @@ export function ServiceOverviewErrorsTable({ serviceName }: Props) { tableOptions.pageIndex, tableOptions.sort.field, tableOptions.sort.direction, + transactionType, ]); const { diff --git a/x-pack/plugins/apm/public/components/app/service_overview/service_overview_transactions_table/index.tsx b/x-pack/plugins/apm/public/components/app/service_overview/service_overview_transactions_table/index.tsx index e4260a2533d36..7887b27f762fe 100644 --- a/x-pack/plugins/apm/public/components/app/service_overview/service_overview_transactions_table/index.tsx +++ b/x-pack/plugins/apm/public/components/app/service_overview/service_overview_transactions_table/index.tsx @@ -34,6 +34,7 @@ import { TableLinkFlexItem } from '../table_link_flex_item'; import { SparkPlotWithValueLabel } from '../../../shared/charts/spark_plot/spark_plot_with_value_label'; import { ImpactBar } from '../../../shared/ImpactBar'; import { ServiceOverviewTable } from '../service_overview_table'; +import { useApmServiceContext } from '../../../../context/apm_service/use_apm_service_context'; type ServiceTransactionGroupItem = ValuesType< APIReturnType<'GET /api/apm/services/{serviceName}/transactions/groups/overview'>['transactionGroups'] @@ -43,7 +44,7 @@ interface Props { serviceName: string; } -type SortField = 'latency' | 'throughput' | 'errorRate' | 'impact'; +type SortField = 'name' | 'latency' | 'throughput' | 'errorRate' | 'impact'; type SortDirection = 'asc' | 'desc'; const PAGE_SIZE = 5; @@ -66,7 +67,7 @@ const StyledTransactionDetailLink = styled(TransactionDetailLink)` export function ServiceOverviewTransactionsTable(props: Props) { const { serviceName } = props; - + const { transactionType } = useApmServiceContext(); const { uiFilters, urlParams: { start, end }, @@ -94,7 +95,7 @@ export function ServiceOverviewTransactionsTable(props: Props) { }, status, } = useFetcher(() => { - if (!start || !end) { + if (!start || !end || !transactionType) { return; } @@ -112,6 +113,7 @@ export function ServiceOverviewTransactionsTable(props: Props) { pageIndex: tableOptions.pageIndex, sortField: tableOptions.sort.field, sortDirection: tableOptions.sort.direction, + transactionType, }, }, }).then((response) => { @@ -135,6 +137,7 @@ export function ServiceOverviewTransactionsTable(props: Props) { tableOptions.pageIndex, tableOptions.sort.field, tableOptions.sort.direction, + transactionType, ]); const { @@ -152,14 +155,14 @@ export function ServiceOverviewTransactionsTable(props: Props) { defaultMessage: 'Name', } ), - render: (_, { name, transactionType }) => { + render: (_, { name, transactionType: type }) => { return ( {name} @@ -209,7 +212,7 @@ export function ServiceOverviewTransactionsTable(props: Props) { }, }, { - field: 'error_rate', + field: 'errorRate', name: i18n.translate( 'xpack.apm.serviceOverview.transactionsTableColumnErrorRate', { diff --git a/x-pack/plugins/apm/public/components/shared/charts/transaction_error_rate_chart/index.tsx b/x-pack/plugins/apm/public/components/shared/charts/transaction_error_rate_chart/index.tsx index 4a388b13d7d22..665c730944a82 100644 --- a/x-pack/plugins/apm/public/components/shared/charts/transaction_error_rate_chart/index.tsx +++ b/x-pack/plugins/apm/public/components/shared/charts/transaction_error_rate_chart/index.tsx @@ -14,6 +14,7 @@ import { useTheme } from '../../../../hooks/use_theme'; import { useUrlParams } from '../../../../context/url_params_context/use_url_params'; import { callApmApi } from '../../../../services/rest/createCallApmApi'; import { TimeseriesChart } from '../timeseries_chart'; +import { useApmServiceContext } from '../../../../context/apm_service/use_apm_service_context'; function yLabelFormat(y?: number | null) { return asPercent(y || 0, 1); @@ -38,8 +39,8 @@ export function TransactionErrorRateChart({ const theme = useTheme(); const { serviceName } = useParams<{ serviceName?: string }>(); const { urlParams, uiFilters } = useUrlParams(); - - const { start, end, transactionType, transactionName } = urlParams; + const { transactionType } = useApmServiceContext(); + const { start, end, transactionName } = urlParams; const { data, status } = useFetcher(() => { if (serviceName && start && end) { diff --git a/x-pack/plugins/apm/server/lib/services/get_service_error_groups/index.ts b/x-pack/plugins/apm/server/lib/services/get_service_error_groups/index.ts index 0ca085105c30c..99382a1241913 100644 --- a/x-pack/plugins/apm/server/lib/services/get_service_error_groups/index.ts +++ b/x-pack/plugins/apm/server/lib/services/get_service_error_groups/index.ts @@ -15,6 +15,7 @@ import { ERROR_GROUP_ID, ERROR_LOG_MESSAGE, SERVICE_NAME, + TRANSACTION_TYPE, } from '../../../../common/elasticsearch_fieldnames'; import { Setup, SetupTimeRange } from '../../helpers/setup_request'; import { getBucketSize } from '../../helpers/get_bucket_size'; @@ -32,6 +33,7 @@ export async function getServiceErrorGroups({ pageIndex, sortDirection, sortField, + transactionType, }: { serviceName: string; setup: Setup & SetupTimeRange; @@ -40,6 +42,7 @@ export async function getServiceErrorGroups({ numBuckets: number; sortDirection: 'asc' | 'desc'; sortField: 'name' | 'last_seen' | 'occurrences'; + transactionType: string; }) { const { apmEventClient, start, end, esFilter } = setup; @@ -55,6 +58,7 @@ export async function getServiceErrorGroups({ bool: { filter: [ { term: { [SERVICE_NAME]: serviceName } }, + { term: { [TRANSACTION_TYPE]: transactionType } }, { range: rangeFilter(start, end) }, ...esFilter, ], @@ -127,6 +131,7 @@ export async function getServiceErrorGroups({ filter: [ { terms: { [ERROR_GROUP_ID]: sortedErrorGroupIds } }, { term: { [SERVICE_NAME]: serviceName } }, + { term: { [TRANSACTION_TYPE]: transactionType } }, { range: rangeFilter(start, end) }, ...esFilter, ], diff --git a/x-pack/plugins/apm/server/lib/services/get_service_transaction_groups/get_timeseries_data_for_transaction_groups.ts b/x-pack/plugins/apm/server/lib/services/get_service_transaction_groups/get_timeseries_data_for_transaction_groups.ts index 73b91429f5101..59af58757250b 100644 --- a/x-pack/plugins/apm/server/lib/services/get_service_transaction_groups/get_timeseries_data_for_transaction_groups.ts +++ b/x-pack/plugins/apm/server/lib/services/get_service_transaction_groups/get_timeseries_data_for_transaction_groups.ts @@ -36,6 +36,7 @@ export async function getTimeseriesDataForTransactionGroups({ searchAggregatedTransactions, size, numBuckets, + transactionType, }: { apmEventClient: APMEventClient; start: number; @@ -46,6 +47,7 @@ export async function getTimeseriesDataForTransactionGroups({ searchAggregatedTransactions: boolean; size: number; numBuckets: number; + transactionType: string; }) { const { intervalString } = getBucketSize({ start, end, numBuckets }); @@ -64,6 +66,7 @@ export async function getTimeseriesDataForTransactionGroups({ filter: [ { terms: { [TRANSACTION_NAME]: transactionNames } }, { term: { [SERVICE_NAME]: serviceName } }, + { term: { [TRANSACTION_TYPE]: transactionType } }, { range: rangeFilter(start, end) }, ...esFilter, ], diff --git a/x-pack/plugins/apm/server/lib/services/get_service_transaction_groups/get_transaction_groups_for_page.ts b/x-pack/plugins/apm/server/lib/services/get_service_transaction_groups/get_transaction_groups_for_page.ts index 5d3d7014ba8f8..28a4e53193f83 100644 --- a/x-pack/plugins/apm/server/lib/services/get_service_transaction_groups/get_transaction_groups_for_page.ts +++ b/x-pack/plugins/apm/server/lib/services/get_service_transaction_groups/get_transaction_groups_for_page.ts @@ -13,6 +13,7 @@ import { EVENT_OUTCOME, SERVICE_NAME, TRANSACTION_NAME, + TRANSACTION_TYPE, } from '../../../../common/elasticsearch_fieldnames'; import { getProcessorEventForAggregatedTransactions, @@ -21,6 +22,7 @@ import { import { APMEventClient } from '../../helpers/create_es_client/create_apm_event_client'; export type ServiceOverviewTransactionGroupSortField = + | 'name' | 'latency' | 'throughput' | 'errorRate' @@ -41,6 +43,7 @@ export async function getTransactionGroupsForPage({ sortDirection, pageIndex, size, + transactionType, }: { apmEventClient: APMEventClient; searchAggregatedTransactions: boolean; @@ -52,6 +55,7 @@ export async function getTransactionGroupsForPage({ sortDirection: 'asc' | 'desc'; pageIndex: number; size: number; + transactionType: string; }) { const response = await apmEventClient.search({ apm: { @@ -67,6 +71,7 @@ export async function getTransactionGroupsForPage({ bool: { filter: [ { term: { [SERVICE_NAME]: serviceName } }, + { term: { [TRANSACTION_TYPE]: transactionType } }, { range: rangeFilter(start, end) }, ...esFilter, ], diff --git a/x-pack/plugins/apm/server/lib/services/get_service_transaction_groups/index.ts b/x-pack/plugins/apm/server/lib/services/get_service_transaction_groups/index.ts index 88fd189712e07..f398f608edd81 100644 --- a/x-pack/plugins/apm/server/lib/services/get_service_transaction_groups/index.ts +++ b/x-pack/plugins/apm/server/lib/services/get_service_transaction_groups/index.ts @@ -21,6 +21,7 @@ export async function getServiceTransactionGroups({ sortDirection, sortField, searchAggregatedTransactions, + transactionType, }: { serviceName: string; setup: Setup & SetupTimeRange; @@ -30,6 +31,7 @@ export async function getServiceTransactionGroups({ sortDirection: 'asc' | 'desc'; sortField: ServiceOverviewTransactionGroupSortField; searchAggregatedTransactions: boolean; + transactionType: string; }) { const { apmEventClient, start, end, esFilter } = setup; @@ -48,6 +50,7 @@ export async function getServiceTransactionGroups({ sortDirection, size, searchAggregatedTransactions, + transactionType, }); const transactionNames = transactionGroups.map((group) => group.name); @@ -62,6 +65,7 @@ export async function getServiceTransactionGroups({ serviceName, size, transactionNames, + transactionType, }); return { diff --git a/x-pack/plugins/apm/server/routes/services.ts b/x-pack/plugins/apm/server/routes/services.ts index 40ad7fdd05248..875ef795270ce 100644 --- a/x-pack/plugins/apm/server/routes/services.ts +++ b/x-pack/plugins/apm/server/routes/services.ts @@ -224,6 +224,7 @@ export const serviceErrorGroupsRoute = createRoute({ t.literal('occurrences'), t.literal('name'), ]), + transactionType: t.string, }), ]), }), @@ -233,7 +234,14 @@ export const serviceErrorGroupsRoute = createRoute({ const { path: { serviceName }, - query: { size, numBuckets, pageIndex, sortDirection, sortField }, + query: { + numBuckets, + pageIndex, + size, + sortDirection, + sortField, + transactionType, + }, } = context.params; return getServiceErrorGroups({ serviceName, @@ -243,6 +251,7 @@ export const serviceErrorGroupsRoute = createRoute({ pageIndex, sortDirection, sortField, + transactionType, }); }, }); diff --git a/x-pack/plugins/apm/server/routes/transactions.ts b/x-pack/plugins/apm/server/routes/transactions.ts index 9b7a0981a4fed..80a4280606cde 100644 --- a/x-pack/plugins/apm/server/routes/transactions.ts +++ b/x-pack/plugins/apm/server/routes/transactions.ts @@ -73,11 +73,13 @@ export const transactionGroupsOverviewRoute = createRoute({ pageIndex: toNumberRt, sortDirection: t.union([t.literal('asc'), t.literal('desc')]), sortField: t.union([ + t.literal('name'), t.literal('latency'), t.literal('throughput'), t.literal('errorRate'), t.literal('impact'), ]), + transactionType: t.string, }), ]), }), @@ -93,7 +95,14 @@ export const transactionGroupsOverviewRoute = createRoute({ const { path: { serviceName }, - query: { size, numBuckets, pageIndex, sortDirection, sortField }, + query: { + size, + numBuckets, + pageIndex, + sortDirection, + sortField, + transactionType, + }, } = context.params; return getServiceTransactionGroups({ @@ -104,6 +113,7 @@ export const transactionGroupsOverviewRoute = createRoute({ size, sortDirection, sortField, + transactionType, numBuckets, }); }, diff --git a/x-pack/test/apm_api_integration/basic/tests/service_overview/error_groups.ts b/x-pack/test/apm_api_integration/basic/tests/service_overview/error_groups.ts index 3af85f7d2ae05..eb89f435082a4 100644 --- a/x-pack/test/apm_api_integration/basic/tests/service_overview/error_groups.ts +++ b/x-pack/test/apm_api_integration/basic/tests/service_overview/error_groups.ts @@ -30,6 +30,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { pageIndex: 0, sortDirection: 'desc', sortField: 'occurrences', + transactionType: 'request', })}` ); @@ -57,6 +58,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { pageIndex: 0, sortDirection: 'desc', sortField: 'occurrences', + transactionType: 'request', })}` ); @@ -114,6 +116,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { pageIndex: 0, sortDirection: 'desc', sortField: 'occurrences', + transactionType: 'request', })}` ); @@ -135,6 +138,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { pageIndex: 0, sortDirection: 'desc', sortField: 'occurrences', + transactionType: 'request', })}` ); @@ -156,6 +160,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { pageIndex: 0, sortDirection: 'desc', sortField: 'last_seen', + transactionType: 'request', })}` ); @@ -179,6 +184,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { pageIndex: 0, sortDirection: 'desc', sortField: 'occurrences', + transactionType: 'request', })}` ); @@ -203,6 +209,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { pageIndex, sortDirection: 'desc', sortField: 'occurrences', + transactionType: 'request', })}` ); diff --git a/x-pack/test/apm_api_integration/basic/tests/transactions/error_rate.ts b/x-pack/test/apm_api_integration/basic/tests/transactions/error_rate.ts index 426f8ab2954ac..e90d23aadcbbe 100644 --- a/x-pack/test/apm_api_integration/basic/tests/transactions/error_rate.ts +++ b/x-pack/test/apm_api_integration/basic/tests/transactions/error_rate.ts @@ -5,6 +5,7 @@ */ import expect from '@kbn/expect'; import { first, last } from 'lodash'; +import { format } from 'url'; import archives_metadata from '../../../common/archives_metadata'; import { FtrProviderContext } from '../../../common/ftr_provider_context'; @@ -13,19 +14,21 @@ export default function ApiTest({ getService }: FtrProviderContext) { const esArchiver = getService('esArchiver'); const archiveName = 'apm_8.0.0'; - const metadata = archives_metadata[archiveName]; // url parameters - const start = encodeURIComponent(metadata.start); - const end = encodeURIComponent(metadata.end); - const uiFilters = encodeURIComponent(JSON.stringify({})); + const { start, end } = archives_metadata[archiveName]; + const uiFilters = '{}'; + const transactionType = 'request'; describe('Error rate', () => { + const url = format({ + pathname: '/api/apm/services/opbeans-java/transactions/charts/error_rate', + query: { start, end, uiFilters, transactionType }, + }); + describe('when data is not loaded', () => { it('handles the empty state', async () => { - const response = await supertest.get( - `/api/apm/services/opbeans-java/transactions/charts/error_rate?start=${start}&end=${end}&uiFilters=${uiFilters}` - ); + const response = await supertest.get(url); expect(response.status).to.be(200); expect(response.body.noHits).to.be(true); @@ -34,6 +37,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { expect(response.body.average).to.be(null); }); }); + describe('when data is loaded', () => { before(() => esArchiver.load(archiveName)); after(() => esArchiver.unload(archiveName)); @@ -43,10 +47,9 @@ export default function ApiTest({ getService }: FtrProviderContext) { transactionErrorRate: Array<{ x: number; y: number | null }>; average: number; }; + before(async () => { - const response = await supertest.get( - `/api/apm/services/opbeans-java/transactions/charts/error_rate?start=${start}&end=${end}&uiFilters=${uiFilters}` - ); + const response = await supertest.get(url); errorRateResponse = response.body; }); diff --git a/x-pack/test/apm_api_integration/basic/tests/transactions/transactions_groups_overview.ts b/x-pack/test/apm_api_integration/basic/tests/transactions/transactions_groups_overview.ts index 28a572ab53043..51c19e4c7ea93 100644 --- a/x-pack/test/apm_api_integration/basic/tests/transactions/transactions_groups_overview.ts +++ b/x-pack/test/apm_api_integration/basic/tests/transactions/transactions_groups_overview.ts @@ -32,6 +32,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { pageIndex: 0, sortDirection: 'desc', sortField: 'impact', + transactionType: 'request', }, }) ); @@ -62,6 +63,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { pageIndex: 0, sortDirection: 'desc', sortField: 'impact', + transactionType: 'request', }, }) ); @@ -138,6 +140,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { pageIndex: 0, sortDirection: 'desc', sortField: 'impact', + transactionType: 'request', }, }) ); @@ -162,6 +165,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { pageIndex: 0, sortDirection: 'desc', sortField: 'impact', + transactionType: 'request', }, }) ); @@ -186,6 +190,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { pageIndex: 0, sortDirection: 'desc', sortField: 'latency', + transactionType: 'request', }, }) ); @@ -212,6 +217,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { pageIndex: 0, sortDirection: 'desc', sortField: 'impact', + transactionType: 'request', }, }) ); @@ -239,6 +245,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { pageIndex, sortDirection: 'desc', sortField: 'impact', + transactionType: 'request', }, }) ); From 73116db8a3a392a6403d89bf681228e2316b7df5 Mon Sep 17 00:00:00 2001 From: Nathan L Smith Date: Thu, 10 Dec 2020 16:34:57 -0600 Subject: [PATCH 2/5] fix a sort --- x-pack/plugins/apm/server/routes/transactions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/plugins/apm/server/routes/transactions.ts b/x-pack/plugins/apm/server/routes/transactions.ts index 80a4280606cde..96f24c50c7bc7 100644 --- a/x-pack/plugins/apm/server/routes/transactions.ts +++ b/x-pack/plugins/apm/server/routes/transactions.ts @@ -96,9 +96,9 @@ export const transactionGroupsOverviewRoute = createRoute({ const { path: { serviceName }, query: { - size, numBuckets, pageIndex, + size, sortDirection, sortField, transactionType, From 4e3152aaed7baa713eed71b3d3f4c0926f1470bc Mon Sep 17 00:00:00 2001 From: Nathan L Smith Date: Tue, 15 Dec 2020 13:05:28 -0600 Subject: [PATCH 3/5] test fix --- .../List/__test__/__snapshots__/List.test.tsx.snap | 2 -- .../components/app/service_overview/service_overview.test.tsx | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/x-pack/plugins/apm/public/components/app/ErrorGroupOverview/List/__test__/__snapshots__/List.test.tsx.snap b/x-pack/plugins/apm/public/components/app/ErrorGroupOverview/List/__test__/__snapshots__/List.test.tsx.snap index 7526eaf1aad64..4b332b6904282 100644 --- a/x-pack/plugins/apm/public/components/app/ErrorGroupOverview/List/__test__/__snapshots__/List.test.tsx.snap +++ b/x-pack/plugins/apm/public/components/app/ErrorGroupOverview/List/__test__/__snapshots__/List.test.tsx.snap @@ -100,7 +100,6 @@ exports[`ErrorGroupOverview -> List should render empty state 1`] = ` >