From 12aae915e9b01b347b6d25bdf3430744f6af2d05 Mon Sep 17 00:00:00 2001 From: Dario Gieselaar Date: Wed, 13 Oct 2021 09:27:35 +0200 Subject: [PATCH] [APM] Filter on tx metrics for instance stats Closes #114391. --- .../get_service_instances_transaction_statistics.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/x-pack/plugins/apm/server/lib/services/get_service_instances/get_service_instances_transaction_statistics.ts b/x-pack/plugins/apm/server/lib/services/get_service_instances/get_service_instances_transaction_statistics.ts index a51f4c4e0fb7d..089282d6f1c34 100644 --- a/x-pack/plugins/apm/server/lib/services/get_service_instances/get_service_instances_transaction_statistics.ts +++ b/x-pack/plugins/apm/server/lib/services/get_service_instances/get_service_instances_transaction_statistics.ts @@ -17,6 +17,7 @@ import { Coordinate } from '../../../../typings/timeseries'; import { kqlQuery, rangeQuery } from '../../../../../observability/server'; import { environmentQuery } from '../../../../common/utils/environment_query'; import { + getDocumentTypeFilterForAggregatedTransactions, getProcessorEventForAggregatedTransactions, getTransactionDurationFieldForAggregatedTransactions, } from '../../helpers/aggregated_transactions'; @@ -111,6 +112,9 @@ export async function getServiceInstancesTransactionStatistics< ...rangeQuery(start, end), ...environmentQuery(environment), ...kqlQuery(kuery), + ...getDocumentTypeFilterForAggregatedTransactions( + searchAggregatedTransactions + ), ...(isComparisonSearch && serviceNodeIds ? [{ terms: { [SERVICE_NODE_NAME]: serviceNodeIds } }] : []),