[APM] APIs refactoring (#85010)
* renaiming /transaction_groups to /transactions/groups * renaiming /transaction_groups to /transactions/groups * renaiming /transaction_groups/charts to /transactions/charts * renaiming /transaction_groups/distribution to transactions/charts/distribution * renaiming /transaction_groups/breakdown to transactions/charts/breakdown * removing /api/apm/transaction_sample. Unused * renaiming /transaction_groups/error_rate to transactions/charts/error_rate * removing transaction_groups * removing /api/apm/transaction_sample. Unused * renaiming /overview_transaction_groups to transactions/groups/overview * refactoring error_groups * addressing pr comments * fixing test
This commit is contained in:
parent
2f327543c2
commit
d4370ff14e
33 changed files with 4073 additions and 260 deletions
|
@ -33,11 +33,9 @@ import { unit } from '../../../../style/variables';
|
|||
import { ChartContainer } from '../../../shared/charts/chart_container';
|
||||
import { EmptyMessage } from '../../../shared/EmptyMessage';
|
||||
|
||||
type TransactionDistributionAPIResponse = APIReturnType<'GET /api/apm/services/{serviceName}/transaction_groups/distribution'>;
|
||||
type TransactionDistributionAPIResponse = APIReturnType<'GET /api/apm/services/{serviceName}/transactions/charts/distribution'>;
|
||||
|
||||
type DistributionApiResponse = APIReturnType<'GET /api/apm/services/{serviceName}/transaction_groups/distribution'>;
|
||||
|
||||
type DistributionBucket = DistributionApiResponse['buckets'][0];
|
||||
type DistributionBucket = TransactionDistributionAPIResponse['buckets'][0];
|
||||
|
||||
interface IChartPoint {
|
||||
x0: number;
|
||||
|
|
|
@ -27,7 +27,7 @@ import { MaybeViewTraceLink } from './MaybeViewTraceLink';
|
|||
import { TransactionTabs } from './TransactionTabs';
|
||||
import { IWaterfall } from './WaterfallContainer/Waterfall/waterfall_helpers/waterfall_helpers';
|
||||
|
||||
type DistributionApiResponse = APIReturnType<'GET /api/apm/services/{serviceName}/transaction_groups/distribution'>;
|
||||
type DistributionApiResponse = APIReturnType<'GET /api/apm/services/{serviceName}/transactions/charts/distribution'>;
|
||||
|
||||
type DistributionBucket = DistributionApiResponse['buckets'][0];
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ import { ImpactBar } from '../../../shared/ImpactBar';
|
|||
import { ServiceOverviewTable } from '../service_overview_table';
|
||||
|
||||
type ServiceTransactionGroupItem = ValuesType<
|
||||
APIReturnType<'GET /api/apm/services/{serviceName}/overview_transaction_groups'>['transactionGroups']
|
||||
APIReturnType<'GET /api/apm/services/{serviceName}/transactions/groups/overview'>['transactionGroups']
|
||||
>;
|
||||
|
||||
interface Props {
|
||||
|
@ -100,7 +100,7 @@ export function ServiceOverviewTransactionsTable(props: Props) {
|
|||
|
||||
return callApmApi({
|
||||
endpoint:
|
||||
'GET /api/apm/services/{serviceName}/overview_transaction_groups',
|
||||
'GET /api/apm/services/{serviceName}/transactions/groups/overview',
|
||||
params: {
|
||||
path: { serviceName },
|
||||
query: {
|
||||
|
|
|
@ -10,7 +10,7 @@ import { APIReturnType } from '../../../../services/rest/createCallApmApi';
|
|||
import { MockApmPluginContextWrapper } from '../../../../context/apm_plugin/mock_apm_plugin_context';
|
||||
import { TransactionList } from './';
|
||||
|
||||
type TransactionGroup = APIReturnType<'GET /api/apm/services/{serviceName}/transaction_groups'>['items'][0];
|
||||
type TransactionGroup = APIReturnType<'GET /api/apm/services/{serviceName}/transactions/groups'>['items'][0];
|
||||
|
||||
export default {
|
||||
title: 'app/TransactionOverview/TransactionList',
|
||||
|
|
|
@ -20,7 +20,7 @@ import { LoadingStatePrompt } from '../../../shared/LoadingStatePrompt';
|
|||
import { EmptyMessage } from '../../../shared/EmptyMessage';
|
||||
import { TransactionDetailLink } from '../../../shared/Links/apm/TransactionDetailLink';
|
||||
|
||||
type TransactionGroup = APIReturnType<'GET /api/apm/services/{serviceName}/transaction_groups'>['items'][0];
|
||||
type TransactionGroup = APIReturnType<'GET /api/apm/services/{serviceName}/transactions/groups'>['items'][0];
|
||||
|
||||
// Truncate both the link and the child span (the tooltip anchor.) The link so
|
||||
// it doesn't overflow, and the anchor so we get the ellipsis.
|
||||
|
|
|
@ -9,7 +9,7 @@ import { APIReturnType } from '../../../services/rest/createCallApmApi';
|
|||
import { useFetcher } from '../../../hooks/use_fetcher';
|
||||
import { useUrlParams } from '../../../context/url_params_context/use_url_params';
|
||||
|
||||
type TransactionsAPIResponse = APIReturnType<'GET /api/apm/services/{serviceName}/transaction_groups'>;
|
||||
type TransactionsAPIResponse = APIReturnType<'GET /api/apm/services/{serviceName}/transactions/groups'>;
|
||||
|
||||
const DEFAULT_RESPONSE: Partial<TransactionsAPIResponse> = {
|
||||
items: undefined,
|
||||
|
@ -25,7 +25,7 @@ export function useTransactionListFetcher() {
|
|||
(callApmApi) => {
|
||||
if (serviceName && start && end && transactionType) {
|
||||
return callApmApi({
|
||||
endpoint: 'GET /api/apm/services/{serviceName}/transaction_groups',
|
||||
endpoint: 'GET /api/apm/services/{serviceName}/transactions/groups',
|
||||
params: {
|
||||
path: { serviceName },
|
||||
query: {
|
||||
|
|
|
@ -20,7 +20,7 @@ export function useTransactionBreakdown() {
|
|||
if (serviceName && start && end && transactionType) {
|
||||
return callApmApi({
|
||||
endpoint:
|
||||
'GET /api/apm/services/{serviceName}/transaction_groups/breakdown',
|
||||
'GET /api/apm/services/{serviceName}/transaction/charts/breakdown',
|
||||
params: {
|
||||
path: { serviceName },
|
||||
query: {
|
||||
|
|
|
@ -45,7 +45,7 @@ export function TransactionErrorRateChart({
|
|||
if (serviceName && start && end) {
|
||||
return callApmApi({
|
||||
endpoint:
|
||||
'GET /api/apm/services/{serviceName}/transaction_groups/error_rate',
|
||||
'GET /api/apm/services/{serviceName}/transactions/charts/error_rate',
|
||||
params: {
|
||||
path: {
|
||||
serviceName,
|
||||
|
|
|
@ -21,8 +21,7 @@ export function useTransactionChartsFetcher() {
|
|||
(callApmApi) => {
|
||||
if (serviceName && start && end) {
|
||||
return callApmApi({
|
||||
endpoint:
|
||||
'GET /api/apm/services/{serviceName}/transaction_groups/charts',
|
||||
endpoint: 'GET /api/apm/services/{serviceName}/transactions/charts',
|
||||
params: {
|
||||
path: { serviceName },
|
||||
query: {
|
||||
|
|
|
@ -12,7 +12,7 @@ import { maybe } from '../../common/utils/maybe';
|
|||
import { APIReturnType } from '../services/rest/createCallApmApi';
|
||||
import { useUrlParams } from '../context/url_params_context/use_url_params';
|
||||
|
||||
type APIResponse = APIReturnType<'GET /api/apm/services/{serviceName}/transaction_groups/distribution'>;
|
||||
type APIResponse = APIReturnType<'GET /api/apm/services/{serviceName}/transactions/charts/distribution'>;
|
||||
|
||||
const INITIAL_DATA = {
|
||||
buckets: [] as APIResponse['buckets'],
|
||||
|
@ -38,7 +38,7 @@ export function useTransactionDistributionFetcher() {
|
|||
if (serviceName && start && end && transactionType && transactionName) {
|
||||
const response = await callApmApi({
|
||||
endpoint:
|
||||
'GET /api/apm/services/{serviceName}/transaction_groups/distribution',
|
||||
'GET /api/apm/services/{serviceName}/transactions/charts/distribution',
|
||||
params: {
|
||||
path: {
|
||||
serviceName,
|
||||
|
|
|
@ -14,8 +14,7 @@ import { rangeFilter } from '../../../common/utils/range_filter';
|
|||
import { Setup, SetupTimeRange } from '../helpers/setup_request';
|
||||
import { getTransaction } from '../transactions/get_transaction';
|
||||
|
||||
// TODO: rename from "getErrorGroup" to "getErrorGroupSample" (since a single error is returned, not an errorGroup)
|
||||
export async function getErrorGroup({
|
||||
export async function getErrorGroupSample({
|
||||
serviceName,
|
||||
groupId,
|
||||
setup,
|
|
@ -4,7 +4,7 @@
|
|||
* you may not use this file except in compliance with the Elastic License.
|
||||
*/
|
||||
|
||||
import { getErrorGroup } from './get_error_group';
|
||||
import { getErrorGroupSample } from './get_error_group_sample';
|
||||
import { getErrorGroups } from './get_error_groups';
|
||||
import {
|
||||
SearchParamsMock,
|
||||
|
@ -20,7 +20,7 @@ describe('error queries', () => {
|
|||
|
||||
it('fetches a single error group', async () => {
|
||||
mock = await inspectSearchParams((setup) =>
|
||||
getErrorGroup({
|
||||
getErrorGroupSample({
|
||||
groupId: 'groupId',
|
||||
serviceName: 'serviceName',
|
||||
setup,
|
||||
|
|
|
@ -1,89 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License;
|
||||
* you may not use this file except in compliance with the Elastic License.
|
||||
*/
|
||||
|
||||
import { maybe } from '../../../common/utils/maybe';
|
||||
import {
|
||||
SERVICE_NAME,
|
||||
TRANSACTION_NAME,
|
||||
TRANSACTION_SAMPLED,
|
||||
} from '../../../common/elasticsearch_fieldnames';
|
||||
import { ProcessorEvent } from '../../../common/processor_event';
|
||||
import { rangeFilter } from '../../../common/utils/range_filter';
|
||||
import { Setup, SetupTimeRange } from '../helpers/setup_request';
|
||||
|
||||
export async function getTransactionSampleForGroup({
|
||||
serviceName,
|
||||
transactionName,
|
||||
setup,
|
||||
}: {
|
||||
serviceName: string;
|
||||
transactionName: string;
|
||||
setup: Setup & SetupTimeRange;
|
||||
}) {
|
||||
const { apmEventClient, start, end, esFilter } = setup;
|
||||
|
||||
const filter = [
|
||||
{
|
||||
range: rangeFilter(start, end),
|
||||
},
|
||||
{
|
||||
term: {
|
||||
[SERVICE_NAME]: serviceName,
|
||||
},
|
||||
},
|
||||
{
|
||||
term: {
|
||||
[TRANSACTION_NAME]: transactionName,
|
||||
},
|
||||
},
|
||||
...esFilter,
|
||||
];
|
||||
|
||||
const getSampledTransaction = async () => {
|
||||
const response = await apmEventClient.search({
|
||||
terminateAfter: 1,
|
||||
apm: {
|
||||
events: [ProcessorEvent.transaction],
|
||||
},
|
||||
body: {
|
||||
size: 1,
|
||||
query: {
|
||||
bool: {
|
||||
filter: [...filter, { term: { [TRANSACTION_SAMPLED]: true } }],
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
return maybe(response.hits.hits[0]?._source);
|
||||
};
|
||||
|
||||
const getUnsampledTransaction = async () => {
|
||||
const response = await apmEventClient.search({
|
||||
terminateAfter: 1,
|
||||
apm: {
|
||||
events: [ProcessorEvent.transaction],
|
||||
},
|
||||
body: {
|
||||
size: 1,
|
||||
query: {
|
||||
bool: {
|
||||
filter: [...filter, { term: { [TRANSACTION_SAMPLED]: false } }],
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
return maybe(response.hits.hits[0]?._source);
|
||||
};
|
||||
|
||||
const [sampledTransaction, unsampledTransaction] = await Promise.all([
|
||||
getSampledTransaction(),
|
||||
getUnsampledTransaction(),
|
||||
]);
|
||||
|
||||
return sampledTransaction || unsampledTransaction;
|
||||
}
|
|
@ -23,7 +23,6 @@ import {
|
|||
serviceAnnotationsCreateRoute,
|
||||
serviceErrorGroupsRoute,
|
||||
serviceThroughputRoute,
|
||||
serviceTransactionGroupsRoute,
|
||||
} from './services';
|
||||
import {
|
||||
agentConfigurationRoute,
|
||||
|
@ -52,13 +51,13 @@ import {
|
|||
correlationsForFailedTransactionsRoute,
|
||||
} from './correlations';
|
||||
import {
|
||||
transactionGroupsBreakdownRoute,
|
||||
transactionGroupsChartsRoute,
|
||||
transactionGroupsDistributionRoute,
|
||||
transactionChartsBreakdownRoute,
|
||||
transactionChartsRoute,
|
||||
transactionChartsDistributionRoute,
|
||||
transactionChartsErrorRateRoute,
|
||||
transactionGroupsRoute,
|
||||
transactionSampleForGroupRoute,
|
||||
transactionGroupsErrorRateRoute,
|
||||
} from './transaction_groups';
|
||||
transactionGroupsOverviewRoute,
|
||||
} from './transactions/transactions_routes';
|
||||
import {
|
||||
errorGroupsLocalFiltersRoute,
|
||||
metricsLocalFiltersRoute,
|
||||
|
@ -122,7 +121,6 @@ const createApmApi = () => {
|
|||
.add(serviceAnnotationsCreateRoute)
|
||||
.add(serviceErrorGroupsRoute)
|
||||
.add(serviceThroughputRoute)
|
||||
.add(serviceTransactionGroupsRoute)
|
||||
|
||||
// Agent configuration
|
||||
.add(getSingleAgentConfigurationRoute)
|
||||
|
@ -152,13 +150,13 @@ const createApmApi = () => {
|
|||
.add(tracesByIdRoute)
|
||||
.add(rootTransactionByTraceIdRoute)
|
||||
|
||||
// Transaction groups
|
||||
.add(transactionGroupsBreakdownRoute)
|
||||
.add(transactionGroupsChartsRoute)
|
||||
.add(transactionGroupsDistributionRoute)
|
||||
// Transactions
|
||||
.add(transactionChartsBreakdownRoute)
|
||||
.add(transactionChartsRoute)
|
||||
.add(transactionChartsDistributionRoute)
|
||||
.add(transactionChartsErrorRateRoute)
|
||||
.add(transactionGroupsRoute)
|
||||
.add(transactionSampleForGroupRoute)
|
||||
.add(transactionGroupsErrorRateRoute)
|
||||
.add(transactionGroupsOverviewRoute)
|
||||
|
||||
// UI filters
|
||||
.add(errorGroupsLocalFiltersRoute)
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
import * as t from 'io-ts';
|
||||
import { createRoute } from './create_route';
|
||||
import { getErrorDistribution } from '../lib/errors/distribution/get_distribution';
|
||||
import { getErrorGroup } from '../lib/errors/get_error_group';
|
||||
import { getErrorGroupSample } from '../lib/errors/get_error_group_sample';
|
||||
import { getErrorGroups } from '../lib/errors/get_error_groups';
|
||||
import { setupRequest } from '../lib/helpers/setup_request';
|
||||
import { uiFiltersRt, rangeRt } from './default_api_types';
|
||||
|
@ -56,7 +56,7 @@ export const errorGroupsRoute = createRoute({
|
|||
handler: async ({ context, request }) => {
|
||||
const setup = await setupRequest(context, request);
|
||||
const { serviceName, groupId } = context.params.path;
|
||||
return getErrorGroup({ serviceName, groupId, setup });
|
||||
return getErrorGroupSample({ serviceName, groupId, setup });
|
||||
},
|
||||
});
|
||||
|
||||
|
|
|
@ -19,7 +19,6 @@ import { dateAsStringRt } from '../../common/runtime_types/date_as_string_rt';
|
|||
import { getSearchAggregatedTransactions } from '../lib/helpers/aggregated_transactions';
|
||||
import { getServiceErrorGroups } from '../lib/services/get_service_error_groups';
|
||||
import { toNumberRt } from '../../common/runtime_types/to_number_rt';
|
||||
import { getServiceTransactionGroups } from '../lib/services/get_service_transaction_groups';
|
||||
import { getThroughput } from '../lib/services/get_throughput';
|
||||
|
||||
export const servicesRoute = createRoute({
|
||||
|
@ -276,52 +275,3 @@ export const serviceThroughputRoute = createRoute({
|
|||
});
|
||||
},
|
||||
});
|
||||
|
||||
export const serviceTransactionGroupsRoute = createRoute({
|
||||
endpoint: 'GET /api/apm/services/{serviceName}/overview_transaction_groups',
|
||||
params: t.type({
|
||||
path: t.type({ serviceName: t.string }),
|
||||
query: t.intersection([
|
||||
rangeRt,
|
||||
uiFiltersRt,
|
||||
t.type({
|
||||
size: toNumberRt,
|
||||
numBuckets: toNumberRt,
|
||||
pageIndex: toNumberRt,
|
||||
sortDirection: t.union([t.literal('asc'), t.literal('desc')]),
|
||||
sortField: t.union([
|
||||
t.literal('latency'),
|
||||
t.literal('throughput'),
|
||||
t.literal('errorRate'),
|
||||
t.literal('impact'),
|
||||
]),
|
||||
}),
|
||||
]),
|
||||
}),
|
||||
options: {
|
||||
tags: ['access:apm'],
|
||||
},
|
||||
handler: async ({ context, request }) => {
|
||||
const setup = await setupRequest(context, request);
|
||||
|
||||
const searchAggregatedTransactions = await getSearchAggregatedTransactions(
|
||||
setup
|
||||
);
|
||||
|
||||
const {
|
||||
path: { serviceName },
|
||||
query: { size, numBuckets, pageIndex, sortDirection, sortField },
|
||||
} = context.params;
|
||||
|
||||
return getServiceTransactionGroups({
|
||||
setup,
|
||||
serviceName,
|
||||
pageIndex,
|
||||
searchAggregatedTransactions,
|
||||
size,
|
||||
sortDirection,
|
||||
sortField,
|
||||
numBuckets,
|
||||
});
|
||||
},
|
||||
});
|
||||
|
|
|
@ -4,21 +4,26 @@
|
|||
* you may not use this file except in compliance with the Elastic License.
|
||||
*/
|
||||
|
||||
import * as t from 'io-ts';
|
||||
import Boom from '@hapi/boom';
|
||||
import { setupRequest } from '../lib/helpers/setup_request';
|
||||
import { getTransactionCharts } from '../lib/transactions/charts';
|
||||
import { getTransactionDistribution } from '../lib/transactions/distribution';
|
||||
import { getTransactionBreakdown } from '../lib/transactions/breakdown';
|
||||
import { getTransactionGroupList } from '../lib/transaction_groups';
|
||||
import { createRoute } from './create_route';
|
||||
import { uiFiltersRt, rangeRt } from './default_api_types';
|
||||
import { getTransactionSampleForGroup } from '../lib/transaction_groups/get_transaction_sample_for_group';
|
||||
import { getSearchAggregatedTransactions } from '../lib/helpers/aggregated_transactions';
|
||||
import { getErrorRate } from '../lib/transaction_groups/get_error_rate';
|
||||
import * as t from 'io-ts';
|
||||
import { toNumberRt } from '../../../common/runtime_types/to_number_rt';
|
||||
import { getSearchAggregatedTransactions } from '../../lib/helpers/aggregated_transactions';
|
||||
import { setupRequest } from '../../lib/helpers/setup_request';
|
||||
import { getServiceTransactionGroups } from '../../lib/services/get_service_transaction_groups';
|
||||
import { getTransactionBreakdown } from '../../lib/transactions/breakdown';
|
||||
import { getTransactionCharts } from '../../lib/transactions/charts';
|
||||
import { getTransactionDistribution } from '../../lib/transactions/distribution';
|
||||
import { getTransactionGroupList } from '../../lib/transaction_groups';
|
||||
import { getErrorRate } from '../../lib/transaction_groups/get_error_rate';
|
||||
import { createRoute } from '../create_route';
|
||||
import { rangeRt, uiFiltersRt } from '../default_api_types';
|
||||
|
||||
/**
|
||||
* Returns a list of transactions grouped by name
|
||||
* //TODO: delete this once we moved away from the old table in the transaction overview page. It should be replaced by /transactions/groups/overview/
|
||||
*/
|
||||
export const transactionGroupsRoute = createRoute({
|
||||
endpoint: 'GET /api/apm/services/{serviceName}/transaction_groups',
|
||||
endpoint: 'GET /api/apm/services/{serviceName}/transactions/groups',
|
||||
params: t.type({
|
||||
path: t.type({
|
||||
serviceName: t.string,
|
||||
|
@ -53,8 +58,64 @@ export const transactionGroupsRoute = createRoute({
|
|||
},
|
||||
});
|
||||
|
||||
export const transactionGroupsChartsRoute = createRoute({
|
||||
endpoint: 'GET /api/apm/services/{serviceName}/transaction_groups/charts',
|
||||
export const transactionGroupsOverviewRoute = createRoute({
|
||||
endpoint: 'GET /api/apm/services/{serviceName}/transactions/groups/overview',
|
||||
params: t.type({
|
||||
path: t.type({ serviceName: t.string }),
|
||||
query: t.intersection([
|
||||
rangeRt,
|
||||
uiFiltersRt,
|
||||
t.type({
|
||||
size: toNumberRt,
|
||||
numBuckets: toNumberRt,
|
||||
pageIndex: toNumberRt,
|
||||
sortDirection: t.union([t.literal('asc'), t.literal('desc')]),
|
||||
sortField: t.union([
|
||||
t.literal('latency'),
|
||||
t.literal('throughput'),
|
||||
t.literal('errorRate'),
|
||||
t.literal('impact'),
|
||||
]),
|
||||
}),
|
||||
]),
|
||||
}),
|
||||
options: {
|
||||
tags: ['access:apm'],
|
||||
},
|
||||
handler: async ({ context, request }) => {
|
||||
const setup = await setupRequest(context, request);
|
||||
|
||||
const searchAggregatedTransactions = await getSearchAggregatedTransactions(
|
||||
setup
|
||||
);
|
||||
|
||||
const {
|
||||
path: { serviceName },
|
||||
query: { size, numBuckets, pageIndex, sortDirection, sortField },
|
||||
} = context.params;
|
||||
|
||||
return getServiceTransactionGroups({
|
||||
setup,
|
||||
serviceName,
|
||||
pageIndex,
|
||||
searchAggregatedTransactions,
|
||||
size,
|
||||
sortDirection,
|
||||
sortField,
|
||||
numBuckets,
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
/**
|
||||
* Returns timeseries for latency, throughput and anomalies
|
||||
* TODO: break it into 3 new APIs:
|
||||
* - Latency: /transactions/charts/latency
|
||||
* - Throughput: /transactions/charts/throughput
|
||||
* - anomalies: /transactions/charts/anomaly
|
||||
*/
|
||||
export const transactionChartsRoute = createRoute({
|
||||
endpoint: 'GET /api/apm/services/{serviceName}/transactions/charts',
|
||||
params: t.type({
|
||||
path: t.type({
|
||||
serviceName: t.string,
|
||||
|
@ -98,9 +159,9 @@ export const transactionGroupsChartsRoute = createRoute({
|
|||
},
|
||||
});
|
||||
|
||||
export const transactionGroupsDistributionRoute = createRoute({
|
||||
export const transactionChartsDistributionRoute = createRoute({
|
||||
endpoint:
|
||||
'GET /api/apm/services/{serviceName}/transaction_groups/distribution',
|
||||
'GET /api/apm/services/{serviceName}/transactions/charts/distribution',
|
||||
params: t.type({
|
||||
path: t.type({
|
||||
serviceName: t.string,
|
||||
|
@ -145,8 +206,8 @@ export const transactionGroupsDistributionRoute = createRoute({
|
|||
},
|
||||
});
|
||||
|
||||
export const transactionGroupsBreakdownRoute = createRoute({
|
||||
endpoint: 'GET /api/apm/services/{serviceName}/transaction_groups/breakdown',
|
||||
export const transactionChartsBreakdownRoute = createRoute({
|
||||
endpoint: 'GET /api/apm/services/{serviceName}/transaction/charts/breakdown',
|
||||
params: t.type({
|
||||
path: t.type({
|
||||
serviceName: t.string,
|
||||
|
@ -177,33 +238,9 @@ export const transactionGroupsBreakdownRoute = createRoute({
|
|||
},
|
||||
});
|
||||
|
||||
export const transactionSampleForGroupRoute = createRoute({
|
||||
endpoint: `GET /api/apm/transaction_sample`,
|
||||
params: t.type({
|
||||
query: t.intersection([
|
||||
uiFiltersRt,
|
||||
rangeRt,
|
||||
t.type({ serviceName: t.string, transactionName: t.string }),
|
||||
]),
|
||||
}),
|
||||
options: { tags: ['access:apm'] },
|
||||
handler: async ({ context, request }) => {
|
||||
const setup = await setupRequest(context, request);
|
||||
|
||||
const { transactionName, serviceName } = context.params.query;
|
||||
|
||||
return {
|
||||
transaction: await getTransactionSampleForGroup({
|
||||
setup,
|
||||
serviceName,
|
||||
transactionName,
|
||||
}),
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
export const transactionGroupsErrorRateRoute = createRoute({
|
||||
endpoint: 'GET /api/apm/services/{serviceName}/transaction_groups/error_rate',
|
||||
export const transactionChartsErrorRateRoute = createRoute({
|
||||
endpoint:
|
||||
'GET /api/apm/services/{serviceName}/transactions/charts/error_rate',
|
||||
params: t.type({
|
||||
path: t.type({
|
||||
serviceName: t.string,
|
|
@ -100,35 +100,35 @@ export default function featureControlsTests({ getService }: FtrProviderContext)
|
|||
},
|
||||
{
|
||||
req: {
|
||||
url: `/api/apm/services/foo/transaction_groups?start=${start}&end=${end}&transactionType=bar&uiFilters=%7B%7D`,
|
||||
url: `/api/apm/services/foo/transactions/groups?start=${start}&end=${end}&transactionType=bar&uiFilters=%7B%7D`,
|
||||
},
|
||||
expectForbidden: expect403,
|
||||
expectResponse: expect200,
|
||||
},
|
||||
{
|
||||
req: {
|
||||
url: `/api/apm/services/foo/transaction_groups/charts?start=${start}&end=${end}&transactionType=bar&uiFilters=%7B%22environment%22%3A%22testing%22%7D`,
|
||||
url: `/api/apm/services/foo/transactions/charts?start=${start}&end=${end}&transactionType=bar&uiFilters=%7B%22environment%22%3A%22testing%22%7D`,
|
||||
},
|
||||
expectForbidden: expect403,
|
||||
expectResponse: expect200,
|
||||
},
|
||||
{
|
||||
req: {
|
||||
url: `/api/apm/services/foo/transaction_groups/charts?start=${start}&end=${end}&uiFilters=%7B%22environment%22%3A%22testing%22%7D`,
|
||||
url: `/api/apm/services/foo/transactions/charts?start=${start}&end=${end}&uiFilters=%7B%22environment%22%3A%22testing%22%7D`,
|
||||
},
|
||||
expectForbidden: expect403,
|
||||
expectResponse: expect200,
|
||||
},
|
||||
{
|
||||
req: {
|
||||
url: `/api/apm/services/foo/transaction_groups/charts?start=${start}&end=${end}&transactionType=bar&transactionName=baz&uiFilters=%7B%22environment%22%3A%22testing%22%7D`,
|
||||
url: `/api/apm/services/foo/transactions/charts?start=${start}&end=${end}&transactionType=bar&transactionName=baz&uiFilters=%7B%22environment%22%3A%22testing%22%7D`,
|
||||
},
|
||||
expectForbidden: expect403,
|
||||
expectResponse: expect200,
|
||||
},
|
||||
{
|
||||
req: {
|
||||
url: `/api/apm/services/foo/transaction_groups/distribution?start=${start}&end=${end}&transactionType=bar&transactionName=baz&uiFilters=%7B%7D`,
|
||||
url: `/api/apm/services/foo/transactions/charts/distribution?start=${start}&end=${end}&transactionType=bar&transactionName=baz&uiFilters=%7B%7D`,
|
||||
},
|
||||
expectForbidden: expect403,
|
||||
expectResponse: expect200,
|
||||
|
|
|
@ -23,9 +23,9 @@ export default function apmApiIntegrationTests({ loadTestFile }: FtrProviderCont
|
|||
loadTestFile(require.resolve('./services/transaction_types'));
|
||||
});
|
||||
|
||||
// TODO: we should not have a service overview.
|
||||
describe('Service overview', function () {
|
||||
loadTestFile(require.resolve('./service_overview/error_groups'));
|
||||
loadTestFile(require.resolve('./service_overview/transaction_groups'));
|
||||
});
|
||||
|
||||
describe('Settings', function () {
|
||||
|
@ -43,12 +43,13 @@ export default function apmApiIntegrationTests({ loadTestFile }: FtrProviderCont
|
|||
loadTestFile(require.resolve('./traces/top_traces'));
|
||||
});
|
||||
|
||||
describe('Transaction Group', function () {
|
||||
loadTestFile(require.resolve('./transaction_groups/top_transaction_groups'));
|
||||
loadTestFile(require.resolve('./transaction_groups/transaction_charts'));
|
||||
loadTestFile(require.resolve('./transaction_groups/error_rate'));
|
||||
loadTestFile(require.resolve('./transaction_groups/breakdown'));
|
||||
loadTestFile(require.resolve('./transaction_groups/distribution'));
|
||||
describe('Transactions', function () {
|
||||
loadTestFile(require.resolve('./transactions/top_transaction_groups'));
|
||||
loadTestFile(require.resolve('./transactions/transaction_charts'));
|
||||
loadTestFile(require.resolve('./transactions/error_rate'));
|
||||
loadTestFile(require.resolve('./transactions/breakdown'));
|
||||
loadTestFile(require.resolve('./transactions/distribution'));
|
||||
loadTestFile(require.resolve('./transactions/transactions_groups_overview'));
|
||||
});
|
||||
|
||||
describe('Observability overview', function () {
|
||||
|
|
250
x-pack/test/apm_api_integration/basic/tests/services/__snapshots__/throughput.snap
generated
Normal file
250
x-pack/test/apm_api_integration/basic/tests/services/__snapshots__/throughput.snap
generated
Normal file
|
@ -0,0 +1,250 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`Throughput when data is loaded returns the service throughput has the correct throughput 1`] = `
|
||||
Array [
|
||||
Object {
|
||||
"x": 1601389800000,
|
||||
"y": 6,
|
||||
},
|
||||
Object {
|
||||
"x": 1601389830000,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"x": 1601389860000,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"x": 1601389890000,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"x": 1601389920000,
|
||||
"y": 3,
|
||||
},
|
||||
Object {
|
||||
"x": 1601389950000,
|
||||
"y": 1,
|
||||
},
|
||||
Object {
|
||||
"x": 1601389980000,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"x": 1601390010000,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"x": 1601390040000,
|
||||
"y": 3,
|
||||
},
|
||||
Object {
|
||||
"x": 1601390070000,
|
||||
"y": 2,
|
||||
},
|
||||
Object {
|
||||
"x": 1601390100000,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"x": 1601390130000,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"x": 1601390160000,
|
||||
"y": 7,
|
||||
},
|
||||
Object {
|
||||
"x": 1601390190000,
|
||||
"y": 3,
|
||||
},
|
||||
Object {
|
||||
"x": 1601390220000,
|
||||
"y": 2,
|
||||
},
|
||||
Object {
|
||||
"x": 1601390250000,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"x": 1601390280000,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"x": 1601390310000,
|
||||
"y": 8,
|
||||
},
|
||||
Object {
|
||||
"x": 1601390340000,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"x": 1601390370000,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"x": 1601390400000,
|
||||
"y": 3,
|
||||
},
|
||||
Object {
|
||||
"x": 1601390430000,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"x": 1601390460000,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"x": 1601390490000,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"x": 1601390520000,
|
||||
"y": 4,
|
||||
},
|
||||
Object {
|
||||
"x": 1601390550000,
|
||||
"y": 3,
|
||||
},
|
||||
Object {
|
||||
"x": 1601390580000,
|
||||
"y": 2,
|
||||
},
|
||||
Object {
|
||||
"x": 1601390610000,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"x": 1601390640000,
|
||||
"y": 1,
|
||||
},
|
||||
Object {
|
||||
"x": 1601390670000,
|
||||
"y": 2,
|
||||
},
|
||||
Object {
|
||||
"x": 1601390700000,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"x": 1601390730000,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"x": 1601390760000,
|
||||
"y": 4,
|
||||
},
|
||||
Object {
|
||||
"x": 1601390790000,
|
||||
"y": 1,
|
||||
},
|
||||
Object {
|
||||
"x": 1601390820000,
|
||||
"y": 1,
|
||||
},
|
||||
Object {
|
||||
"x": 1601390850000,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"x": 1601390880000,
|
||||
"y": 6,
|
||||
},
|
||||
Object {
|
||||
"x": 1601390910000,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"x": 1601390940000,
|
||||
"y": 3,
|
||||
},
|
||||
Object {
|
||||
"x": 1601390970000,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"x": 1601391000000,
|
||||
"y": 4,
|
||||
},
|
||||
Object {
|
||||
"x": 1601391030000,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"x": 1601391060000,
|
||||
"y": 1,
|
||||
},
|
||||
Object {
|
||||
"x": 1601391090000,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"x": 1601391120000,
|
||||
"y": 2,
|
||||
},
|
||||
Object {
|
||||
"x": 1601391150000,
|
||||
"y": 1,
|
||||
},
|
||||
Object {
|
||||
"x": 1601391180000,
|
||||
"y": 2,
|
||||
},
|
||||
Object {
|
||||
"x": 1601391210000,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"x": 1601391240000,
|
||||
"y": 1,
|
||||
},
|
||||
Object {
|
||||
"x": 1601391270000,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"x": 1601391300000,
|
||||
"y": 1,
|
||||
},
|
||||
Object {
|
||||
"x": 1601391330000,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"x": 1601391360000,
|
||||
"y": 1,
|
||||
},
|
||||
Object {
|
||||
"x": 1601391390000,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"x": 1601391420000,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"x": 1601391450000,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"x": 1601391480000,
|
||||
"y": 10,
|
||||
},
|
||||
Object {
|
||||
"x": 1601391510000,
|
||||
"y": 3,
|
||||
},
|
||||
Object {
|
||||
"x": 1601391540000,
|
||||
"y": 1,
|
||||
},
|
||||
Object {
|
||||
"x": 1601391570000,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"x": 1601391600000,
|
||||
"y": 0,
|
||||
},
|
||||
]
|
||||
`;
|
774
x-pack/test/apm_api_integration/basic/tests/traces/__snapshots__/top_traces.snap
generated
Normal file
774
x-pack/test/apm_api_integration/basic/tests/traces/__snapshots__/top_traces.snap
generated
Normal file
|
@ -0,0 +1,774 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`Top traces when data is loaded returns the correct buckets 1`] = `
|
||||
Array [
|
||||
Object {
|
||||
"averageResponseTime": 1756,
|
||||
"impact": 0,
|
||||
"key": Object {
|
||||
"service.name": "opbeans-java",
|
||||
"transaction.name": "DispatcherServlet#doPost",
|
||||
},
|
||||
"serviceName": "opbeans-java",
|
||||
"transactionName": "DispatcherServlet#doPost",
|
||||
"transactionType": "request",
|
||||
"transactionsPerMinute": 0.0333333333333333,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 3251,
|
||||
"impact": 0.00224063647384788,
|
||||
"key": Object {
|
||||
"service.name": "opbeans-node",
|
||||
"transaction.name": "GET /api/types",
|
||||
},
|
||||
"serviceName": "opbeans-node",
|
||||
"transactionName": "GET /api/types",
|
||||
"transactionType": "request",
|
||||
"transactionsPerMinute": 0.0333333333333333,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 3813,
|
||||
"impact": 0.00308293593759538,
|
||||
"key": Object {
|
||||
"service.name": "opbeans-java",
|
||||
"transaction.name": "ResourceHttpRequestHandler",
|
||||
},
|
||||
"serviceName": "opbeans-java",
|
||||
"transactionName": "ResourceHttpRequestHandler",
|
||||
"transactionType": "request",
|
||||
"transactionsPerMinute": 0.0333333333333333,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 7741,
|
||||
"impact": 0.0089700396628626,
|
||||
"key": Object {
|
||||
"service.name": "opbeans-node",
|
||||
"transaction.name": "GET /api/products/top",
|
||||
},
|
||||
"serviceName": "opbeans-node",
|
||||
"transactionName": "GET /api/products/top",
|
||||
"transactionType": "request",
|
||||
"transactionsPerMinute": 0.0333333333333333,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 7994,
|
||||
"impact": 0.00934922429689839,
|
||||
"key": Object {
|
||||
"service.name": "opbeans-go",
|
||||
"transaction.name": "POST /api/orders",
|
||||
},
|
||||
"serviceName": "opbeans-go",
|
||||
"transactionName": "POST /api/orders",
|
||||
"transactionType": "request",
|
||||
"transactionsPerMinute": 0.0333333333333333,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 10317,
|
||||
"impact": 0.0128308286639543,
|
||||
"key": Object {
|
||||
"service.name": "opbeans-node",
|
||||
"transaction.name": "GET /api/orders/:id",
|
||||
},
|
||||
"serviceName": "opbeans-node",
|
||||
"transactionName": "GET /api/orders/:id",
|
||||
"transactionType": "request",
|
||||
"transactionsPerMinute": 0.0333333333333333,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 10837,
|
||||
"impact": 0.0136101804809449,
|
||||
"key": Object {
|
||||
"service.name": "opbeans-java",
|
||||
"transaction.name": "APIRestController#topProducts",
|
||||
},
|
||||
"serviceName": "opbeans-java",
|
||||
"transactionName": "APIRestController#topProducts",
|
||||
"transactionType": "request",
|
||||
"transactionsPerMinute": 0.0333333333333333,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 6495,
|
||||
"impact": 0.0168369967539847,
|
||||
"key": Object {
|
||||
"service.name": "opbeans-node",
|
||||
"transaction.name": "GET /api/products/:id",
|
||||
},
|
||||
"serviceName": "opbeans-node",
|
||||
"transactionName": "GET /api/products/:id",
|
||||
"transactionType": "request",
|
||||
"transactionsPerMinute": 0.0666666666666667,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 13952,
|
||||
"impact": 0.0182787976154172,
|
||||
"key": Object {
|
||||
"service.name": "opbeans-java",
|
||||
"transaction.name": "APIRestController#stats",
|
||||
},
|
||||
"serviceName": "opbeans-java",
|
||||
"transactionName": "APIRestController#stats",
|
||||
"transactionType": "request",
|
||||
"transactionsPerMinute": 0.0333333333333333,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 7324.5,
|
||||
"impact": 0.0193234288008834,
|
||||
"key": Object {
|
||||
"service.name": "opbeans-java",
|
||||
"transaction.name": "APIRestController#customerWhoBought",
|
||||
},
|
||||
"serviceName": "opbeans-java",
|
||||
"transactionName": "APIRestController#customerWhoBought",
|
||||
"transactionType": "request",
|
||||
"transactionsPerMinute": 0.0666666666666667,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 7089.66666666667,
|
||||
"impact": 0.0292451769325711,
|
||||
"key": Object {
|
||||
"service.name": "opbeans-go",
|
||||
"transaction.name": "GET /api/customers/:id",
|
||||
},
|
||||
"serviceName": "opbeans-go",
|
||||
"transactionName": "GET /api/customers/:id",
|
||||
"transactionType": "request",
|
||||
"transactionsPerMinute": 0.1,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 11759.5,
|
||||
"impact": 0.0326173722945495,
|
||||
"key": Object {
|
||||
"service.name": "opbeans-node",
|
||||
"transaction.name": "GET /api/customers/:id",
|
||||
},
|
||||
"serviceName": "opbeans-node",
|
||||
"transactionName": "GET /api/customers/:id",
|
||||
"transactionType": "request",
|
||||
"transactionsPerMinute": 0.0666666666666667,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 8109.33333333333,
|
||||
"impact": 0.0338298638713675,
|
||||
"key": Object {
|
||||
"service.name": "opbeans-java",
|
||||
"transaction.name": "APIRestController#customer",
|
||||
},
|
||||
"serviceName": "opbeans-java",
|
||||
"transactionName": "APIRestController#customer",
|
||||
"transactionType": "request",
|
||||
"transactionsPerMinute": 0.1,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 8677.33333333333,
|
||||
"impact": 0.0363837398255058,
|
||||
"key": Object {
|
||||
"service.name": "opbeans-java",
|
||||
"transaction.name": "APIRestController#order",
|
||||
},
|
||||
"serviceName": "opbeans-java",
|
||||
"transactionName": "APIRestController#order",
|
||||
"transactionType": "request",
|
||||
"transactionsPerMinute": 0.1,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 26624,
|
||||
"impact": 0.0372710018940797,
|
||||
"key": Object {
|
||||
"service.name": "opbeans-node",
|
||||
"transaction.name": "GET /api/customers",
|
||||
},
|
||||
"serviceName": "opbeans-node",
|
||||
"transactionName": "GET /api/customers",
|
||||
"transactionType": "request",
|
||||
"transactionsPerMinute": 0.0333333333333333,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 5687.8,
|
||||
"impact": 0.0399912394860756,
|
||||
"key": Object {
|
||||
"service.name": "opbeans-go",
|
||||
"transaction.name": "GET /api/products",
|
||||
},
|
||||
"serviceName": "opbeans-go",
|
||||
"transactionName": "GET /api/products",
|
||||
"transactionType": "request",
|
||||
"transactionsPerMinute": 0.166666666666667,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 9496.33333333333,
|
||||
"impact": 0.0400661771607863,
|
||||
"key": Object {
|
||||
"service.name": "opbeans-node",
|
||||
"transaction.name": "GET /api/products",
|
||||
},
|
||||
"serviceName": "opbeans-node",
|
||||
"transactionName": "GET /api/products",
|
||||
"transactionType": "request",
|
||||
"transactionsPerMinute": 0.1,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 10717.3333333333,
|
||||
"impact": 0.0455561112100871,
|
||||
"key": Object {
|
||||
"service.name": "opbeans-java",
|
||||
"transaction.name": "APIRestController#products",
|
||||
},
|
||||
"serviceName": "opbeans-java",
|
||||
"transactionName": "APIRestController#products",
|
||||
"transactionType": "request",
|
||||
"transactionsPerMinute": 0.1,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 8438.75,
|
||||
"impact": 0.04795861306131,
|
||||
"key": Object {
|
||||
"service.name": "opbeans-node",
|
||||
"transaction.name": "GET /api/orders",
|
||||
},
|
||||
"serviceName": "opbeans-node",
|
||||
"transactionName": "GET /api/orders",
|
||||
"transactionType": "request",
|
||||
"transactionsPerMinute": 0.133333333333333,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 17322.5,
|
||||
"impact": 0.0492925036711592,
|
||||
"key": Object {
|
||||
"service.name": "opbeans-java",
|
||||
"transaction.name": "APIRestController#customers",
|
||||
},
|
||||
"serviceName": "opbeans-java",
|
||||
"transactionName": "APIRestController#customers",
|
||||
"transactionType": "request",
|
||||
"transactionsPerMinute": 0.0666666666666667,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 34696,
|
||||
"impact": 0.0493689400993641,
|
||||
"key": Object {
|
||||
"service.name": "opbeans-python",
|
||||
"transaction.name": "GET opbeans.views.product",
|
||||
},
|
||||
"serviceName": "opbeans-python",
|
||||
"transactionName": "GET opbeans.views.product",
|
||||
"transactionType": "request",
|
||||
"transactionsPerMinute": 0.0333333333333333,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 7321.4,
|
||||
"impact": 0.0522330580268044,
|
||||
"key": Object {
|
||||
"service.name": "opbeans-go",
|
||||
"transaction.name": "GET /api/types/:id",
|
||||
},
|
||||
"serviceName": "opbeans-go",
|
||||
"transactionName": "GET /api/types/:id",
|
||||
"transactionType": "request",
|
||||
"transactionsPerMinute": 0.166666666666667,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 9663.5,
|
||||
"impact": 0.0553010064294577,
|
||||
"key": Object {
|
||||
"service.name": "opbeans-ruby",
|
||||
"transaction.name": "Api::OrdersController#show",
|
||||
},
|
||||
"serviceName": "opbeans-ruby",
|
||||
"transactionName": "Api::OrdersController#show",
|
||||
"transactionType": "request",
|
||||
"transactionsPerMinute": 0.133333333333333,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 44819,
|
||||
"impact": 0.0645408217212785,
|
||||
"key": Object {
|
||||
"service.name": "opbeans-python",
|
||||
"transaction.name": "GET opbeans.views.products",
|
||||
},
|
||||
"serviceName": "opbeans-python",
|
||||
"transactionName": "GET opbeans.views.products",
|
||||
"transactionType": "request",
|
||||
"transactionsPerMinute": 0.0333333333333333,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 14944,
|
||||
"impact": 0.0645603055167033,
|
||||
"key": Object {
|
||||
"service.name": "opbeans-ruby",
|
||||
"transaction.name": "Api::ProductsController#index",
|
||||
},
|
||||
"serviceName": "opbeans-ruby",
|
||||
"transactionName": "Api::ProductsController#index",
|
||||
"transactionType": "request",
|
||||
"transactionsPerMinute": 0.1,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 24056,
|
||||
"impact": 0.0694762169777207,
|
||||
"key": Object {
|
||||
"service.name": "opbeans-python",
|
||||
"transaction.name": "GET opbeans.views.product_types",
|
||||
},
|
||||
"serviceName": "opbeans-python",
|
||||
"transactionName": "GET opbeans.views.product_types",
|
||||
"transactionType": "request",
|
||||
"transactionsPerMinute": 0.0666666666666667,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 8401.33333333333,
|
||||
"impact": 0.0729173550004329,
|
||||
"key": Object {
|
||||
"service.name": "opbeans-go",
|
||||
"transaction.name": "GET /api/types",
|
||||
},
|
||||
"serviceName": "opbeans-go",
|
||||
"transactionName": "GET /api/types",
|
||||
"transactionType": "request",
|
||||
"transactionsPerMinute": 0.2,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 13182,
|
||||
"impact": 0.0763944631070062,
|
||||
"key": Object {
|
||||
"service.name": "opbeans-node",
|
||||
"transaction.name": "GET /api/products/:id/customers",
|
||||
},
|
||||
"serviceName": "opbeans-node",
|
||||
"transactionName": "GET /api/products/:id/customers",
|
||||
"transactionType": "request",
|
||||
"transactionsPerMinute": 0.133333333333333,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 7923,
|
||||
"impact": 0.0804905564066893,
|
||||
"key": Object {
|
||||
"service.name": "opbeans-ruby",
|
||||
"transaction.name": "Api::TypesController#index",
|
||||
},
|
||||
"serviceName": "opbeans-ruby",
|
||||
"transactionName": "Api::TypesController#index",
|
||||
"transactionType": "request",
|
||||
"transactionsPerMinute": 0.233333333333333,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 19838.6666666667,
|
||||
"impact": 0.0865680018257216,
|
||||
"key": Object {
|
||||
"service.name": "opbeans-ruby",
|
||||
"transaction.name": "Api::CustomersController#index",
|
||||
},
|
||||
"serviceName": "opbeans-ruby",
|
||||
"transactionName": "Api::CustomersController#index",
|
||||
"transactionType": "request",
|
||||
"transactionsPerMinute": 0.1,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 7952.33333333333,
|
||||
"impact": 0.104635475198455,
|
||||
"key": Object {
|
||||
"service.name": "opbeans-go",
|
||||
"transaction.name": "GET /api/orders/:id",
|
||||
},
|
||||
"serviceName": "opbeans-go",
|
||||
"transactionName": "GET /api/orders/:id",
|
||||
"transactionType": "request",
|
||||
"transactionsPerMinute": 0.3,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 19666,
|
||||
"impact": 0.115266133732905,
|
||||
"key": Object {
|
||||
"service.name": "opbeans-node",
|
||||
"transaction.name": "GET /api/stats",
|
||||
},
|
||||
"serviceName": "opbeans-node",
|
||||
"transactionName": "GET /api/stats",
|
||||
"transactionType": "request",
|
||||
"transactionsPerMinute": 0.133333333333333,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 40188.5,
|
||||
"impact": 0.117833498468491,
|
||||
"key": Object {
|
||||
"service.name": "opbeans-python",
|
||||
"transaction.name": "GET opbeans.views.customer",
|
||||
},
|
||||
"serviceName": "opbeans-python",
|
||||
"transactionName": "GET opbeans.views.customer",
|
||||
"transactionType": "request",
|
||||
"transactionsPerMinute": 0.0666666666666667,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 26802.3333333333,
|
||||
"impact": 0.117878461073318,
|
||||
"key": Object {
|
||||
"service.name": "opbeans-ruby",
|
||||
"transaction.name": "Api::ProductsController#show",
|
||||
},
|
||||
"serviceName": "opbeans-ruby",
|
||||
"transactionName": "Api::ProductsController#show",
|
||||
"transactionType": "request",
|
||||
"transactionsPerMinute": 0.1,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 14709.3333333333,
|
||||
"impact": 0.129642177249393,
|
||||
"key": Object {
|
||||
"service.name": "opbeans-ruby",
|
||||
"transaction.name": "Api::StatsController#index",
|
||||
},
|
||||
"serviceName": "opbeans-ruby",
|
||||
"transactionName": "Api::StatsController#index",
|
||||
"transactionType": "request",
|
||||
"transactionsPerMinute": 0.2,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 15432,
|
||||
"impact": 0.136140772400299,
|
||||
"key": Object {
|
||||
"service.name": "opbeans-ruby",
|
||||
"transaction.name": "Api::TypesController#show",
|
||||
},
|
||||
"serviceName": "opbeans-ruby",
|
||||
"transactionName": "Api::TypesController#show",
|
||||
"transactionType": "request",
|
||||
"transactionsPerMinute": 0.2,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 33266.3333333333,
|
||||
"impact": 0.146942288833089,
|
||||
"key": Object {
|
||||
"service.name": "opbeans-python",
|
||||
"transaction.name": "GET opbeans.views.orders",
|
||||
},
|
||||
"serviceName": "opbeans-python",
|
||||
"transactionName": "GET opbeans.views.orders",
|
||||
"transactionType": "request",
|
||||
"transactionsPerMinute": 0.1,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 33445.3333333333,
|
||||
"impact": 0.147747119459481,
|
||||
"key": Object {
|
||||
"service.name": "opbeans-python",
|
||||
"transaction.name": "GET opbeans.views.customers",
|
||||
},
|
||||
"serviceName": "opbeans-python",
|
||||
"transactionName": "GET opbeans.views.customers",
|
||||
"transactionType": "request",
|
||||
"transactionsPerMinute": 0.1,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 107438,
|
||||
"impact": 0.158391266775379,
|
||||
"key": Object {
|
||||
"service.name": "opbeans-python",
|
||||
"transaction.name": "GET opbeans.views.top_products",
|
||||
},
|
||||
"serviceName": "opbeans-python",
|
||||
"transactionName": "GET opbeans.views.top_products",
|
||||
"transactionType": "request",
|
||||
"transactionsPerMinute": 0.0333333333333333,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 27696.75,
|
||||
"impact": 0.163410592227497,
|
||||
"key": Object {
|
||||
"service.name": "opbeans-ruby",
|
||||
"transaction.name": "Api::ProductsController#top",
|
||||
},
|
||||
"serviceName": "opbeans-ruby",
|
||||
"transactionName": "Api::ProductsController#top",
|
||||
"transactionType": "request",
|
||||
"transactionsPerMinute": 0.133333333333333,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 55832.5,
|
||||
"impact": 0.164726497795416,
|
||||
"key": Object {
|
||||
"service.name": "opbeans-python",
|
||||
"transaction.name": "GET opbeans.views.stats",
|
||||
},
|
||||
"serviceName": "opbeans-python",
|
||||
"transactionName": "GET opbeans.views.stats",
|
||||
"transactionType": "request",
|
||||
"transactionsPerMinute": 0.0666666666666667,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 10483.6363636364,
|
||||
"impact": 0.170204441816763,
|
||||
"key": Object {
|
||||
"service.name": "opbeans-python",
|
||||
"transaction.name": "GET opbeans.views.order",
|
||||
},
|
||||
"serviceName": "opbeans-python",
|
||||
"transactionName": "GET opbeans.views.order",
|
||||
"transactionType": "request",
|
||||
"transactionsPerMinute": 0.366666666666667,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 24524.5,
|
||||
"impact": 0.217905269277069,
|
||||
"key": Object {
|
||||
"service.name": "opbeans-go",
|
||||
"transaction.name": "GET /api/customers",
|
||||
},
|
||||
"serviceName": "opbeans-go",
|
||||
"transactionName": "GET /api/customers",
|
||||
"transactionType": "request",
|
||||
"transactionsPerMinute": 0.2,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 14822.3,
|
||||
"impact": 0.219517928036841,
|
||||
"key": Object {
|
||||
"service.name": "opbeans-ruby",
|
||||
"transaction.name": "Api::CustomersController#show",
|
||||
},
|
||||
"serviceName": "opbeans-ruby",
|
||||
"transactionName": "Api::CustomersController#show",
|
||||
"transactionType": "request",
|
||||
"transactionsPerMinute": 0.333333333333333,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 44771.75,
|
||||
"impact": 0.26577545588222,
|
||||
"key": Object {
|
||||
"service.name": "opbeans-go",
|
||||
"transaction.name": "GET /api/stats",
|
||||
},
|
||||
"serviceName": "opbeans-go",
|
||||
"transactionName": "GET /api/stats",
|
||||
"transactionType": "request",
|
||||
"transactionsPerMinute": 0.133333333333333,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 39421.4285714286,
|
||||
"impact": 0.410949215592138,
|
||||
"key": Object {
|
||||
"service.name": "opbeans-ruby",
|
||||
"transaction.name": "Api::OrdersController#index",
|
||||
},
|
||||
"serviceName": "opbeans-ruby",
|
||||
"transactionName": "Api::OrdersController#index",
|
||||
"transactionType": "request",
|
||||
"transactionsPerMinute": 0.233333333333333,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 33513.3076923077,
|
||||
"impact": 0.650334619948262,
|
||||
"key": Object {
|
||||
"service.name": "opbeans-go",
|
||||
"transaction.name": "GET /api/products/:id",
|
||||
},
|
||||
"serviceName": "opbeans-go",
|
||||
"transactionName": "GET /api/products/:id",
|
||||
"transactionType": "request",
|
||||
"transactionsPerMinute": 0.433333333333333,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 28933.2222222222,
|
||||
"impact": 0.777916011143112,
|
||||
"key": Object {
|
||||
"service.name": "opbeans-node",
|
||||
"transaction.name": "GET /api",
|
||||
},
|
||||
"serviceName": "opbeans-node",
|
||||
"transactionName": "GET /api",
|
||||
"transactionType": "request",
|
||||
"transactionsPerMinute": 0.6,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 101613,
|
||||
"impact": 1.06341806051616,
|
||||
"key": Object {
|
||||
"service.name": "opbeans-go",
|
||||
"transaction.name": "GET /api/products/:id/customers",
|
||||
},
|
||||
"serviceName": "opbeans-go",
|
||||
"transactionName": "GET /api/products/:id/customers",
|
||||
"transactionType": "request",
|
||||
"transactionsPerMinute": 0.233333333333333,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 377325,
|
||||
"impact": 1.12840251327172,
|
||||
"key": Object {
|
||||
"service.name": "opbeans-python",
|
||||
"transaction.name": "GET opbeans.views.product_customers",
|
||||
},
|
||||
"serviceName": "opbeans-python",
|
||||
"transactionName": "GET opbeans.views.product_customers",
|
||||
"transactionType": "request",
|
||||
"transactionsPerMinute": 0.0666666666666667,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 39452.8333333333,
|
||||
"impact": 3.54517249775948,
|
||||
"key": Object {
|
||||
"service.name": "opbeans-python",
|
||||
"transaction.name": "opbeans.tasks.sync_orders",
|
||||
},
|
||||
"serviceName": "opbeans-python",
|
||||
"transactionName": "opbeans.tasks.sync_orders",
|
||||
"transactionType": "celery",
|
||||
"transactionsPerMinute": 2,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 715444.444444444,
|
||||
"impact": 9.64784193809929,
|
||||
"key": Object {
|
||||
"service.name": "opbeans-rum",
|
||||
"transaction.name": "/customers",
|
||||
},
|
||||
"serviceName": "opbeans-rum",
|
||||
"transactionName": "/customers",
|
||||
"transactionType": "page-load",
|
||||
"transactionsPerMinute": 0.3,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 833539.125,
|
||||
"impact": 9.99152559811767,
|
||||
"key": Object {
|
||||
"service.name": "opbeans-go",
|
||||
"transaction.name": "GET /api/orders",
|
||||
},
|
||||
"serviceName": "opbeans-go",
|
||||
"transactionName": "GET /api/orders",
|
||||
"transactionType": "request",
|
||||
"transactionsPerMinute": 0.266666666666667,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 7480000,
|
||||
"impact": 11.2080443255746,
|
||||
"key": Object {
|
||||
"service.name": "elastic-co-frontend",
|
||||
"transaction.name": "/community/security",
|
||||
},
|
||||
"serviceName": "elastic-co-frontend",
|
||||
"transactionName": "/community/security",
|
||||
"transactionType": "page-load",
|
||||
"transactionsPerMinute": 0.0333333333333333,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 171383.519230769,
|
||||
"impact": 13.354173900338,
|
||||
"key": Object {
|
||||
"service.name": "opbeans-ruby",
|
||||
"transaction.name": "Rack",
|
||||
},
|
||||
"serviceName": "opbeans-ruby",
|
||||
"transactionName": "Rack",
|
||||
"transactionType": "request",
|
||||
"transactionsPerMinute": 1.73333333333333,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 1052468.6,
|
||||
"impact": 15.7712781068549,
|
||||
"key": Object {
|
||||
"service.name": "opbeans-java",
|
||||
"transaction.name": "DispatcherServlet#doGet",
|
||||
},
|
||||
"serviceName": "opbeans-java",
|
||||
"transactionName": "DispatcherServlet#doGet",
|
||||
"transactionType": "request",
|
||||
"transactionsPerMinute": 0.333333333333333,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 1413866.66666667,
|
||||
"impact": 31.7829322941256,
|
||||
"key": Object {
|
||||
"service.name": "opbeans-rum",
|
||||
"transaction.name": "/products",
|
||||
},
|
||||
"serviceName": "opbeans-rum",
|
||||
"transactionName": "/products",
|
||||
"transactionType": "page-load",
|
||||
"transactionsPerMinute": 0.5,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 996583.333333333,
|
||||
"impact": 35.8445542634419,
|
||||
"key": Object {
|
||||
"service.name": "opbeans-rum",
|
||||
"transaction.name": "/dashboard",
|
||||
},
|
||||
"serviceName": "opbeans-rum",
|
||||
"transactionName": "/dashboard",
|
||||
"transactionType": "page-load",
|
||||
"transactionsPerMinute": 0.8,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 1046912.60465116,
|
||||
"impact": 67.4671169361798,
|
||||
"key": Object {
|
||||
"service.name": "opbeans-node",
|
||||
"transaction.name": "Process completed order",
|
||||
},
|
||||
"serviceName": "opbeans-node",
|
||||
"transactionName": "Process completed order",
|
||||
"transactionType": "Worker",
|
||||
"transactionsPerMinute": 1.43333333333333,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 1142941.8,
|
||||
"impact": 68.5168888461311,
|
||||
"key": Object {
|
||||
"service.name": "opbeans-node",
|
||||
"transaction.name": "Update shipping status",
|
||||
},
|
||||
"serviceName": "opbeans-node",
|
||||
"transactionName": "Update shipping status",
|
||||
"transactionType": "Worker",
|
||||
"transactionsPerMinute": 1.33333333333333,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 128285.213888889,
|
||||
"impact": 69.2138167147075,
|
||||
"key": Object {
|
||||
"service.name": "opbeans-python",
|
||||
"transaction.name": "opbeans.tasks.update_stats",
|
||||
},
|
||||
"serviceName": "opbeans-python",
|
||||
"transactionName": "opbeans.tasks.update_stats",
|
||||
"transactionType": "celery",
|
||||
"transactionsPerMinute": 12,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 1032979.06666667,
|
||||
"impact": 69.6655125415468,
|
||||
"key": Object {
|
||||
"service.name": "opbeans-node",
|
||||
"transaction.name": "Process payment",
|
||||
},
|
||||
"serviceName": "opbeans-node",
|
||||
"transactionName": "Process payment",
|
||||
"transactionType": "Worker",
|
||||
"transactionsPerMinute": 1.5,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 4410285.71428571,
|
||||
"impact": 92.5364039355288,
|
||||
"key": Object {
|
||||
"service.name": "opbeans-rum",
|
||||
"transaction.name": "/orders",
|
||||
},
|
||||
"serviceName": "opbeans-rum",
|
||||
"transactionName": "/orders",
|
||||
"transactionType": "page-load",
|
||||
"transactionsPerMinute": 0.466666666666667,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 1803347.81081081,
|
||||
"impact": 100,
|
||||
"key": Object {
|
||||
"service.name": "opbeans-python",
|
||||
"transaction.name": "opbeans.tasks.sync_customers",
|
||||
},
|
||||
"serviceName": "opbeans-python",
|
||||
"transactionName": "opbeans.tasks.sync_customers",
|
||||
"transactionType": "celery",
|
||||
"transactionsPerMinute": 1.23333333333333,
|
||||
},
|
||||
]
|
||||
`;
|
1016
x-pack/test/apm_api_integration/basic/tests/transactions/__snapshots__/breakdown.snap
generated
Normal file
1016
x-pack/test/apm_api_integration/basic/tests/transactions/__snapshots__/breakdown.snap
generated
Normal file
File diff suppressed because it is too large
Load diff
250
x-pack/test/apm_api_integration/basic/tests/transactions/__snapshots__/error_rate.snap
generated
Normal file
250
x-pack/test/apm_api_integration/basic/tests/transactions/__snapshots__/error_rate.snap
generated
Normal file
|
@ -0,0 +1,250 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`Error rate when data is loaded returns the transaction error rate has the correct error rate 1`] = `
|
||||
Array [
|
||||
Object {
|
||||
"x": 1601389800000,
|
||||
"y": 0.166666666666667,
|
||||
},
|
||||
Object {
|
||||
"x": 1601389830000,
|
||||
"y": null,
|
||||
},
|
||||
Object {
|
||||
"x": 1601389860000,
|
||||
"y": null,
|
||||
},
|
||||
Object {
|
||||
"x": 1601389890000,
|
||||
"y": null,
|
||||
},
|
||||
Object {
|
||||
"x": 1601389920000,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"x": 1601389950000,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"x": 1601389980000,
|
||||
"y": null,
|
||||
},
|
||||
Object {
|
||||
"x": 1601390010000,
|
||||
"y": null,
|
||||
},
|
||||
Object {
|
||||
"x": 1601390040000,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"x": 1601390070000,
|
||||
"y": 0.5,
|
||||
},
|
||||
Object {
|
||||
"x": 1601390100000,
|
||||
"y": null,
|
||||
},
|
||||
Object {
|
||||
"x": 1601390130000,
|
||||
"y": null,
|
||||
},
|
||||
Object {
|
||||
"x": 1601390160000,
|
||||
"y": 0.285714285714286,
|
||||
},
|
||||
Object {
|
||||
"x": 1601390190000,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"x": 1601390220000,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"x": 1601390250000,
|
||||
"y": null,
|
||||
},
|
||||
Object {
|
||||
"x": 1601390280000,
|
||||
"y": null,
|
||||
},
|
||||
Object {
|
||||
"x": 1601390310000,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"x": 1601390340000,
|
||||
"y": null,
|
||||
},
|
||||
Object {
|
||||
"x": 1601390370000,
|
||||
"y": null,
|
||||
},
|
||||
Object {
|
||||
"x": 1601390400000,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"x": 1601390430000,
|
||||
"y": null,
|
||||
},
|
||||
Object {
|
||||
"x": 1601390460000,
|
||||
"y": null,
|
||||
},
|
||||
Object {
|
||||
"x": 1601390490000,
|
||||
"y": null,
|
||||
},
|
||||
Object {
|
||||
"x": 1601390520000,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"x": 1601390550000,
|
||||
"y": 1,
|
||||
},
|
||||
Object {
|
||||
"x": 1601390580000,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"x": 1601390610000,
|
||||
"y": null,
|
||||
},
|
||||
Object {
|
||||
"x": 1601390640000,
|
||||
"y": 1,
|
||||
},
|
||||
Object {
|
||||
"x": 1601390670000,
|
||||
"y": 0.5,
|
||||
},
|
||||
Object {
|
||||
"x": 1601390700000,
|
||||
"y": null,
|
||||
},
|
||||
Object {
|
||||
"x": 1601390730000,
|
||||
"y": null,
|
||||
},
|
||||
Object {
|
||||
"x": 1601390760000,
|
||||
"y": 0.25,
|
||||
},
|
||||
Object {
|
||||
"x": 1601390790000,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"x": 1601390820000,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"x": 1601390850000,
|
||||
"y": null,
|
||||
},
|
||||
Object {
|
||||
"x": 1601390880000,
|
||||
"y": 0.166666666666667,
|
||||
},
|
||||
Object {
|
||||
"x": 1601390910000,
|
||||
"y": null,
|
||||
},
|
||||
Object {
|
||||
"x": 1601390940000,
|
||||
"y": 0.333333333333333,
|
||||
},
|
||||
Object {
|
||||
"x": 1601390970000,
|
||||
"y": null,
|
||||
},
|
||||
Object {
|
||||
"x": 1601391000000,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"x": 1601391030000,
|
||||
"y": null,
|
||||
},
|
||||
Object {
|
||||
"x": 1601391060000,
|
||||
"y": 1,
|
||||
},
|
||||
Object {
|
||||
"x": 1601391090000,
|
||||
"y": null,
|
||||
},
|
||||
Object {
|
||||
"x": 1601391120000,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"x": 1601391150000,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"x": 1601391180000,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"x": 1601391210000,
|
||||
"y": null,
|
||||
},
|
||||
Object {
|
||||
"x": 1601391240000,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"x": 1601391270000,
|
||||
"y": null,
|
||||
},
|
||||
Object {
|
||||
"x": 1601391300000,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"x": 1601391330000,
|
||||
"y": null,
|
||||
},
|
||||
Object {
|
||||
"x": 1601391360000,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"x": 1601391390000,
|
||||
"y": null,
|
||||
},
|
||||
Object {
|
||||
"x": 1601391420000,
|
||||
"y": null,
|
||||
},
|
||||
Object {
|
||||
"x": 1601391450000,
|
||||
"y": null,
|
||||
},
|
||||
Object {
|
||||
"x": 1601391480000,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"x": 1601391510000,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"x": 1601391540000,
|
||||
"y": 1,
|
||||
},
|
||||
Object {
|
||||
"x": 1601391570000,
|
||||
"y": null,
|
||||
},
|
||||
Object {
|
||||
"x": 1601391600000,
|
||||
"y": null,
|
||||
},
|
||||
]
|
||||
`;
|
126
x-pack/test/apm_api_integration/basic/tests/transactions/__snapshots__/top_transaction_groups.snap
generated
Normal file
126
x-pack/test/apm_api_integration/basic/tests/transactions/__snapshots__/top_transaction_groups.snap
generated
Normal file
|
@ -0,0 +1,126 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`Top transaction groups when data is loaded returns the correct buckets (when ignoring samples) 1`] = `
|
||||
Array [
|
||||
Object {
|
||||
"averageResponseTime": 2292,
|
||||
"impact": 0,
|
||||
"key": "GET /*",
|
||||
"p95": 2288,
|
||||
"serviceName": "opbeans-node",
|
||||
"transactionName": "GET /*",
|
||||
"transactionType": "request",
|
||||
"transactionsPerMinute": 0.0333333333333333,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 10317,
|
||||
"impact": 0.420340829629707,
|
||||
"key": "GET /api/orders/:id",
|
||||
"p95": 10304,
|
||||
"serviceName": "opbeans-node",
|
||||
"transactionName": "GET /api/orders/:id",
|
||||
"transactionType": "request",
|
||||
"transactionsPerMinute": 0.0333333333333333,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 6495,
|
||||
"impact": 0.560349681667116,
|
||||
"key": "GET /api/products/:id",
|
||||
"p95": 6720,
|
||||
"serviceName": "opbeans-node",
|
||||
"transactionName": "GET /api/products/:id",
|
||||
"transactionType": "request",
|
||||
"transactionsPerMinute": 0.0666666666666667,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 9825.5,
|
||||
"impact": 0.909245664989668,
|
||||
"key": "GET /api/types",
|
||||
"p95": 16496,
|
||||
"serviceName": "opbeans-node",
|
||||
"transactionName": "GET /api/types",
|
||||
"transactionType": "request",
|
||||
"transactionsPerMinute": 0.0666666666666667,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 9516.83333333333,
|
||||
"impact": 2.87083620326164,
|
||||
"key": "GET /api/products",
|
||||
"p95": 17888,
|
||||
"serviceName": "opbeans-node",
|
||||
"transactionName": "GET /api/products",
|
||||
"transactionType": "request",
|
||||
"transactionsPerMinute": 0.2,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 13962.2,
|
||||
"impact": 3.53657227112376,
|
||||
"key": "GET /api/products/:id/customers",
|
||||
"p95": 23264,
|
||||
"serviceName": "opbeans-node",
|
||||
"transactionName": "GET /api/products/:id/customers",
|
||||
"transactionType": "request",
|
||||
"transactionsPerMinute": 0.166666666666667,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 21129.5,
|
||||
"impact": 4.3069090413872,
|
||||
"key": "GET /api/customers/:id",
|
||||
"p95": 32608,
|
||||
"serviceName": "opbeans-node",
|
||||
"transactionName": "GET /api/customers/:id",
|
||||
"transactionType": "request",
|
||||
"transactionsPerMinute": 0.133333333333333,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 10137.1111111111,
|
||||
"impact": 4.65868586528666,
|
||||
"key": "GET /api/orders",
|
||||
"p95": 21344,
|
||||
"serviceName": "opbeans-node",
|
||||
"transactionName": "GET /api/orders",
|
||||
"transactionType": "request",
|
||||
"transactionsPerMinute": 0.3,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 24206.25,
|
||||
"impact": 4.95153640465858,
|
||||
"key": "GET /api/customers",
|
||||
"p95": 36032,
|
||||
"serviceName": "opbeans-node",
|
||||
"transactionName": "GET /api/customers",
|
||||
"transactionType": "request",
|
||||
"transactionsPerMinute": 0.133333333333333,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 17267.0833333333,
|
||||
"impact": 10.7331215479018,
|
||||
"key": "GET /api/products/top",
|
||||
"p95": 26208,
|
||||
"serviceName": "opbeans-node",
|
||||
"transactionName": "GET /api/products/top",
|
||||
"transactionType": "request",
|
||||
"transactionsPerMinute": 0.4,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 20417.7272727273,
|
||||
"impact": 11.6439909593985,
|
||||
"key": "GET /api/stats",
|
||||
"p95": 24800,
|
||||
"serviceName": "opbeans-node",
|
||||
"transactionName": "GET /api/stats",
|
||||
"transactionType": "request",
|
||||
"transactionsPerMinute": 0.366666666666667,
|
||||
},
|
||||
Object {
|
||||
"averageResponseTime": 39822.0208333333,
|
||||
"impact": 100,
|
||||
"key": "GET /api",
|
||||
"p95": 122816,
|
||||
"serviceName": "opbeans-node",
|
||||
"transactionName": "GET /api",
|
||||
"transactionType": "request",
|
||||
"transactionsPerMinute": 1.6,
|
||||
},
|
||||
]
|
||||
`;
|
1501
x-pack/test/apm_api_integration/basic/tests/transactions/__snapshots__/transaction_charts.snap
generated
Normal file
1501
x-pack/test/apm_api_integration/basic/tests/transactions/__snapshots__/transaction_charts.snap
generated
Normal file
File diff suppressed because it is too large
Load diff
|
@ -24,7 +24,7 @@ export default function ApiTest({ getService }: FtrProviderContext) {
|
|||
describe('when data is not loaded', () => {
|
||||
it('handles the empty state', async () => {
|
||||
const response = await supertest.get(
|
||||
`/api/apm/services/opbeans-node/transaction_groups/breakdown?start=${start}&end=${end}&uiFilters=${uiFilters}&transactionType=${transactionType}`
|
||||
`/api/apm/services/opbeans-node/transaction/charts/breakdown?start=${start}&end=${end}&uiFilters=${uiFilters}&transactionType=${transactionType}`
|
||||
);
|
||||
expect(response.status).to.be(200);
|
||||
expect(response.body).to.eql({ timeseries: [] });
|
||||
|
@ -37,7 +37,7 @@ export default function ApiTest({ getService }: FtrProviderContext) {
|
|||
|
||||
it('returns the transaction breakdown for a service', async () => {
|
||||
const response = await supertest.get(
|
||||
`/api/apm/services/opbeans-node/transaction_groups/breakdown?start=${start}&end=${end}&uiFilters=${uiFilters}&transactionType=${transactionType}`
|
||||
`/api/apm/services/opbeans-node/transaction/charts/breakdown?start=${start}&end=${end}&uiFilters=${uiFilters}&transactionType=${transactionType}`
|
||||
);
|
||||
|
||||
expect(response.status).to.be(200);
|
||||
|
@ -45,7 +45,7 @@ export default function ApiTest({ getService }: FtrProviderContext) {
|
|||
});
|
||||
it('returns the transaction breakdown for a transaction group', async () => {
|
||||
const response = await supertest.get(
|
||||
`/api/apm/services/opbeans-node/transaction_groups/breakdown?start=${start}&end=${end}&uiFilters=${uiFilters}&transactionType=${transactionType}&transactionName=${transactionName}`
|
||||
`/api/apm/services/opbeans-node/transaction/charts/breakdown?start=${start}&end=${end}&uiFilters=${uiFilters}&transactionType=${transactionType}&transactionName=${transactionName}`
|
||||
);
|
||||
|
||||
expect(response.status).to.be(200);
|
||||
|
@ -104,7 +104,7 @@ export default function ApiTest({ getService }: FtrProviderContext) {
|
|||
});
|
||||
it('returns the transaction breakdown sorted by name', async () => {
|
||||
const response = await supertest.get(
|
||||
`/api/apm/services/opbeans-node/transaction_groups/breakdown?start=${start}&end=${end}&uiFilters=${uiFilters}&transactionType=${transactionType}`
|
||||
`/api/apm/services/opbeans-node/transaction/charts/breakdown?start=${start}&end=${end}&uiFilters=${uiFilters}&transactionType=${transactionType}`
|
||||
);
|
||||
|
||||
expect(response.status).to.be(200);
|
|
@ -16,7 +16,7 @@ export default function ApiTest({ getService }: FtrProviderContext) {
|
|||
const archiveName = 'apm_8.0.0';
|
||||
const metadata = archives_metadata[archiveName];
|
||||
|
||||
const url = `/api/apm/services/opbeans-java/transaction_groups/distribution?${qs.stringify({
|
||||
const url = `/api/apm/services/opbeans-java/transactions/charts/distribution?${qs.stringify({
|
||||
start: metadata.start,
|
||||
end: metadata.end,
|
||||
uiFilters: encodeURIComponent('{}'),
|
|
@ -24,7 +24,7 @@ export default function ApiTest({ getService }: FtrProviderContext) {
|
|||
describe('when data is not loaded', () => {
|
||||
it('handles the empty state', async () => {
|
||||
const response = await supertest.get(
|
||||
`/api/apm/services/opbeans-java/transaction_groups/error_rate?start=${start}&end=${end}&uiFilters=${uiFilters}`
|
||||
`/api/apm/services/opbeans-java/transactions/charts/error_rate?start=${start}&end=${end}&uiFilters=${uiFilters}`
|
||||
);
|
||||
expect(response.status).to.be(200);
|
||||
|
||||
|
@ -45,7 +45,7 @@ export default function ApiTest({ getService }: FtrProviderContext) {
|
|||
};
|
||||
before(async () => {
|
||||
const response = await supertest.get(
|
||||
`/api/apm/services/opbeans-java/transaction_groups/error_rate?start=${start}&end=${end}&uiFilters=${uiFilters}`
|
||||
`/api/apm/services/opbeans-java/transactions/charts/error_rate?start=${start}&end=${end}&uiFilters=${uiFilters}`
|
||||
);
|
||||
errorRateResponse = response.body;
|
||||
});
|
|
@ -29,7 +29,7 @@ export default function ApiTest({ getService }: FtrProviderContext) {
|
|||
describe('when data is not loaded ', () => {
|
||||
it('handles empty state', async () => {
|
||||
const response = await supertest.get(
|
||||
`/api/apm/services/opbeans-node/transaction_groups?start=${start}&end=${end}&uiFilters=${uiFilters}&transactionType=${transactionType}`
|
||||
`/api/apm/services/opbeans-node/transactions/groups?start=${start}&end=${end}&uiFilters=${uiFilters}&transactionType=${transactionType}`
|
||||
);
|
||||
|
||||
expect(response.status).to.be(200);
|
||||
|
@ -44,7 +44,7 @@ export default function ApiTest({ getService }: FtrProviderContext) {
|
|||
before(async () => {
|
||||
await esArchiver.load(archiveName);
|
||||
response = await supertest.get(
|
||||
`/api/apm/services/opbeans-node/transaction_groups?start=${start}&end=${end}&uiFilters=${uiFilters}&transactionType=${transactionType}`
|
||||
`/api/apm/services/opbeans-node/transactions/groups?start=${start}&end=${end}&uiFilters=${uiFilters}&transactionType=${transactionType}`
|
||||
);
|
||||
});
|
||||
after(() => esArchiver.unload(archiveName));
|
|
@ -24,7 +24,7 @@ export default function ApiTest({ getService }: FtrProviderContext) {
|
|||
describe('when data is not loaded ', () => {
|
||||
it('handles the empty state', async () => {
|
||||
const response = await supertest.get(
|
||||
`/api/apm/services/opbeans-node/transaction_groups/charts?start=${start}&end=${end}&uiFilters=${uiFilters}`
|
||||
`/api/apm/services/opbeans-node/transactions/charts?start=${start}&end=${end}&uiFilters=${uiFilters}`
|
||||
);
|
||||
|
||||
expect(response.status).to.be(200);
|
||||
|
@ -45,7 +45,7 @@ export default function ApiTest({ getService }: FtrProviderContext) {
|
|||
|
||||
before(async () => {
|
||||
response = await supertest.get(
|
||||
`/api/apm/services/opbeans-node/transaction_groups/charts?start=${start}&end=${end}&uiFilters=${uiFilters}`
|
||||
`/api/apm/services/opbeans-node/transactions/charts?start=${start}&end=${end}&uiFilters=${uiFilters}`
|
||||
);
|
||||
});
|
||||
|
|
@ -17,12 +17,12 @@ export default function ApiTest({ getService }: FtrProviderContext) {
|
|||
const archiveName = 'apm_8.0.0';
|
||||
const { start, end } = archives[archiveName];
|
||||
|
||||
describe('Service overview transaction groups', () => {
|
||||
describe('Transactions groups overview', () => {
|
||||
describe('when data is not loaded', () => {
|
||||
it('handles the empty state', async () => {
|
||||
const response = await supertest.get(
|
||||
url.format({
|
||||
pathname: `/api/apm/services/opbeans-java/overview_transaction_groups`,
|
||||
pathname: `/api/apm/services/opbeans-java/transactions/groups/overview`,
|
||||
query: {
|
||||
start,
|
||||
end,
|
||||
|
@ -52,7 +52,7 @@ export default function ApiTest({ getService }: FtrProviderContext) {
|
|||
it('returns the correct data', async () => {
|
||||
const response = await supertest.get(
|
||||
url.format({
|
||||
pathname: `/api/apm/services/opbeans-java/overview_transaction_groups`,
|
||||
pathname: `/api/apm/services/opbeans-java/transactions/groups/overview`,
|
||||
query: {
|
||||
start,
|
||||
end,
|
||||
|
@ -128,7 +128,7 @@ export default function ApiTest({ getService }: FtrProviderContext) {
|
|||
it('sorts items in the correct order', async () => {
|
||||
const descendingResponse = await supertest.get(
|
||||
url.format({
|
||||
pathname: `/api/apm/services/opbeans-java/overview_transaction_groups`,
|
||||
pathname: `/api/apm/services/opbeans-java/transactions/groups/overview`,
|
||||
query: {
|
||||
start,
|
||||
end,
|
||||
|
@ -152,7 +152,7 @@ export default function ApiTest({ getService }: FtrProviderContext) {
|
|||
|
||||
const ascendingResponse = await supertest.get(
|
||||
url.format({
|
||||
pathname: `/api/apm/services/opbeans-java/overview_transaction_groups`,
|
||||
pathname: `/api/apm/services/opbeans-java/transactions/groups/overview`,
|
||||
query: {
|
||||
start,
|
||||
end,
|
||||
|
@ -176,7 +176,7 @@ export default function ApiTest({ getService }: FtrProviderContext) {
|
|||
it('sorts items by the correct field', async () => {
|
||||
const response = await supertest.get(
|
||||
url.format({
|
||||
pathname: `/api/apm/services/opbeans-java/overview_transaction_groups`,
|
||||
pathname: `/api/apm/services/opbeans-java/transactions/groups/overview`,
|
||||
query: {
|
||||
start,
|
||||
end,
|
||||
|
@ -202,7 +202,7 @@ export default function ApiTest({ getService }: FtrProviderContext) {
|
|||
|
||||
const firstPage = await supertest.get(
|
||||
url.format({
|
||||
pathname: `/api/apm/services/opbeans-java/overview_transaction_groups`,
|
||||
pathname: `/api/apm/services/opbeans-java/transactions/groups/overview`,
|
||||
query: {
|
||||
start,
|
||||
end,
|
||||
|
@ -229,7 +229,7 @@ export default function ApiTest({ getService }: FtrProviderContext) {
|
|||
|
||||
const thisPage = await supertest.get(
|
||||
url.format({
|
||||
pathname: '/api/apm/services/opbeans-java/overview_transaction_groups',
|
||||
pathname: '/api/apm/services/opbeans-java/transactions/groups/overview',
|
||||
query: {
|
||||
start,
|
||||
end,
|
|
@ -13,7 +13,10 @@ export default function observabilityApiIntegrationTests({ loadTestFile }: FtrPr
|
|||
describe('Services', function () {
|
||||
loadTestFile(require.resolve('./services/annotations'));
|
||||
loadTestFile(require.resolve('./services/top_services.ts'));
|
||||
loadTestFile(require.resolve('./services/transaction_groups_charts'));
|
||||
});
|
||||
|
||||
describe('Transactions', function () {
|
||||
loadTestFile(require.resolve('./transactions/transactions_charts.ts'));
|
||||
});
|
||||
|
||||
describe('Settings', function () {
|
||||
|
|
|
@ -27,7 +27,7 @@ export default function ApiTest({ getService }: FtrProviderContext) {
|
|||
before(() => esArchiver.load(archiveName));
|
||||
after(() => esArchiver.unload(archiveName));
|
||||
|
||||
describe('and fetching transaction groups charts with uiFilters', () => {
|
||||
describe('and fetching transaction charts with uiFilters', () => {
|
||||
const serviceName = 'opbeans-java';
|
||||
let response: PromiseReturnType<typeof supertest.get>;
|
||||
|
||||
|
@ -35,7 +35,7 @@ export default function ApiTest({ getService }: FtrProviderContext) {
|
|||
const uiFilters = encodeURIComponent(JSON.stringify({}));
|
||||
before(async () => {
|
||||
response = await supertest.get(
|
||||
`/api/apm/services/${serviceName}/transaction_groups/charts?start=${start}&end=${end}&transactionType=${transactionType}&uiFilters=${uiFilters}`
|
||||
`/api/apm/services/${serviceName}/transactions/charts?start=${start}&end=${end}&transactionType=${transactionType}&uiFilters=${uiFilters}`
|
||||
);
|
||||
});
|
||||
it('should return an error response', () => {
|
||||
|
@ -46,7 +46,7 @@ export default function ApiTest({ getService }: FtrProviderContext) {
|
|||
describe('without uiFilters', () => {
|
||||
before(async () => {
|
||||
response = await supertest.get(
|
||||
`/api/apm/services/${serviceName}/transaction_groups/charts?start=${start}&end=${end}&transactionType=${transactionType}`
|
||||
`/api/apm/services/${serviceName}/transactions/charts?start=${start}&end=${end}&transactionType=${transactionType}`
|
||||
);
|
||||
});
|
||||
it('should return an error response', () => {
|
||||
|
@ -58,7 +58,7 @@ export default function ApiTest({ getService }: FtrProviderContext) {
|
|||
const uiFilters = encodeURIComponent(JSON.stringify({ environment: 'production' }));
|
||||
before(async () => {
|
||||
response = await supertest.get(
|
||||
`/api/apm/services/${serviceName}/transaction_groups/charts?start=${start}&end=${end}&transactionType=${transactionType}&uiFilters=${uiFilters}`
|
||||
`/api/apm/services/${serviceName}/transactions/charts?start=${start}&end=${end}&transactionType=${transactionType}&uiFilters=${uiFilters}`
|
||||
);
|
||||
});
|
||||
|
||||
|
@ -87,7 +87,7 @@ export default function ApiTest({ getService }: FtrProviderContext) {
|
|||
);
|
||||
before(async () => {
|
||||
response = await supertest.get(
|
||||
`/api/apm/services/${serviceName}/transaction_groups/charts?start=${start}&end=${end}&transactionType=${transactionType}&uiFilters=${uiFilters}`
|
||||
`/api/apm/services/${serviceName}/transactions/charts?start=${start}&end=${end}&transactionType=${transactionType}&uiFilters=${uiFilters}`
|
||||
);
|
||||
});
|
||||
|
||||
|
@ -113,7 +113,7 @@ export default function ApiTest({ getService }: FtrProviderContext) {
|
|||
const uiFilters = encodeURIComponent(JSON.stringify({ environment: 'ENVIRONMENT_ALL' }));
|
||||
before(async () => {
|
||||
response = await supertest.get(
|
||||
`/api/apm/services/${serviceName}/transaction_groups/charts?start=${start}&end=${end}&transactionType=${transactionType}&uiFilters=${uiFilters}`
|
||||
`/api/apm/services/${serviceName}/transactions/charts?start=${start}&end=${end}&transactionType=${transactionType}&uiFilters=${uiFilters}`
|
||||
);
|
||||
});
|
||||
|
||||
|
@ -132,7 +132,7 @@ export default function ApiTest({ getService }: FtrProviderContext) {
|
|||
);
|
||||
before(async () => {
|
||||
response = await supertest.get(
|
||||
`/api/apm/services/${serviceName}/transaction_groups/charts?start=${start}&end=${end}&transactionType=${transactionType}&uiFilters=${uiFilters}`
|
||||
`/api/apm/services/${serviceName}/transactions/charts?start=${start}&end=${end}&transactionType=${transactionType}&uiFilters=${uiFilters}`
|
||||
);
|
||||
});
|
||||
|
Loading…
Reference in a new issue