diff --git a/package.json b/package.json
index d4f63df304f9a..55be5fe7c32a4 100644
--- a/package.json
+++ b/package.json
@@ -244,7 +244,7 @@
"@types/boom": "^7.2.0",
"@types/chance": "^1.0.0",
"@types/classnames": "^2.2.3",
- "@types/d3": "^5.0.0",
+ "@types/d3": "^3.5.41",
"@types/dedent": "^0.7.0",
"@types/del": "^3.0.1",
"@types/elasticsearch": "^5.0.26",
@@ -258,6 +258,7 @@
"@types/hapi": "^17.0.18",
"@types/has-ansi": "^3.0.0",
"@types/hoek": "^4.1.3",
+ "@types/humps": "^1.1.2",
"@types/jest": "^23.3.1",
"@types/joi": "^13.4.2",
"@types/jquery": "^3.3.6",
diff --git a/src/ui/public/kfetch/index.ts b/src/ui/public/kfetch/index.ts
index 1b0861da9fc1b..f871d97f0fd54 100644
--- a/src/ui/public/kfetch/index.ts
+++ b/src/ui/public/kfetch/index.ts
@@ -17,5 +17,5 @@
* under the License.
*/
-export { kfetch, addInterceptor } from './kfetch';
+export { kfetch, addInterceptor, KFetchOptions } from './kfetch';
export { kfetchAbortable } from './kfetch_abortable';
diff --git a/src/ui/public/kfetch/kfetch.ts b/src/ui/public/kfetch/kfetch.ts
index 2d93c89f57d2b..06edae2d9e756 100644
--- a/src/ui/public/kfetch/kfetch.ts
+++ b/src/ui/public/kfetch/kfetch.ts
@@ -26,7 +26,7 @@ import chrome from '../chrome';
import { KFetchError } from './kfetch_error';
interface KFetchQuery {
- [key: string]: string | number | boolean;
+ [key: string]: string | number | boolean | undefined;
}
export interface KFetchOptions extends RequestInit {
diff --git a/x-pack/plugins/apm/public/components/app/ErrorGroupDetails/DetailView/__test__/__snapshots__/DetailView.test.js.snap b/x-pack/plugins/apm/public/components/app/ErrorGroupDetails/DetailView/__test__/__snapshots__/DetailView.test.js.snap
index 393a73aaf2a68..d0a6b69f71ed2 100644
--- a/x-pack/plugins/apm/public/components/app/ErrorGroupDetails/DetailView/__test__/__snapshots__/DetailView.test.js.snap
+++ b/x-pack/plugins/apm/public/components/app/ErrorGroupDetails/DetailView/__test__/__snapshots__/DetailView.test.js.snap
@@ -12,7 +12,7 @@ exports[`DetailView should render with data 1`] = `
>
Error occurrence
-
View 18 occurences in Discover
-
+
) => (
+ render={({ data, status }: RRRRenderResponse) => (
) => (
+ render={({ data }) => (
= ({
+ query,
+ children,
+ ...rest
+}) => {
return (
);
-}
+};
diff --git a/x-pack/plugins/apm/public/components/shared/ManagedTable/index.tsx b/x-pack/plugins/apm/public/components/shared/ManagedTable/index.tsx
index 1b426121fce63..447c34b0189aa 100644
--- a/x-pack/plugins/apm/public/components/shared/ManagedTable/index.tsx
+++ b/x-pack/plugins/apm/public/components/shared/ManagedTable/index.tsx
@@ -18,7 +18,7 @@ export interface ITableColumn {
align?: string;
width?: string;
sortable?: boolean;
- render?: (value: any, item?: any) => any;
+ render?: (value: any, item?: any) => unknown;
}
export interface IManagedTableProps {
@@ -31,7 +31,7 @@ export interface IManagedTableProps {
field: string;
direction: 'asc' | 'desc';
};
- noItemsMessage?: any;
+ noItemsMessage?: React.ReactNode;
}
export class ManagedTable extends Component {
diff --git a/x-pack/plugins/apm/public/components/shared/PropertiesTable/NestedKeyValueTable.tsx b/x-pack/plugins/apm/public/components/shared/PropertiesTable/NestedKeyValueTable.tsx
index 4804adbc80e4a..bea0f145bbac4 100644
--- a/x-pack/plugins/apm/public/components/shared/PropertiesTable/NestedKeyValueTable.tsx
+++ b/x-pack/plugins/apm/public/components/shared/PropertiesTable/NestedKeyValueTable.tsx
@@ -17,7 +17,7 @@ import {
units
} from '../../../style/variables';
-export type KeySorter = (data: StringMap, parentKey?: string) => string[];
+export type KeySorter = (data: StringMap, parentKey?: string) => string[];
const Table = styled.table`
font-family: ${fontFamilyCode};
@@ -60,7 +60,7 @@ export function FormattedKey({
value
}: {
k: string;
- value: any;
+ value: unknown;
}): JSX.Element {
if (value == null) {
return {k};
@@ -87,7 +87,7 @@ export function NestedValue({
depth,
keySorter
}: {
- value: any;
+ value: StringMap;
depth: number;
parentKey?: string;
keySorter?: KeySorter;
diff --git a/x-pack/plugins/apm/public/components/shared/charts/CustomPlot/test/responseWithData.json b/x-pack/plugins/apm/public/components/shared/charts/CustomPlot/test/responseWithData.json
index 472f2b65861ca..9efb6e7d9a531 100644
--- a/x-pack/plugins/apm/public/components/shared/charts/CustomPlot/test/responseWithData.json
+++ b/x-pack/plugins/apm/public/components/shared/charts/CustomPlot/test/responseWithData.json
@@ -131,13 +131,12 @@
2547299.079999993,
4586742.89999998,
0
- ],
- "avgAnomalies": {}
+ ]
},
"tpmBuckets": [
{
"key": "2xx",
- "avg": "41.61538461538461",
+ "avg": 41.61538461538461,
"values": [
0,
0,
@@ -174,7 +173,7 @@
},
{
"key": "3xx",
- "avg": "0",
+ "avg": 0,
"values": [
0,
0,
@@ -211,7 +210,7 @@
},
{
"key": "4xx",
- "avg": "1.4615384615384615",
+ "avg": 1.4615384615384615,
"values": [
0,
0,
@@ -248,7 +247,7 @@
},
{
"key": "5xx",
- "avg": "5.6923076923076925",
+ "avg": 5.6923076923076925,
"values": [
0,
0,
diff --git a/x-pack/plugins/apm/public/services/__test__/SessionStorageMock.js b/x-pack/plugins/apm/public/services/__test__/SessionStorageMock.ts
similarity index 65%
rename from x-pack/plugins/apm/public/services/__test__/SessionStorageMock.js
rename to x-pack/plugins/apm/public/services/__test__/SessionStorageMock.ts
index c42d84b1da1d7..2423cbd11a2d0 100644
--- a/x-pack/plugins/apm/public/services/__test__/SessionStorageMock.js
+++ b/x-pack/plugins/apm/public/services/__test__/SessionStorageMock.ts
@@ -4,22 +4,24 @@
* you may not use this file except in compliance with the Elastic License.
*/
+import { StringMap } from 'x-pack/plugins/apm/typings/common';
+
export class SessionStorageMock {
- store = {};
+ private store: StringMap = {};
- clear() {
+ public clear() {
this.store = {};
}
- getItem(key) {
+ public getItem(key: string) {
return this.store[key] || null;
}
- setItem(key, value) {
+ public setItem(key: string, value: any) {
this.store[key] = value.toString();
}
- removeItem(key) {
+ public removeItem(key: string) {
delete this.store[key];
}
}
diff --git a/x-pack/plugins/apm/public/services/__test__/callApi.test.js b/x-pack/plugins/apm/public/services/__test__/callApi.test.ts
similarity index 98%
rename from x-pack/plugins/apm/public/services/__test__/callApi.test.js
rename to x-pack/plugins/apm/public/services/__test__/callApi.test.ts
index 7e5439b2e6eb4..9533902fe39f8 100644
--- a/x-pack/plugins/apm/public/services/__test__/callApi.test.js
+++ b/x-pack/plugins/apm/public/services/__test__/callApi.test.ts
@@ -5,16 +5,17 @@
*/
import * as kfetchModule from 'ui/kfetch';
-import { SessionStorageMock } from './SessionStorageMock';
import { callApi } from '../rest/callApi';
+import { SessionStorageMock } from './SessionStorageMock';
describe('callApi', () => {
- let kfetchSpy;
+ let kfetchSpy: jest.Mock;
beforeEach(() => {
kfetchSpy = jest.spyOn(kfetchModule, 'kfetch').mockResolvedValue({
my_key: 'hello world'
});
+ // @ts-ignore
global.sessionStorage = new SessionStorageMock();
});
diff --git a/x-pack/plugins/apm/public/services/rest/apm.ts b/x-pack/plugins/apm/public/services/rest/apm.ts
index d065be4fa28a2..692c360980ef8 100644
--- a/x-pack/plugins/apm/public/services/rest/apm.ts
+++ b/x-pack/plugins/apm/public/services/rest/apm.ts
@@ -6,17 +6,20 @@
// @ts-ignore
import { camelizeKeys } from 'humps';
-import { ServiceResponse } from 'x-pack/plugins/apm/server/lib/services/get_service';
-import { IServiceListItem } from 'x-pack/plugins/apm/server/lib/services/get_services';
-import { IDistributionResponse } from 'x-pack/plugins/apm/server/lib/transactions/distribution/get_distribution';
+import { ServiceAPIResponse } from 'x-pack/plugins/apm/server/lib/services/get_service';
+import { ServiceListAPIResponse } from 'x-pack/plugins/apm/server/lib/services/get_services';
+import { TraceListAPIResponse } from 'x-pack/plugins/apm/server/lib/traces/get_top_traces';
+import { TraceAPIResponse } from 'x-pack/plugins/apm/server/lib/traces/get_trace';
+import { TimeSeriesAPIResponse } from 'x-pack/plugins/apm/server/lib/transactions/charts/get_timeseries_data/transform';
+import { ITransactionDistributionAPIResponse } from 'x-pack/plugins/apm/server/lib/transactions/distribution';
+import { TransactionListAPIResponse } from 'x-pack/plugins/apm/server/lib/transactions/get_top_transactions';
+import { TransactionAPIResponse } from 'x-pack/plugins/apm/server/lib/transactions/get_transaction';
+import { SpanListAPIResponse } from 'x-pack/plugins/apm/server/lib/transactions/spans/get_spans';
import { Span } from 'x-pack/plugins/apm/typings/Span';
import { Transaction } from 'x-pack/plugins/apm/typings/Transaction';
-import { ITransactionGroup } from 'x-pack/plugins/apm/typings/TransactionGroup';
-import { WaterfallResponse } from 'x-pack/plugins/apm/typings/waterfall';
import { IUrlParams } from '../../store/urlParams';
// @ts-ignore
import { convertKueryToEsQuery } from '../kuery';
-// @ts-ignore
import { callApi } from './callApi';
// @ts-ignore
import { getAPMIndexPattern } from './savedObjects';
@@ -34,7 +37,7 @@ export async function loadServerStatus() {
}
export async function loadAgentStatus() {
- return callApi({
+ return callApi<{ dataFound: boolean }>({
pathname: `/api/apm/status/agent`
});
}
@@ -54,12 +57,8 @@ export async function getEncodedEsQuery(kuery?: string) {
return encodeURIComponent(JSON.stringify(esFilterQuery));
}
-export async function loadServiceList({
- start,
- end,
- kuery
-}: IUrlParams): Promise {
- return callApi({
+export async function loadServiceList({ start, end, kuery }: IUrlParams) {
+ return callApi({
pathname: `/api/apm/services`,
query: {
start,
@@ -74,8 +73,8 @@ export async function loadServiceDetails({
start,
end,
kuery
-}: IUrlParams): Promise {
- return callApi({
+}: IUrlParams) {
+ return callApi({
pathname: `/api/apm/services/${serviceName}`,
query: {
start,
@@ -85,12 +84,8 @@ export async function loadServiceDetails({
});
}
-export async function loadTraceList({
- start,
- end,
- kuery
-}: IUrlParams): Promise {
- const groups: ITransactionGroup[] = await callApi({
+export async function loadTraceList({ start, end, kuery }: IUrlParams) {
+ const groups = await callApi({
pathname: '/api/apm/traces',
query: {
start,
@@ -111,8 +106,8 @@ export async function loadTransactionList({
end,
kuery,
transactionType
-}: IUrlParams): Promise {
- const groups: ITransactionGroup[] = await callApi({
+}: IUrlParams) {
+ const groups = await callApi({
pathname: `/api/apm/services/${serviceName}/transactions`,
query: {
start,
@@ -134,8 +129,8 @@ export async function loadTransactionDistribution({
end,
transactionName,
kuery
-}: IUrlParams): Promise {
- return callApi({
+}: IUrlParams) {
+ return callApi({
pathname: `/api/apm/services/${serviceName}/transactions/distribution`,
query: {
start,
@@ -168,8 +163,8 @@ export async function loadSpans({
start,
end,
transactionId
-}: IUrlParams): Promise {
- const hits: Span[] = await callApi({
+}: IUrlParams) {
+ const hits = await callApi({
pathname: `/api/apm/services/${serviceName}/transactions/${transactionId}/spans`,
query: {
start,
@@ -181,7 +176,7 @@ export async function loadSpans({
}
export async function loadTrace({ traceId, start, end }: IUrlParams) {
- const hits: WaterfallResponse = await callApi(
+ const hits = await callApi(
{
pathname: `/api/apm/traces/${traceId}`,
query: {
@@ -205,7 +200,7 @@ export async function loadTransaction({
traceId,
kuery
}: IUrlParams) {
- const result: Transaction | null = await callApi(
+ const result = await callApi(
{
pathname: `/api/apm/services/${serviceName}/transactions/${transactionId}`,
query: {
@@ -231,7 +226,7 @@ export async function loadCharts({
transactionType,
transactionName
}: IUrlParams) {
- return callApi({
+ return callApi({
pathname: `/api/apm/services/${serviceName}/transactions/charts`,
query: {
start,
@@ -278,7 +273,8 @@ export async function loadErrorGroupDetails({
kuery,
errorGroupId
}: IUrlParams) {
- const res = await callApi(
+ // TODO: add types when error section is converted to ts
+ const res = await callApi(
{
pathname: `/api/apm/services/${serviceName}/errors/${errorGroupId}`,
query: {
@@ -291,7 +287,7 @@ export async function loadErrorGroupDetails({
camelcase: false
}
);
- const camelizedRes = camelizeKeys(res);
+ const camelizedRes: any = camelizeKeys(res);
if (res.error.context) {
camelizedRes.error.context = res.error.context;
}
diff --git a/x-pack/plugins/apm/public/services/rest/callApi.js b/x-pack/plugins/apm/public/services/rest/callApi.ts
similarity index 81%
rename from x-pack/plugins/apm/public/services/rest/callApi.js
rename to x-pack/plugins/apm/public/services/rest/callApi.ts
index d33bea0644d5d..3de91a3f5e98f 100644
--- a/x-pack/plugins/apm/public/services/rest/callApi.js
+++ b/x-pack/plugins/apm/public/services/rest/callApi.ts
@@ -4,12 +4,12 @@
* you may not use this file except in compliance with the Elastic License.
*/
-import 'isomorphic-fetch';
import { camelizeKeys } from 'humps';
-import { kfetch } from 'ui/kfetch';
+import 'isomorphic-fetch';
import { startsWith } from 'lodash';
+import { kfetch, KFetchOptions } from 'ui/kfetch';
-function fetchOptionsWithDebug(fetchOptions) {
+function fetchOptionsWithDebug(fetchOptions: KFetchOptions) {
const debugEnabled =
sessionStorage.getItem('apm_debug') === 'true' &&
startsWith(fetchOptions.pathname, '/api/apm');
@@ -27,10 +27,10 @@ function fetchOptionsWithDebug(fetchOptions) {
};
}
-export async function callApi(
- fetchOptions,
+export async function callApi(
+ fetchOptions: KFetchOptions,
{ camelcase = true, prependBasePath = true } = {}
-) {
+): Promise {
const combinedFetchOptions = fetchOptionsWithDebug(fetchOptions);
const res = await kfetch(combinedFetchOptions, { prependBasePath });
return camelcase ? camelizeKeys(res) : res;
diff --git a/x-pack/plugins/apm/public/store/mockData/mockTraceList.json b/x-pack/plugins/apm/public/store/mockData/mockTraceList.json
deleted file mode 100644
index 4e97a030a2621..0000000000000
--- a/x-pack/plugins/apm/public/store/mockData/mockTraceList.json
+++ /dev/null
@@ -1,30 +0,0 @@
-[
- {
- "name": "log",
- "serviceName": "flask-server",
- "averageResponseTime": 1329,
- "tracesPerMinute": 3201,
- "impact": 70
- },
- {
- "name": "products/item",
- "serviceName": "client",
- "averageResponseTime": 2301,
- "tracesPerMinute": 5432,
- "impact": 42
- },
- {
- "name": "billing/payment",
- "serviceName": "client",
- "averageResponseTime": 789,
- "tracesPerMinute": 1201,
- "impact": 14
- },
- {
- "name": "user/profile",
- "serviceName": "client",
- "averageResponseTime": 1212,
- "tracesPerMinute": 904,
- "impact": 92
- }
-]
diff --git a/x-pack/plugins/apm/public/store/reactReduxRequest/transactionDetailsCharts.js b/x-pack/plugins/apm/public/store/reactReduxRequest/transactionDetailsCharts.tsx
similarity index 64%
rename from x-pack/plugins/apm/public/store/reactReduxRequest/transactionDetailsCharts.js
rename to x-pack/plugins/apm/public/store/reactReduxRequest/transactionDetailsCharts.tsx
index 484555bf86328..45c0d3e9f53d1 100644
--- a/x-pack/plugins/apm/public/store/reactReduxRequest/transactionDetailsCharts.js
+++ b/x-pack/plugins/apm/public/store/reactReduxRequest/transactionDetailsCharts.tsx
@@ -5,36 +5,44 @@
*/
import React from 'react';
+import { Request, RRRRender } from 'react-redux-request';
import { createSelector } from 'reselect';
-import { getCharts } from '../selectors/chartSelectors';
-import { getUrlParams } from '../urlParams';
-import { Request } from 'react-redux-request';
+import { TimeSeriesAPIResponse } from 'x-pack/plugins/apm/server/lib/transactions/charts/get_timeseries_data/transform';
import { loadCharts } from '../../services/rest/apm';
-import { createInitialDataSelector } from './helpers';
+import { IReduxState } from '../rootReducer';
+import { getCharts } from '../selectors/chartSelectors';
+import { getUrlParams, IUrlParams } from '../urlParams';
const ID = 'transactionDetailsCharts';
const INITIAL_DATA = {
totalHits: 0,
dates: [],
- responseTimes: {},
+ responseTimes: {
+ avg: [],
+ p95: [],
+ p99: []
+ },
tpmBuckets: [],
- overallAvgDuration: null
+ overallAvgDuration: undefined
};
-const withInitialData = createInitialDataSelector(INITIAL_DATA);
-
export const getTransactionDetailsCharts = createSelector(
getUrlParams,
- state => withInitialData(state.reactReduxRequest[ID]),
- (urlParams, detailCharts) => {
+ (state: IReduxState) => state.reactReduxRequest[ID],
+ (urlParams, detailCharts = {}) => {
return {
...detailCharts,
- data: getCharts(urlParams, detailCharts.data)
+ data: getCharts(urlParams, detailCharts.data || INITIAL_DATA)
};
}
);
-export function TransactionDetailsChartsRequest({ urlParams, render }) {
+interface Props {
+ urlParams: IUrlParams;
+ render: RRRRender;
+}
+
+export function TransactionDetailsChartsRequest({ urlParams, render }: Props) {
const {
serviceName,
start,
diff --git a/x-pack/plugins/apm/public/store/reactReduxRequest/transactionDistribution.tsx b/x-pack/plugins/apm/public/store/reactReduxRequest/transactionDistribution.tsx
index b52644d6881d5..bf2e803b2c46c 100644
--- a/x-pack/plugins/apm/public/store/reactReduxRequest/transactionDistribution.tsx
+++ b/x-pack/plugins/apm/public/store/reactReduxRequest/transactionDistribution.tsx
@@ -6,7 +6,7 @@
import React from 'react';
import { Request, RRRRender, RRRRenderResponse } from 'react-redux-request';
-import { IDistributionResponse } from '../../../server/lib/transactions/distribution/get_distribution';
+import { ITransactionDistributionAPIResponse } from 'x-pack/plugins/apm/server/lib/transactions/distribution';
import { loadTransactionDistribution } from '../../services/rest/apm';
import { IReduxState } from '../rootReducer';
import { IUrlParams } from '../urlParams';
@@ -19,7 +19,7 @@ const withInitialData = createInitialDataSelector(INITIAL_DATA);
export function getTransactionDistribution(
state: IReduxState
-): RRRRenderResponse {
+): RRRRenderResponse {
return withInitialData(state.reactReduxRequest[ID]);
}
@@ -37,7 +37,7 @@ export function TransactionDistributionRequest({
render
}: {
urlParams: IUrlParams;
- render: RRRRender;
+ render: RRRRender;
}) {
const { serviceName, start, end, transactionName, kuery } = urlParams;
diff --git a/x-pack/plugins/apm/public/store/reactReduxRequest/transactionOverviewCharts.js b/x-pack/plugins/apm/public/store/reactReduxRequest/transactionOverviewCharts.tsx
similarity index 69%
rename from x-pack/plugins/apm/public/store/reactReduxRequest/transactionOverviewCharts.js
rename to x-pack/plugins/apm/public/store/reactReduxRequest/transactionOverviewCharts.tsx
index a5313c7efda10..87ecf58e0e338 100644
--- a/x-pack/plugins/apm/public/store/reactReduxRequest/transactionOverviewCharts.js
+++ b/x-pack/plugins/apm/public/store/reactReduxRequest/transactionOverviewCharts.tsx
@@ -4,26 +4,32 @@
* you may not use this file except in compliance with the Elastic License.
*/
+import { get, isEmpty } from 'lodash';
import React from 'react';
+import { Request, RRRRender } from 'react-redux-request';
import { createSelector } from 'reselect';
-import { get, isEmpty } from 'lodash';
-import { getCharts } from '../selectors/chartSelectors';
-import { getUrlParams } from '../urlParams';
-import { Request } from 'react-redux-request';
+import { TimeSeriesAPIResponse } from 'x-pack/plugins/apm/server/lib/transactions/charts/get_timeseries_data/transform';
import { loadCharts } from '../../services/rest/apm';
+import { IReduxState } from '../rootReducer';
+import { getCharts } from '../selectors/chartSelectors';
+import { getUrlParams, IUrlParams } from '../urlParams';
const ID = 'transactionOverviewCharts';
const INITIAL_DATA = {
totalHits: 0,
dates: [],
- responseTimes: {},
+ responseTimes: {
+ avg: [],
+ p95: [],
+ p99: []
+ },
tpmBuckets: [],
- overallAvgDuration: null
+ overallAvgDuration: undefined
};
export const getTransactionOverviewCharts = createSelector(
getUrlParams,
- state => state.reactReduxRequest[ID],
+ (state: IReduxState) => state.reactReduxRequest[ID],
(urlParams, overviewCharts = {}) => {
return {
...overviewCharts,
@@ -32,7 +38,7 @@ export const getTransactionOverviewCharts = createSelector(
}
);
-export function hasDynamicBaseline(state) {
+export function hasDynamicBaseline(state: IReduxState) {
return !isEmpty(
get(
state,
@@ -41,7 +47,12 @@ export function hasDynamicBaseline(state) {
);
}
-export function TransactionOverviewChartsRequest({ urlParams, render }) {
+interface Props {
+ urlParams: IUrlParams;
+ render: RRRRender;
+}
+
+export function TransactionOverviewChartsRequest({ urlParams, render }: Props) {
const { serviceName, start, end, transactionType, kuery } = urlParams;
if (!(serviceName && start && end && transactionType)) {
diff --git a/x-pack/plugins/apm/public/store/reactReduxRequest/waterfallV2.tsx b/x-pack/plugins/apm/public/store/reactReduxRequest/waterfallV2.tsx
index 43e4f65c91d4b..996c80bb8a055 100644
--- a/x-pack/plugins/apm/public/store/reactReduxRequest/waterfallV2.tsx
+++ b/x-pack/plugins/apm/public/store/reactReduxRequest/waterfallV2.tsx
@@ -8,8 +8,8 @@ import { get } from 'lodash';
import React from 'react';
import { Request, RRRRender } from 'react-redux-request';
import { TRACE_ID } from 'x-pack/plugins/apm/common/constants';
+import { TraceAPIResponse } from 'x-pack/plugins/apm/server/lib/traces/get_trace';
import { Transaction } from 'x-pack/plugins/apm/typings/Transaction';
-import { WaterfallResponse } from 'x-pack/plugins/apm/typings/waterfall';
import {
getWaterfall,
IWaterfall
@@ -36,7 +36,7 @@ export function WaterfallV2Request({ urlParams, transaction, render }: Props) {
}
return (
-
+
id={ID}
fn={loadTrace}
args={[{ traceId, start, end }]}
diff --git a/x-pack/plugins/apm/public/store/selectors/__tests__/__snapshots__/chartSelectors.test.js.snap b/x-pack/plugins/apm/public/store/selectors/__tests__/__snapshots__/chartSelectors.test.ts.snap
similarity index 100%
rename from x-pack/plugins/apm/public/store/selectors/__tests__/__snapshots__/chartSelectors.test.js.snap
rename to x-pack/plugins/apm/public/store/selectors/__tests__/__snapshots__/chartSelectors.test.ts.snap
diff --git a/x-pack/plugins/apm/public/store/selectors/__tests__/chartSelectors.test.js b/x-pack/plugins/apm/public/store/selectors/__tests__/chartSelectors.test.ts
similarity index 79%
rename from x-pack/plugins/apm/public/store/selectors/__tests__/chartSelectors.test.js
rename to x-pack/plugins/apm/public/store/selectors/__tests__/chartSelectors.test.ts
index 1850fd990c957..608a87ee48f2c 100644
--- a/x-pack/plugins/apm/public/store/selectors/__tests__/chartSelectors.test.js
+++ b/x-pack/plugins/apm/public/store/selectors/__tests__/chartSelectors.test.ts
@@ -4,14 +4,15 @@
* you may not use this file except in compliance with the Elastic License.
*/
+import { AvgAnomalyBucket } from 'x-pack/plugins/apm/server/lib/transactions/charts/get_avg_response_time_anomalies/get_anomaly_aggs/transform';
+import { TimeSeriesAPIResponse } from 'x-pack/plugins/apm/server/lib/transactions/charts/get_timeseries_data/transform';
import {
+ getAnomalyBoundaryValues,
getAnomalyScoreValues,
getResponseTimeSeries,
- getTpmSeries,
- getAnomalyBoundaryValues
+ getTpmSeries
} from '../chartSelectors';
-
-import anomalyData from './mockData/anomalyData.json';
+import { anomalyData } from './mockData/anomalyData';
describe('chartSelectors', () => {
describe('getAnomalyScoreValues', () => {
@@ -39,7 +40,7 @@ describe('chartSelectors', () => {
{
anomalyScore: 0
}
- ];
+ ] as AvgAnomalyBucket[];
expect(getAnomalyScoreValues(dates, buckets, 1000)).toEqual([
{ x: 1000, y: 1 },
@@ -58,11 +59,10 @@ describe('chartSelectors', () => {
responseTimes: {
avg: [100, 200, 150, 250, 100, 50],
p95: [200, 300, 250, 350, 200, 150],
- p99: [300, 400, 350, 450, 100, 50],
- avgAnomalies: {}
+ p99: [300, 400, 350, 450, 100, 50]
},
overallAvgDuration: 200
- };
+ } as TimeSeriesAPIResponse;
it('should match snapshot', () => {
expect(getResponseTimeSeries(chartsData)).toMatchSnapshot();
@@ -93,7 +93,7 @@ describe('chartSelectors', () => {
values: [0, 1, 2, 1, 0, 2]
}
]
- };
+ } as TimeSeriesAPIResponse;
const transactionType = 'MyTransactionType';
@@ -104,10 +104,10 @@ describe('chartSelectors', () => {
describe('getAnomalyBoundaryValues', () => {
const { dates, buckets } = anomalyData;
- const bucketSpan = 240000;
+ const bucketSize = 240000;
it('should return correct buckets', () => {
- expect(getAnomalyBoundaryValues(dates, buckets, bucketSpan)).toEqual([
+ expect(getAnomalyBoundaryValues(dates, buckets, bucketSize)).toEqual([
{ x: 1530614880000, y: 54799, y0: 15669 },
{ x: 1530615060000, y: 49874, y0: 17808 },
{ x: 1530615300000, y: 49421, y0: 18012 },
@@ -120,18 +120,18 @@ describe('chartSelectors', () => {
]);
});
- it('should extend the last bucket with a size of bucketSpan', () => {
+ it('should extend the last bucket with a size of bucketSize', () => {
const [lastBucket, secondLastBuckets] = getAnomalyBoundaryValues(
dates,
buckets,
- bucketSpan
+ bucketSize
).reverse();
expect(secondLastBuckets.y).toBe(lastBucket.y);
expect(secondLastBuckets.y0).toBe(lastBucket.y0);
- expect(lastBucket.x - secondLastBuckets.x).toBeLessThanOrEqual(
- bucketSpan
- );
+ expect(
+ (lastBucket.x as number) - (secondLastBuckets.x as number)
+ ).toBeLessThanOrEqual(bucketSize);
});
});
});
diff --git a/x-pack/plugins/apm/public/store/selectors/__tests__/mockData/anomalyData.json b/x-pack/plugins/apm/public/store/selectors/__tests__/mockData/anomalyData.json
deleted file mode 100644
index d91fc736801a7..0000000000000
--- a/x-pack/plugins/apm/public/store/selectors/__tests__/mockData/anomalyData.json
+++ /dev/null
@@ -1,186 +0,0 @@
-{
- "dates": [
- 1530614880000,
- 1530614940000,
- 1530615000000,
- 1530615060000,
- 1530615120000,
- 1530615180000,
- 1530615240000,
- 1530615300000,
- 1530615360000,
- 1530615420000,
- 1530615480000,
- 1530615540000,
- 1530615600000,
- 1530615660000,
- 1530615720000,
- 1530615780000,
- 1530615840000,
- 1530615900000,
- 1530615960000,
- 1530616020000,
- 1530616080000,
- 1530616140000,
- 1530616200000,
- 1530616260000,
- 1530616320000,
- 1530616380000,
- 1530616440000,
- 1530616500000,
- 1530616560000,
- 1530616620000
- ],
- "buckets": [
- {
- "anomalyScore": null,
- "lower": 15669,
- "upper": 54799
- },
- {
- "anomalyScore": null,
- "lower": null,
- "upper": null
- },
- {
- "anomalyScore": null,
- "lower": null,
- "upper": null
- },
- {
- "anomalyScore": 0,
- "lower": 17808,
- "upper": 49874
- },
- {
- "anomalyScore": null,
- "lower": null,
- "upper": null
- },
- {
- "anomalyScore": null,
- "lower": null,
- "upper": null
- },
- {
- "anomalyScore": null,
- "lower": null,
- "upper": null
- },
- {
- "anomalyScore": 0,
- "lower": 18012,
- "upper": 49421
- },
- {
- "anomalyScore": null,
- "lower": null,
- "upper": null
- },
- {
- "anomalyScore": null,
- "lower": null,
- "upper": null
- },
- {
- "anomalyScore": null,
- "lower": null,
- "upper": null
- },
- {
- "anomalyScore": 0,
- "lower": 17889,
- "upper": 49654
- },
- {
- "anomalyScore": null,
- "lower": null,
- "upper": null
- },
- {
- "anomalyScore": null,
- "lower": null,
- "upper": null
- },
- {
- "anomalyScore": null,
- "lower": null,
- "upper": null
- },
- {
- "anomalyScore": 0,
- "lower": 17713,
- "upper": 50026
- },
- {
- "anomalyScore": null,
- "lower": null,
- "upper": null
- },
- {
- "anomalyScore": null,
- "lower": null,
- "upper": null
- },
- {
- "anomalyScore": null,
- "lower": null,
- "upper": null
- },
- {
- "anomalyScore": 0,
- "lower": 18044,
- "upper": 49371
- },
- {
- "anomalyScore": null,
- "lower": null,
- "upper": null
- },
- {
- "anomalyScore": null,
- "lower": null,
- "upper": null
- },
- {
- "anomalyScore": null,
- "lower": null,
- "upper": null
- },
- {
- "anomalyScore": 0,
- "lower": 17713,
- "upper": 50110
- },
- {
- "anomalyScore": null,
- "lower": null,
- "upper": null
- },
- {
- "anomalyScore": null,
- "lower": null,
- "upper": null
- },
- {
- "anomalyScore": null,
- "lower": null,
- "upper": null
- },
- {
- "anomalyScore": 0,
- "lower": 17582,
- "upper": 50419
- },
- {
- "anomalyScore": null,
- "lower": null,
- "upper": null
- },
- {
- "anomalyScore": null,
- "lower": null,
- "upper": null
- }
- ]
-}
diff --git a/x-pack/plugins/apm/public/store/selectors/__tests__/mockData/anomalyData.ts b/x-pack/plugins/apm/public/store/selectors/__tests__/mockData/anomalyData.ts
new file mode 100644
index 0000000000000..af864e69dc72a
--- /dev/null
+++ b/x-pack/plugins/apm/public/store/selectors/__tests__/mockData/anomalyData.ts
@@ -0,0 +1,192 @@
+/*
+ * 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.
+ */
+
+export const anomalyData = {
+ dates: [
+ 1530614880000,
+ 1530614940000,
+ 1530615000000,
+ 1530615060000,
+ 1530615120000,
+ 1530615180000,
+ 1530615240000,
+ 1530615300000,
+ 1530615360000,
+ 1530615420000,
+ 1530615480000,
+ 1530615540000,
+ 1530615600000,
+ 1530615660000,
+ 1530615720000,
+ 1530615780000,
+ 1530615840000,
+ 1530615900000,
+ 1530615960000,
+ 1530616020000,
+ 1530616080000,
+ 1530616140000,
+ 1530616200000,
+ 1530616260000,
+ 1530616320000,
+ 1530616380000,
+ 1530616440000,
+ 1530616500000,
+ 1530616560000,
+ 1530616620000
+ ],
+ buckets: [
+ {
+ anomalyScore: null,
+ lower: 15669,
+ upper: 54799
+ },
+ {
+ anomalyScore: null,
+ lower: null,
+ upper: null
+ },
+ {
+ anomalyScore: null,
+ lower: null,
+ upper: null
+ },
+ {
+ anomalyScore: 0,
+ lower: 17808,
+ upper: 49874
+ },
+ {
+ anomalyScore: null,
+ lower: null,
+ upper: null
+ },
+ {
+ anomalyScore: null,
+ lower: null,
+ upper: null
+ },
+ {
+ anomalyScore: null,
+ lower: null,
+ upper: null
+ },
+ {
+ anomalyScore: 0,
+ lower: 18012,
+ upper: 49421
+ },
+ {
+ anomalyScore: null,
+ lower: null,
+ upper: null
+ },
+ {
+ anomalyScore: null,
+ lower: null,
+ upper: null
+ },
+ {
+ anomalyScore: null,
+ lower: null,
+ upper: null
+ },
+ {
+ anomalyScore: 0,
+ lower: 17889,
+ upper: 49654
+ },
+ {
+ anomalyScore: null,
+ lower: null,
+ upper: null
+ },
+ {
+ anomalyScore: null,
+ lower: null,
+ upper: null
+ },
+ {
+ anomalyScore: null,
+ lower: null,
+ upper: null
+ },
+ {
+ anomalyScore: 0,
+ lower: 17713,
+ upper: 50026
+ },
+ {
+ anomalyScore: null,
+ lower: null,
+ upper: null
+ },
+ {
+ anomalyScore: null,
+ lower: null,
+ upper: null
+ },
+ {
+ anomalyScore: null,
+ lower: null,
+ upper: null
+ },
+ {
+ anomalyScore: 0,
+ lower: 18044,
+ upper: 49371
+ },
+ {
+ anomalyScore: null,
+ lower: null,
+ upper: null
+ },
+ {
+ anomalyScore: null,
+ lower: null,
+ upper: null
+ },
+ {
+ anomalyScore: null,
+ lower: null,
+ upper: null
+ },
+ {
+ anomalyScore: 0,
+ lower: 17713,
+ upper: 50110
+ },
+ {
+ anomalyScore: null,
+ lower: null,
+ upper: null
+ },
+ {
+ anomalyScore: null,
+ lower: null,
+ upper: null
+ },
+ {
+ anomalyScore: null,
+ lower: null,
+ upper: null
+ },
+ {
+ anomalyScore: 0,
+ lower: 17582,
+ upper: 50419
+ },
+ {
+ anomalyScore: null,
+ lower: null,
+ upper: null
+ },
+ {
+ anomalyScore: null,
+ lower: null,
+ upper: null
+ }
+ ]
+};
diff --git a/x-pack/plugins/apm/public/store/selectors/chartSelectors.js b/x-pack/plugins/apm/public/store/selectors/chartSelectors.ts
similarity index 58%
rename from x-pack/plugins/apm/public/store/selectors/chartSelectors.js
rename to x-pack/plugins/apm/public/store/selectors/chartSelectors.ts
index 534da52262d16..d9670364131aa 100644
--- a/x-pack/plugins/apm/public/store/selectors/chartSelectors.js
+++ b/x-pack/plugins/apm/public/store/selectors/chartSelectors.ts
@@ -5,10 +5,23 @@
*/
import d3 from 'd3';
-import { last, zipObject, difference, memoize, get, isEmpty } from 'lodash';
-import { colors } from '../../style/variables';
-import { asMillis, asDecimal, tpmUnit } from '../../utils/formatters';
+import { difference, last, memoize, zipObject } from 'lodash';
import { rgba } from 'polished';
+import { AvgAnomalyBucket } from 'x-pack/plugins/apm/server/lib/transactions/charts/get_avg_response_time_anomalies/get_anomaly_aggs/transform';
+import { TimeSeriesAPIResponse } from 'x-pack/plugins/apm/server/lib/transactions/charts/get_timeseries_data/transform';
+import { StringMap } from 'x-pack/plugins/apm/typings/common';
+import { colors } from '../../style/variables';
+import { asDecimal, asMillis, tpmUnit } from '../../utils/formatters';
+import { IUrlParams } from '../urlParams';
+
+interface Coordinate {
+ x: number;
+ y?: number | null;
+}
+
+interface BoundaryCoordinate extends Coordinate {
+ y0: number | null;
+}
export const getEmptySerie = memoize(
(start = Date.now() - 3600000, end = Date.now()) => {
@@ -26,10 +39,13 @@ export const getEmptySerie = memoize(
}
];
},
- (...args) => args.join('_')
+ (start: number, end: number) => [start, end].join('_')
);
-export function getCharts(urlParams, charts) {
+export function getCharts(
+ urlParams: IUrlParams,
+ charts: TimeSeriesAPIResponse
+) {
const { start, end, transactionType } = urlParams;
const noHits = charts.totalHits === 0;
const tpmSeries = noHits
@@ -47,11 +63,23 @@ export function getCharts(urlParams, charts) {
};
}
-export function getResponseTimeSeries(chartsData) {
+interface TimeSerie {
+ title: string;
+ titleShort?: string;
+ hideLegend?: boolean;
+ hideTooltipValue?: boolean;
+ data: Coordinate[];
+ legendValue?: string;
+ type: string;
+ color: string;
+ areaColor?: string;
+}
+
+export function getResponseTimeSeries(chartsData: TimeSeriesAPIResponse) {
const { dates, overallAvgDuration } = chartsData;
const { avg, p95, p99, avgAnomalies } = chartsData.responseTimes;
- const series = [
+ const series: TimeSerie[] = [
{
title: 'Avg.',
data: getChartValues(dates, avg),
@@ -75,7 +103,7 @@ export function getResponseTimeSeries(chartsData) {
}
];
- if (!isEmpty(avgAnomalies.buckets)) {
+ if (avgAnomalies) {
// insert after Avg. serie
series.splice(1, 0, {
title: 'Anomaly Boundaries',
@@ -84,7 +112,7 @@ export function getResponseTimeSeries(chartsData) {
data: getAnomalyBoundaryValues(
dates,
avgAnomalies.buckets,
- avgAnomalies.bucketSpanAsMillis
+ avgAnomalies.bucketSizeAsMillis
),
type: 'area',
color: 'none',
@@ -98,7 +126,7 @@ export function getResponseTimeSeries(chartsData) {
data: getAnomalyScoreValues(
dates,
avgAnomalies.buckets,
- avgAnomalies.bucketSpanAsMillis
+ avgAnomalies.bucketSizeAsMillis
),
type: 'areaMaxHeight',
color: 'none',
@@ -109,10 +137,14 @@ export function getResponseTimeSeries(chartsData) {
return series;
}
-export function getTpmSeries(chartsData, transactionType) {
+export function getTpmSeries(
+ chartsData: TimeSeriesAPIResponse,
+ transactionType?: string
+) {
const { dates, tpmBuckets } = chartsData;
- const getColor = getColorByKey(tpmBuckets.map(({ key }) => key));
- const getTpmLegendTitle = bucketKey => {
+ const bucketKeys = tpmBuckets.map(({ key }) => key);
+ const getColor = getColorByKey(bucketKeys);
+ const getTpmLegendTitle = (bucketKey: string) => {
// hide legend text for transactions without "result"
if (bucketKey === 'transaction_result_missing') {
return '';
@@ -125,15 +157,15 @@ export function getTpmSeries(chartsData, transactionType) {
return {
title: getTpmLegendTitle(bucket.key),
data: getChartValues(dates, bucket.values),
- legendValue: `${asDecimal(bucket.avg)} ${tpmUnit(transactionType)}`,
+ legendValue: `${asDecimal(bucket.avg)} ${tpmUnit(transactionType || '')}`,
type: 'line',
color: getColor(bucket.key)
};
});
}
-function getColorByKey(keys) {
- const assignedColors = {
+function getColorByKey(keys: string[]) {
+ const assignedColors: StringMap = {
'HTTP 2xx': colors.apmGreen,
'HTTP 3xx': colors.apmYellow,
'HTTP 4xx': colors.apmOrange,
@@ -141,7 +173,7 @@ function getColorByKey(keys) {
};
const unknownKeys = difference(keys, Object.keys(assignedColors));
- const unassignedColors = zipObject(unknownKeys, [
+ const unassignedColors: StringMap = zipObject(unknownKeys, [
colors.apmBlue,
colors.apmPurple,
colors.apmPink,
@@ -150,10 +182,13 @@ function getColorByKey(keys) {
colors.apmBrown
]);
- return key => assignedColors[key] || unassignedColors[key];
+ return (key: string) => assignedColors[key] || unassignedColors[key];
}
-function getChartValues(dates = [], buckets = []) {
+function getChartValues(
+ dates: number[] = [],
+ buckets: Array = []
+) {
return dates.map((x, i) => ({
x,
y: buckets[i]
@@ -161,27 +196,32 @@ function getChartValues(dates = [], buckets = []) {
}
export function getAnomalyScoreValues(
- dates = [],
- buckets = [],
- bucketSpanAsMillis
+ dates: number[] = [],
+ buckets: AvgAnomalyBucket[] = [],
+ bucketSizeAsMillis: number
) {
const ANOMALY_THRESHOLD = 75;
- const getX = (currentX, i) => currentX + bucketSpanAsMillis * i;
+ const getX = (currentX: number, i: number) =>
+ currentX + bucketSizeAsMillis * i;
return dates
- .map((x, i) => {
- const { anomalyScore } = buckets[i] || {};
+ .map((date, i) => {
+ const { anomalyScore } = buckets[i];
return {
- x,
+ x: date,
anomalyScore
};
})
- .filter(p => p.anomalyScore > ANOMALY_THRESHOLD)
- .reduce((acc, p, i, points) => {
- acc.push({ x: p.x, y: 1 });
- const { x: nextX } = points[i + 1] || {};
+ .filter(p => {
+ const res =
+ p && p.anomalyScore != null && p.anomalyScore > ANOMALY_THRESHOLD;
+ return res;
+ })
+ .reduce((acc, p, i, points) => {
+ const nextPoint = points[i + 1] || {};
const endX = getX(p.x, 1);
- if (nextX == null || nextX > endX) {
+ acc.push({ x: p.x, y: 1 });
+ if (nextPoint.x == null || nextPoint.x > endX) {
acc.push(
{
x: endX,
@@ -198,26 +238,29 @@ export function getAnomalyScoreValues(
}
export function getAnomalyBoundaryValues(
- dates = [],
- buckets = [],
- bucketSpanAsMillis
+ dates: number[] = [],
+ buckets: AvgAnomalyBucket[] = [],
+ bucketSizeAsMillis: number
) {
const lastX = last(dates);
return dates
- .map((x, i) => ({
- x,
- y0: get(buckets[i], 'lower'),
- y: get(buckets[i], 'upper')
- }))
- .filter(point => point.y != null)
- .reduce((acc, p, i, points) => {
+ .map((date, i) => {
+ const bucket = buckets[i];
+ return {
+ x: date,
+ y0: bucket.lower,
+ y: bucket.upper
+ };
+ })
+ .filter(p => p.y != null)
+ .reduce((acc, p, i, points) => {
const isLast = last(points) === p;
acc.push(p);
if (isLast) {
acc.push({
...p,
- x: Math.min(p.x + bucketSpanAsMillis, lastX) // avoid going beyond the last date
+ x: Math.min(p.x + bucketSizeAsMillis, lastX) // avoid going beyond the last date
});
}
return acc;
diff --git a/x-pack/plugins/apm/public/store/urlParams.ts b/x-pack/plugins/apm/public/store/urlParams.ts
index cedcbfe337fee..b0850aa2cf880 100644
--- a/x-pack/plugins/apm/public/store/urlParams.ts
+++ b/x-pack/plugins/apm/public/store/urlParams.ts
@@ -157,13 +157,13 @@ export const getUrlParams = createSelector(
);
export interface IUrlParams {
- end?: string;
+ end?: number;
errorGroupId?: string;
flyoutDetailTab?: string;
detailTab?: string;
kuery?: string;
serviceName?: string;
- start?: string;
+ start?: number;
traceId?: string;
transactionId?: string;
transactionName?: string;
diff --git a/x-pack/plugins/apm/public/utils/url.tsx b/x-pack/plugins/apm/public/utils/url.tsx
index 6ae3fcb643a6c..f2b0dfc9a34f3 100644
--- a/x-pack/plugins/apm/public/utils/url.tsx
+++ b/x-pack/plugins/apm/public/utils/url.tsx
@@ -30,15 +30,14 @@ interface ViewMlJobArgs {
serviceName: string;
transactionType: string;
location: any;
- children?: any;
}
-export function ViewMLJob({
+export const ViewMLJob: React.SFC = ({
serviceName,
transactionType,
location,
children = 'View Job'
-}: ViewMlJobArgs) {
+}) => {
const pathname = '/app/ml';
const hash = '/timeseriesexplorer';
const jobId = `${serviceName}-${transactionType}-high_mean_response_time`;
@@ -59,7 +58,7 @@ export function ViewMLJob({
children={children}
/>
);
-}
+};
export function toQuery(search?: string): StringMap {
return search ? qs.parse(search.slice(1)) : {};
diff --git a/x-pack/plugins/apm/server/lib/helpers/get_bucket_size/index.js b/x-pack/plugins/apm/server/lib/helpers/get_bucket_size/index.ts
similarity index 58%
rename from x-pack/plugins/apm/server/lib/helpers/get_bucket_size/index.js
rename to x-pack/plugins/apm/server/lib/helpers/get_bucket_size/index.ts
index a7e4319243bc9..5ec0c2b7b2d96 100644
--- a/x-pack/plugins/apm/server/lib/helpers/get_bucket_size/index.js
+++ b/x-pack/plugins/apm/server/lib/helpers/get_bucket_size/index.ts
@@ -4,24 +4,26 @@
* you may not use this file except in compliance with the Elastic License.
*/
-import { calculateAuto } from './calculate_auto';
import moment from 'moment';
+// @ts-ignore
+import { calculateAuto } from './calculate_auto';
+// @ts-ignore
import { unitToSeconds } from './unit_to_seconds';
-export function getBucketSize(start, end, interval) {
- const duration = moment.duration(end - start, 'ms');
- let bucketSize = calculateAuto.near(100, duration).asSeconds();
- if (bucketSize < 1) bucketSize = 1; // don't go too small
- let intervalString = `${bucketSize}s`;
+export function getBucketSize(start: number, end: number, interval: string) {
+ const duration = moment.duration(end - start, 'ms');
+ const bucketSize = Math.max(calculateAuto.near(100, duration).asSeconds(), 1);
+ const intervalString = `${bucketSize}s`;
const matches = interval && interval.match(/^([\d]+)([shmdwMy]|ms)$/);
- let minBucketSize = 0;
- if (matches) {
- minBucketSize = Number(matches[1]) * unitToSeconds(matches[2]);
- }
+ const minBucketSize = matches
+ ? Number(matches[1]) * unitToSeconds(matches[2])
+ : 0;
if (bucketSize < minBucketSize) {
- bucketSize = minBucketSize;
- intervalString = interval;
+ return {
+ bucketSize: minBucketSize,
+ intervalString: interval
+ };
}
return { bucketSize, intervalString };
diff --git a/x-pack/plugins/apm/server/lib/helpers/setup_request.ts b/x-pack/plugins/apm/server/lib/helpers/setup_request.ts
index 70773755c2c78..7d46d07865ba9 100644
--- a/x-pack/plugins/apm/server/lib/helpers/setup_request.ts
+++ b/x-pack/plugins/apm/server/lib/helpers/setup_request.ts
@@ -5,7 +5,7 @@
*/
/* tslint:disable no-console */
-import { SearchParams, SearchResponse } from 'elasticsearch';
+import { AggregationSearchResponse, SearchParams } from 'elasticsearch';
import { Request } from 'hapi';
import moment from 'moment';
@@ -14,7 +14,7 @@ function decodeEsQuery(esQuery?: string): object {
}
interface KibanaConfig {
- get: (key: string) => any;
+ get: (key: string) => T;
}
// Extend the defaults with the plugins and server methods we need.
@@ -28,13 +28,16 @@ declare module 'hapi' {
}
}
-type Client = (type: string, params: SearchParams) => SearchResponse;
+export type ESClient = (
+ type: string,
+ params: SearchParams
+) => Promise>;
-export interface Setup {
+export interface Setup {
start: number;
end: number;
- esFilterQuery: any;
- client: Client;
+ esFilterQuery?: any;
+ client: ESClient;
config: KibanaConfig;
}
@@ -49,7 +52,10 @@ export function setupRequest(req: Request) {
const query = (req.query as unknown) as APMRequestQuery;
const cluster = req.server.plugins.elasticsearch.getCluster('data');
- function client(type: string, params: SearchParams): SearchResponse {
+ function client(
+ type: string,
+ params: SearchParams
+ ): AggregationSearchResponse {
if (query._debug) {
console.log(`DEBUG ES QUERY:`);
console.log(
diff --git a/x-pack/plugins/apm/server/lib/helpers/transaction_group_query.ts b/x-pack/plugins/apm/server/lib/helpers/transaction_group_query.ts
deleted file mode 100644
index db7b65c646870..0000000000000
--- a/x-pack/plugins/apm/server/lib/helpers/transaction_group_query.ts
+++ /dev/null
@@ -1,95 +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 moment from 'moment';
-import {
- TRANSACTION_DURATION,
- TRANSACTION_NAME
-} from '../../../common/constants';
-import { Transaction } from '../../../typings/Transaction';
-import { ITransactionGroup } from '../../../typings/TransactionGroup';
-
-export interface ITransactionGroupBucket {
- key: string;
- doc_count: number;
- avg: {
- value: number;
- };
- p95: {
- values: {
- '95.0': number;
- };
- };
- sample: {
- hits: {
- hits: Array<{
- _source: Transaction;
- }>;
- };
- };
-}
-
-export const TRANSACTION_GROUP_AGGREGATES = {
- transactions: {
- terms: {
- field: `${TRANSACTION_NAME}.keyword`,
- order: { avg: 'desc' },
- size: 100
- },
- aggs: {
- sample: {
- top_hits: {
- size: 1,
- sort: [{ '@timestamp': { order: 'desc' } }]
- }
- },
- avg: { avg: { field: TRANSACTION_DURATION } },
- p95: { percentiles: { field: TRANSACTION_DURATION, percents: [95] } }
- }
- }
-};
-
-function calculateRelativeImpacts(results: ITransactionGroup[]) {
- const values = results.map(({ impact }) => impact);
- const max = Math.max(...values);
- const min = Math.min(...values);
-
- return results.map(bucket => ({
- ...bucket,
- impact: ((bucket.impact - min) / (max - min)) * 100
- }));
-}
-
-export function prepareTransactionGroups({
- buckets,
- start,
- end
-}: {
- buckets: ITransactionGroupBucket[];
- start: number;
- end: number;
-}) {
- const duration = moment.duration(end - start);
- const minutes = duration.asMinutes();
-
- const results = buckets.map((bucket: ITransactionGroupBucket) => {
- const averageResponseTime = bucket.avg.value;
- const transactionsPerMinute = bucket.doc_count / minutes;
- const impact = Math.round(averageResponseTime * transactionsPerMinute);
- const sample = bucket.sample.hits.hits[0]._source;
-
- return {
- name: bucket.key,
- sample,
- p95: bucket.p95.values['95.0'],
- averageResponseTime,
- transactionsPerMinute,
- impact
- };
- });
-
- return calculateRelativeImpacts(results);
-}
diff --git a/x-pack/plugins/apm/server/lib/services/get_service.ts b/x-pack/plugins/apm/server/lib/services/get_service.ts
index 2998f3487ecc6..05beb6b96883d 100644
--- a/x-pack/plugins/apm/server/lib/services/get_service.ts
+++ b/x-pack/plugins/apm/server/lib/services/get_service.ts
@@ -13,22 +13,22 @@ import {
} from '../../../common/constants';
import { Setup } from '../helpers/setup_request';
-export interface ServiceResponse {
- service_name: string;
+export interface ServiceAPIResponse {
+ serviceName: string;
types: string[];
- agent_name?: string;
+ agentName?: string;
}
export async function getService(
serviceName: string,
setup: Setup
-): Promise {
+): Promise {
const { start, end, esFilterQuery, client, config } = setup;
const params = {
index: [
- config.get('apm_oss.errorIndices'),
- config.get('apm_oss.transactionIndices')
+ config.get('apm_oss.errorIndices'),
+ config.get('apm_oss.transactionIndices')
],
body: {
size: 0,
@@ -72,12 +72,12 @@ export async function getService(
};
}
- const resp = await client('search', params);
- const aggs: Aggs = resp.aggregations;
-
+ const { aggregations } = await client('search', params);
return {
- service_name: serviceName,
- types: aggs.types.buckets.map(bucket => bucket.key),
- agent_name: oc(aggs).agents.buckets[0].key()
+ serviceName,
+ types: oc(aggregations)
+ .types.buckets([])
+ .map(bucket => bucket.key),
+ agentName: oc(aggregations).agents.buckets[0].key()
};
}
diff --git a/x-pack/plugins/apm/server/lib/services/get_services.ts b/x-pack/plugins/apm/server/lib/services/get_services.ts
index 6d2019e64c1db..023e889e62fe5 100644
--- a/x-pack/plugins/apm/server/lib/services/get_services.ts
+++ b/x-pack/plugins/apm/server/lib/services/get_services.ts
@@ -22,13 +22,17 @@ export interface IServiceListItem {
avgResponseTime: number;
}
-export async function getServices(setup: Setup): Promise {
+export type ServiceListAPIResponse = IServiceListItem[];
+
+export async function getServices(
+ setup: Setup
+): Promise {
const { start, end, esFilterQuery, client, config } = setup;
const params = {
index: [
- config.get('apm_oss.errorIndices'),
- config.get('apm_oss.transactionIndices')
+ config.get('apm_oss.errorIndices'),
+ config.get('apm_oss.transactionIndices')
],
body: {
size: 0,
@@ -99,8 +103,8 @@ export async function getServices(setup: Setup): Promise {
};
}
- const resp = await client('search', params);
- const aggs: Aggs = resp.aggregations;
+ const resp = await client('search', params);
+ const aggs = resp.aggregations;
const serviceBuckets = oc(aggs).services.buckets([]);
return serviceBuckets.map(bucket => {
diff --git a/x-pack/plugins/apm/server/lib/traces/get_top_traces.ts b/x-pack/plugins/apm/server/lib/traces/get_top_traces.ts
index 990879690d9b7..a75f69e3369cb 100644
--- a/x-pack/plugins/apm/server/lib/traces/get_top_traces.ts
+++ b/x-pack/plugins/apm/server/lib/traces/get_top_traces.ts
@@ -4,74 +4,53 @@
* you may not use this file except in compliance with the Elastic License.
*/
-import { SearchResponse } from 'elasticsearch';
-import { get } from 'lodash';
import {
PARENT_ID,
PROCESSOR_EVENT,
TRACE_ID
} from '../../../common/constants';
-import { Transaction } from '../../../typings/Transaction';
-import { ITransactionGroup } from '../../../typings/TransactionGroup';
import { Setup } from '../helpers/setup_request';
-import {
- ITransactionGroupBucket,
- prepareTransactionGroups,
- TRANSACTION_GROUP_AGGREGATES
-} from '../helpers/transaction_group_query';
+import { getTransactionGroups } from '../transaction_groups';
+import { ITransactionGroup } from '../transaction_groups/transform';
-export async function getTopTraces(setup: Setup): Promise {
- const { start, end, esFilterQuery, client, config } = setup;
+export type TraceListAPIResponse = ITransactionGroup[];
- const params = {
- index: config.get('apm_oss.transactionIndices'),
- body: {
- size: 0,
- query: {
- bool: {
- must: {
- // this criterion safeguards against data that lacks a transaction
- // parent ID but still is not a "trace" by way of not having a
- // trace ID (e.g. old data before parent ID was implemented, etc)
- exists: {
- field: TRACE_ID
- }
- },
- must_not: {
- // no parent ID alongside a trace ID means this transaction is a
- // "root" transaction, i.e. a trace
- exists: {
- field: PARENT_ID
- }
- },
- filter: [
- {
- range: {
- '@timestamp': {
- gte: start,
- lte: end,
- format: 'epoch_millis'
- }
- }
- },
- { term: { [PROCESSOR_EVENT]: 'transaction' } }
- ]
+export async function getTopTraces(
+ setup: Setup
+): Promise {
+ const { start, end } = setup;
+
+ const bodyQuery = {
+ bool: {
+ must: {
+ // this criterion safeguards against data that lacks a transaction
+ // parent ID but still is not a "trace" by way of not having a
+ // trace ID (e.g. old data before parent ID was implemented, etc)
+ exists: {
+ field: TRACE_ID
}
},
- aggs: TRANSACTION_GROUP_AGGREGATES
+ must_not: {
+ // no parent ID alongside a trace ID means this transaction is a
+ // "root" transaction, i.e. a trace
+ exists: {
+ field: PARENT_ID
+ }
+ },
+ filter: [
+ {
+ range: {
+ '@timestamp': {
+ gte: start,
+ lte: end,
+ format: 'epoch_millis'
+ }
+ }
+ },
+ { term: { [PROCESSOR_EVENT]: 'transaction' } }
+ ]
}
};
- if (esFilterQuery) {
- params.body.query.bool.filter.push(esFilterQuery);
- }
-
- const response: SearchResponse = await client('search', params);
- const buckets: ITransactionGroupBucket[] = get(
- response.aggregations,
- 'transactions.buckets',
- []
- );
-
- return prepareTransactionGroups({ buckets, start, end });
+ return getTransactionGroups(setup, bodyQuery);
}
diff --git a/x-pack/plugins/apm/server/lib/traces/get_trace.ts b/x-pack/plugins/apm/server/lib/traces/get_trace.ts
index b92e9e377e701..4adb8ece0c81b 100644
--- a/x-pack/plugins/apm/server/lib/traces/get_trace.ts
+++ b/x-pack/plugins/apm/server/lib/traces/get_trace.ts
@@ -4,17 +4,18 @@
* you may not use this file except in compliance with the Elastic License.
*/
-import { SearchParams, SearchResponse } from 'elasticsearch';
-import { WaterfallResponse } from 'x-pack/plugins/apm/typings/waterfall';
+import { SearchParams } from 'elasticsearch';
import { TRACE_ID } from '../../../common/constants';
import { Span } from '../../../typings/Span';
import { Transaction } from '../../../typings/Transaction';
import { Setup } from '../helpers/setup_request';
+export type TraceAPIResponse = Array;
+
export async function getTrace(
traceId: string,
setup: Setup
-): Promise {
+): Promise {
const { start, end, client, config } = setup;
const params: SearchParams = {
@@ -40,10 +41,6 @@ export async function getTrace(
}
};
- const resp: SearchResponse = await client(
- 'search',
- params
- );
-
+ const resp = await client('search', params);
return resp.hits.hits.map(hit => hit._source);
}
diff --git a/x-pack/plugins/apm/server/lib/transaction_groups/__snapshots__/fetcher.test.ts.snap b/x-pack/plugins/apm/server/lib/transaction_groups/__snapshots__/fetcher.test.ts.snap
new file mode 100644
index 0000000000000..9e180f3fcdb5d
--- /dev/null
+++ b/x-pack/plugins/apm/server/lib/transaction_groups/__snapshots__/fetcher.test.ts.snap
@@ -0,0 +1,56 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`transactionGroupsFetcher should call client with correct query 1`] = `
+Array [
+ Array [
+ "search",
+ Object {
+ "body": Object {
+ "aggs": Object {
+ "transactions": Object {
+ "aggs": Object {
+ "avg": Object {
+ "avg": Object {
+ "field": "transaction.duration.us",
+ },
+ },
+ "p95": Object {
+ "percentiles": Object {
+ "field": "transaction.duration.us",
+ "percents": Array [
+ 95,
+ ],
+ },
+ },
+ "sample": Object {
+ "top_hits": Object {
+ "size": 1,
+ "sort": Array [
+ Object {
+ "@timestamp": Object {
+ "order": "desc",
+ },
+ },
+ ],
+ },
+ },
+ },
+ "terms": Object {
+ "field": "transaction.name.keyword",
+ "order": Object {
+ "avg": "desc",
+ },
+ "size": 100,
+ },
+ },
+ },
+ "query": Object {
+ "my": "bodyQuery",
+ },
+ "size": 0,
+ },
+ "index": "myIndex",
+ },
+ ],
+]
+`;
diff --git a/x-pack/plugins/apm/server/lib/transaction_groups/__snapshots__/transform.test.ts.snap b/x-pack/plugins/apm/server/lib/transaction_groups/__snapshots__/transform.test.ts.snap
new file mode 100644
index 0000000000000..a68d7dc80338a
--- /dev/null
+++ b/x-pack/plugins/apm/server/lib/transaction_groups/__snapshots__/transform.test.ts.snap
@@ -0,0 +1,2822 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`transactionGroupsTransformer should match snapshot 1`] = `
+Array [
+ Object {
+ "averageResponseTime": 255966.30555555556,
+ "impact": 4.369340653255684,
+ "name": "POST /api/orders",
+ "p95": 320238.5,
+ "sample": Object {
+ "@timestamp": "2018-11-18T20:43:32.010Z",
+ "agent": Object {
+ "hostname": "b359e3afece8",
+ "type": "apm-server",
+ "version": "7.0.0-alpha1",
+ },
+ "context": Object {
+ "custom": Object {
+ "containerId": 4669,
+ },
+ "process": Object {
+ "argv": Array [
+ "/usr/local/bin/node",
+ "/usr/local/lib/node_modules/pm2/lib/ProcessContainerFork.js",
+ ],
+ "pid": 2413,
+ "ppid": 1,
+ "title": "node /app/server.js",
+ },
+ "request": Object {
+ "body": "[REDACTED]",
+ "headers": Object {
+ "accept": "application/json",
+ "connection": "close",
+ "content-length": "129",
+ "content-type": "application/json",
+ "host": "opbeans-node:3000",
+ "user-agent": "workload/2.4.3",
+ },
+ "http_version": "1.1",
+ "method": "POST",
+ "socket": Object {
+ "encrypted": false,
+ "remote_address": "::ffff:172.18.0.10",
+ },
+ "url": Object {
+ "full": "http://opbeans-node:3000/api/orders",
+ "hostname": "opbeans-node",
+ "pathname": "/api/orders",
+ "port": "3000",
+ "protocol": "http:",
+ "raw": "/api/orders",
+ },
+ },
+ "response": Object {
+ "headers": Object {
+ "connection": "close",
+ "content-length": "13",
+ "content-type": "application/json; charset=utf-8",
+ "date": "Sun, 18 Nov 2018 20:43:32 GMT",
+ "etag": "W/\\"d-g9K2iK4ordyN88lGL4LmPlYNfhc\\"",
+ "x-powered-by": "Express",
+ },
+ "status_code": 200,
+ },
+ "service": Object {
+ "agent": Object {
+ "name": "nodejs",
+ "version": "1.14.2",
+ },
+ "language": Object {
+ "name": "javascript",
+ },
+ "name": "opbeans-node",
+ "runtime": Object {
+ "name": "node",
+ "version": "8.12.0",
+ },
+ "version": "1.0.0",
+ },
+ "system": Object {
+ "architecture": "x64",
+ "hostname": "98195610c255",
+ "ip": "172.18.0.10",
+ "platform": "linux",
+ },
+ "tags": Object {
+ "foo": "bar",
+ "lorem": "ipsum dolor sit amet, consectetur adipiscing elit. Nulla finibus, ipsum id scelerisque consequat, enim leo vulputate massa, vel ultricies ante neque ac risus. Curabitur tincidunt vitae sapien id pulvinar. Mauris eu vestibulum tortor. Integer sit amet lorem fringilla, egestas tellus vitae, vulputate purus. Nulla feugiat blandit nunc et semper. Morbi purus libero, mattis sed mauris non, euismod iaculis lacus. Curabitur eleifend ante eros, non faucibus velit lacinia id. Duis posuere libero augue, at dignissim urna consectetur eget. Praesent eu congue est, iaculis finibus augue.",
+ "multi-line": "foo
+bar
+baz",
+ "this-is-a-very-long-tag-name-without-any-spaces": "test",
+ },
+ "user": Object {
+ "email": "kimchy@elastic.co",
+ "id": "42",
+ "username": "kimchy",
+ },
+ },
+ "host": Object {
+ "name": "b359e3afece8",
+ },
+ "processor": Object {
+ "event": "transaction",
+ "name": "transaction",
+ },
+ "timestamp": Object {
+ "us": 1542573812010006,
+ },
+ "trace": Object {
+ "id": "2b1252a338249daeecf6afb0c236e31b",
+ },
+ "transaction": Object {
+ "duration": Object {
+ "us": 291572,
+ },
+ "id": "2c9f39e9ec4a0111",
+ "name": "POST /api/orders",
+ "result": "HTTP 2xx",
+ "sampled": true,
+ "span_count": Object {
+ "started": 16,
+ },
+ "type": "request",
+ },
+ },
+ "transactionsPerMinute": 5684.210526315789,
+ },
+ Object {
+ "averageResponseTime": 48021.972616494,
+ "impact": 100,
+ "name": "GET /api",
+ "p95": 67138.18364917398,
+ "sample": Object {
+ "@timestamp": "2018-11-18T20:53:44.070Z",
+ "agent": Object {
+ "hostname": "b359e3afece8",
+ "type": "apm-server",
+ "version": "7.0.0-alpha1",
+ },
+ "context": Object {
+ "custom": Object {
+ "containerId": 5176,
+ },
+ "process": Object {
+ "argv": Array [
+ "/usr/local/bin/node",
+ "/usr/local/lib/node_modules/pm2/lib/ProcessContainerFork.js",
+ ],
+ "pid": 3756,
+ "ppid": 1,
+ "title": "node /app/server.js",
+ },
+ "request": Object {
+ "headers": Object {
+ "accept": "*/*",
+ "accept-encoding": "gzip, deflate",
+ "connection": "keep-alive",
+ "elastic-apm-traceparent": "00-86c68779d8a65b06fb78e770ffc436a5-4aaea53dc1791183-01",
+ "host": "opbeans-node:3000",
+ "user-agent": "python-requests/2.20.0",
+ },
+ "http_version": "1.1",
+ "method": "GET",
+ "socket": Object {
+ "encrypted": false,
+ "remote_address": "::ffff:172.18.0.6",
+ },
+ "url": Object {
+ "full": "http://opbeans-node:3000/api/types/3",
+ "hostname": "opbeans-node",
+ "pathname": "/api/types/3",
+ "port": "3000",
+ "protocol": "http:",
+ "raw": "/api/types/3",
+ },
+ },
+ "response": Object {
+ "headers": Object {
+ "connection": "close",
+ "content-type": "application/json;charset=UTF-8",
+ "date": "Sun, 18 Nov 2018 20:53:43 GMT",
+ "transfer-encoding": "chunked",
+ "x-powered-by": "Express",
+ },
+ "status_code": 404,
+ },
+ "service": Object {
+ "agent": Object {
+ "name": "nodejs",
+ "version": "1.14.2",
+ },
+ "language": Object {
+ "name": "javascript",
+ },
+ "name": "opbeans-node",
+ "runtime": Object {
+ "name": "node",
+ "version": "8.12.0",
+ },
+ "version": "1.0.0",
+ },
+ "system": Object {
+ "architecture": "x64",
+ "hostname": "98195610c255",
+ "ip": "172.18.0.10",
+ "platform": "linux",
+ },
+ "tags": Object {
+ "foo": "bar",
+ "lorem": "ipsum dolor sit amet, consectetur adipiscing elit. Nulla finibus, ipsum id scelerisque consequat, enim leo vulputate massa, vel ultricies ante neque ac risus. Curabitur tincidunt vitae sapien id pulvinar. Mauris eu vestibulum tortor. Integer sit amet lorem fringilla, egestas tellus vitae, vulputate purus. Nulla feugiat blandit nunc et semper. Morbi purus libero, mattis sed mauris non, euismod iaculis lacus. Curabitur eleifend ante eros, non faucibus velit lacinia id. Duis posuere libero augue, at dignissim urna consectetur eget. Praesent eu congue est, iaculis finibus augue.",
+ "multi-line": "foo
+bar
+baz",
+ "this-is-a-very-long-tag-name-without-any-spaces": "test",
+ },
+ "user": Object {
+ "email": "kimchy@elastic.co",
+ "id": "42",
+ "username": "kimchy",
+ },
+ },
+ "host": Object {
+ "name": "b359e3afece8",
+ },
+ "parent": Object {
+ "id": "4aaea53dc1791183",
+ },
+ "processor": Object {
+ "event": "transaction",
+ "name": "transaction",
+ },
+ "timestamp": Object {
+ "us": 1542574424070007,
+ },
+ "trace": Object {
+ "id": "86c68779d8a65b06fb78e770ffc436a5",
+ },
+ "transaction": Object {
+ "duration": Object {
+ "us": 8684,
+ },
+ "id": "a78bca581dcd8ff8",
+ "name": "GET /api",
+ "result": "HTTP 4xx",
+ "sampled": true,
+ "span_count": Object {
+ "started": 1,
+ },
+ "type": "request",
+ },
+ },
+ "transactionsPerMinute": 691926.3157894736,
+ },
+ Object {
+ "averageResponseTime": 33265.03326147213,
+ "impact": 10.256357027900046,
+ "name": "GET /api/orders",
+ "p95": 58827.489999999976,
+ "sample": Object {
+ "@timestamp": "2018-11-18T20:53:40.973Z",
+ "agent": Object {
+ "hostname": "b359e3afece8",
+ "type": "apm-server",
+ "version": "7.0.0-alpha1",
+ },
+ "context": Object {
+ "custom": Object {
+ "containerId": 408,
+ },
+ "process": Object {
+ "argv": Array [
+ "/usr/local/bin/node",
+ "/usr/local/lib/node_modules/pm2/lib/ProcessContainerFork.js",
+ ],
+ "pid": 3756,
+ "ppid": 1,
+ "title": "node /app/server.js",
+ },
+ "request": Object {
+ "headers": Object {
+ "connection": "close",
+ "host": "opbeans-node:3000",
+ "user-agent": "workload/2.4.3",
+ },
+ "http_version": "1.1",
+ "method": "GET",
+ "socket": Object {
+ "encrypted": false,
+ "remote_address": "::ffff:172.18.0.10",
+ },
+ "url": Object {
+ "full": "http://opbeans-node:3000/api/orders",
+ "hostname": "opbeans-node",
+ "pathname": "/api/orders",
+ "port": "3000",
+ "protocol": "http:",
+ "raw": "/api/orders",
+ },
+ },
+ "response": Object {
+ "headers": Object {
+ "connection": "close",
+ "content-length": "103612",
+ "content-type": "application/json; charset=utf-8",
+ "date": "Sun, 18 Nov 2018 20:53:40 GMT",
+ "etag": "W/\\"194bc-cOw6+iRf7XCeqMXHrle3IOig7tY\\"",
+ "x-powered-by": "Express",
+ },
+ "status_code": 200,
+ },
+ "service": Object {
+ "agent": Object {
+ "name": "nodejs",
+ "version": "1.14.2",
+ },
+ "language": Object {
+ "name": "javascript",
+ },
+ "name": "opbeans-node",
+ "runtime": Object {
+ "name": "node",
+ "version": "8.12.0",
+ },
+ "version": "1.0.0",
+ },
+ "system": Object {
+ "architecture": "x64",
+ "hostname": "98195610c255",
+ "ip": "172.18.0.10",
+ "platform": "linux",
+ },
+ "tags": Object {
+ "foo": "bar",
+ "lorem": "ipsum dolor sit amet, consectetur adipiscing elit. Nulla finibus, ipsum id scelerisque consequat, enim leo vulputate massa, vel ultricies ante neque ac risus. Curabitur tincidunt vitae sapien id pulvinar. Mauris eu vestibulum tortor. Integer sit amet lorem fringilla, egestas tellus vitae, vulputate purus. Nulla feugiat blandit nunc et semper. Morbi purus libero, mattis sed mauris non, euismod iaculis lacus. Curabitur eleifend ante eros, non faucibus velit lacinia id. Duis posuere libero augue, at dignissim urna consectetur eget. Praesent eu congue est, iaculis finibus augue.",
+ "multi-line": "foo
+bar
+baz",
+ "this-is-a-very-long-tag-name-without-any-spaces": "test",
+ },
+ "user": Object {
+ "email": "kimchy@elastic.co",
+ "id": "42",
+ "username": "kimchy",
+ },
+ },
+ "host": Object {
+ "name": "b359e3afece8",
+ },
+ "processor": Object {
+ "event": "transaction",
+ "name": "transaction",
+ },
+ "timestamp": Object {
+ "us": 1542574420973006,
+ },
+ "trace": Object {
+ "id": "0afce85f593cbbdd09949936fe964f0f",
+ },
+ "transaction": Object {
+ "duration": Object {
+ "us": 23040,
+ },
+ "id": "89f200353eb50539",
+ "name": "GET /api/orders",
+ "result": "HTTP 2xx",
+ "sampled": true,
+ "span_count": Object {
+ "started": 2,
+ },
+ "type": "request",
+ },
+ },
+ "transactionsPerMinute": 102536.84210526315,
+ },
+ Object {
+ "averageResponseTime": 32900.72714285714,
+ "impact": 2.179120743402716,
+ "name": "GET /log-message",
+ "p95": 40444,
+ "sample": Object {
+ "@timestamp": "2018-11-18T20:49:09.225Z",
+ "agent": Object {
+ "hostname": "b359e3afece8",
+ "type": "apm-server",
+ "version": "7.0.0-alpha1",
+ },
+ "context": Object {
+ "custom": Object {
+ "containerId": 321,
+ },
+ "process": Object {
+ "argv": Array [
+ "/usr/local/bin/node",
+ "/usr/local/lib/node_modules/pm2/lib/ProcessContainerFork.js",
+ ],
+ "pid": 3142,
+ "ppid": 1,
+ "title": "node /app/server.js",
+ },
+ "request": Object {
+ "headers": Object {
+ "connection": "close",
+ "host": "opbeans-node:3000",
+ "user-agent": "workload/2.4.3",
+ },
+ "http_version": "1.1",
+ "method": "GET",
+ "socket": Object {
+ "encrypted": false,
+ "remote_address": "::ffff:172.18.0.10",
+ },
+ "url": Object {
+ "full": "http://opbeans-node:3000/log-message",
+ "hostname": "opbeans-node",
+ "pathname": "/log-message",
+ "port": "3000",
+ "protocol": "http:",
+ "raw": "/log-message",
+ },
+ },
+ "response": Object {
+ "headers": Object {
+ "connection": "close",
+ "content-length": "24",
+ "content-type": "text/html; charset=utf-8",
+ "date": "Sun, 18 Nov 2018 20:49:09 GMT",
+ "etag": "W/\\"18-MS3VbhH7auHMzO0fUuNF6v14N/M\\"",
+ "x-powered-by": "Express",
+ },
+ "status_code": 500,
+ },
+ "service": Object {
+ "agent": Object {
+ "name": "nodejs",
+ "version": "1.14.2",
+ },
+ "language": Object {
+ "name": "javascript",
+ },
+ "name": "opbeans-node",
+ "runtime": Object {
+ "name": "node",
+ "version": "8.12.0",
+ },
+ "version": "1.0.0",
+ },
+ "system": Object {
+ "architecture": "x64",
+ "hostname": "98195610c255",
+ "ip": "172.18.0.10",
+ "platform": "linux",
+ },
+ "tags": Object {
+ "foo": "bar",
+ "lorem": "ipsum dolor sit amet, consectetur adipiscing elit. Nulla finibus, ipsum id scelerisque consequat, enim leo vulputate massa, vel ultricies ante neque ac risus. Curabitur tincidunt vitae sapien id pulvinar. Mauris eu vestibulum tortor. Integer sit amet lorem fringilla, egestas tellus vitae, vulputate purus. Nulla feugiat blandit nunc et semper. Morbi purus libero, mattis sed mauris non, euismod iaculis lacus. Curabitur eleifend ante eros, non faucibus velit lacinia id. Duis posuere libero augue, at dignissim urna consectetur eget. Praesent eu congue est, iaculis finibus augue.",
+ "multi-line": "foo
+bar
+baz",
+ "this-is-a-very-long-tag-name-without-any-spaces": "test",
+ },
+ "user": Object {
+ "email": "kimchy@elastic.co",
+ "id": "42",
+ "username": "kimchy",
+ },
+ },
+ "host": Object {
+ "name": "b359e3afece8",
+ },
+ "processor": Object {
+ "event": "transaction",
+ "name": "transaction",
+ },
+ "timestamp": Object {
+ "us": 1542574149225004,
+ },
+ "trace": Object {
+ "id": "ba18b741cdd3ac83eca89a5fede47577",
+ },
+ "transaction": Object {
+ "duration": Object {
+ "us": 32381,
+ },
+ "id": "b9a8f96d7554d09f",
+ "name": "GET /log-message",
+ "result": "HTTP 5xx",
+ "sampled": true,
+ "span_count": Object {
+ "started": 0,
+ },
+ "type": "request",
+ },
+ },
+ "transactionsPerMinute": 22105.263157894737,
+ },
+ Object {
+ "averageResponseTime": 32554.36257814184,
+ "impact": 14.344171564855404,
+ "name": "GET /api/stats",
+ "p95": 59356.73611111111,
+ "sample": Object {
+ "@timestamp": "2018-11-18T20:53:42.560Z",
+ "agent": Object {
+ "hostname": "b359e3afece8",
+ "type": "apm-server",
+ "version": "7.0.0-alpha1",
+ },
+ "context": Object {
+ "custom": Object {
+ "containerId": 207,
+ },
+ "process": Object {
+ "argv": Array [
+ "/usr/local/bin/node",
+ "/usr/local/lib/node_modules/pm2/lib/ProcessContainerFork.js",
+ ],
+ "pid": 3756,
+ "ppid": 1,
+ "title": "node /app/server.js",
+ },
+ "request": Object {
+ "headers": Object {
+ "accept": "*/*",
+ "accept-encoding": "gzip, deflate",
+ "connection": "keep-alive",
+ "elastic-apm-traceparent": "00-63ccc3b0929dafb7f2fbcabdc7f7af25-821a787e73ab1563-01",
+ "host": "opbeans-node:3000",
+ "if-none-match": "W/\\"77-uxKJrX5GSMJJWTKh3orUFAEVxSs\\"",
+ "referer": "http://opbeans-node:3000/dashboard",
+ "user-agent": "Chromeless 1.4.0",
+ },
+ "http_version": "1.1",
+ "method": "GET",
+ "socket": Object {
+ "encrypted": false,
+ "remote_address": "::ffff:172.18.0.7",
+ },
+ "url": Object {
+ "full": "http://opbeans-node:3000/api/stats",
+ "hostname": "opbeans-node",
+ "pathname": "/api/stats",
+ "port": "3000",
+ "protocol": "http:",
+ "raw": "/api/stats",
+ },
+ },
+ "response": Object {
+ "headers": Object {
+ "connection": "keep-alive",
+ "date": "Sun, 18 Nov 2018 20:53:42 GMT",
+ "etag": "W/\\"77-uxKJrX5GSMJJWTKh3orUFAEVxSs\\"",
+ "x-powered-by": "Express",
+ },
+ "status_code": 304,
+ },
+ "service": Object {
+ "agent": Object {
+ "name": "nodejs",
+ "version": "1.14.2",
+ },
+ "language": Object {
+ "name": "javascript",
+ },
+ "name": "opbeans-node",
+ "runtime": Object {
+ "name": "node",
+ "version": "8.12.0",
+ },
+ "version": "1.0.0",
+ },
+ "system": Object {
+ "architecture": "x64",
+ "hostname": "98195610c255",
+ "ip": "172.18.0.10",
+ "platform": "linux",
+ },
+ "tags": Object {
+ "foo": "bar",
+ "lorem": "ipsum dolor sit amet, consectetur adipiscing elit. Nulla finibus, ipsum id scelerisque consequat, enim leo vulputate massa, vel ultricies ante neque ac risus. Curabitur tincidunt vitae sapien id pulvinar. Mauris eu vestibulum tortor. Integer sit amet lorem fringilla, egestas tellus vitae, vulputate purus. Nulla feugiat blandit nunc et semper. Morbi purus libero, mattis sed mauris non, euismod iaculis lacus. Curabitur eleifend ante eros, non faucibus velit lacinia id. Duis posuere libero augue, at dignissim urna consectetur eget. Praesent eu congue est, iaculis finibus augue.",
+ "multi-line": "foo
+bar
+baz",
+ "this-is-a-very-long-tag-name-without-any-spaces": "test",
+ },
+ "user": Object {
+ "email": "kimchy@elastic.co",
+ "id": "42",
+ "username": "kimchy",
+ },
+ },
+ "host": Object {
+ "name": "b359e3afece8",
+ },
+ "parent": Object {
+ "id": "821a787e73ab1563",
+ },
+ "processor": Object {
+ "event": "transaction",
+ "name": "transaction",
+ },
+ "timestamp": Object {
+ "us": 1542574422560002,
+ },
+ "trace": Object {
+ "id": "63ccc3b0929dafb7f2fbcabdc7f7af25",
+ },
+ "transaction": Object {
+ "duration": Object {
+ "us": 28753,
+ },
+ "id": "fb754e7628da2fb5",
+ "name": "GET /api/stats",
+ "result": "HTTP 3xx",
+ "sampled": true,
+ "span_count": Object {
+ "started": 7,
+ },
+ "type": "request",
+ },
+ },
+ "transactionsPerMinute": 146494.73684210525,
+ },
+ Object {
+ "averageResponseTime": 32387.73641304348,
+ "impact": 2.2558112391673664,
+ "name": "GET /log-error",
+ "p95": 40061.1,
+ "sample": Object {
+ "@timestamp": "2018-11-18T20:52:51.462Z",
+ "agent": Object {
+ "hostname": "b359e3afece8",
+ "type": "apm-server",
+ "version": "7.0.0-alpha1",
+ },
+ "context": Object {
+ "custom": Object {
+ "containerId": 4877,
+ },
+ "process": Object {
+ "argv": Array [
+ "/usr/local/bin/node",
+ "/usr/local/lib/node_modules/pm2/lib/ProcessContainerFork.js",
+ ],
+ "pid": 3659,
+ "ppid": 1,
+ "title": "node /app/server.js",
+ },
+ "request": Object {
+ "headers": Object {
+ "connection": "close",
+ "host": "opbeans-node:3000",
+ "user-agent": "workload/2.4.3",
+ },
+ "http_version": "1.1",
+ "method": "GET",
+ "socket": Object {
+ "encrypted": false,
+ "remote_address": "::ffff:172.18.0.10",
+ },
+ "url": Object {
+ "full": "http://opbeans-node:3000/log-error",
+ "hostname": "opbeans-node",
+ "pathname": "/log-error",
+ "port": "3000",
+ "protocol": "http:",
+ "raw": "/log-error",
+ },
+ },
+ "response": Object {
+ "headers": Object {
+ "connection": "close",
+ "content-length": "24",
+ "content-type": "text/html; charset=utf-8",
+ "date": "Sun, 18 Nov 2018 20:52:51 GMT",
+ "etag": "W/\\"18-MS3VbhH7auHMzO0fUuNF6v14N/M\\"",
+ "x-powered-by": "Express",
+ },
+ "status_code": 500,
+ },
+ "service": Object {
+ "agent": Object {
+ "name": "nodejs",
+ "version": "1.14.2",
+ },
+ "language": Object {
+ "name": "javascript",
+ },
+ "name": "opbeans-node",
+ "runtime": Object {
+ "name": "node",
+ "version": "8.12.0",
+ },
+ "version": "1.0.0",
+ },
+ "system": Object {
+ "architecture": "x64",
+ "hostname": "98195610c255",
+ "ip": "172.18.0.10",
+ "platform": "linux",
+ },
+ "tags": Object {
+ "foo": "bar",
+ "lorem": "ipsum dolor sit amet, consectetur adipiscing elit. Nulla finibus, ipsum id scelerisque consequat, enim leo vulputate massa, vel ultricies ante neque ac risus. Curabitur tincidunt vitae sapien id pulvinar. Mauris eu vestibulum tortor. Integer sit amet lorem fringilla, egestas tellus vitae, vulputate purus. Nulla feugiat blandit nunc et semper. Morbi purus libero, mattis sed mauris non, euismod iaculis lacus. Curabitur eleifend ante eros, non faucibus velit lacinia id. Duis posuere libero augue, at dignissim urna consectetur eget. Praesent eu congue est, iaculis finibus augue.",
+ "multi-line": "foo
+bar
+baz",
+ "this-is-a-very-long-tag-name-without-any-spaces": "test",
+ },
+ "user": Object {
+ "email": "kimchy@elastic.co",
+ "id": "42",
+ "username": "kimchy",
+ },
+ },
+ "host": Object {
+ "name": "b359e3afece8",
+ },
+ "processor": Object {
+ "event": "transaction",
+ "name": "transaction",
+ },
+ "timestamp": Object {
+ "us": 1542574371462005,
+ },
+ "trace": Object {
+ "id": "15366d65659b5fc8f67ff127391b3aff",
+ },
+ "transaction": Object {
+ "duration": Object {
+ "us": 33367,
+ },
+ "id": "ec9c465c5042ded8",
+ "name": "GET /log-error",
+ "result": "HTTP 5xx",
+ "sampled": true,
+ "span_count": Object {
+ "started": 0,
+ },
+ "type": "request",
+ },
+ },
+ "transactionsPerMinute": 23242.105263157893,
+ },
+ Object {
+ "averageResponseTime": 32159.926322043968,
+ "impact": 10.279049521913821,
+ "name": "GET /api/customers",
+ "p95": 59845.85714285714,
+ "sample": Object {
+ "@timestamp": "2018-11-18T20:53:21.180Z",
+ "agent": Object {
+ "hostname": "b359e3afece8",
+ "type": "apm-server",
+ "version": "7.0.0-alpha1",
+ },
+ "context": Object {
+ "custom": Object {
+ "containerId": 2531,
+ },
+ "process": Object {
+ "argv": Array [
+ "/usr/local/bin/node",
+ "/usr/local/lib/node_modules/pm2/lib/ProcessContainerFork.js",
+ ],
+ "pid": 3710,
+ "ppid": 1,
+ "title": "node /app/server.js",
+ },
+ "request": Object {
+ "headers": Object {
+ "accept": "*/*",
+ "accept-encoding": "gzip, deflate",
+ "connection": "keep-alive",
+ "elastic-apm-traceparent": "00-541025da8ecc2f51f21c1a4ad6992b77-ca18d9d4c3879519-01",
+ "host": "opbeans-node:3000",
+ "user-agent": "python-requests/2.20.0",
+ },
+ "http_version": "1.1",
+ "method": "GET",
+ "socket": Object {
+ "encrypted": false,
+ "remote_address": "::ffff:172.18.0.6",
+ },
+ "url": Object {
+ "full": "http://opbeans-node:3000/api/customers",
+ "hostname": "opbeans-node",
+ "pathname": "/api/customers",
+ "port": "3000",
+ "protocol": "http:",
+ "raw": "/api/customers",
+ },
+ },
+ "response": Object {
+ "headers": Object {
+ "connection": "keep-alive",
+ "content-length": "186769",
+ "content-type": "application/json; charset=utf-8",
+ "date": "Sun, 18 Nov 2018 20:53:21 GMT",
+ "etag": "W/\\"2d991-yG3J8W/roH7fSxXTudZrO27Ax9s\\"",
+ "x-powered-by": "Express",
+ },
+ "status_code": 200,
+ },
+ "service": Object {
+ "agent": Object {
+ "name": "nodejs",
+ "version": "1.14.2",
+ },
+ "language": Object {
+ "name": "javascript",
+ },
+ "name": "opbeans-node",
+ "runtime": Object {
+ "name": "node",
+ "version": "8.12.0",
+ },
+ "version": "1.0.0",
+ },
+ "system": Object {
+ "architecture": "x64",
+ "hostname": "98195610c255",
+ "ip": "172.18.0.10",
+ "platform": "linux",
+ },
+ "tags": Object {
+ "foo": "bar",
+ "lorem": "ipsum dolor sit amet, consectetur adipiscing elit. Nulla finibus, ipsum id scelerisque consequat, enim leo vulputate massa, vel ultricies ante neque ac risus. Curabitur tincidunt vitae sapien id pulvinar. Mauris eu vestibulum tortor. Integer sit amet lorem fringilla, egestas tellus vitae, vulputate purus. Nulla feugiat blandit nunc et semper. Morbi purus libero, mattis sed mauris non, euismod iaculis lacus. Curabitur eleifend ante eros, non faucibus velit lacinia id. Duis posuere libero augue, at dignissim urna consectetur eget. Praesent eu congue est, iaculis finibus augue.",
+ "multi-line": "foo
+bar
+baz",
+ "this-is-a-very-long-tag-name-without-any-spaces": "test",
+ },
+ "user": Object {
+ "email": "kimchy@elastic.co",
+ "id": "42",
+ "username": "kimchy",
+ },
+ },
+ "host": Object {
+ "name": "b359e3afece8",
+ },
+ "parent": Object {
+ "id": "ca18d9d4c3879519",
+ },
+ "processor": Object {
+ "event": "transaction",
+ "name": "transaction",
+ },
+ "timestamp": Object {
+ "us": 1542574401180002,
+ },
+ "trace": Object {
+ "id": "541025da8ecc2f51f21c1a4ad6992b77",
+ },
+ "transaction": Object {
+ "duration": Object {
+ "us": 18077,
+ },
+ "id": "94852b9dd1075982",
+ "name": "GET /api/customers",
+ "result": "HTTP 2xx",
+ "sampled": true,
+ "span_count": Object {
+ "started": 2,
+ },
+ "type": "request",
+ },
+ },
+ "transactionsPerMinute": 106294.73684210525,
+ },
+ Object {
+ "averageResponseTime": 27516.89144558744,
+ "impact": 9.651458993728006,
+ "name": "GET /api/products/top",
+ "p95": 56064.679999999986,
+ "sample": Object {
+ "@timestamp": "2018-11-18T20:52:57.316Z",
+ "agent": Object {
+ "hostname": "b359e3afece8",
+ "type": "apm-server",
+ "version": "7.0.0-alpha1",
+ },
+ "context": Object {
+ "custom": Object {
+ "containerId": 5113,
+ },
+ "process": Object {
+ "argv": Array [
+ "/usr/local/bin/node",
+ "/usr/local/lib/node_modules/pm2/lib/ProcessContainerFork.js",
+ ],
+ "pid": 3686,
+ "ppid": 1,
+ "title": "node /app/server.js",
+ },
+ "request": Object {
+ "headers": Object {
+ "accept": "*/*",
+ "accept-encoding": "gzip, deflate",
+ "connection": "keep-alive",
+ "elastic-apm-traceparent": "00-74f12e705936d66350f4741ebeb55189-fcebe94cd2136215-01",
+ "host": "opbeans-node:3000",
+ "referer": "http://opbeans-node:3000/dashboard",
+ "user-agent": "Chromeless 1.4.0",
+ },
+ "http_version": "1.1",
+ "method": "GET",
+ "socket": Object {
+ "encrypted": false,
+ "remote_address": "::ffff:172.18.0.7",
+ },
+ "url": Object {
+ "full": "http://opbeans-node:3000/api/products/top",
+ "hostname": "opbeans-node",
+ "pathname": "/api/products/top",
+ "port": "3000",
+ "protocol": "http:",
+ "raw": "/api/products/top",
+ },
+ },
+ "response": Object {
+ "headers": Object {
+ "connection": "keep-alive",
+ "content-length": "282",
+ "content-type": "application/json; charset=utf-8",
+ "date": "Sun, 18 Nov 2018 20:52:57 GMT",
+ "etag": "W/\\"11a-lcI9zuMZYYsDRpEZgYqDYr96cKM\\"",
+ "x-powered-by": "Express",
+ },
+ "status_code": 200,
+ },
+ "service": Object {
+ "agent": Object {
+ "name": "nodejs",
+ "version": "1.14.2",
+ },
+ "language": Object {
+ "name": "javascript",
+ },
+ "name": "opbeans-node",
+ "runtime": Object {
+ "name": "node",
+ "version": "8.12.0",
+ },
+ "version": "1.0.0",
+ },
+ "system": Object {
+ "architecture": "x64",
+ "hostname": "98195610c255",
+ "ip": "172.18.0.10",
+ "platform": "linux",
+ },
+ "tags": Object {
+ "foo": "bar",
+ "lorem": "ipsum dolor sit amet, consectetur adipiscing elit. Nulla finibus, ipsum id scelerisque consequat, enim leo vulputate massa, vel ultricies ante neque ac risus. Curabitur tincidunt vitae sapien id pulvinar. Mauris eu vestibulum tortor. Integer sit amet lorem fringilla, egestas tellus vitae, vulputate purus. Nulla feugiat blandit nunc et semper. Morbi purus libero, mattis sed mauris non, euismod iaculis lacus. Curabitur eleifend ante eros, non faucibus velit lacinia id. Duis posuere libero augue, at dignissim urna consectetur eget. Praesent eu congue est, iaculis finibus augue.",
+ "multi-line": "foo
+bar
+baz",
+ "this-is-a-very-long-tag-name-without-any-spaces": "test",
+ },
+ "user": Object {
+ "email": "kimchy@elastic.co",
+ "id": "42",
+ "username": "kimchy",
+ },
+ },
+ "host": Object {
+ "name": "b359e3afece8",
+ },
+ "parent": Object {
+ "id": "fcebe94cd2136215",
+ },
+ "processor": Object {
+ "event": "transaction",
+ "name": "transaction",
+ },
+ "timestamp": Object {
+ "us": 1542574377316005,
+ },
+ "trace": Object {
+ "id": "74f12e705936d66350f4741ebeb55189",
+ },
+ "transaction": Object {
+ "duration": Object {
+ "us": 48781,
+ },
+ "id": "be4bd5475d5d9e6f",
+ "name": "GET /api/products/top",
+ "result": "HTTP 2xx",
+ "sampled": true,
+ "span_count": Object {
+ "started": 4,
+ },
+ "type": "request",
+ },
+ },
+ "transactionsPerMinute": 116652.63157894736,
+ },
+ Object {
+ "averageResponseTime": 21331.714285714286,
+ "impact": 0.28817488008070574,
+ "name": "POST /api",
+ "p95": 30938,
+ "sample": Object {
+ "@timestamp": "2018-11-18T20:29:42.751Z",
+ "agent": Object {
+ "hostname": "b359e3afece8",
+ "type": "apm-server",
+ "version": "7.0.0-alpha1",
+ },
+ "context": Object {
+ "custom": Object {
+ "containerId": 2927,
+ },
+ "process": Object {
+ "argv": Array [
+ "/usr/local/bin/node",
+ "/usr/local/lib/node_modules/pm2/lib/ProcessContainerFork.js",
+ ],
+ "pid": 546,
+ "ppid": 1,
+ "title": "node /app/server.js",
+ },
+ "request": Object {
+ "body": "[REDACTED]",
+ "headers": Object {
+ "accept": "application/json",
+ "connection": "close",
+ "content-length": "129",
+ "content-type": "application/json",
+ "host": "opbeans-node:3000",
+ "user-agent": "workload/2.4.3",
+ },
+ "http_version": "1.1",
+ "method": "POST",
+ "socket": Object {
+ "encrypted": false,
+ "remote_address": "::ffff:172.18.0.10",
+ },
+ "url": Object {
+ "full": "http://opbeans-node:3000/api/orders",
+ "hostname": "opbeans-node",
+ "pathname": "/api/orders",
+ "port": "3000",
+ "protocol": "http:",
+ "raw": "/api/orders",
+ },
+ },
+ "response": Object {
+ "headers": Object {
+ "connection": "close",
+ "content-length": "0",
+ "date": "Sun, 18 Nov 2018 20:29:42 GMT",
+ "x-powered-by": "Express",
+ },
+ "status_code": 400,
+ },
+ "service": Object {
+ "agent": Object {
+ "name": "nodejs",
+ "version": "1.14.2",
+ },
+ "language": Object {
+ "name": "javascript",
+ },
+ "name": "opbeans-node",
+ "runtime": Object {
+ "name": "node",
+ "version": "8.12.0",
+ },
+ "version": "1.0.0",
+ },
+ "system": Object {
+ "architecture": "x64",
+ "hostname": "98195610c255",
+ "ip": "172.18.0.10",
+ "platform": "linux",
+ },
+ "tags": Object {
+ "foo": "bar",
+ "lorem": "ipsum dolor sit amet, consectetur adipiscing elit. Nulla finibus, ipsum id scelerisque consequat, enim leo vulputate massa, vel ultricies ante neque ac risus. Curabitur tincidunt vitae sapien id pulvinar. Mauris eu vestibulum tortor. Integer sit amet lorem fringilla, egestas tellus vitae, vulputate purus. Nulla feugiat blandit nunc et semper. Morbi purus libero, mattis sed mauris non, euismod iaculis lacus. Curabitur eleifend ante eros, non faucibus velit lacinia id. Duis posuere libero augue, at dignissim urna consectetur eget. Praesent eu congue est, iaculis finibus augue.",
+ "multi-line": "foo
+bar
+baz",
+ "this-is-a-very-long-tag-name-without-any-spaces": "test",
+ },
+ "user": Object {
+ "email": "kimchy@elastic.co",
+ "id": "42",
+ "username": "kimchy",
+ },
+ },
+ "host": Object {
+ "name": "b359e3afece8",
+ },
+ "processor": Object {
+ "event": "transaction",
+ "name": "transaction",
+ },
+ "timestamp": Object {
+ "us": 1542572982751005,
+ },
+ "trace": Object {
+ "id": "8ed4d94ec8fc11b1ea1b0aa59c2320ff",
+ },
+ "transaction": Object {
+ "duration": Object {
+ "us": 21083,
+ },
+ "id": "d67c2f7aa897110c",
+ "name": "POST /api",
+ "result": "HTTP 4xx",
+ "sampled": true,
+ "span_count": Object {
+ "started": 1,
+ },
+ "type": "request",
+ },
+ },
+ "transactionsPerMinute": 4642.105263157894,
+ },
+ Object {
+ "averageResponseTime": 17189.329210275926,
+ "impact": 3.424381788267164,
+ "name": "GET /api/products/:id/customers",
+ "p95": 39284.79999999999,
+ "sample": Object {
+ "@timestamp": "2018-11-18T20:48:24.769Z",
+ "agent": Object {
+ "hostname": "b359e3afece8",
+ "type": "apm-server",
+ "version": "7.0.0-alpha1",
+ },
+ "context": Object {
+ "custom": Object {
+ "containerId": 1735,
+ },
+ "process": Object {
+ "argv": Array [
+ "/usr/local/bin/node",
+ "/usr/local/lib/node_modules/pm2/lib/ProcessContainerFork.js",
+ ],
+ "pid": 3100,
+ "ppid": 1,
+ "title": "node /app/server.js",
+ },
+ "request": Object {
+ "headers": Object {
+ "accept": "*/*",
+ "accept-encoding": "gzip, deflate",
+ "connection": "keep-alive",
+ "elastic-apm-traceparent": "00-28f178c354d17f400dea04bc4a7b3c57-68f5d1607cac7779-01",
+ "host": "opbeans-node:3000",
+ "user-agent": "python-requests/2.20.0",
+ },
+ "http_version": "1.1",
+ "method": "GET",
+ "socket": Object {
+ "encrypted": false,
+ "remote_address": "::ffff:172.18.0.6",
+ },
+ "url": Object {
+ "full": "http://opbeans-node:3000/api/products/2/customers",
+ "hostname": "opbeans-node",
+ "pathname": "/api/products/2/customers",
+ "port": "3000",
+ "protocol": "http:",
+ "raw": "/api/products/2/customers",
+ },
+ },
+ "response": Object {
+ "headers": Object {
+ "connection": "keep-alive",
+ "content-length": "186570",
+ "content-type": "application/json; charset=utf-8",
+ "date": "Sun, 18 Nov 2018 20:48:24 GMT",
+ "etag": "W/\\"2d8ca-Z9NzuHyGyxwtzpOkcIxBvzm24iw\\"",
+ "x-powered-by": "Express",
+ },
+ "status_code": 200,
+ },
+ "service": Object {
+ "agent": Object {
+ "name": "nodejs",
+ "version": "1.14.2",
+ },
+ "language": Object {
+ "name": "javascript",
+ },
+ "name": "opbeans-node",
+ "runtime": Object {
+ "name": "node",
+ "version": "8.12.0",
+ },
+ "version": "1.0.0",
+ },
+ "system": Object {
+ "architecture": "x64",
+ "hostname": "98195610c255",
+ "ip": "172.18.0.10",
+ "platform": "linux",
+ },
+ "tags": Object {
+ "foo": "bar",
+ "lorem": "ipsum dolor sit amet, consectetur adipiscing elit. Nulla finibus, ipsum id scelerisque consequat, enim leo vulputate massa, vel ultricies ante neque ac risus. Curabitur tincidunt vitae sapien id pulvinar. Mauris eu vestibulum tortor. Integer sit amet lorem fringilla, egestas tellus vitae, vulputate purus. Nulla feugiat blandit nunc et semper. Morbi purus libero, mattis sed mauris non, euismod iaculis lacus. Curabitur eleifend ante eros, non faucibus velit lacinia id. Duis posuere libero augue, at dignissim urna consectetur eget. Praesent eu congue est, iaculis finibus augue.",
+ "multi-line": "foo
+bar
+baz",
+ "this-is-a-very-long-tag-name-without-any-spaces": "test",
+ },
+ "user": Object {
+ "email": "kimchy@elastic.co",
+ "id": "42",
+ "username": "kimchy",
+ },
+ },
+ "host": Object {
+ "name": "b359e3afece8",
+ },
+ "parent": Object {
+ "id": "68f5d1607cac7779",
+ },
+ "processor": Object {
+ "event": "transaction",
+ "name": "transaction",
+ },
+ "timestamp": Object {
+ "us": 1542574104769029,
+ },
+ "trace": Object {
+ "id": "28f178c354d17f400dea04bc4a7b3c57",
+ },
+ "transaction": Object {
+ "duration": Object {
+ "us": 49338,
+ },
+ "id": "2a87ae20ad04ee0c",
+ "name": "GET /api/products/:id/customers",
+ "result": "HTTP 2xx",
+ "sampled": true,
+ "span_count": Object {
+ "started": 1,
+ },
+ "type": "request",
+ },
+ },
+ "transactionsPerMinute": 66378.94736842105,
+ },
+ Object {
+ "averageResponseTime": 12763.68806073154,
+ "impact": 1.747992435179465,
+ "name": "GET /api/types/:id",
+ "p95": 30576.749999999996,
+ "sample": Object {
+ "@timestamp": "2018-11-18T20:53:35.967Z",
+ "agent": Object {
+ "hostname": "b359e3afece8",
+ "type": "apm-server",
+ "version": "7.0.0-alpha1",
+ },
+ "context": Object {
+ "custom": Object {
+ "containerId": 5345,
+ },
+ "process": Object {
+ "argv": Array [
+ "/usr/local/bin/node",
+ "/usr/local/lib/node_modules/pm2/lib/ProcessContainerFork.js",
+ ],
+ "pid": 3756,
+ "ppid": 1,
+ "title": "node /app/server.js",
+ },
+ "request": Object {
+ "headers": Object {
+ "connection": "close",
+ "host": "opbeans-node:3000",
+ "user-agent": "workload/2.4.3",
+ },
+ "http_version": "1.1",
+ "method": "GET",
+ "socket": Object {
+ "encrypted": false,
+ "remote_address": "::ffff:172.18.0.10",
+ },
+ "url": Object {
+ "full": "http://opbeans-node:3000/api/types/1",
+ "hostname": "opbeans-node",
+ "pathname": "/api/types/1",
+ "port": "3000",
+ "protocol": "http:",
+ "raw": "/api/types/1",
+ },
+ },
+ "response": Object {
+ "headers": Object {
+ "connection": "close",
+ "content-length": "217",
+ "content-type": "application/json; charset=utf-8",
+ "date": "Sun, 18 Nov 2018 20:53:35 GMT",
+ "etag": "W/\\"d9-cebOOHODBQMZd1wt+ZZBaSPgQLQ\\"",
+ "x-powered-by": "Express",
+ },
+ "status_code": 200,
+ },
+ "service": Object {
+ "agent": Object {
+ "name": "nodejs",
+ "version": "1.14.2",
+ },
+ "language": Object {
+ "name": "javascript",
+ },
+ "name": "opbeans-node",
+ "runtime": Object {
+ "name": "node",
+ "version": "8.12.0",
+ },
+ "version": "1.0.0",
+ },
+ "system": Object {
+ "architecture": "x64",
+ "hostname": "98195610c255",
+ "ip": "172.18.0.10",
+ "platform": "linux",
+ },
+ "tags": Object {
+ "foo": "bar",
+ "lorem": "ipsum dolor sit amet, consectetur adipiscing elit. Nulla finibus, ipsum id scelerisque consequat, enim leo vulputate massa, vel ultricies ante neque ac risus. Curabitur tincidunt vitae sapien id pulvinar. Mauris eu vestibulum tortor. Integer sit amet lorem fringilla, egestas tellus vitae, vulputate purus. Nulla feugiat blandit nunc et semper. Morbi purus libero, mattis sed mauris non, euismod iaculis lacus. Curabitur eleifend ante eros, non faucibus velit lacinia id. Duis posuere libero augue, at dignissim urna consectetur eget. Praesent eu congue est, iaculis finibus augue.",
+ "multi-line": "foo
+bar
+baz",
+ "this-is-a-very-long-tag-name-without-any-spaces": "test",
+ },
+ "user": Object {
+ "email": "kimchy@elastic.co",
+ "id": "42",
+ "username": "kimchy",
+ },
+ },
+ "host": Object {
+ "name": "b359e3afece8",
+ },
+ "processor": Object {
+ "event": "transaction",
+ "name": "transaction",
+ },
+ "timestamp": Object {
+ "us": 1542574415967005,
+ },
+ "trace": Object {
+ "id": "2223b30b5cbaf2e221fcf70ac6d9abbe",
+ },
+ "transaction": Object {
+ "duration": Object {
+ "us": 13064,
+ },
+ "id": "053436abacdec0a4",
+ "name": "GET /api/types/:id",
+ "result": "HTTP 2xx",
+ "sampled": true,
+ "span_count": Object {
+ "started": 2,
+ },
+ "type": "request",
+ },
+ },
+ "transactionsPerMinute": 45757.8947368421,
+ },
+ Object {
+ "averageResponseTime": 12683.190864600327,
+ "impact": 4.4239778511514745,
+ "name": "GET /api/products",
+ "p95": 35009.67999999999,
+ "sample": Object {
+ "@timestamp": "2018-11-18T20:53:43.477Z",
+ "agent": Object {
+ "hostname": "b359e3afece8",
+ "type": "apm-server",
+ "version": "7.0.0-alpha1",
+ },
+ "context": Object {
+ "custom": Object {
+ "containerId": 2857,
+ },
+ "process": Object {
+ "argv": Array [
+ "/usr/local/bin/node",
+ "/usr/local/lib/node_modules/pm2/lib/ProcessContainerFork.js",
+ ],
+ "pid": 3756,
+ "ppid": 1,
+ "title": "node /app/server.js",
+ },
+ "request": Object {
+ "headers": Object {
+ "connection": "close",
+ "host": "opbeans-node:3000",
+ "user-agent": "workload/2.4.3",
+ },
+ "http_version": "1.1",
+ "method": "GET",
+ "socket": Object {
+ "encrypted": false,
+ "remote_address": "::ffff:172.18.0.10",
+ },
+ "url": Object {
+ "full": "http://opbeans-node:3000/api/products",
+ "hostname": "opbeans-node",
+ "pathname": "/api/products",
+ "port": "3000",
+ "protocol": "http:",
+ "raw": "/api/products",
+ },
+ },
+ "response": Object {
+ "headers": Object {
+ "connection": "close",
+ "content-length": "1023",
+ "content-type": "application/json; charset=utf-8",
+ "date": "Sun, 18 Nov 2018 20:53:43 GMT",
+ "etag": "W/\\"3ff-VyOxcDApb+a/lnjkm9FeTOGSDrs\\"",
+ "x-powered-by": "Express",
+ },
+ "status_code": 200,
+ },
+ "service": Object {
+ "agent": Object {
+ "name": "nodejs",
+ "version": "1.14.2",
+ },
+ "language": Object {
+ "name": "javascript",
+ },
+ "name": "opbeans-node",
+ "runtime": Object {
+ "name": "node",
+ "version": "8.12.0",
+ },
+ "version": "1.0.0",
+ },
+ "system": Object {
+ "architecture": "x64",
+ "hostname": "98195610c255",
+ "ip": "172.18.0.10",
+ "platform": "linux",
+ },
+ "tags": Object {
+ "foo": "bar",
+ "lorem": "ipsum dolor sit amet, consectetur adipiscing elit. Nulla finibus, ipsum id scelerisque consequat, enim leo vulputate massa, vel ultricies ante neque ac risus. Curabitur tincidunt vitae sapien id pulvinar. Mauris eu vestibulum tortor. Integer sit amet lorem fringilla, egestas tellus vitae, vulputate purus. Nulla feugiat blandit nunc et semper. Morbi purus libero, mattis sed mauris non, euismod iaculis lacus. Curabitur eleifend ante eros, non faucibus velit lacinia id. Duis posuere libero augue, at dignissim urna consectetur eget. Praesent eu congue est, iaculis finibus augue.",
+ "multi-line": "foo
+bar
+baz",
+ "this-is-a-very-long-tag-name-without-any-spaces": "test",
+ },
+ "user": Object {
+ "email": "kimchy@elastic.co",
+ "id": "42",
+ "username": "kimchy",
+ },
+ },
+ "host": Object {
+ "name": "b359e3afece8",
+ },
+ "processor": Object {
+ "event": "transaction",
+ "name": "transaction",
+ },
+ "timestamp": Object {
+ "us": 1542574423477006,
+ },
+ "trace": Object {
+ "id": "bee00a8efb523ca4b72adad57f7caba3",
+ },
+ "transaction": Object {
+ "duration": Object {
+ "us": 6915,
+ },
+ "id": "d8fc6d3b8707b64c",
+ "name": "GET /api/products",
+ "result": "HTTP 2xx",
+ "sampled": true,
+ "span_count": Object {
+ "started": 2,
+ },
+ "type": "request",
+ },
+ },
+ "transactionsPerMinute": 116147.36842105263,
+ },
+ Object {
+ "averageResponseTime": 11257.757916666667,
+ "impact": 2.558180605423081,
+ "name": "GET /api/types",
+ "p95": 35222.944444444445,
+ "sample": Object {
+ "@timestamp": "2018-11-18T20:53:44.978Z",
+ "agent": Object {
+ "hostname": "b359e3afece8",
+ "type": "apm-server",
+ "version": "7.0.0-alpha1",
+ },
+ "context": Object {
+ "custom": Object {
+ "containerId": 2193,
+ },
+ "process": Object {
+ "argv": Array [
+ "/usr/local/bin/node",
+ "/usr/local/lib/node_modules/pm2/lib/ProcessContainerFork.js",
+ ],
+ "pid": 3756,
+ "ppid": 1,
+ "title": "node /app/server.js",
+ },
+ "request": Object {
+ "headers": Object {
+ "connection": "close",
+ "host": "opbeans-node:3000",
+ "user-agent": "workload/2.4.3",
+ },
+ "http_version": "1.1",
+ "method": "GET",
+ "socket": Object {
+ "encrypted": false,
+ "remote_address": "::ffff:172.18.0.10",
+ },
+ "url": Object {
+ "full": "http://opbeans-node:3000/api/types",
+ "hostname": "opbeans-node",
+ "pathname": "/api/types",
+ "port": "3000",
+ "protocol": "http:",
+ "raw": "/api/types",
+ },
+ },
+ "response": Object {
+ "headers": Object {
+ "connection": "close",
+ "content-length": "112",
+ "content-type": "application/json; charset=utf-8",
+ "date": "Sun, 18 Nov 2018 20:53:44 GMT",
+ "etag": "W/\\"70-1z6hT7P1WHgBgS/BeUEVeHhOCQU\\"",
+ "x-powered-by": "Express",
+ },
+ "status_code": 200,
+ },
+ "service": Object {
+ "agent": Object {
+ "name": "nodejs",
+ "version": "1.14.2",
+ },
+ "language": Object {
+ "name": "javascript",
+ },
+ "name": "opbeans-node",
+ "runtime": Object {
+ "name": "node",
+ "version": "8.12.0",
+ },
+ "version": "1.0.0",
+ },
+ "system": Object {
+ "architecture": "x64",
+ "hostname": "98195610c255",
+ "ip": "172.18.0.10",
+ "platform": "linux",
+ },
+ "tags": Object {
+ "foo": "bar",
+ "lorem": "ipsum dolor sit amet, consectetur adipiscing elit. Nulla finibus, ipsum id scelerisque consequat, enim leo vulputate massa, vel ultricies ante neque ac risus. Curabitur tincidunt vitae sapien id pulvinar. Mauris eu vestibulum tortor. Integer sit amet lorem fringilla, egestas tellus vitae, vulputate purus. Nulla feugiat blandit nunc et semper. Morbi purus libero, mattis sed mauris non, euismod iaculis lacus. Curabitur eleifend ante eros, non faucibus velit lacinia id. Duis posuere libero augue, at dignissim urna consectetur eget. Praesent eu congue est, iaculis finibus augue.",
+ "multi-line": "foo
+bar
+baz",
+ "this-is-a-very-long-tag-name-without-any-spaces": "test",
+ },
+ "user": Object {
+ "email": "kimchy@elastic.co",
+ "id": "42",
+ "username": "kimchy",
+ },
+ },
+ "host": Object {
+ "name": "b359e3afece8",
+ },
+ "processor": Object {
+ "event": "transaction",
+ "name": "transaction",
+ },
+ "timestamp": Object {
+ "us": 1542574424978005,
+ },
+ "trace": Object {
+ "id": "0d84126973411c19b470f2d9eea958d3",
+ },
+ "transaction": Object {
+ "duration": Object {
+ "us": 7891,
+ },
+ "id": "0f10668e4fb3adc7",
+ "name": "GET /api/types",
+ "result": "HTTP 2xx",
+ "sampled": true,
+ "span_count": Object {
+ "started": 2,
+ },
+ "type": "request",
+ },
+ },
+ "transactionsPerMinute": 75789.47368421052,
+ },
+ Object {
+ "averageResponseTime": 10584.05144193297,
+ "impact": 1.2808106158729446,
+ "name": "GET /api/orders/:id",
+ "p95": 26555.399999999998,
+ "sample": Object {
+ "@timestamp": "2018-11-18T20:51:36.949Z",
+ "agent": Object {
+ "hostname": "b359e3afece8",
+ "type": "apm-server",
+ "version": "7.0.0-alpha1",
+ },
+ "context": Object {
+ "custom": Object {
+ "containerId": 5999,
+ },
+ "process": Object {
+ "argv": Array [
+ "/usr/local/bin/node",
+ "/usr/local/lib/node_modules/pm2/lib/ProcessContainerFork.js",
+ ],
+ "pid": 3475,
+ "ppid": 1,
+ "title": "node /app/server.js",
+ },
+ "request": Object {
+ "headers": Object {
+ "connection": "close",
+ "host": "opbeans-node:3000",
+ "user-agent": "workload/2.4.3",
+ },
+ "http_version": "1.1",
+ "method": "GET",
+ "socket": Object {
+ "encrypted": false,
+ "remote_address": "::ffff:172.18.0.10",
+ },
+ "url": Object {
+ "full": "http://opbeans-node:3000/api/orders/183",
+ "hostname": "opbeans-node",
+ "pathname": "/api/orders/183",
+ "port": "3000",
+ "protocol": "http:",
+ "raw": "/api/orders/183",
+ },
+ },
+ "response": Object {
+ "headers": Object {
+ "connection": "close",
+ "content-length": "0",
+ "date": "Sun, 18 Nov 2018 20:51:36 GMT",
+ "x-powered-by": "Express",
+ },
+ "status_code": 404,
+ },
+ "service": Object {
+ "agent": Object {
+ "name": "nodejs",
+ "version": "1.14.2",
+ },
+ "language": Object {
+ "name": "javascript",
+ },
+ "name": "opbeans-node",
+ "runtime": Object {
+ "name": "node",
+ "version": "8.12.0",
+ },
+ "version": "1.0.0",
+ },
+ "system": Object {
+ "architecture": "x64",
+ "hostname": "98195610c255",
+ "ip": "172.18.0.10",
+ "platform": "linux",
+ },
+ "tags": Object {
+ "foo": "bar",
+ "lorem": "ipsum dolor sit amet, consectetur adipiscing elit. Nulla finibus, ipsum id scelerisque consequat, enim leo vulputate massa, vel ultricies ante neque ac risus. Curabitur tincidunt vitae sapien id pulvinar. Mauris eu vestibulum tortor. Integer sit amet lorem fringilla, egestas tellus vitae, vulputate purus. Nulla feugiat blandit nunc et semper. Morbi purus libero, mattis sed mauris non, euismod iaculis lacus. Curabitur eleifend ante eros, non faucibus velit lacinia id. Duis posuere libero augue, at dignissim urna consectetur eget. Praesent eu congue est, iaculis finibus augue.",
+ "multi-line": "foo
+bar
+baz",
+ "this-is-a-very-long-tag-name-without-any-spaces": "test",
+ },
+ "user": Object {
+ "email": "kimchy@elastic.co",
+ "id": "42",
+ "username": "kimchy",
+ },
+ },
+ "host": Object {
+ "name": "b359e3afece8",
+ },
+ "processor": Object {
+ "event": "transaction",
+ "name": "transaction",
+ },
+ "timestamp": Object {
+ "us": 1542574296949004,
+ },
+ "trace": Object {
+ "id": "dab6421fa44a6869887e0edf32e1ad6f",
+ },
+ "transaction": Object {
+ "duration": Object {
+ "us": 5906,
+ },
+ "id": "937ef5588454f74a",
+ "name": "GET /api/orders/:id",
+ "result": "HTTP 4xx",
+ "sampled": true,
+ "span_count": Object {
+ "started": 1,
+ },
+ "type": "request",
+ },
+ },
+ "transactionsPerMinute": 40515.789473684206,
+ },
+ Object {
+ "averageResponseTime": 10548.218597063622,
+ "impact": 1.8338764008269306,
+ "name": "GET /api/products/:id",
+ "p95": 28413.383333333328,
+ "sample": Object {
+ "@timestamp": "2018-11-18T20:52:57.963Z",
+ "agent": Object {
+ "hostname": "b359e3afece8",
+ "type": "apm-server",
+ "version": "7.0.0-alpha1",
+ },
+ "context": Object {
+ "custom": Object {
+ "containerId": 7184,
+ },
+ "process": Object {
+ "argv": Array [
+ "/usr/local/bin/node",
+ "/usr/local/lib/node_modules/pm2/lib/ProcessContainerFork.js",
+ ],
+ "pid": 3686,
+ "ppid": 1,
+ "title": "node /app/server.js",
+ },
+ "request": Object {
+ "headers": Object {
+ "connection": "close",
+ "host": "opbeans-node:3000",
+ "user-agent": "workload/2.4.3",
+ },
+ "http_version": "1.1",
+ "method": "GET",
+ "socket": Object {
+ "encrypted": false,
+ "remote_address": "::ffff:172.18.0.10",
+ },
+ "url": Object {
+ "full": "http://opbeans-node:3000/api/products/3",
+ "hostname": "opbeans-node",
+ "pathname": "/api/products/3",
+ "port": "3000",
+ "protocol": "http:",
+ "raw": "/api/products/3",
+ },
+ },
+ "response": Object {
+ "headers": Object {
+ "connection": "close",
+ "content-length": "231",
+ "content-type": "application/json; charset=utf-8",
+ "date": "Sun, 18 Nov 2018 20:52:57 GMT",
+ "etag": "W/\\"e7-kkuzj37GZDzXDh0CWqh5Gan0VO4\\"",
+ "x-powered-by": "Express",
+ },
+ "status_code": 200,
+ },
+ "service": Object {
+ "agent": Object {
+ "name": "nodejs",
+ "version": "1.14.2",
+ },
+ "language": Object {
+ "name": "javascript",
+ },
+ "name": "opbeans-node",
+ "runtime": Object {
+ "name": "node",
+ "version": "8.12.0",
+ },
+ "version": "1.0.0",
+ },
+ "system": Object {
+ "architecture": "x64",
+ "hostname": "98195610c255",
+ "ip": "172.18.0.10",
+ "platform": "linux",
+ },
+ "tags": Object {
+ "foo": "bar",
+ "lorem": "ipsum dolor sit amet, consectetur adipiscing elit. Nulla finibus, ipsum id scelerisque consequat, enim leo vulputate massa, vel ultricies ante neque ac risus. Curabitur tincidunt vitae sapien id pulvinar. Mauris eu vestibulum tortor. Integer sit amet lorem fringilla, egestas tellus vitae, vulputate purus. Nulla feugiat blandit nunc et semper. Morbi purus libero, mattis sed mauris non, euismod iaculis lacus. Curabitur eleifend ante eros, non faucibus velit lacinia id. Duis posuere libero augue, at dignissim urna consectetur eget. Praesent eu congue est, iaculis finibus augue.",
+ "multi-line": "foo
+bar
+baz",
+ "this-is-a-very-long-tag-name-without-any-spaces": "test",
+ },
+ "user": Object {
+ "email": "kimchy@elastic.co",
+ "id": "42",
+ "username": "kimchy",
+ },
+ },
+ "host": Object {
+ "name": "b359e3afece8",
+ },
+ "processor": Object {
+ "event": "transaction",
+ "name": "transaction",
+ },
+ "timestamp": Object {
+ "us": 1542574377963005,
+ },
+ "trace": Object {
+ "id": "ca86ec845e412e4b4506a715d51548ec",
+ },
+ "transaction": Object {
+ "duration": Object {
+ "us": 6959,
+ },
+ "id": "d324897ffb7ebcdc",
+ "name": "GET /api/products/:id",
+ "result": "HTTP 2xx",
+ "sampled": true,
+ "span_count": Object {
+ "started": 1,
+ },
+ "type": "request",
+ },
+ },
+ "transactionsPerMinute": 58073.68421052631,
+ },
+ Object {
+ "averageResponseTime": 9868.217894736843,
+ "impact": 1.7722323979309487,
+ "name": "GET /api/customers/:id",
+ "p95": 27486.5,
+ "sample": Object {
+ "@timestamp": "2018-11-18T20:52:56.797Z",
+ "agent": Object {
+ "hostname": "b359e3afece8",
+ "type": "apm-server",
+ "version": "7.0.0-alpha1",
+ },
+ "context": Object {
+ "custom": Object {
+ "containerId": 8225,
+ },
+ "process": Object {
+ "argv": Array [
+ "/usr/local/bin/node",
+ "/usr/local/lib/node_modules/pm2/lib/ProcessContainerFork.js",
+ ],
+ "pid": 3686,
+ "ppid": 1,
+ "title": "node /app/server.js",
+ },
+ "request": Object {
+ "headers": Object {
+ "accept": "*/*",
+ "accept-encoding": "gzip, deflate",
+ "connection": "keep-alive",
+ "elastic-apm-traceparent": "00-e6140d30363f18b585f5d3b753f4d025-aa82e2c847265626-01",
+ "host": "opbeans-node:3000",
+ "user-agent": "python-requests/2.20.0",
+ },
+ "http_version": "1.1",
+ "method": "GET",
+ "socket": Object {
+ "encrypted": false,
+ "remote_address": "::ffff:172.18.0.6",
+ },
+ "url": Object {
+ "full": "http://opbeans-node:3000/api/customers/700",
+ "hostname": "opbeans-node",
+ "pathname": "/api/customers/700",
+ "port": "3000",
+ "protocol": "http:",
+ "raw": "/api/customers/700",
+ },
+ },
+ "response": Object {
+ "headers": Object {
+ "connection": "keep-alive",
+ "content-length": "193",
+ "content-type": "application/json; charset=utf-8",
+ "date": "Sun, 18 Nov 2018 20:52:56 GMT",
+ "etag": "W/\\"c1-LbuhkuLzFyZ0H+7+JQGA5b0kvNs\\"",
+ "x-powered-by": "Express",
+ },
+ "status_code": 200,
+ },
+ "service": Object {
+ "agent": Object {
+ "name": "nodejs",
+ "version": "1.14.2",
+ },
+ "language": Object {
+ "name": "javascript",
+ },
+ "name": "opbeans-node",
+ "runtime": Object {
+ "name": "node",
+ "version": "8.12.0",
+ },
+ "version": "1.0.0",
+ },
+ "system": Object {
+ "architecture": "x64",
+ "hostname": "98195610c255",
+ "ip": "172.18.0.10",
+ "platform": "linux",
+ },
+ "tags": Object {
+ "foo": "bar",
+ "lorem": "ipsum dolor sit amet, consectetur adipiscing elit. Nulla finibus, ipsum id scelerisque consequat, enim leo vulputate massa, vel ultricies ante neque ac risus. Curabitur tincidunt vitae sapien id pulvinar. Mauris eu vestibulum tortor. Integer sit amet lorem fringilla, egestas tellus vitae, vulputate purus. Nulla feugiat blandit nunc et semper. Morbi purus libero, mattis sed mauris non, euismod iaculis lacus. Curabitur eleifend ante eros, non faucibus velit lacinia id. Duis posuere libero augue, at dignissim urna consectetur eget. Praesent eu congue est, iaculis finibus augue.",
+ "multi-line": "foo
+bar
+baz",
+ "this-is-a-very-long-tag-name-without-any-spaces": "test",
+ },
+ "user": Object {
+ "email": "kimchy@elastic.co",
+ "id": "42",
+ "username": "kimchy",
+ },
+ },
+ "host": Object {
+ "name": "b359e3afece8",
+ },
+ "parent": Object {
+ "id": "aa82e2c847265626",
+ },
+ "processor": Object {
+ "event": "transaction",
+ "name": "transaction",
+ },
+ "timestamp": Object {
+ "us": 1542574376797031,
+ },
+ "trace": Object {
+ "id": "e6140d30363f18b585f5d3b753f4d025",
+ },
+ "transaction": Object {
+ "duration": Object {
+ "us": 9735,
+ },
+ "id": "60e230d12f3f0960",
+ "name": "GET /api/customers/:id",
+ "result": "HTTP 2xx",
+ "sampled": true,
+ "span_count": Object {
+ "started": 1,
+ },
+ "type": "request",
+ },
+ },
+ "transactionsPerMinute": 59999.99999999999,
+ },
+ Object {
+ "averageResponseTime": 5192.9,
+ "impact": 0,
+ "name": "POST unknown route",
+ "p95": 13230.5,
+ "sample": Object {
+ "@timestamp": "2018-11-18T18:43:50.994Z",
+ "agent": Object {
+ "hostname": "b359e3afece8",
+ "type": "apm-server",
+ "version": "7.0.0-alpha1",
+ },
+ "context": Object {
+ "custom": Object {
+ "containerId": 6102,
+ },
+ "process": Object {
+ "argv": Array [
+ "/usr/local/bin/node",
+ "/usr/local/lib/node_modules/pm2/lib/ProcessContainerFork.js",
+ ],
+ "pid": 19196,
+ "ppid": 1,
+ "title": "node /app/server.js",
+ },
+ "request": Object {
+ "body": "[REDACTED]",
+ "headers": Object {
+ "accept": "*/*",
+ "accept-encoding": "gzip, deflate",
+ "content-length": "380",
+ "content-type": "multipart/form-data; boundary=2b2e40be188a4cb5a56c05a0c182f6c9",
+ "elastic-apm-traceparent": "00-19688959ea6cbccda8013c11566ea329-1fc3665eef2dcdfc-01",
+ "host": "172.18.0.9:3000",
+ "user-agent": "Python/3.7 aiohttp/3.3.2",
+ "x-forwarded-for": "172.18.0.11",
+ },
+ "http_version": "1.1",
+ "method": "POST",
+ "socket": Object {
+ "encrypted": false,
+ "remote_address": "::ffff:172.18.0.9",
+ },
+ "url": Object {
+ "full": "http://172.18.0.9:3000/api/orders/csv",
+ "hostname": "172.18.0.9",
+ "pathname": "/api/orders/csv",
+ "port": "3000",
+ "protocol": "http:",
+ "raw": "/api/orders/csv",
+ },
+ },
+ "response": Object {
+ "headers": Object {
+ "connection": "keep-alive",
+ "content-length": "154",
+ "content-security-policy": "default-src 'self'",
+ "content-type": "text/html; charset=utf-8",
+ "date": "Sun, 18 Nov 2018 18:43:50 GMT",
+ "x-content-type-options": "nosniff",
+ "x-powered-by": "Express",
+ },
+ "status_code": 404,
+ },
+ "service": Object {
+ "agent": Object {
+ "name": "nodejs",
+ "version": "1.14.2",
+ },
+ "language": Object {
+ "name": "javascript",
+ },
+ "name": "opbeans-node",
+ "runtime": Object {
+ "name": "node",
+ "version": "8.12.0",
+ },
+ "version": "1.0.0",
+ },
+ "system": Object {
+ "architecture": "x64",
+ "hostname": "98195610c255",
+ "ip": "172.18.0.10",
+ "platform": "linux",
+ },
+ "tags": Object {
+ "foo": "bar",
+ "lorem": "ipsum dolor sit amet, consectetur adipiscing elit. Nulla finibus, ipsum id scelerisque consequat, enim leo vulputate massa, vel ultricies ante neque ac risus. Curabitur tincidunt vitae sapien id pulvinar. Mauris eu vestibulum tortor. Integer sit amet lorem fringilla, egestas tellus vitae, vulputate purus. Nulla feugiat blandit nunc et semper. Morbi purus libero, mattis sed mauris non, euismod iaculis lacus. Curabitur eleifend ante eros, non faucibus velit lacinia id. Duis posuere libero augue, at dignissim urna consectetur eget. Praesent eu congue est, iaculis finibus augue.",
+ "multi-line": "foo
+bar
+baz",
+ "this-is-a-very-long-tag-name-without-any-spaces": "test",
+ },
+ "user": Object {
+ "email": "kimchy@elastic.co",
+ "id": "42",
+ "username": "kimchy",
+ },
+ },
+ "host": Object {
+ "name": "b359e3afece8",
+ },
+ "parent": Object {
+ "id": "1fc3665eef2dcdfc",
+ },
+ "processor": Object {
+ "event": "transaction",
+ "name": "transaction",
+ },
+ "timestamp": Object {
+ "us": 1542566630994005,
+ },
+ "trace": Object {
+ "id": "19688959ea6cbccda8013c11566ea329",
+ },
+ "transaction": Object {
+ "duration": Object {
+ "us": 3467,
+ },
+ "id": "92c3ceea57899061",
+ "name": "POST unknown route",
+ "result": "HTTP 4xx",
+ "sampled": true,
+ "span_count": Object {
+ "started": 0,
+ },
+ "type": "request",
+ },
+ },
+ "transactionsPerMinute": 631.578947368421,
+ },
+ Object {
+ "averageResponseTime": 4694.005586592179,
+ "impact": 0.1498514997591876,
+ "name": "GET /is-it-coffee-time",
+ "p95": 11022.99999999992,
+ "sample": Object {
+ "@timestamp": "2018-11-18T20:46:19.317Z",
+ "agent": Object {
+ "hostname": "b359e3afece8",
+ "type": "apm-server",
+ "version": "7.0.0-alpha1",
+ },
+ "context": Object {
+ "custom": Object {
+ "containerId": 8593,
+ },
+ "process": Object {
+ "argv": Array [
+ "/usr/local/bin/node",
+ "/usr/local/lib/node_modules/pm2/lib/ProcessContainerFork.js",
+ ],
+ "pid": 2760,
+ "ppid": 1,
+ "title": "node /app/server.js",
+ },
+ "request": Object {
+ "headers": Object {
+ "connection": "close",
+ "host": "opbeans-node:3000",
+ "user-agent": "workload/2.4.3",
+ },
+ "http_version": "1.1",
+ "method": "GET",
+ "socket": Object {
+ "encrypted": false,
+ "remote_address": "::ffff:172.18.0.10",
+ },
+ "url": Object {
+ "full": "http://opbeans-node:3000/is-it-coffee-time",
+ "hostname": "opbeans-node",
+ "pathname": "/is-it-coffee-time",
+ "port": "3000",
+ "protocol": "http:",
+ "raw": "/is-it-coffee-time",
+ },
+ },
+ "response": Object {
+ "headers": Object {
+ "connection": "close",
+ "content-length": "148",
+ "content-security-policy": "default-src 'self'",
+ "content-type": "text/html; charset=utf-8",
+ "date": "Sun, 18 Nov 2018 20:46:19 GMT",
+ "x-content-type-options": "nosniff",
+ "x-powered-by": "Express",
+ },
+ "status_code": 500,
+ },
+ "service": Object {
+ "agent": Object {
+ "name": "nodejs",
+ "version": "1.14.2",
+ },
+ "language": Object {
+ "name": "javascript",
+ },
+ "name": "opbeans-node",
+ "runtime": Object {
+ "name": "node",
+ "version": "8.12.0",
+ },
+ "version": "1.0.0",
+ },
+ "system": Object {
+ "architecture": "x64",
+ "hostname": "98195610c255",
+ "ip": "172.18.0.10",
+ "platform": "linux",
+ },
+ "tags": Object {
+ "foo": "bar",
+ "lorem": "ipsum dolor sit amet, consectetur adipiscing elit. Nulla finibus, ipsum id scelerisque consequat, enim leo vulputate massa, vel ultricies ante neque ac risus. Curabitur tincidunt vitae sapien id pulvinar. Mauris eu vestibulum tortor. Integer sit amet lorem fringilla, egestas tellus vitae, vulputate purus. Nulla feugiat blandit nunc et semper. Morbi purus libero, mattis sed mauris non, euismod iaculis lacus. Curabitur eleifend ante eros, non faucibus velit lacinia id. Duis posuere libero augue, at dignissim urna consectetur eget. Praesent eu congue est, iaculis finibus augue.",
+ "multi-line": "foo
+bar
+baz",
+ "this-is-a-very-long-tag-name-without-any-spaces": "test",
+ },
+ "user": Object {
+ "email": "kimchy@elastic.co",
+ "id": "42",
+ "username": "kimchy",
+ },
+ },
+ "host": Object {
+ "name": "b359e3afece8",
+ },
+ "processor": Object {
+ "event": "transaction",
+ "name": "transaction",
+ },
+ "timestamp": Object {
+ "us": 1542573979317007,
+ },
+ "trace": Object {
+ "id": "821812b416de4c73ced87f8777fa46a6",
+ },
+ "transaction": Object {
+ "duration": Object {
+ "us": 4253,
+ },
+ "id": "319a5c555a1ab207",
+ "name": "GET /is-it-coffee-time",
+ "result": "HTTP 5xx",
+ "sampled": true,
+ "span_count": Object {
+ "started": 0,
+ },
+ "type": "request",
+ },
+ },
+ "transactionsPerMinute": 11305.263157894737,
+ },
+ Object {
+ "averageResponseTime": 4549.889880952381,
+ "impact": 0.1354336505457395,
+ "name": "GET /throw-error",
+ "p95": 7719.700000000001,
+ "sample": Object {
+ "@timestamp": "2018-11-18T20:47:10.714Z",
+ "agent": Object {
+ "hostname": "b359e3afece8",
+ "type": "apm-server",
+ "version": "7.0.0-alpha1",
+ },
+ "context": Object {
+ "custom": Object {
+ "containerId": 7220,
+ },
+ "process": Object {
+ "argv": Array [
+ "/usr/local/bin/node",
+ "/usr/local/lib/node_modules/pm2/lib/ProcessContainerFork.js",
+ ],
+ "pid": 2895,
+ "ppid": 1,
+ "title": "node /app/server.js",
+ },
+ "request": Object {
+ "headers": Object {
+ "connection": "close",
+ "host": "opbeans-node:3000",
+ "user-agent": "workload/2.4.3",
+ },
+ "http_version": "1.1",
+ "method": "GET",
+ "socket": Object {
+ "encrypted": false,
+ "remote_address": "::ffff:172.18.0.10",
+ },
+ "url": Object {
+ "full": "http://opbeans-node:3000/throw-error",
+ "hostname": "opbeans-node",
+ "pathname": "/throw-error",
+ "port": "3000",
+ "protocol": "http:",
+ "raw": "/throw-error",
+ },
+ },
+ "response": Object {
+ "headers": Object {
+ "connection": "close",
+ "content-length": "148",
+ "content-security-policy": "default-src 'self'",
+ "content-type": "text/html; charset=utf-8",
+ "date": "Sun, 18 Nov 2018 20:47:10 GMT",
+ "x-content-type-options": "nosniff",
+ "x-powered-by": "Express",
+ },
+ "status_code": 500,
+ },
+ "service": Object {
+ "agent": Object {
+ "name": "nodejs",
+ "version": "1.14.2",
+ },
+ "language": Object {
+ "name": "javascript",
+ },
+ "name": "opbeans-node",
+ "runtime": Object {
+ "name": "node",
+ "version": "8.12.0",
+ },
+ "version": "1.0.0",
+ },
+ "system": Object {
+ "architecture": "x64",
+ "hostname": "98195610c255",
+ "ip": "172.18.0.10",
+ "platform": "linux",
+ },
+ "tags": Object {
+ "foo": "bar",
+ "lorem": "ipsum dolor sit amet, consectetur adipiscing elit. Nulla finibus, ipsum id scelerisque consequat, enim leo vulputate massa, vel ultricies ante neque ac risus. Curabitur tincidunt vitae sapien id pulvinar. Mauris eu vestibulum tortor. Integer sit amet lorem fringilla, egestas tellus vitae, vulputate purus. Nulla feugiat blandit nunc et semper. Morbi purus libero, mattis sed mauris non, euismod iaculis lacus. Curabitur eleifend ante eros, non faucibus velit lacinia id. Duis posuere libero augue, at dignissim urna consectetur eget. Praesent eu congue est, iaculis finibus augue.",
+ "multi-line": "foo
+bar
+baz",
+ "this-is-a-very-long-tag-name-without-any-spaces": "test",
+ },
+ "user": Object {
+ "email": "kimchy@elastic.co",
+ "id": "42",
+ "username": "kimchy",
+ },
+ },
+ "host": Object {
+ "name": "b359e3afece8",
+ },
+ "processor": Object {
+ "event": "transaction",
+ "name": "transaction",
+ },
+ "timestamp": Object {
+ "us": 1542574030714012,
+ },
+ "trace": Object {
+ "id": "6c0ef23e1f963f304ce440a909914d35",
+ },
+ "transaction": Object {
+ "duration": Object {
+ "us": 4458,
+ },
+ "id": "ecd187dc53f09fbd",
+ "name": "GET /throw-error",
+ "result": "HTTP 5xx",
+ "sampled": true,
+ "span_count": Object {
+ "started": 0,
+ },
+ "type": "request",
+ },
+ },
+ "transactionsPerMinute": 10610.526315789473,
+ },
+ Object {
+ "averageResponseTime": 3504.5108924806746,
+ "impact": 2.36009934580083,
+ "name": "GET *",
+ "p95": 11431.738095238095,
+ "sample": Object {
+ "@timestamp": "2018-11-18T20:53:42.493Z",
+ "agent": Object {
+ "hostname": "b359e3afece8",
+ "type": "apm-server",
+ "version": "7.0.0-alpha1",
+ },
+ "context": Object {
+ "custom": Object {
+ "containerId": 6446,
+ },
+ "process": Object {
+ "argv": Array [
+ "/usr/local/bin/node",
+ "/usr/local/lib/node_modules/pm2/lib/ProcessContainerFork.js",
+ ],
+ "pid": 3756,
+ "ppid": 1,
+ "title": "node /app/server.js",
+ },
+ "request": Object {
+ "headers": Object {
+ "accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
+ "accept-encoding": "gzip, deflate",
+ "connection": "keep-alive",
+ "host": "opbeans-node:3000",
+ "if-modified-since": "Mon, 12 Nov 2018 10:27:07 GMT",
+ "if-none-match": "W/\\"280-1670775e878\\"",
+ "upgrade-insecure-requests": "1",
+ "user-agent": "Chromeless 1.4.0",
+ },
+ "http_version": "1.1",
+ "method": "GET",
+ "socket": Object {
+ "encrypted": false,
+ "remote_address": "::ffff:172.18.0.7",
+ },
+ "url": Object {
+ "full": "http://opbeans-node:3000/dashboard",
+ "hostname": "opbeans-node",
+ "pathname": "/dashboard",
+ "port": "3000",
+ "protocol": "http:",
+ "raw": "/dashboard",
+ },
+ },
+ "response": Object {
+ "headers": Object {
+ "accept-ranges": "bytes",
+ "cache-control": "public, max-age=0",
+ "connection": "keep-alive",
+ "date": "Sun, 18 Nov 2018 20:53:42 GMT",
+ "etag": "W/\\"280-1670775e878\\"",
+ "last-modified": "Mon, 12 Nov 2018 10:27:07 GMT",
+ "x-powered-by": "Express",
+ },
+ "status_code": 304,
+ },
+ "service": Object {
+ "agent": Object {
+ "name": "nodejs",
+ "version": "1.14.2",
+ },
+ "language": Object {
+ "name": "javascript",
+ },
+ "name": "opbeans-node",
+ "runtime": Object {
+ "name": "node",
+ "version": "8.12.0",
+ },
+ "version": "1.0.0",
+ },
+ "system": Object {
+ "architecture": "x64",
+ "hostname": "98195610c255",
+ "ip": "172.18.0.10",
+ "platform": "linux",
+ },
+ "tags": Object {
+ "foo": "bar",
+ "lorem": "ipsum dolor sit amet, consectetur adipiscing elit. Nulla finibus, ipsum id scelerisque consequat, enim leo vulputate massa, vel ultricies ante neque ac risus. Curabitur tincidunt vitae sapien id pulvinar. Mauris eu vestibulum tortor. Integer sit amet lorem fringilla, egestas tellus vitae, vulputate purus. Nulla feugiat blandit nunc et semper. Morbi purus libero, mattis sed mauris non, euismod iaculis lacus. Curabitur eleifend ante eros, non faucibus velit lacinia id. Duis posuere libero augue, at dignissim urna consectetur eget. Praesent eu congue est, iaculis finibus augue.",
+ "multi-line": "foo
+bar
+baz",
+ "this-is-a-very-long-tag-name-without-any-spaces": "test",
+ },
+ "user": Object {
+ "email": "kimchy@elastic.co",
+ "id": "42",
+ "username": "kimchy",
+ },
+ },
+ "host": Object {
+ "name": "b359e3afece8",
+ },
+ "processor": Object {
+ "event": "transaction",
+ "name": "transaction",
+ },
+ "timestamp": Object {
+ "us": 1542574422493006,
+ },
+ "trace": Object {
+ "id": "7efb6ade88cdea20cd96ca482681cde7",
+ },
+ "transaction": Object {
+ "duration": Object {
+ "us": 1901,
+ },
+ "id": "f5fc4621949b63fb",
+ "name": "GET *",
+ "result": "HTTP 3xx",
+ "sampled": true,
+ "span_count": Object {
+ "started": 0,
+ },
+ "type": "request",
+ },
+ },
+ "transactionsPerMinute": 224684.21052631576,
+ },
+ Object {
+ "averageResponseTime": 2742.4615384615386,
+ "impact": 0.08501029113483448,
+ "name": "OPTIONS unknown route",
+ "p95": 4370.000000000002,
+ "sample": Object {
+ "@timestamp": "2018-11-18T20:49:00.707Z",
+ "agent": Object {
+ "hostname": "b359e3afece8",
+ "type": "apm-server",
+ "version": "7.0.0-alpha1",
+ },
+ "context": Object {
+ "custom": Object {
+ "containerId": 3775,
+ },
+ "process": Object {
+ "argv": Array [
+ "/usr/local/bin/node",
+ "/usr/local/lib/node_modules/pm2/lib/ProcessContainerFork.js",
+ ],
+ "pid": 3142,
+ "ppid": 1,
+ "title": "node /app/server.js",
+ },
+ "request": Object {
+ "headers": Object {
+ "connection": "close",
+ "content-length": "0",
+ "host": "opbeans-node:3000",
+ "user-agent": "workload/2.4.3",
+ },
+ "http_version": "1.1",
+ "method": "OPTIONS",
+ "socket": Object {
+ "encrypted": false,
+ "remote_address": "::ffff:172.18.0.10",
+ },
+ "url": Object {
+ "full": "http://opbeans-node:3000/",
+ "hostname": "opbeans-node",
+ "pathname": "/",
+ "port": "3000",
+ "protocol": "http:",
+ "raw": "/",
+ },
+ },
+ "response": Object {
+ "headers": Object {
+ "allow": "GET,HEAD",
+ "connection": "close",
+ "content-length": "8",
+ "content-type": "text/html; charset=utf-8",
+ "date": "Sun, 18 Nov 2018 20:49:00 GMT",
+ "etag": "W/\\"8-ZRAf8oNBS3Bjb/SU2GYZCmbtmXg\\"",
+ "x-powered-by": "Express",
+ },
+ "status_code": 200,
+ },
+ "service": Object {
+ "agent": Object {
+ "name": "nodejs",
+ "version": "1.14.2",
+ },
+ "language": Object {
+ "name": "javascript",
+ },
+ "name": "opbeans-node",
+ "runtime": Object {
+ "name": "node",
+ "version": "8.12.0",
+ },
+ "version": "1.0.0",
+ },
+ "system": Object {
+ "architecture": "x64",
+ "hostname": "98195610c255",
+ "ip": "172.18.0.10",
+ "platform": "linux",
+ },
+ "tags": Object {
+ "foo": "bar",
+ "lorem": "ipsum dolor sit amet, consectetur adipiscing elit. Nulla finibus, ipsum id scelerisque consequat, enim leo vulputate massa, vel ultricies ante neque ac risus. Curabitur tincidunt vitae sapien id pulvinar. Mauris eu vestibulum tortor. Integer sit amet lorem fringilla, egestas tellus vitae, vulputate purus. Nulla feugiat blandit nunc et semper. Morbi purus libero, mattis sed mauris non, euismod iaculis lacus. Curabitur eleifend ante eros, non faucibus velit lacinia id. Duis posuere libero augue, at dignissim urna consectetur eget. Praesent eu congue est, iaculis finibus augue.",
+ "multi-line": "foo
+bar
+baz",
+ "this-is-a-very-long-tag-name-without-any-spaces": "test",
+ },
+ "user": Object {
+ "email": "kimchy@elastic.co",
+ "id": "42",
+ "username": "kimchy",
+ },
+ },
+ "host": Object {
+ "name": "b359e3afece8",
+ },
+ "processor": Object {
+ "event": "transaction",
+ "name": "transaction",
+ },
+ "timestamp": Object {
+ "us": 1542574140707006,
+ },
+ "trace": Object {
+ "id": "469e3e5f91ffe3195a8e58cdd1cdefa8",
+ },
+ "transaction": Object {
+ "duration": Object {
+ "us": 2371,
+ },
+ "id": "a8c87ebc7ec68bc0",
+ "name": "OPTIONS unknown route",
+ "result": "HTTP 2xx",
+ "sampled": true,
+ "span_count": Object {
+ "started": 0,
+ },
+ "type": "request",
+ },
+ },
+ "transactionsPerMinute": 11494.736842105262,
+ },
+ Object {
+ "averageResponseTime": 2651.8784461553205,
+ "impact": 15.770246498769827,
+ "name": "GET static file",
+ "p95": 6140.579335038363,
+ "sample": Object {
+ "@timestamp": "2018-11-18T20:53:43.304Z",
+ "agent": Object {
+ "hostname": "b359e3afece8",
+ "type": "apm-server",
+ "version": "7.0.0-alpha1",
+ },
+ "context": Object {
+ "process": Object {
+ "argv": Array [
+ "/usr/local/bin/node",
+ "/usr/local/lib/node_modules/pm2/lib/ProcessContainerFork.js",
+ ],
+ "pid": 3756,
+ "ppid": 1,
+ "title": "node /app/server.js",
+ },
+ "request": Object {
+ "headers": Object {
+ "accept": "*/*",
+ "host": "opbeans-node:3000",
+ "user-agent": "curl/7.38.0",
+ },
+ "http_version": "1.1",
+ "method": "GET",
+ "socket": Object {
+ "encrypted": false,
+ "remote_address": "::ffff:172.18.0.10",
+ },
+ "url": Object {
+ "full": "http://opbeans-node:3000/",
+ "hostname": "opbeans-node",
+ "pathname": "/",
+ "port": "3000",
+ "protocol": "http:",
+ "raw": "/",
+ },
+ },
+ "response": Object {
+ "headers": Object {
+ "accept-ranges": "bytes",
+ "cache-control": "public, max-age=0",
+ "connection": "keep-alive",
+ "content-length": "640",
+ "content-type": "text/html; charset=UTF-8",
+ "date": "Sun, 18 Nov 2018 20:53:43 GMT",
+ "etag": "W/\\"280-1670775e878\\"",
+ "last-modified": "Mon, 12 Nov 2018 10:27:07 GMT",
+ "x-powered-by": "Express",
+ },
+ "status_code": 200,
+ },
+ "service": Object {
+ "agent": Object {
+ "name": "nodejs",
+ "version": "1.14.2",
+ },
+ "language": Object {
+ "name": "javascript",
+ },
+ "name": "opbeans-node",
+ "runtime": Object {
+ "name": "node",
+ "version": "8.12.0",
+ },
+ "version": "1.0.0",
+ },
+ "system": Object {
+ "architecture": "x64",
+ "hostname": "98195610c255",
+ "ip": "172.18.0.10",
+ "platform": "linux",
+ },
+ },
+ "host": Object {
+ "name": "b359e3afece8",
+ },
+ "processor": Object {
+ "event": "transaction",
+ "name": "transaction",
+ },
+ "timestamp": Object {
+ "us": 1542574423304006,
+ },
+ "trace": Object {
+ "id": "b303d2a4a007946b63b9db7fafe639a0",
+ },
+ "transaction": Object {
+ "duration": Object {
+ "us": 1801,
+ },
+ "id": "2869c13633534be5",
+ "name": "GET static file",
+ "result": "HTTP 2xx",
+ "sampled": true,
+ "span_count": Object {
+ "started": 0,
+ },
+ "type": "request",
+ },
+ },
+ "transactionsPerMinute": 1977031.5789473683,
+ },
+ Object {
+ "averageResponseTime": 1422.926672899693,
+ "impact": 1.002712481568783,
+ "name": "GET unknown route",
+ "p95": 2311.885238095238,
+ "sample": Object {
+ "@timestamp": "2018-11-18T20:53:42.504Z",
+ "agent": Object {
+ "hostname": "b359e3afece8",
+ "type": "apm-server",
+ "version": "7.0.0-alpha1",
+ },
+ "context": Object {
+ "process": Object {
+ "argv": Array [
+ "/usr/local/bin/node",
+ "/usr/local/lib/node_modules/pm2/lib/ProcessContainerFork.js",
+ ],
+ "pid": 3756,
+ "ppid": 1,
+ "title": "node /app/server.js",
+ },
+ "request": Object {
+ "headers": Object {
+ "accept": "*/*",
+ "accept-encoding": "gzip, deflate",
+ "connection": "keep-alive",
+ "host": "opbeans-node:3000",
+ "referer": "http://opbeans-node:3000/dashboard",
+ "user-agent": "Chromeless 1.4.0",
+ },
+ "http_version": "1.1",
+ "method": "GET",
+ "socket": Object {
+ "encrypted": false,
+ "remote_address": "::ffff:172.18.0.7",
+ },
+ "url": Object {
+ "full": "http://opbeans-node:3000/rum-config.js",
+ "hostname": "opbeans-node",
+ "pathname": "/rum-config.js",
+ "port": "3000",
+ "protocol": "http:",
+ "raw": "/rum-config.js",
+ },
+ },
+ "response": Object {
+ "headers": Object {
+ "connection": "keep-alive",
+ "content-length": "172",
+ "content-type": "text/javascript",
+ "date": "Sun, 18 Nov 2018 20:53:42 GMT",
+ "x-powered-by": "Express",
+ },
+ "status_code": 200,
+ },
+ "service": Object {
+ "agent": Object {
+ "name": "nodejs",
+ "version": "1.14.2",
+ },
+ "language": Object {
+ "name": "javascript",
+ },
+ "name": "opbeans-node",
+ "runtime": Object {
+ "name": "node",
+ "version": "8.12.0",
+ },
+ "version": "1.0.0",
+ },
+ "system": Object {
+ "architecture": "x64",
+ "hostname": "98195610c255",
+ "ip": "172.18.0.10",
+ "platform": "linux",
+ },
+ },
+ "host": Object {
+ "name": "b359e3afece8",
+ },
+ "processor": Object {
+ "event": "transaction",
+ "name": "transaction",
+ },
+ "timestamp": Object {
+ "us": 1542574422504004,
+ },
+ "trace": Object {
+ "id": "4399e7233e6e7b77e70c2fff111b8f28",
+ },
+ "transaction": Object {
+ "duration": Object {
+ "us": 911,
+ },
+ "id": "107881ae2be1b56d",
+ "name": "GET unknown route",
+ "result": "HTTP 2xx",
+ "sampled": true,
+ "span_count": Object {
+ "started": 0,
+ },
+ "type": "request",
+ },
+ },
+ "transactionsPerMinute": 236431.5789473684,
+ },
+]
+`;
diff --git a/x-pack/plugins/apm/server/lib/transaction_groups/fetcher.test.ts b/x-pack/plugins/apm/server/lib/transaction_groups/fetcher.test.ts
new file mode 100644
index 0000000000000..cfbffe77222f3
--- /dev/null
+++ b/x-pack/plugins/apm/server/lib/transaction_groups/fetcher.test.ts
@@ -0,0 +1,34 @@
+/*
+ * 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 { ESResponse, transactionGroupsFetcher } from './fetcher';
+
+describe('transactionGroupsFetcher', () => {
+ let res: ESResponse;
+ let clientSpy: jest.Mock;
+ beforeEach(async () => {
+ clientSpy = jest.fn().mockResolvedValue('ES response');
+
+ const setup = {
+ start: 1528113600000,
+ end: 1528977600000,
+ client: clientSpy,
+ config: {
+ get: () => 'myIndex' as any
+ }
+ };
+ const bodyQuery = { my: 'bodyQuery' };
+ res = await transactionGroupsFetcher(setup, bodyQuery);
+ });
+
+ it('should call client with correct query', () => {
+ expect(clientSpy.mock.calls).toMatchSnapshot();
+ });
+
+ it('should return correct response', () => {
+ expect(res).toBe('ES response');
+ });
+});
diff --git a/x-pack/plugins/apm/server/lib/transaction_groups/fetcher.ts b/x-pack/plugins/apm/server/lib/transaction_groups/fetcher.ts
new file mode 100644
index 0000000000000..9ab287402c561
--- /dev/null
+++ b/x-pack/plugins/apm/server/lib/transaction_groups/fetcher.ts
@@ -0,0 +1,85 @@
+/*
+ * 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 { AggregationSearchResponse } from 'elasticsearch';
+import { StringMap } from 'x-pack/plugins/apm/typings/common';
+import {
+ TRANSACTION_DURATION,
+ TRANSACTION_NAME
+} from '../../../common/constants';
+import { Transaction } from '../../../typings/Transaction';
+import { Setup } from '../helpers/setup_request';
+
+interface Bucket {
+ key: string;
+ doc_count: number;
+ avg: {
+ value: number;
+ };
+ p95: {
+ values: {
+ '95.0': number;
+ };
+ };
+ sample: {
+ hits: {
+ total: number;
+ max_score: number | null;
+ hits: Array<{
+ _source: Transaction;
+ }>;
+ };
+ };
+}
+
+interface Aggs {
+ transactions: {
+ buckets: Bucket[];
+ };
+}
+
+export type ESResponse = AggregationSearchResponse;
+
+export function transactionGroupsFetcher(
+ setup: Setup,
+ bodyQuery: StringMap
+): Promise {
+ const { esFilterQuery, client, config } = setup;
+ const params = {
+ index: config.get('apm_oss.transactionIndices'),
+ body: {
+ size: 0,
+ query: bodyQuery,
+ aggs: {
+ transactions: {
+ terms: {
+ field: `${TRANSACTION_NAME}.keyword`,
+ order: { avg: 'desc' },
+ size: 100
+ },
+ aggs: {
+ sample: {
+ top_hits: {
+ size: 1,
+ sort: [{ '@timestamp': { order: 'desc' } }]
+ }
+ },
+ avg: { avg: { field: TRANSACTION_DURATION } },
+ p95: {
+ percentiles: { field: TRANSACTION_DURATION, percents: [95] }
+ }
+ }
+ }
+ }
+ }
+ };
+
+ if (esFilterQuery) {
+ params.body.query.bool.filter.push(esFilterQuery);
+ }
+
+ return client('search', params);
+}
diff --git a/x-pack/plugins/apm/server/lib/transaction_groups/index.ts b/x-pack/plugins/apm/server/lib/transaction_groups/index.ts
new file mode 100644
index 0000000000000..ae59a2f8e5e4f
--- /dev/null
+++ b/x-pack/plugins/apm/server/lib/transaction_groups/index.ts
@@ -0,0 +1,20 @@
+/*
+ * 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 { StringMap } from 'x-pack/plugins/apm/typings/common';
+import { Setup } from '../helpers/setup_request';
+import { transactionGroupsFetcher } from './fetcher';
+import { transactionGroupsTransformer } from './transform';
+
+export async function getTransactionGroups(setup: Setup, bodyQuery: StringMap) {
+ const { start, end } = setup;
+ const response = await transactionGroupsFetcher(setup, bodyQuery);
+ return transactionGroupsTransformer({
+ response,
+ start,
+ end
+ });
+}
diff --git a/x-pack/plugins/apm/server/lib/transaction_groups/mock-responses/transactionGroupsResponse.ts b/x-pack/plugins/apm/server/lib/transaction_groups/mock-responses/transactionGroupsResponse.ts
new file mode 100644
index 0000000000000..08492ee7a7839
--- /dev/null
+++ b/x-pack/plugins/apm/server/lib/transaction_groups/mock-responses/transactionGroupsResponse.ts
@@ -0,0 +1,2700 @@
+/*
+ * 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 { ESResponse } from '../fetcher';
+
+export const transactionGroupsResponse = ({
+ took: 139,
+ timed_out: false,
+ _shards: { total: 44, successful: 44, skipped: 0, failed: 0 },
+ hits: { total: 131557, max_score: null, hits: [] },
+ aggregations: {
+ transactions: {
+ doc_count_error_upper_bound: 0,
+ sum_other_doc_count: 0,
+ buckets: [
+ {
+ key: 'POST /api/orders',
+ doc_count: 180,
+ avg: { value: 255966.30555555556 },
+ p95: { values: { '95.0': 320238.5 } },
+ sample: {
+ hits: {
+ total: 180,
+ max_score: null,
+ hits: [
+ {
+ _index: 'apm-7.0.0-alpha1-2018.11.18',
+ _type: 'doc',
+ _id: 'TBGQKGcBVMxP8Wrugd8L',
+ _score: null,
+ _source: {
+ '@timestamp': '2018-11-18T20:43:32.010Z',
+ context: {
+ request: {
+ http_version: '1.1',
+ method: 'POST',
+ url: {
+ port: '3000',
+ pathname: '/api/orders',
+ full: 'http://opbeans-node:3000/api/orders',
+ raw: '/api/orders',
+ protocol: 'http:',
+ hostname: 'opbeans-node'
+ },
+ socket: {
+ encrypted: false,
+ remote_address: '::ffff:172.18.0.10'
+ },
+ headers: {
+ host: 'opbeans-node:3000',
+ accept: 'application/json',
+ 'content-type': 'application/json',
+ 'content-length': '129',
+ connection: 'close',
+ 'user-agent': 'workload/2.4.3'
+ },
+ body: '[REDACTED]'
+ },
+ response: {
+ status_code: 200,
+ headers: {
+ date: 'Sun, 18 Nov 2018 20:43:32 GMT',
+ connection: 'close',
+ 'x-powered-by': 'Express',
+ 'content-type': 'application/json; charset=utf-8',
+ 'content-length': '13',
+ etag: 'W/"d-g9K2iK4ordyN88lGL4LmPlYNfhc"'
+ }
+ },
+ system: {
+ ip: '172.18.0.10',
+ hostname: '98195610c255',
+ architecture: 'x64',
+ platform: 'linux'
+ },
+ process: {
+ argv: [
+ '/usr/local/bin/node',
+ '/usr/local/lib/node_modules/pm2/lib/ProcessContainerFork.js'
+ ],
+ pid: 2413,
+ ppid: 1,
+ title: 'node /app/server.js'
+ },
+ service: {
+ runtime: { name: 'node', version: '8.12.0' },
+ name: 'opbeans-node',
+ agent: { name: 'nodejs', version: '1.14.2' },
+ version: '1.0.0',
+ language: { name: 'javascript' }
+ },
+ user: {
+ id: '42',
+ username: 'kimchy',
+ email: 'kimchy@elastic.co'
+ },
+ tags: {
+ lorem:
+ 'ipsum dolor sit amet, consectetur adipiscing elit. Nulla finibus, ipsum id scelerisque consequat, enim leo vulputate massa, vel ultricies ante neque ac risus. Curabitur tincidunt vitae sapien id pulvinar. Mauris eu vestibulum tortor. Integer sit amet lorem fringilla, egestas tellus vitae, vulputate purus. Nulla feugiat blandit nunc et semper. Morbi purus libero, mattis sed mauris non, euismod iaculis lacus. Curabitur eleifend ante eros, non faucibus velit lacinia id. Duis posuere libero augue, at dignissim urna consectetur eget. Praesent eu congue est, iaculis finibus augue.',
+ 'this-is-a-very-long-tag-name-without-any-spaces':
+ 'test',
+ 'multi-line': 'foo\nbar\nbaz',
+ foo: 'bar'
+ },
+ custom: { containerId: 4669 }
+ },
+ trace: { id: '2b1252a338249daeecf6afb0c236e31b' },
+ timestamp: { us: 1542573812010006 },
+ agent: {
+ type: 'apm-server',
+ hostname: 'b359e3afece8',
+ version: '7.0.0-alpha1'
+ },
+ host: { name: 'b359e3afece8' },
+ processor: {
+ name: 'transaction',
+ event: 'transaction'
+ },
+ transaction: {
+ sampled: true,
+ span_count: { started: 16 },
+ id: '2c9f39e9ec4a0111',
+ name: 'POST /api/orders',
+ duration: { us: 291572 },
+ type: 'request',
+ result: 'HTTP 2xx'
+ }
+ },
+ sort: [1542573812010]
+ }
+ ]
+ }
+ }
+ },
+ {
+ key: 'GET /api',
+ doc_count: 21911,
+ avg: { value: 48021.972616494 },
+ p95: { values: { '95.0': 67138.18364917398 } },
+ sample: {
+ hits: {
+ total: 21911,
+ max_score: null,
+ hits: [
+ {
+ _index: 'apm-7.0.0-alpha1-2018.11.18',
+ _type: 'doc',
+ _id: '_hKZKGcBVMxP8Wru1G13',
+ _score: null,
+ _source: {
+ '@timestamp': '2018-11-18T20:53:44.070Z',
+ timestamp: { us: 1542574424070007 },
+ agent: {
+ hostname: 'b359e3afece8',
+ version: '7.0.0-alpha1',
+ type: 'apm-server'
+ },
+ host: { name: 'b359e3afece8' },
+ processor: {
+ name: 'transaction',
+ event: 'transaction'
+ },
+ transaction: {
+ sampled: true,
+ span_count: { started: 1 },
+ id: 'a78bca581dcd8ff8',
+ name: 'GET /api',
+ duration: { us: 8684 },
+ type: 'request',
+ result: 'HTTP 4xx'
+ },
+ context: {
+ response: {
+ status_code: 404,
+ headers: {
+ 'content-type': 'application/json;charset=UTF-8',
+ 'transfer-encoding': 'chunked',
+ date: 'Sun, 18 Nov 2018 20:53:43 GMT',
+ connection: 'close',
+ 'x-powered-by': 'Express'
+ }
+ },
+ system: {
+ hostname: '98195610c255',
+ architecture: 'x64',
+ platform: 'linux',
+ ip: '172.18.0.10'
+ },
+ process: {
+ argv: [
+ '/usr/local/bin/node',
+ '/usr/local/lib/node_modules/pm2/lib/ProcessContainerFork.js'
+ ],
+ pid: 3756,
+ ppid: 1,
+ title: 'node /app/server.js'
+ },
+ service: {
+ runtime: { name: 'node', version: '8.12.0' },
+ name: 'opbeans-node',
+ agent: { version: '1.14.2', name: 'nodejs' },
+ version: '1.0.0',
+ language: { name: 'javascript' }
+ },
+ user: {
+ id: '42',
+ username: 'kimchy',
+ email: 'kimchy@elastic.co'
+ },
+ tags: {
+ foo: 'bar',
+ lorem:
+ 'ipsum dolor sit amet, consectetur adipiscing elit. Nulla finibus, ipsum id scelerisque consequat, enim leo vulputate massa, vel ultricies ante neque ac risus. Curabitur tincidunt vitae sapien id pulvinar. Mauris eu vestibulum tortor. Integer sit amet lorem fringilla, egestas tellus vitae, vulputate purus. Nulla feugiat blandit nunc et semper. Morbi purus libero, mattis sed mauris non, euismod iaculis lacus. Curabitur eleifend ante eros, non faucibus velit lacinia id. Duis posuere libero augue, at dignissim urna consectetur eget. Praesent eu congue est, iaculis finibus augue.',
+ 'this-is-a-very-long-tag-name-without-any-spaces':
+ 'test',
+ 'multi-line': 'foo\nbar\nbaz'
+ },
+ custom: { containerId: 5176 },
+ request: {
+ method: 'GET',
+ url: {
+ protocol: 'http:',
+ hostname: 'opbeans-node',
+ port: '3000',
+ pathname: '/api/types/3',
+ full: 'http://opbeans-node:3000/api/types/3',
+ raw: '/api/types/3'
+ },
+ socket: {
+ encrypted: false,
+ remote_address: '::ffff:172.18.0.6'
+ },
+ headers: {
+ 'accept-encoding': 'gzip, deflate',
+ accept: '*/*',
+ connection: 'keep-alive',
+ 'elastic-apm-traceparent':
+ '00-86c68779d8a65b06fb78e770ffc436a5-4aaea53dc1791183-01',
+ host: 'opbeans-node:3000',
+ 'user-agent': 'python-requests/2.20.0'
+ },
+ http_version: '1.1'
+ }
+ },
+ parent: { id: '4aaea53dc1791183' },
+ trace: { id: '86c68779d8a65b06fb78e770ffc436a5' }
+ },
+ sort: [1542574424070]
+ }
+ ]
+ }
+ }
+ },
+ {
+ key: 'GET /api/orders',
+ doc_count: 3247,
+ avg: { value: 33265.03326147213 },
+ p95: { values: { '95.0': 58827.489999999976 } },
+ sample: {
+ hits: {
+ total: 3247,
+ max_score: null,
+ hits: [
+ {
+ _index: 'apm-7.0.0-alpha1-2018.11.18',
+ _type: 'doc',
+ _id: '6BKZKGcBVMxP8Wru1G13',
+ _score: null,
+ _source: {
+ '@timestamp': '2018-11-18T20:53:40.973Z',
+ timestamp: { us: 1542574420973006 },
+ agent: {
+ type: 'apm-server',
+ hostname: 'b359e3afece8',
+ version: '7.0.0-alpha1'
+ },
+ host: { name: 'b359e3afece8' },
+ processor: {
+ name: 'transaction',
+ event: 'transaction'
+ },
+ transaction: {
+ type: 'request',
+ result: 'HTTP 2xx',
+ sampled: true,
+ span_count: { started: 2 },
+ id: '89f200353eb50539',
+ name: 'GET /api/orders',
+ duration: { us: 23040 }
+ },
+ context: {
+ user: {
+ username: 'kimchy',
+ email: 'kimchy@elastic.co',
+ id: '42'
+ },
+ tags: {
+ foo: 'bar',
+ lorem:
+ 'ipsum dolor sit amet, consectetur adipiscing elit. Nulla finibus, ipsum id scelerisque consequat, enim leo vulputate massa, vel ultricies ante neque ac risus. Curabitur tincidunt vitae sapien id pulvinar. Mauris eu vestibulum tortor. Integer sit amet lorem fringilla, egestas tellus vitae, vulputate purus. Nulla feugiat blandit nunc et semper. Morbi purus libero, mattis sed mauris non, euismod iaculis lacus. Curabitur eleifend ante eros, non faucibus velit lacinia id. Duis posuere libero augue, at dignissim urna consectetur eget. Praesent eu congue est, iaculis finibus augue.',
+ 'this-is-a-very-long-tag-name-without-any-spaces':
+ 'test',
+ 'multi-line': 'foo\nbar\nbaz'
+ },
+ custom: { containerId: 408 },
+ request: {
+ method: 'GET',
+ url: {
+ full: 'http://opbeans-node:3000/api/orders',
+ raw: '/api/orders',
+ protocol: 'http:',
+ hostname: 'opbeans-node',
+ port: '3000',
+ pathname: '/api/orders'
+ },
+ socket: {
+ remote_address: '::ffff:172.18.0.10',
+ encrypted: false
+ },
+ headers: {
+ 'user-agent': 'workload/2.4.3',
+ host: 'opbeans-node:3000',
+ connection: 'close'
+ },
+ http_version: '1.1'
+ },
+ response: {
+ status_code: 200,
+ headers: {
+ etag: 'W/"194bc-cOw6+iRf7XCeqMXHrle3IOig7tY"',
+ date: 'Sun, 18 Nov 2018 20:53:40 GMT',
+ connection: 'close',
+ 'x-powered-by': 'Express',
+ 'content-type': 'application/json; charset=utf-8',
+ 'content-length': '103612'
+ }
+ },
+ system: {
+ platform: 'linux',
+ ip: '172.18.0.10',
+ hostname: '98195610c255',
+ architecture: 'x64'
+ },
+ process: {
+ title: 'node /app/server.js',
+ argv: [
+ '/usr/local/bin/node',
+ '/usr/local/lib/node_modules/pm2/lib/ProcessContainerFork.js'
+ ],
+ pid: 3756,
+ ppid: 1
+ },
+ service: {
+ version: '1.0.0',
+ language: { name: 'javascript' },
+ runtime: { name: 'node', version: '8.12.0' },
+ name: 'opbeans-node',
+ agent: { version: '1.14.2', name: 'nodejs' }
+ }
+ },
+ trace: { id: '0afce85f593cbbdd09949936fe964f0f' }
+ },
+ sort: [1542574420973]
+ }
+ ]
+ }
+ }
+ },
+ {
+ key: 'GET /log-message',
+ doc_count: 700,
+ avg: { value: 32900.72714285714 },
+ p95: { values: { '95.0': 40444 } },
+ sample: {
+ hits: {
+ total: 700,
+ max_score: null,
+ hits: [
+ {
+ _index: 'apm-7.0.0-alpha1-2018.11.18',
+ _type: 'doc',
+ _id: 'qBKVKGcBVMxP8Wruqi_j',
+ _score: null,
+ _source: {
+ '@timestamp': '2018-11-18T20:49:09.225Z',
+ processor: {
+ name: 'transaction',
+ event: 'transaction'
+ },
+ transaction: {
+ sampled: true,
+ span_count: { started: 0 },
+ id: 'b9a8f96d7554d09f',
+ name: 'GET /log-message',
+ duration: { us: 32381 },
+ type: 'request',
+ result: 'HTTP 5xx'
+ },
+ context: {
+ user: {
+ id: '42',
+ username: 'kimchy',
+ email: 'kimchy@elastic.co'
+ },
+ tags: {
+ lorem:
+ 'ipsum dolor sit amet, consectetur adipiscing elit. Nulla finibus, ipsum id scelerisque consequat, enim leo vulputate massa, vel ultricies ante neque ac risus. Curabitur tincidunt vitae sapien id pulvinar. Mauris eu vestibulum tortor. Integer sit amet lorem fringilla, egestas tellus vitae, vulputate purus. Nulla feugiat blandit nunc et semper. Morbi purus libero, mattis sed mauris non, euismod iaculis lacus. Curabitur eleifend ante eros, non faucibus velit lacinia id. Duis posuere libero augue, at dignissim urna consectetur eget. Praesent eu congue est, iaculis finibus augue.',
+ 'this-is-a-very-long-tag-name-without-any-spaces':
+ 'test',
+ 'multi-line': 'foo\nbar\nbaz',
+ foo: 'bar'
+ },
+ custom: { containerId: 321 },
+ request: {
+ socket: {
+ remote_address: '::ffff:172.18.0.10',
+ encrypted: false
+ },
+ headers: {
+ 'user-agent': 'workload/2.4.3',
+ host: 'opbeans-node:3000',
+ connection: 'close'
+ },
+ http_version: '1.1',
+ method: 'GET',
+ url: {
+ raw: '/log-message',
+ protocol: 'http:',
+ hostname: 'opbeans-node',
+ port: '3000',
+ pathname: '/log-message',
+ full: 'http://opbeans-node:3000/log-message'
+ }
+ },
+ response: {
+ status_code: 500,
+ headers: {
+ 'x-powered-by': 'Express',
+ 'content-type': 'text/html; charset=utf-8',
+ 'content-length': '24',
+ etag: 'W/"18-MS3VbhH7auHMzO0fUuNF6v14N/M"',
+ date: 'Sun, 18 Nov 2018 20:49:09 GMT',
+ connection: 'close'
+ }
+ },
+ system: {
+ ip: '172.18.0.10',
+ hostname: '98195610c255',
+ architecture: 'x64',
+ platform: 'linux'
+ },
+ process: {
+ title: 'node /app/server.js',
+ argv: [
+ '/usr/local/bin/node',
+ '/usr/local/lib/node_modules/pm2/lib/ProcessContainerFork.js'
+ ],
+ pid: 3142,
+ ppid: 1
+ },
+ service: {
+ language: { name: 'javascript' },
+ runtime: { version: '8.12.0', name: 'node' },
+ name: 'opbeans-node',
+ agent: { name: 'nodejs', version: '1.14.2' },
+ version: '1.0.0'
+ }
+ },
+ trace: { id: 'ba18b741cdd3ac83eca89a5fede47577' },
+ timestamp: { us: 1542574149225004 },
+ agent: {
+ type: 'apm-server',
+ hostname: 'b359e3afece8',
+ version: '7.0.0-alpha1'
+ },
+ host: { name: 'b359e3afece8' }
+ },
+ sort: [1542574149225]
+ }
+ ]
+ }
+ }
+ },
+ {
+ key: 'GET /api/stats',
+ doc_count: 4639,
+ avg: { value: 32554.36257814184 },
+ p95: { values: { '95.0': 59356.73611111111 } },
+ sample: {
+ hits: {
+ total: 4639,
+ max_score: null,
+ hits: [
+ {
+ _index: 'apm-7.0.0-alpha1-2018.11.18',
+ _type: 'doc',
+ _id: '9hKZKGcBVMxP8Wru1G13',
+ _score: null,
+ _source: {
+ '@timestamp': '2018-11-18T20:53:42.560Z',
+ trace: { id: '63ccc3b0929dafb7f2fbcabdc7f7af25' },
+ timestamp: { us: 1542574422560002 },
+ agent: {
+ hostname: 'b359e3afece8',
+ version: '7.0.0-alpha1',
+ type: 'apm-server'
+ },
+ host: { name: 'b359e3afece8' },
+ processor: {
+ name: 'transaction',
+ event: 'transaction'
+ },
+ transaction: {
+ sampled: true,
+ span_count: { started: 7 },
+ id: 'fb754e7628da2fb5',
+ name: 'GET /api/stats',
+ duration: { us: 28753 },
+ type: 'request',
+ result: 'HTTP 3xx'
+ },
+ context: {
+ response: {
+ headers: {
+ 'x-powered-by': 'Express',
+ etag: 'W/"77-uxKJrX5GSMJJWTKh3orUFAEVxSs"',
+ date: 'Sun, 18 Nov 2018 20:53:42 GMT',
+ connection: 'keep-alive'
+ },
+ status_code: 304
+ },
+ system: {
+ ip: '172.18.0.10',
+ hostname: '98195610c255',
+ architecture: 'x64',
+ platform: 'linux'
+ },
+ process: {
+ pid: 3756,
+ ppid: 1,
+ title: 'node /app/server.js',
+ argv: [
+ '/usr/local/bin/node',
+ '/usr/local/lib/node_modules/pm2/lib/ProcessContainerFork.js'
+ ]
+ },
+ service: {
+ name: 'opbeans-node',
+ agent: { version: '1.14.2', name: 'nodejs' },
+ version: '1.0.0',
+ language: { name: 'javascript' },
+ runtime: { name: 'node', version: '8.12.0' }
+ },
+ user: {
+ email: 'kimchy@elastic.co',
+ id: '42',
+ username: 'kimchy'
+ },
+ tags: {
+ 'multi-line': 'foo\nbar\nbaz',
+ foo: 'bar',
+ lorem:
+ 'ipsum dolor sit amet, consectetur adipiscing elit. Nulla finibus, ipsum id scelerisque consequat, enim leo vulputate massa, vel ultricies ante neque ac risus. Curabitur tincidunt vitae sapien id pulvinar. Mauris eu vestibulum tortor. Integer sit amet lorem fringilla, egestas tellus vitae, vulputate purus. Nulla feugiat blandit nunc et semper. Morbi purus libero, mattis sed mauris non, euismod iaculis lacus. Curabitur eleifend ante eros, non faucibus velit lacinia id. Duis posuere libero augue, at dignissim urna consectetur eget. Praesent eu congue est, iaculis finibus augue.',
+ 'this-is-a-very-long-tag-name-without-any-spaces':
+ 'test'
+ },
+ custom: { containerId: 207 },
+ request: {
+ url: {
+ protocol: 'http:',
+ hostname: 'opbeans-node',
+ port: '3000',
+ pathname: '/api/stats',
+ full: 'http://opbeans-node:3000/api/stats',
+ raw: '/api/stats'
+ },
+ socket: {
+ remote_address: '::ffff:172.18.0.7',
+ encrypted: false
+ },
+ headers: {
+ 'if-none-match': 'W/"77-uxKJrX5GSMJJWTKh3orUFAEVxSs"',
+ host: 'opbeans-node:3000',
+ connection: 'keep-alive',
+ 'user-agent': 'Chromeless 1.4.0',
+ 'elastic-apm-traceparent':
+ '00-63ccc3b0929dafb7f2fbcabdc7f7af25-821a787e73ab1563-01',
+ accept: '*/*',
+ referer: 'http://opbeans-node:3000/dashboard',
+ 'accept-encoding': 'gzip, deflate'
+ },
+ http_version: '1.1',
+ method: 'GET'
+ }
+ },
+ parent: { id: '821a787e73ab1563' }
+ },
+ sort: [1542574422560]
+ }
+ ]
+ }
+ }
+ },
+ {
+ key: 'GET /log-error',
+ doc_count: 736,
+ avg: { value: 32387.73641304348 },
+ p95: { values: { '95.0': 40061.1 } },
+ sample: {
+ hits: {
+ total: 736,
+ max_score: null,
+ hits: [
+ {
+ _index: 'apm-7.0.0-alpha1-2018.11.18',
+ _type: 'doc',
+ _id: 'rBKYKGcBVMxP8Wru9mC0',
+ _score: null,
+ _source: {
+ '@timestamp': '2018-11-18T20:52:51.462Z',
+ host: { name: 'b359e3afece8' },
+ agent: {
+ type: 'apm-server',
+ hostname: 'b359e3afece8',
+ version: '7.0.0-alpha1'
+ },
+ processor: {
+ name: 'transaction',
+ event: 'transaction'
+ },
+ transaction: {
+ sampled: true,
+ span_count: { started: 0 },
+ id: 'ec9c465c5042ded8',
+ name: 'GET /log-error',
+ duration: { us: 33367 },
+ type: 'request',
+ result: 'HTTP 5xx'
+ },
+ context: {
+ service: {
+ name: 'opbeans-node',
+ agent: { version: '1.14.2', name: 'nodejs' },
+ version: '1.0.0',
+ language: { name: 'javascript' },
+ runtime: { name: 'node', version: '8.12.0' }
+ },
+ user: {
+ id: '42',
+ username: 'kimchy',
+ email: 'kimchy@elastic.co'
+ },
+ tags: {
+ 'multi-line': 'foo\nbar\nbaz',
+ foo: 'bar',
+ lorem:
+ 'ipsum dolor sit amet, consectetur adipiscing elit. Nulla finibus, ipsum id scelerisque consequat, enim leo vulputate massa, vel ultricies ante neque ac risus. Curabitur tincidunt vitae sapien id pulvinar. Mauris eu vestibulum tortor. Integer sit amet lorem fringilla, egestas tellus vitae, vulputate purus. Nulla feugiat blandit nunc et semper. Morbi purus libero, mattis sed mauris non, euismod iaculis lacus. Curabitur eleifend ante eros, non faucibus velit lacinia id. Duis posuere libero augue, at dignissim urna consectetur eget. Praesent eu congue est, iaculis finibus augue.',
+ 'this-is-a-very-long-tag-name-without-any-spaces':
+ 'test'
+ },
+ custom: { containerId: 4877 },
+ request: {
+ http_version: '1.1',
+ method: 'GET',
+ url: {
+ full: 'http://opbeans-node:3000/log-error',
+ raw: '/log-error',
+ protocol: 'http:',
+ hostname: 'opbeans-node',
+ port: '3000',
+ pathname: '/log-error'
+ },
+ socket: {
+ remote_address: '::ffff:172.18.0.10',
+ encrypted: false
+ },
+ headers: {
+ 'user-agent': 'workload/2.4.3',
+ host: 'opbeans-node:3000',
+ connection: 'close'
+ }
+ },
+ response: {
+ headers: {
+ date: 'Sun, 18 Nov 2018 20:52:51 GMT',
+ connection: 'close',
+ 'x-powered-by': 'Express',
+ 'content-type': 'text/html; charset=utf-8',
+ 'content-length': '24',
+ etag: 'W/"18-MS3VbhH7auHMzO0fUuNF6v14N/M"'
+ },
+ status_code: 500
+ },
+ system: {
+ architecture: 'x64',
+ platform: 'linux',
+ ip: '172.18.0.10',
+ hostname: '98195610c255'
+ },
+ process: {
+ argv: [
+ '/usr/local/bin/node',
+ '/usr/local/lib/node_modules/pm2/lib/ProcessContainerFork.js'
+ ],
+ pid: 3659,
+ ppid: 1,
+ title: 'node /app/server.js'
+ }
+ },
+ trace: { id: '15366d65659b5fc8f67ff127391b3aff' },
+ timestamp: { us: 1542574371462005 }
+ },
+ sort: [1542574371462]
+ }
+ ]
+ }
+ }
+ },
+ {
+ key: 'GET /api/customers',
+ doc_count: 3366,
+ avg: { value: 32159.926322043968 },
+ p95: { values: { '95.0': 59845.85714285714 } },
+ sample: {
+ hits: {
+ total: 3366,
+ max_score: null,
+ hits: [
+ {
+ _index: 'apm-7.0.0-alpha1-2018.11.18',
+ _type: 'doc',
+ _id: 'aRKZKGcBVMxP8Wruf2ly',
+ _score: null,
+ _source: {
+ '@timestamp': '2018-11-18T20:53:21.180Z',
+ transaction: {
+ sampled: true,
+ span_count: { started: 2 },
+ id: '94852b9dd1075982',
+ name: 'GET /api/customers',
+ duration: { us: 18077 },
+ type: 'request',
+ result: 'HTTP 2xx'
+ },
+ context: {
+ user: {
+ id: '42',
+ username: 'kimchy',
+ email: 'kimchy@elastic.co'
+ },
+ tags: {
+ foo: 'bar',
+ lorem:
+ 'ipsum dolor sit amet, consectetur adipiscing elit. Nulla finibus, ipsum id scelerisque consequat, enim leo vulputate massa, vel ultricies ante neque ac risus. Curabitur tincidunt vitae sapien id pulvinar. Mauris eu vestibulum tortor. Integer sit amet lorem fringilla, egestas tellus vitae, vulputate purus. Nulla feugiat blandit nunc et semper. Morbi purus libero, mattis sed mauris non, euismod iaculis lacus. Curabitur eleifend ante eros, non faucibus velit lacinia id. Duis posuere libero augue, at dignissim urna consectetur eget. Praesent eu congue est, iaculis finibus augue.',
+ 'this-is-a-very-long-tag-name-without-any-spaces':
+ 'test',
+ 'multi-line': 'foo\nbar\nbaz'
+ },
+ custom: { containerId: 2531 },
+ request: {
+ http_version: '1.1',
+ method: 'GET',
+ url: {
+ protocol: 'http:',
+ hostname: 'opbeans-node',
+ port: '3000',
+ pathname: '/api/customers',
+ full: 'http://opbeans-node:3000/api/customers',
+ raw: '/api/customers'
+ },
+ socket: {
+ remote_address: '::ffff:172.18.0.6',
+ encrypted: false
+ },
+ headers: {
+ accept: '*/*',
+ connection: 'keep-alive',
+ 'elastic-apm-traceparent':
+ '00-541025da8ecc2f51f21c1a4ad6992b77-ca18d9d4c3879519-01',
+ host: 'opbeans-node:3000',
+ 'user-agent': 'python-requests/2.20.0',
+ 'accept-encoding': 'gzip, deflate'
+ }
+ },
+ response: {
+ status_code: 200,
+ headers: {
+ etag: 'W/"2d991-yG3J8W/roH7fSxXTudZrO27Ax9s"',
+ date: 'Sun, 18 Nov 2018 20:53:21 GMT',
+ connection: 'keep-alive',
+ 'x-powered-by': 'Express',
+ 'content-type': 'application/json; charset=utf-8',
+ 'content-length': '186769'
+ }
+ },
+ system: {
+ platform: 'linux',
+ ip: '172.18.0.10',
+ hostname: '98195610c255',
+ architecture: 'x64'
+ },
+ process: {
+ title: 'node /app/server.js',
+ argv: [
+ '/usr/local/bin/node',
+ '/usr/local/lib/node_modules/pm2/lib/ProcessContainerFork.js'
+ ],
+ pid: 3710,
+ ppid: 1
+ },
+ service: {
+ version: '1.0.0',
+ language: { name: 'javascript' },
+ runtime: { name: 'node', version: '8.12.0' },
+ name: 'opbeans-node',
+ agent: { version: '1.14.2', name: 'nodejs' }
+ }
+ },
+ parent: { id: 'ca18d9d4c3879519' },
+ trace: { id: '541025da8ecc2f51f21c1a4ad6992b77' },
+ timestamp: { us: 1542574401180002 },
+ agent: {
+ type: 'apm-server',
+ hostname: 'b359e3afece8',
+ version: '7.0.0-alpha1'
+ },
+ host: { name: 'b359e3afece8' },
+ processor: {
+ name: 'transaction',
+ event: 'transaction'
+ }
+ },
+ sort: [1542574401180]
+ }
+ ]
+ }
+ }
+ },
+ {
+ key: 'GET /api/products/top',
+ doc_count: 3694,
+ avg: { value: 27516.89144558744 },
+ p95: { values: { '95.0': 56064.679999999986 } },
+ sample: {
+ hits: {
+ total: 3694,
+ max_score: null,
+ hits: [
+ {
+ _index: 'apm-7.0.0-alpha1-2018.11.18',
+ _type: 'doc',
+ _id: 'LhKZKGcBVMxP8WruHWMl',
+ _score: null,
+ _source: {
+ '@timestamp': '2018-11-18T20:52:57.316Z',
+ host: { name: 'b359e3afece8' },
+ agent: {
+ type: 'apm-server',
+ hostname: 'b359e3afece8',
+ version: '7.0.0-alpha1'
+ },
+ processor: {
+ name: 'transaction',
+ event: 'transaction'
+ },
+ transaction: {
+ span_count: { started: 4 },
+ id: 'be4bd5475d5d9e6f',
+ name: 'GET /api/products/top',
+ duration: { us: 48781 },
+ type: 'request',
+ result: 'HTTP 2xx',
+ sampled: true
+ },
+ context: {
+ request: {
+ headers: {
+ host: 'opbeans-node:3000',
+ connection: 'keep-alive',
+ 'user-agent': 'Chromeless 1.4.0',
+ 'elastic-apm-traceparent':
+ '00-74f12e705936d66350f4741ebeb55189-fcebe94cd2136215-01',
+ accept: '*/*',
+ referer: 'http://opbeans-node:3000/dashboard',
+ 'accept-encoding': 'gzip, deflate'
+ },
+ http_version: '1.1',
+ method: 'GET',
+ url: {
+ port: '3000',
+ pathname: '/api/products/top',
+ full: 'http://opbeans-node:3000/api/products/top',
+ raw: '/api/products/top',
+ protocol: 'http:',
+ hostname: 'opbeans-node'
+ },
+ socket: {
+ remote_address: '::ffff:172.18.0.7',
+ encrypted: false
+ }
+ },
+ response: {
+ status_code: 200,
+ headers: {
+ 'x-powered-by': 'Express',
+ 'content-type': 'application/json; charset=utf-8',
+ 'content-length': '282',
+ etag: 'W/"11a-lcI9zuMZYYsDRpEZgYqDYr96cKM"',
+ date: 'Sun, 18 Nov 2018 20:52:57 GMT',
+ connection: 'keep-alive'
+ }
+ },
+ system: {
+ hostname: '98195610c255',
+ architecture: 'x64',
+ platform: 'linux',
+ ip: '172.18.0.10'
+ },
+ process: {
+ title: 'node /app/server.js',
+ argv: [
+ '/usr/local/bin/node',
+ '/usr/local/lib/node_modules/pm2/lib/ProcessContainerFork.js'
+ ],
+ pid: 3686,
+ ppid: 1
+ },
+ service: {
+ version: '1.0.0',
+ language: { name: 'javascript' },
+ runtime: { name: 'node', version: '8.12.0' },
+ name: 'opbeans-node',
+ agent: { name: 'nodejs', version: '1.14.2' }
+ },
+ user: {
+ username: 'kimchy',
+ email: 'kimchy@elastic.co',
+ id: '42'
+ },
+ tags: {
+ foo: 'bar',
+ lorem:
+ 'ipsum dolor sit amet, consectetur adipiscing elit. Nulla finibus, ipsum id scelerisque consequat, enim leo vulputate massa, vel ultricies ante neque ac risus. Curabitur tincidunt vitae sapien id pulvinar. Mauris eu vestibulum tortor. Integer sit amet lorem fringilla, egestas tellus vitae, vulputate purus. Nulla feugiat blandit nunc et semper. Morbi purus libero, mattis sed mauris non, euismod iaculis lacus. Curabitur eleifend ante eros, non faucibus velit lacinia id. Duis posuere libero augue, at dignissim urna consectetur eget. Praesent eu congue est, iaculis finibus augue.',
+ 'this-is-a-very-long-tag-name-without-any-spaces':
+ 'test',
+ 'multi-line': 'foo\nbar\nbaz'
+ },
+ custom: { containerId: 5113 }
+ },
+ parent: { id: 'fcebe94cd2136215' },
+ trace: { id: '74f12e705936d66350f4741ebeb55189' },
+ timestamp: { us: 1542574377316005 }
+ },
+ sort: [1542574377316]
+ }
+ ]
+ }
+ }
+ },
+ {
+ key: 'POST /api',
+ doc_count: 147,
+ avg: { value: 21331.714285714286 },
+ p95: { values: { '95.0': 30938 } },
+ sample: {
+ hits: {
+ total: 147,
+ max_score: null,
+ hits: [
+ {
+ _index: 'apm-7.0.0-alpha1-2018.11.18',
+ _type: 'doc',
+ _id: 'DhGDKGcBVMxP8WruzRXV',
+ _score: null,
+ _source: {
+ '@timestamp': '2018-11-18T20:29:42.751Z',
+ transaction: {
+ duration: { us: 21083 },
+ type: 'request',
+ result: 'HTTP 4xx',
+ sampled: true,
+ span_count: { started: 1 },
+ id: 'd67c2f7aa897110c',
+ name: 'POST /api'
+ },
+ context: {
+ user: {
+ email: 'kimchy@elastic.co',
+ id: '42',
+ username: 'kimchy'
+ },
+ tags: {
+ 'multi-line': 'foo\nbar\nbaz',
+ foo: 'bar',
+ lorem:
+ 'ipsum dolor sit amet, consectetur adipiscing elit. Nulla finibus, ipsum id scelerisque consequat, enim leo vulputate massa, vel ultricies ante neque ac risus. Curabitur tincidunt vitae sapien id pulvinar. Mauris eu vestibulum tortor. Integer sit amet lorem fringilla, egestas tellus vitae, vulputate purus. Nulla feugiat blandit nunc et semper. Morbi purus libero, mattis sed mauris non, euismod iaculis lacus. Curabitur eleifend ante eros, non faucibus velit lacinia id. Duis posuere libero augue, at dignissim urna consectetur eget. Praesent eu congue est, iaculis finibus augue.',
+ 'this-is-a-very-long-tag-name-without-any-spaces':
+ 'test'
+ },
+ custom: { containerId: 2927 },
+ request: {
+ url: {
+ raw: '/api/orders',
+ protocol: 'http:',
+ hostname: 'opbeans-node',
+ port: '3000',
+ pathname: '/api/orders',
+ full: 'http://opbeans-node:3000/api/orders'
+ },
+ socket: {
+ encrypted: false,
+ remote_address: '::ffff:172.18.0.10'
+ },
+ headers: {
+ accept: 'application/json',
+ 'content-type': 'application/json',
+ 'content-length': '129',
+ connection: 'close',
+ 'user-agent': 'workload/2.4.3',
+ host: 'opbeans-node:3000'
+ },
+ body: '[REDACTED]',
+ http_version: '1.1',
+ method: 'POST'
+ },
+ response: {
+ status_code: 400,
+ headers: {
+ 'x-powered-by': 'Express',
+ date: 'Sun, 18 Nov 2018 20:29:42 GMT',
+ 'content-length': '0',
+ connection: 'close'
+ }
+ },
+ system: {
+ hostname: '98195610c255',
+ architecture: 'x64',
+ platform: 'linux',
+ ip: '172.18.0.10'
+ },
+ process: {
+ pid: 546,
+ ppid: 1,
+ title: 'node /app/server.js',
+ argv: [
+ '/usr/local/bin/node',
+ '/usr/local/lib/node_modules/pm2/lib/ProcessContainerFork.js'
+ ]
+ },
+ service: {
+ agent: { name: 'nodejs', version: '1.14.2' },
+ version: '1.0.0',
+ language: { name: 'javascript' },
+ runtime: { name: 'node', version: '8.12.0' },
+ name: 'opbeans-node'
+ }
+ },
+ trace: { id: '8ed4d94ec8fc11b1ea1b0aa59c2320ff' },
+ timestamp: { us: 1542572982751005 },
+ agent: {
+ version: '7.0.0-alpha1',
+ type: 'apm-server',
+ hostname: 'b359e3afece8'
+ },
+ host: { name: 'b359e3afece8' },
+ processor: {
+ name: 'transaction',
+ event: 'transaction'
+ }
+ },
+ sort: [1542572982751]
+ }
+ ]
+ }
+ }
+ },
+ {
+ key: 'GET /api/products/:id/customers',
+ doc_count: 2102,
+ avg: { value: 17189.329210275926 },
+ p95: { values: { '95.0': 39284.79999999999 } },
+ sample: {
+ hits: {
+ total: 2102,
+ max_score: null,
+ hits: [
+ {
+ _index: 'apm-7.0.0-alpha1-2018.11.18',
+ _type: 'doc',
+ _id: 'lhKVKGcBVMxP8WruDCUH',
+ _score: null,
+ _source: {
+ '@timestamp': '2018-11-18T20:48:24.769Z',
+ agent: {
+ type: 'apm-server',
+ hostname: 'b359e3afece8',
+ version: '7.0.0-alpha1'
+ },
+ host: { name: 'b359e3afece8' },
+ processor: {
+ event: 'transaction',
+ name: 'transaction'
+ },
+ transaction: {
+ type: 'request',
+ result: 'HTTP 2xx',
+ sampled: true,
+ span_count: { started: 1 },
+ id: '2a87ae20ad04ee0c',
+ name: 'GET /api/products/:id/customers',
+ duration: { us: 49338 }
+ },
+ context: {
+ user: {
+ id: '42',
+ username: 'kimchy',
+ email: 'kimchy@elastic.co'
+ },
+ tags: {
+ lorem:
+ 'ipsum dolor sit amet, consectetur adipiscing elit. Nulla finibus, ipsum id scelerisque consequat, enim leo vulputate massa, vel ultricies ante neque ac risus. Curabitur tincidunt vitae sapien id pulvinar. Mauris eu vestibulum tortor. Integer sit amet lorem fringilla, egestas tellus vitae, vulputate purus. Nulla feugiat blandit nunc et semper. Morbi purus libero, mattis sed mauris non, euismod iaculis lacus. Curabitur eleifend ante eros, non faucibus velit lacinia id. Duis posuere libero augue, at dignissim urna consectetur eget. Praesent eu congue est, iaculis finibus augue.',
+ 'this-is-a-very-long-tag-name-without-any-spaces':
+ 'test',
+ 'multi-line': 'foo\nbar\nbaz',
+ foo: 'bar'
+ },
+ custom: { containerId: 1735 },
+ request: {
+ headers: {
+ accept: '*/*',
+ connection: 'keep-alive',
+ 'elastic-apm-traceparent':
+ '00-28f178c354d17f400dea04bc4a7b3c57-68f5d1607cac7779-01',
+ host: 'opbeans-node:3000',
+ 'user-agent': 'python-requests/2.20.0',
+ 'accept-encoding': 'gzip, deflate'
+ },
+ http_version: '1.1',
+ method: 'GET',
+ url: {
+ port: '3000',
+ pathname: '/api/products/2/customers',
+ full:
+ 'http://opbeans-node:3000/api/products/2/customers',
+ raw: '/api/products/2/customers',
+ protocol: 'http:',
+ hostname: 'opbeans-node'
+ },
+ socket: {
+ remote_address: '::ffff:172.18.0.6',
+ encrypted: false
+ }
+ },
+ response: {
+ status_code: 200,
+ headers: {
+ 'content-length': '186570',
+ etag: 'W/"2d8ca-Z9NzuHyGyxwtzpOkcIxBvzm24iw"',
+ date: 'Sun, 18 Nov 2018 20:48:24 GMT',
+ connection: 'keep-alive',
+ 'x-powered-by': 'Express',
+ 'content-type': 'application/json; charset=utf-8'
+ }
+ },
+ system: {
+ platform: 'linux',
+ ip: '172.18.0.10',
+ hostname: '98195610c255',
+ architecture: 'x64'
+ },
+ process: {
+ argv: [
+ '/usr/local/bin/node',
+ '/usr/local/lib/node_modules/pm2/lib/ProcessContainerFork.js'
+ ],
+ pid: 3100,
+ ppid: 1,
+ title: 'node /app/server.js'
+ },
+ service: {
+ language: { name: 'javascript' },
+ runtime: { name: 'node', version: '8.12.0' },
+ name: 'opbeans-node',
+ agent: { version: '1.14.2', name: 'nodejs' },
+ version: '1.0.0'
+ }
+ },
+ parent: { id: '68f5d1607cac7779' },
+ trace: { id: '28f178c354d17f400dea04bc4a7b3c57' },
+ timestamp: { us: 1542574104769029 }
+ },
+ sort: [1542574104769]
+ }
+ ]
+ }
+ }
+ },
+ {
+ key: 'GET /api/types/:id',
+ doc_count: 1449,
+ avg: { value: 12763.68806073154 },
+ p95: { values: { '95.0': 30576.749999999996 } },
+ sample: {
+ hits: {
+ total: 1449,
+ max_score: null,
+ hits: [
+ {
+ _index: 'apm-7.0.0-alpha1-2018.11.18',
+ _type: 'doc',
+ _id: 'lxKZKGcBVMxP8WrurGuW',
+ _score: null,
+ _source: {
+ '@timestamp': '2018-11-18T20:53:35.967Z',
+ processor: {
+ name: 'transaction',
+ event: 'transaction'
+ },
+ transaction: {
+ id: '053436abacdec0a4',
+ name: 'GET /api/types/:id',
+ duration: { us: 13064 },
+ type: 'request',
+ result: 'HTTP 2xx',
+ sampled: true,
+ span_count: { started: 2 }
+ },
+ context: {
+ process: {
+ title: 'node /app/server.js',
+ argv: [
+ '/usr/local/bin/node',
+ '/usr/local/lib/node_modules/pm2/lib/ProcessContainerFork.js'
+ ],
+ pid: 3756,
+ ppid: 1
+ },
+ service: {
+ name: 'opbeans-node',
+ agent: { name: 'nodejs', version: '1.14.2' },
+ version: '1.0.0',
+ language: { name: 'javascript' },
+ runtime: { name: 'node', version: '8.12.0' }
+ },
+ user: {
+ id: '42',
+ username: 'kimchy',
+ email: 'kimchy@elastic.co'
+ },
+ tags: {
+ foo: 'bar',
+ lorem:
+ 'ipsum dolor sit amet, consectetur adipiscing elit. Nulla finibus, ipsum id scelerisque consequat, enim leo vulputate massa, vel ultricies ante neque ac risus. Curabitur tincidunt vitae sapien id pulvinar. Mauris eu vestibulum tortor. Integer sit amet lorem fringilla, egestas tellus vitae, vulputate purus. Nulla feugiat blandit nunc et semper. Morbi purus libero, mattis sed mauris non, euismod iaculis lacus. Curabitur eleifend ante eros, non faucibus velit lacinia id. Duis posuere libero augue, at dignissim urna consectetur eget. Praesent eu congue est, iaculis finibus augue.',
+ 'this-is-a-very-long-tag-name-without-any-spaces':
+ 'test',
+ 'multi-line': 'foo\nbar\nbaz'
+ },
+ custom: { containerId: 5345 },
+ request: {
+ socket: {
+ remote_address: '::ffff:172.18.0.10',
+ encrypted: false
+ },
+ headers: {
+ 'user-agent': 'workload/2.4.3',
+ host: 'opbeans-node:3000',
+ connection: 'close'
+ },
+ http_version: '1.1',
+ method: 'GET',
+ url: {
+ pathname: '/api/types/1',
+ full: 'http://opbeans-node:3000/api/types/1',
+ raw: '/api/types/1',
+ protocol: 'http:',
+ hostname: 'opbeans-node',
+ port: '3000'
+ }
+ },
+ response: {
+ status_code: 200,
+ headers: {
+ 'x-powered-by': 'Express',
+ 'content-type': 'application/json; charset=utf-8',
+ 'content-length': '217',
+ etag: 'W/"d9-cebOOHODBQMZd1wt+ZZBaSPgQLQ"',
+ date: 'Sun, 18 Nov 2018 20:53:35 GMT',
+ connection: 'close'
+ }
+ },
+ system: {
+ platform: 'linux',
+ ip: '172.18.0.10',
+ hostname: '98195610c255',
+ architecture: 'x64'
+ }
+ },
+ trace: { id: '2223b30b5cbaf2e221fcf70ac6d9abbe' },
+ timestamp: { us: 1542574415967005 },
+ host: { name: 'b359e3afece8' },
+ agent: {
+ type: 'apm-server',
+ hostname: 'b359e3afece8',
+ version: '7.0.0-alpha1'
+ }
+ },
+ sort: [1542574415967]
+ }
+ ]
+ }
+ }
+ },
+ {
+ key: 'GET /api/products',
+ doc_count: 3678,
+ avg: { value: 12683.190864600327 },
+ p95: { values: { '95.0': 35009.67999999999 } },
+ sample: {
+ hits: {
+ total: 3678,
+ max_score: null,
+ hits: [
+ {
+ _index: 'apm-7.0.0-alpha1-2018.11.18',
+ _type: 'doc',
+ _id: '-hKZKGcBVMxP8Wru1G13',
+ _score: null,
+ _source: {
+ '@timestamp': '2018-11-18T20:53:43.477Z',
+ trace: { id: 'bee00a8efb523ca4b72adad57f7caba3' },
+ timestamp: { us: 1542574423477006 },
+ agent: {
+ type: 'apm-server',
+ hostname: 'b359e3afece8',
+ version: '7.0.0-alpha1'
+ },
+ host: { name: 'b359e3afece8' },
+ processor: {
+ name: 'transaction',
+ event: 'transaction'
+ },
+ transaction: {
+ span_count: { started: 2 },
+ id: 'd8fc6d3b8707b64c',
+ name: 'GET /api/products',
+ duration: { us: 6915 },
+ type: 'request',
+ result: 'HTTP 2xx',
+ sampled: true
+ },
+ context: {
+ custom: { containerId: 2857 },
+ request: {
+ headers: {
+ 'user-agent': 'workload/2.4.3',
+ host: 'opbeans-node:3000',
+ connection: 'close'
+ },
+ http_version: '1.1',
+ method: 'GET',
+ url: {
+ full: 'http://opbeans-node:3000/api/products',
+ raw: '/api/products',
+ protocol: 'http:',
+ hostname: 'opbeans-node',
+ port: '3000',
+ pathname: '/api/products'
+ },
+ socket: {
+ remote_address: '::ffff:172.18.0.10',
+ encrypted: false
+ }
+ },
+ response: {
+ status_code: 200,
+ headers: {
+ connection: 'close',
+ 'x-powered-by': 'Express',
+ 'content-type': 'application/json; charset=utf-8',
+ 'content-length': '1023',
+ etag: 'W/"3ff-VyOxcDApb+a/lnjkm9FeTOGSDrs"',
+ date: 'Sun, 18 Nov 2018 20:53:43 GMT'
+ }
+ },
+ system: {
+ hostname: '98195610c255',
+ architecture: 'x64',
+ platform: 'linux',
+ ip: '172.18.0.10'
+ },
+ process: {
+ pid: 3756,
+ ppid: 1,
+ title: 'node /app/server.js',
+ argv: [
+ '/usr/local/bin/node',
+ '/usr/local/lib/node_modules/pm2/lib/ProcessContainerFork.js'
+ ]
+ },
+ service: {
+ runtime: { name: 'node', version: '8.12.0' },
+ name: 'opbeans-node',
+ agent: { version: '1.14.2', name: 'nodejs' },
+ version: '1.0.0',
+ language: { name: 'javascript' }
+ },
+ user: {
+ id: '42',
+ username: 'kimchy',
+ email: 'kimchy@elastic.co'
+ },
+ tags: {
+ foo: 'bar',
+ lorem:
+ 'ipsum dolor sit amet, consectetur adipiscing elit. Nulla finibus, ipsum id scelerisque consequat, enim leo vulputate massa, vel ultricies ante neque ac risus. Curabitur tincidunt vitae sapien id pulvinar. Mauris eu vestibulum tortor. Integer sit amet lorem fringilla, egestas tellus vitae, vulputate purus. Nulla feugiat blandit nunc et semper. Morbi purus libero, mattis sed mauris non, euismod iaculis lacus. Curabitur eleifend ante eros, non faucibus velit lacinia id. Duis posuere libero augue, at dignissim urna consectetur eget. Praesent eu congue est, iaculis finibus augue.',
+ 'this-is-a-very-long-tag-name-without-any-spaces':
+ 'test',
+ 'multi-line': 'foo\nbar\nbaz'
+ }
+ }
+ },
+ sort: [1542574423477]
+ }
+ ]
+ }
+ }
+ },
+ {
+ key: 'GET /api/types',
+ doc_count: 2400,
+ avg: { value: 11257.757916666667 },
+ p95: { values: { '95.0': 35222.944444444445 } },
+ sample: {
+ hits: {
+ total: 2400,
+ max_score: null,
+ hits: [
+ {
+ _index: 'apm-7.0.0-alpha1-2018.11.18',
+ _type: 'doc',
+ _id: '_xKZKGcBVMxP8Wru1G13',
+ _score: null,
+ _source: {
+ '@timestamp': '2018-11-18T20:53:44.978Z',
+ processor: {
+ name: 'transaction',
+ event: 'transaction'
+ },
+ transaction: {
+ id: '0f10668e4fb3adc7',
+ name: 'GET /api/types',
+ duration: { us: 7891 },
+ type: 'request',
+ result: 'HTTP 2xx',
+ sampled: true,
+ span_count: { started: 2 }
+ },
+ context: {
+ request: {
+ http_version: '1.1',
+ method: 'GET',
+ url: {
+ hostname: 'opbeans-node',
+ port: '3000',
+ pathname: '/api/types',
+ full: 'http://opbeans-node:3000/api/types',
+ raw: '/api/types',
+ protocol: 'http:'
+ },
+ socket: {
+ remote_address: '::ffff:172.18.0.10',
+ encrypted: false
+ },
+ headers: {
+ connection: 'close',
+ 'user-agent': 'workload/2.4.3',
+ host: 'opbeans-node:3000'
+ }
+ },
+ response: {
+ status_code: 200,
+ headers: {
+ 'content-length': '112',
+ etag: 'W/"70-1z6hT7P1WHgBgS/BeUEVeHhOCQU"',
+ date: 'Sun, 18 Nov 2018 20:53:44 GMT',
+ connection: 'close',
+ 'x-powered-by': 'Express',
+ 'content-type': 'application/json; charset=utf-8'
+ }
+ },
+ system: {
+ hostname: '98195610c255',
+ architecture: 'x64',
+ platform: 'linux',
+ ip: '172.18.0.10'
+ },
+ process: {
+ pid: 3756,
+ ppid: 1,
+ title: 'node /app/server.js',
+ argv: [
+ '/usr/local/bin/node',
+ '/usr/local/lib/node_modules/pm2/lib/ProcessContainerFork.js'
+ ]
+ },
+ service: {
+ version: '1.0.0',
+ language: { name: 'javascript' },
+ runtime: { name: 'node', version: '8.12.0' },
+ name: 'opbeans-node',
+ agent: { version: '1.14.2', name: 'nodejs' }
+ },
+ user: {
+ email: 'kimchy@elastic.co',
+ id: '42',
+ username: 'kimchy'
+ },
+ tags: {
+ foo: 'bar',
+ lorem:
+ 'ipsum dolor sit amet, consectetur adipiscing elit. Nulla finibus, ipsum id scelerisque consequat, enim leo vulputate massa, vel ultricies ante neque ac risus. Curabitur tincidunt vitae sapien id pulvinar. Mauris eu vestibulum tortor. Integer sit amet lorem fringilla, egestas tellus vitae, vulputate purus. Nulla feugiat blandit nunc et semper. Morbi purus libero, mattis sed mauris non, euismod iaculis lacus. Curabitur eleifend ante eros, non faucibus velit lacinia id. Duis posuere libero augue, at dignissim urna consectetur eget. Praesent eu congue est, iaculis finibus augue.',
+ 'this-is-a-very-long-tag-name-without-any-spaces':
+ 'test',
+ 'multi-line': 'foo\nbar\nbaz'
+ },
+ custom: { containerId: 2193 }
+ },
+ trace: { id: '0d84126973411c19b470f2d9eea958d3' },
+ timestamp: { us: 1542574424978005 },
+ agent: {
+ type: 'apm-server',
+ hostname: 'b359e3afece8',
+ version: '7.0.0-alpha1'
+ },
+ host: { name: 'b359e3afece8' }
+ },
+ sort: [1542574424978]
+ }
+ ]
+ }
+ }
+ },
+ {
+ key: 'GET /api/orders/:id',
+ doc_count: 1283,
+ avg: { value: 10584.05144193297 },
+ p95: { values: { '95.0': 26555.399999999998 } },
+ sample: {
+ hits: {
+ total: 1283,
+ max_score: null,
+ hits: [
+ {
+ _index: 'apm-7.0.0-alpha1-2018.11.18',
+ _type: 'doc',
+ _id: 'SRKXKGcBVMxP8Wru41Gf',
+ _score: null,
+ _source: {
+ '@timestamp': '2018-11-18T20:51:36.949Z',
+ context: {
+ tags: {
+ foo: 'bar',
+ lorem:
+ 'ipsum dolor sit amet, consectetur adipiscing elit. Nulla finibus, ipsum id scelerisque consequat, enim leo vulputate massa, vel ultricies ante neque ac risus. Curabitur tincidunt vitae sapien id pulvinar. Mauris eu vestibulum tortor. Integer sit amet lorem fringilla, egestas tellus vitae, vulputate purus. Nulla feugiat blandit nunc et semper. Morbi purus libero, mattis sed mauris non, euismod iaculis lacus. Curabitur eleifend ante eros, non faucibus velit lacinia id. Duis posuere libero augue, at dignissim urna consectetur eget. Praesent eu congue est, iaculis finibus augue.',
+ 'this-is-a-very-long-tag-name-without-any-spaces':
+ 'test',
+ 'multi-line': 'foo\nbar\nbaz'
+ },
+ custom: { containerId: 5999 },
+ request: {
+ socket: {
+ remote_address: '::ffff:172.18.0.10',
+ encrypted: false
+ },
+ headers: {
+ connection: 'close',
+ 'user-agent': 'workload/2.4.3',
+ host: 'opbeans-node:3000'
+ },
+ http_version: '1.1',
+ method: 'GET',
+ url: {
+ raw: '/api/orders/183',
+ protocol: 'http:',
+ hostname: 'opbeans-node',
+ port: '3000',
+ pathname: '/api/orders/183',
+ full: 'http://opbeans-node:3000/api/orders/183'
+ }
+ },
+ response: {
+ headers: {
+ date: 'Sun, 18 Nov 2018 20:51:36 GMT',
+ connection: 'close',
+ 'content-length': '0',
+ 'x-powered-by': 'Express'
+ },
+ status_code: 404
+ },
+ system: {
+ hostname: '98195610c255',
+ architecture: 'x64',
+ platform: 'linux',
+ ip: '172.18.0.10'
+ },
+ process: {
+ pid: 3475,
+ ppid: 1,
+ title: 'node /app/server.js',
+ argv: [
+ '/usr/local/bin/node',
+ '/usr/local/lib/node_modules/pm2/lib/ProcessContainerFork.js'
+ ]
+ },
+ service: {
+ agent: { name: 'nodejs', version: '1.14.2' },
+ version: '1.0.0',
+ language: { name: 'javascript' },
+ runtime: { name: 'node', version: '8.12.0' },
+ name: 'opbeans-node'
+ },
+ user: {
+ username: 'kimchy',
+ email: 'kimchy@elastic.co',
+ id: '42'
+ }
+ },
+ trace: { id: 'dab6421fa44a6869887e0edf32e1ad6f' },
+ timestamp: { us: 1542574296949004 },
+ agent: {
+ type: 'apm-server',
+ hostname: 'b359e3afece8',
+ version: '7.0.0-alpha1'
+ },
+ host: { name: 'b359e3afece8' },
+ processor: {
+ name: 'transaction',
+ event: 'transaction'
+ },
+ transaction: {
+ span_count: { started: 1 },
+ id: '937ef5588454f74a',
+ name: 'GET /api/orders/:id',
+ duration: { us: 5906 },
+ type: 'request',
+ result: 'HTTP 4xx',
+ sampled: true
+ }
+ },
+ sort: [1542574296949]
+ }
+ ]
+ }
+ }
+ },
+ {
+ key: 'GET /api/products/:id',
+ doc_count: 1839,
+ avg: { value: 10548.218597063622 },
+ p95: { values: { '95.0': 28413.383333333328 } },
+ sample: {
+ hits: {
+ total: 1839,
+ max_score: null,
+ hits: [
+ {
+ _index: 'apm-7.0.0-alpha1-2018.11.18',
+ _type: 'doc',
+ _id: 'OxKZKGcBVMxP8WruHWMl',
+ _score: null,
+ _source: {
+ '@timestamp': '2018-11-18T20:52:57.963Z',
+ agent: {
+ type: 'apm-server',
+ hostname: 'b359e3afece8',
+ version: '7.0.0-alpha1'
+ },
+ host: { name: 'b359e3afece8' },
+ processor: {
+ name: 'transaction',
+ event: 'transaction'
+ },
+ transaction: {
+ span_count: { started: 1 },
+ id: 'd324897ffb7ebcdc',
+ name: 'GET /api/products/:id',
+ duration: { us: 6959 },
+ type: 'request',
+ result: 'HTTP 2xx',
+ sampled: true
+ },
+ context: {
+ service: {
+ name: 'opbeans-node',
+ agent: { version: '1.14.2', name: 'nodejs' },
+ version: '1.0.0',
+ language: { name: 'javascript' },
+ runtime: { version: '8.12.0', name: 'node' }
+ },
+ user: {
+ email: 'kimchy@elastic.co',
+ id: '42',
+ username: 'kimchy'
+ },
+ tags: {
+ 'multi-line': 'foo\nbar\nbaz',
+ foo: 'bar',
+ lorem:
+ 'ipsum dolor sit amet, consectetur adipiscing elit. Nulla finibus, ipsum id scelerisque consequat, enim leo vulputate massa, vel ultricies ante neque ac risus. Curabitur tincidunt vitae sapien id pulvinar. Mauris eu vestibulum tortor. Integer sit amet lorem fringilla, egestas tellus vitae, vulputate purus. Nulla feugiat blandit nunc et semper. Morbi purus libero, mattis sed mauris non, euismod iaculis lacus. Curabitur eleifend ante eros, non faucibus velit lacinia id. Duis posuere libero augue, at dignissim urna consectetur eget. Praesent eu congue est, iaculis finibus augue.',
+ 'this-is-a-very-long-tag-name-without-any-spaces':
+ 'test'
+ },
+ custom: { containerId: 7184 },
+ request: {
+ socket: {
+ remote_address: '::ffff:172.18.0.10',
+ encrypted: false
+ },
+ headers: {
+ host: 'opbeans-node:3000',
+ connection: 'close',
+ 'user-agent': 'workload/2.4.3'
+ },
+ http_version: '1.1',
+ method: 'GET',
+ url: {
+ port: '3000',
+ pathname: '/api/products/3',
+ full: 'http://opbeans-node:3000/api/products/3',
+ raw: '/api/products/3',
+ protocol: 'http:',
+ hostname: 'opbeans-node'
+ }
+ },
+ response: {
+ status_code: 200,
+ headers: {
+ 'x-powered-by': 'Express',
+ 'content-type': 'application/json; charset=utf-8',
+ 'content-length': '231',
+ etag: 'W/"e7-kkuzj37GZDzXDh0CWqh5Gan0VO4"',
+ date: 'Sun, 18 Nov 2018 20:52:57 GMT',
+ connection: 'close'
+ }
+ },
+ system: {
+ ip: '172.18.0.10',
+ hostname: '98195610c255',
+ architecture: 'x64',
+ platform: 'linux'
+ },
+ process: {
+ pid: 3686,
+ ppid: 1,
+ title: 'node /app/server.js',
+ argv: [
+ '/usr/local/bin/node',
+ '/usr/local/lib/node_modules/pm2/lib/ProcessContainerFork.js'
+ ]
+ }
+ },
+ trace: { id: 'ca86ec845e412e4b4506a715d51548ec' },
+ timestamp: { us: 1542574377963005 }
+ },
+ sort: [1542574377963]
+ }
+ ]
+ }
+ }
+ },
+ {
+ key: 'GET /api/customers/:id',
+ doc_count: 1900,
+ avg: { value: 9868.217894736843 },
+ p95: { values: { '95.0': 27486.5 } },
+ sample: {
+ hits: {
+ total: 1900,
+ max_score: null,
+ hits: [
+ {
+ _index: 'apm-7.0.0-alpha1-2018.11.18',
+ _type: 'doc',
+ _id: 'IhKZKGcBVMxP8WruHGPb',
+ _score: null,
+ _source: {
+ '@timestamp': '2018-11-18T20:52:56.797Z',
+ agent: {
+ hostname: 'b359e3afece8',
+ version: '7.0.0-alpha1',
+ type: 'apm-server'
+ },
+ host: { name: 'b359e3afece8' },
+ processor: {
+ name: 'transaction',
+ event: 'transaction'
+ },
+ transaction: {
+ span_count: { started: 1 },
+ id: '60e230d12f3f0960',
+ name: 'GET /api/customers/:id',
+ duration: { us: 9735 },
+ type: 'request',
+ result: 'HTTP 2xx',
+ sampled: true
+ },
+ context: {
+ response: {
+ status_code: 200,
+ headers: {
+ connection: 'keep-alive',
+ 'x-powered-by': 'Express',
+ 'content-type': 'application/json; charset=utf-8',
+ 'content-length': '193',
+ etag: 'W/"c1-LbuhkuLzFyZ0H+7+JQGA5b0kvNs"',
+ date: 'Sun, 18 Nov 2018 20:52:56 GMT'
+ }
+ },
+ system: {
+ architecture: 'x64',
+ platform: 'linux',
+ ip: '172.18.0.10',
+ hostname: '98195610c255'
+ },
+ process: {
+ ppid: 1,
+ title: 'node /app/server.js',
+ argv: [
+ '/usr/local/bin/node',
+ '/usr/local/lib/node_modules/pm2/lib/ProcessContainerFork.js'
+ ],
+ pid: 3686
+ },
+ service: {
+ name: 'opbeans-node',
+ agent: { name: 'nodejs', version: '1.14.2' },
+ version: '1.0.0',
+ language: { name: 'javascript' },
+ runtime: { name: 'node', version: '8.12.0' }
+ },
+ user: {
+ username: 'kimchy',
+ email: 'kimchy@elastic.co',
+ id: '42'
+ },
+ tags: {
+ 'multi-line': 'foo\nbar\nbaz',
+ foo: 'bar',
+ lorem:
+ 'ipsum dolor sit amet, consectetur adipiscing elit. Nulla finibus, ipsum id scelerisque consequat, enim leo vulputate massa, vel ultricies ante neque ac risus. Curabitur tincidunt vitae sapien id pulvinar. Mauris eu vestibulum tortor. Integer sit amet lorem fringilla, egestas tellus vitae, vulputate purus. Nulla feugiat blandit nunc et semper. Morbi purus libero, mattis sed mauris non, euismod iaculis lacus. Curabitur eleifend ante eros, non faucibus velit lacinia id. Duis posuere libero augue, at dignissim urna consectetur eget. Praesent eu congue est, iaculis finibus augue.',
+ 'this-is-a-very-long-tag-name-without-any-spaces':
+ 'test'
+ },
+ custom: { containerId: 8225 },
+ request: {
+ headers: {
+ 'accept-encoding': 'gzip, deflate',
+ accept: '*/*',
+ connection: 'keep-alive',
+ 'elastic-apm-traceparent':
+ '00-e6140d30363f18b585f5d3b753f4d025-aa82e2c847265626-01',
+ host: 'opbeans-node:3000',
+ 'user-agent': 'python-requests/2.20.0'
+ },
+ http_version: '1.1',
+ method: 'GET',
+ url: {
+ pathname: '/api/customers/700',
+ full: 'http://opbeans-node:3000/api/customers/700',
+ raw: '/api/customers/700',
+ protocol: 'http:',
+ hostname: 'opbeans-node',
+ port: '3000'
+ },
+ socket: {
+ remote_address: '::ffff:172.18.0.6',
+ encrypted: false
+ }
+ }
+ },
+ parent: { id: 'aa82e2c847265626' },
+ trace: { id: 'e6140d30363f18b585f5d3b753f4d025' },
+ timestamp: { us: 1542574376797031 }
+ },
+ sort: [1542574376797]
+ }
+ ]
+ }
+ }
+ },
+ {
+ key: 'POST unknown route',
+ doc_count: 20,
+ avg: { value: 5192.9 },
+ p95: { values: { '95.0': 13230.5 } },
+ sample: {
+ hits: {
+ total: 20,
+ max_score: null,
+ hits: [
+ {
+ _index: 'apm-7.0.0-alpha1-2018.11.18',
+ _type: 'doc',
+ _id: '4wsiKGcBVMxP8Wru2j59',
+ _score: null,
+ _source: {
+ '@timestamp': '2018-11-18T18:43:50.994Z',
+ host: { name: 'b359e3afece8' },
+ processor: {
+ name: 'transaction',
+ event: 'transaction'
+ },
+ transaction: {
+ sampled: true,
+ span_count: { started: 0 },
+ id: '92c3ceea57899061',
+ name: 'POST unknown route',
+ duration: { us: 3467 },
+ type: 'request',
+ result: 'HTTP 4xx'
+ },
+ context: {
+ system: {
+ platform: 'linux',
+ ip: '172.18.0.10',
+ hostname: '98195610c255',
+ architecture: 'x64'
+ },
+ process: {
+ pid: 19196,
+ ppid: 1,
+ title: 'node /app/server.js',
+ argv: [
+ '/usr/local/bin/node',
+ '/usr/local/lib/node_modules/pm2/lib/ProcessContainerFork.js'
+ ]
+ },
+ service: {
+ name: 'opbeans-node',
+ agent: { version: '1.14.2', name: 'nodejs' },
+ version: '1.0.0',
+ language: { name: 'javascript' },
+ runtime: { name: 'node', version: '8.12.0' }
+ },
+ user: {
+ email: 'kimchy@elastic.co',
+ id: '42',
+ username: 'kimchy'
+ },
+ tags: {
+ 'this-is-a-very-long-tag-name-without-any-spaces':
+ 'test',
+ 'multi-line': 'foo\nbar\nbaz',
+ foo: 'bar',
+ lorem:
+ 'ipsum dolor sit amet, consectetur adipiscing elit. Nulla finibus, ipsum id scelerisque consequat, enim leo vulputate massa, vel ultricies ante neque ac risus. Curabitur tincidunt vitae sapien id pulvinar. Mauris eu vestibulum tortor. Integer sit amet lorem fringilla, egestas tellus vitae, vulputate purus. Nulla feugiat blandit nunc et semper. Morbi purus libero, mattis sed mauris non, euismod iaculis lacus. Curabitur eleifend ante eros, non faucibus velit lacinia id. Duis posuere libero augue, at dignissim urna consectetur eget. Praesent eu congue est, iaculis finibus augue.'
+ },
+ custom: { containerId: 6102 },
+ request: {
+ method: 'POST',
+ url: {
+ raw: '/api/orders/csv',
+ protocol: 'http:',
+ hostname: '172.18.0.9',
+ port: '3000',
+ pathname: '/api/orders/csv',
+ full: 'http://172.18.0.9:3000/api/orders/csv'
+ },
+ socket: {
+ remote_address: '::ffff:172.18.0.9',
+ encrypted: false
+ },
+ headers: {
+ 'accept-encoding': 'gzip, deflate',
+ 'content-type':
+ 'multipart/form-data; boundary=2b2e40be188a4cb5a56c05a0c182f6c9',
+ 'elastic-apm-traceparent':
+ '00-19688959ea6cbccda8013c11566ea329-1fc3665eef2dcdfc-01',
+ 'x-forwarded-for': '172.18.0.11',
+ host: '172.18.0.9:3000',
+ 'user-agent': 'Python/3.7 aiohttp/3.3.2',
+ 'content-length': '380',
+ accept: '*/*'
+ },
+ body: '[REDACTED]',
+ http_version: '1.1'
+ },
+ response: {
+ headers: {
+ date: 'Sun, 18 Nov 2018 18:43:50 GMT',
+ connection: 'keep-alive',
+ 'x-powered-by': 'Express',
+ 'content-security-policy': "default-src 'self'",
+ 'x-content-type-options': 'nosniff',
+ 'content-type': 'text/html; charset=utf-8',
+ 'content-length': '154'
+ },
+ status_code: 404
+ }
+ },
+ parent: { id: '1fc3665eef2dcdfc' },
+ trace: { id: '19688959ea6cbccda8013c11566ea329' },
+ timestamp: { us: 1542566630994005 },
+ agent: {
+ version: '7.0.0-alpha1',
+ type: 'apm-server',
+ hostname: 'b359e3afece8'
+ }
+ },
+ sort: [1542566630994]
+ }
+ ]
+ }
+ }
+ },
+ {
+ key: 'GET /is-it-coffee-time',
+ doc_count: 358,
+ avg: { value: 4694.005586592179 },
+ p95: { values: { '95.0': 11022.99999999992 } },
+ sample: {
+ hits: {
+ total: 358,
+ max_score: null,
+ hits: [
+ {
+ _index: 'apm-7.0.0-alpha1-2018.11.18',
+ _type: 'doc',
+ _id: '7RKSKGcBVMxP8Wru-gjC',
+ _score: null,
+ _source: {
+ '@timestamp': '2018-11-18T20:46:19.317Z',
+ agent: {
+ type: 'apm-server',
+ hostname: 'b359e3afece8',
+ version: '7.0.0-alpha1'
+ },
+ host: { name: 'b359e3afece8' },
+ processor: {
+ name: 'transaction',
+ event: 'transaction'
+ },
+ transaction: {
+ id: '319a5c555a1ab207',
+ name: 'GET /is-it-coffee-time',
+ duration: { us: 4253 },
+ type: 'request',
+ result: 'HTTP 5xx',
+ sampled: true,
+ span_count: { started: 0 }
+ },
+ context: {
+ process: {
+ pid: 2760,
+ ppid: 1,
+ title: 'node /app/server.js',
+ argv: [
+ '/usr/local/bin/node',
+ '/usr/local/lib/node_modules/pm2/lib/ProcessContainerFork.js'
+ ]
+ },
+ service: {
+ agent: { name: 'nodejs', version: '1.14.2' },
+ version: '1.0.0',
+ language: { name: 'javascript' },
+ runtime: { name: 'node', version: '8.12.0' },
+ name: 'opbeans-node'
+ },
+ user: {
+ email: 'kimchy@elastic.co',
+ id: '42',
+ username: 'kimchy'
+ },
+ tags: {
+ foo: 'bar',
+ lorem:
+ 'ipsum dolor sit amet, consectetur adipiscing elit. Nulla finibus, ipsum id scelerisque consequat, enim leo vulputate massa, vel ultricies ante neque ac risus. Curabitur tincidunt vitae sapien id pulvinar. Mauris eu vestibulum tortor. Integer sit amet lorem fringilla, egestas tellus vitae, vulputate purus. Nulla feugiat blandit nunc et semper. Morbi purus libero, mattis sed mauris non, euismod iaculis lacus. Curabitur eleifend ante eros, non faucibus velit lacinia id. Duis posuere libero augue, at dignissim urna consectetur eget. Praesent eu congue est, iaculis finibus augue.',
+ 'this-is-a-very-long-tag-name-without-any-spaces':
+ 'test',
+ 'multi-line': 'foo\nbar\nbaz'
+ },
+ custom: { containerId: 8593 },
+ request: {
+ headers: {
+ 'user-agent': 'workload/2.4.3',
+ host: 'opbeans-node:3000',
+ connection: 'close'
+ },
+ http_version: '1.1',
+ method: 'GET',
+ url: {
+ port: '3000',
+ pathname: '/is-it-coffee-time',
+ full: 'http://opbeans-node:3000/is-it-coffee-time',
+ raw: '/is-it-coffee-time',
+ protocol: 'http:',
+ hostname: 'opbeans-node'
+ },
+ socket: {
+ remote_address: '::ffff:172.18.0.10',
+ encrypted: false
+ }
+ },
+ response: {
+ status_code: 500,
+ headers: {
+ date: 'Sun, 18 Nov 2018 20:46:19 GMT',
+ connection: 'close',
+ 'x-powered-by': 'Express',
+ 'content-security-policy': "default-src 'self'",
+ 'x-content-type-options': 'nosniff',
+ 'content-type': 'text/html; charset=utf-8',
+ 'content-length': '148'
+ }
+ },
+ system: {
+ ip: '172.18.0.10',
+ hostname: '98195610c255',
+ architecture: 'x64',
+ platform: 'linux'
+ }
+ },
+ trace: { id: '821812b416de4c73ced87f8777fa46a6' },
+ timestamp: { us: 1542573979317007 }
+ },
+ sort: [1542573979317]
+ }
+ ]
+ }
+ }
+ },
+ {
+ key: 'GET /throw-error',
+ doc_count: 336,
+ avg: { value: 4549.889880952381 },
+ p95: { values: { '95.0': 7719.700000000001 } },
+ sample: {
+ hits: {
+ total: 336,
+ max_score: null,
+ hits: [
+ {
+ _index: 'apm-7.0.0-alpha1-2018.11.18',
+ _type: 'doc',
+ _id: 'PhKTKGcBVMxP8WruwxSG',
+ _score: null,
+ _source: {
+ '@timestamp': '2018-11-18T20:47:10.714Z',
+ agent: {
+ version: '7.0.0-alpha1',
+ type: 'apm-server',
+ hostname: 'b359e3afece8'
+ },
+ host: { name: 'b359e3afece8' },
+ processor: {
+ name: 'transaction',
+ event: 'transaction'
+ },
+ transaction: {
+ id: 'ecd187dc53f09fbd',
+ name: 'GET /throw-error',
+ duration: { us: 4458 },
+ type: 'request',
+ result: 'HTTP 5xx',
+ sampled: true,
+ span_count: { started: 0 }
+ },
+ context: {
+ user: {
+ id: '42',
+ username: 'kimchy',
+ email: 'kimchy@elastic.co'
+ },
+ tags: {
+ lorem:
+ 'ipsum dolor sit amet, consectetur adipiscing elit. Nulla finibus, ipsum id scelerisque consequat, enim leo vulputate massa, vel ultricies ante neque ac risus. Curabitur tincidunt vitae sapien id pulvinar. Mauris eu vestibulum tortor. Integer sit amet lorem fringilla, egestas tellus vitae, vulputate purus. Nulla feugiat blandit nunc et semper. Morbi purus libero, mattis sed mauris non, euismod iaculis lacus. Curabitur eleifend ante eros, non faucibus velit lacinia id. Duis posuere libero augue, at dignissim urna consectetur eget. Praesent eu congue est, iaculis finibus augue.',
+ 'this-is-a-very-long-tag-name-without-any-spaces':
+ 'test',
+ 'multi-line': 'foo\nbar\nbaz',
+ foo: 'bar'
+ },
+ custom: { containerId: 7220 },
+ request: {
+ http_version: '1.1',
+ method: 'GET',
+ url: {
+ port: '3000',
+ pathname: '/throw-error',
+ full: 'http://opbeans-node:3000/throw-error',
+ raw: '/throw-error',
+ protocol: 'http:',
+ hostname: 'opbeans-node'
+ },
+ socket: {
+ remote_address: '::ffff:172.18.0.10',
+ encrypted: false
+ },
+ headers: {
+ 'user-agent': 'workload/2.4.3',
+ host: 'opbeans-node:3000',
+ connection: 'close'
+ }
+ },
+ response: {
+ status_code: 500,
+ headers: {
+ 'x-content-type-options': 'nosniff',
+ 'content-type': 'text/html; charset=utf-8',
+ 'content-length': '148',
+ date: 'Sun, 18 Nov 2018 20:47:10 GMT',
+ connection: 'close',
+ 'x-powered-by': 'Express',
+ 'content-security-policy': "default-src 'self'"
+ }
+ },
+ system: {
+ platform: 'linux',
+ ip: '172.18.0.10',
+ hostname: '98195610c255',
+ architecture: 'x64'
+ },
+ process: {
+ title: 'node /app/server.js',
+ argv: [
+ '/usr/local/bin/node',
+ '/usr/local/lib/node_modules/pm2/lib/ProcessContainerFork.js'
+ ],
+ pid: 2895,
+ ppid: 1
+ },
+ service: {
+ name: 'opbeans-node',
+ agent: { version: '1.14.2', name: 'nodejs' },
+ version: '1.0.0',
+ language: { name: 'javascript' },
+ runtime: { name: 'node', version: '8.12.0' }
+ }
+ },
+ trace: { id: '6c0ef23e1f963f304ce440a909914d35' },
+ timestamp: { us: 1542574030714012 }
+ },
+ sort: [1542574030714]
+ }
+ ]
+ }
+ }
+ },
+ {
+ key: 'GET *',
+ doc_count: 7115,
+ avg: { value: 3504.5108924806746 },
+ p95: { values: { '95.0': 11431.738095238095 } },
+ sample: {
+ hits: {
+ total: 7115,
+ max_score: null,
+ hits: [
+ {
+ _index: 'apm-7.0.0-alpha1-2018.11.18',
+ _type: 'doc',
+ _id: '6hKZKGcBVMxP8Wru1G13',
+ _score: null,
+ _source: {
+ '@timestamp': '2018-11-18T20:53:42.493Z',
+ agent: {
+ type: 'apm-server',
+ hostname: 'b359e3afece8',
+ version: '7.0.0-alpha1'
+ },
+ host: { name: 'b359e3afece8' },
+ processor: {
+ name: 'transaction',
+ event: 'transaction'
+ },
+ transaction: {
+ span_count: { started: 0 },
+ id: 'f5fc4621949b63fb',
+ name: 'GET *',
+ duration: { us: 1901 },
+ type: 'request',
+ result: 'HTTP 3xx',
+ sampled: true
+ },
+ context: {
+ request: {
+ http_version: '1.1',
+ method: 'GET',
+ url: {
+ hostname: 'opbeans-node',
+ port: '3000',
+ pathname: '/dashboard',
+ full: 'http://opbeans-node:3000/dashboard',
+ raw: '/dashboard',
+ protocol: 'http:'
+ },
+ socket: {
+ remote_address: '::ffff:172.18.0.7',
+ encrypted: false
+ },
+ headers: {
+ accept:
+ 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8',
+ 'accept-encoding': 'gzip, deflate',
+ 'if-none-match': 'W/"280-1670775e878"',
+ 'if-modified-since': 'Mon, 12 Nov 2018 10:27:07 GMT',
+ host: 'opbeans-node:3000',
+ connection: 'keep-alive',
+ 'upgrade-insecure-requests': '1',
+ 'user-agent': 'Chromeless 1.4.0'
+ }
+ },
+ response: {
+ status_code: 304,
+ headers: {
+ 'x-powered-by': 'Express',
+ 'accept-ranges': 'bytes',
+ 'cache-control': 'public, max-age=0',
+ 'last-modified': 'Mon, 12 Nov 2018 10:27:07 GMT',
+ etag: 'W/"280-1670775e878"',
+ date: 'Sun, 18 Nov 2018 20:53:42 GMT',
+ connection: 'keep-alive'
+ }
+ },
+ system: {
+ hostname: '98195610c255',
+ architecture: 'x64',
+ platform: 'linux',
+ ip: '172.18.0.10'
+ },
+ process: {
+ title: 'node /app/server.js',
+ argv: [
+ '/usr/local/bin/node',
+ '/usr/local/lib/node_modules/pm2/lib/ProcessContainerFork.js'
+ ],
+ pid: 3756,
+ ppid: 1
+ },
+ service: {
+ version: '1.0.0',
+ language: { name: 'javascript' },
+ runtime: { name: 'node', version: '8.12.0' },
+ name: 'opbeans-node',
+ agent: { version: '1.14.2', name: 'nodejs' }
+ },
+ user: {
+ email: 'kimchy@elastic.co',
+ id: '42',
+ username: 'kimchy'
+ },
+ tags: {
+ 'multi-line': 'foo\nbar\nbaz',
+ foo: 'bar',
+ lorem:
+ 'ipsum dolor sit amet, consectetur adipiscing elit. Nulla finibus, ipsum id scelerisque consequat, enim leo vulputate massa, vel ultricies ante neque ac risus. Curabitur tincidunt vitae sapien id pulvinar. Mauris eu vestibulum tortor. Integer sit amet lorem fringilla, egestas tellus vitae, vulputate purus. Nulla feugiat blandit nunc et semper. Morbi purus libero, mattis sed mauris non, euismod iaculis lacus. Curabitur eleifend ante eros, non faucibus velit lacinia id. Duis posuere libero augue, at dignissim urna consectetur eget. Praesent eu congue est, iaculis finibus augue.',
+ 'this-is-a-very-long-tag-name-without-any-spaces':
+ 'test'
+ },
+ custom: { containerId: 6446 }
+ },
+ trace: { id: '7efb6ade88cdea20cd96ca482681cde7' },
+ timestamp: { us: 1542574422493006 }
+ },
+ sort: [1542574422493]
+ }
+ ]
+ }
+ }
+ },
+ {
+ key: 'OPTIONS unknown route',
+ doc_count: 364,
+ avg: { value: 2742.4615384615386 },
+ p95: { values: { '95.0': 4370.000000000002 } },
+ sample: {
+ hits: {
+ total: 364,
+ max_score: null,
+ hits: [
+ {
+ _index: 'apm-7.0.0-alpha1-2018.11.18',
+ _type: 'doc',
+ _id: '-xKVKGcBVMxP8WrucSs2',
+ _score: null,
+ _source: {
+ '@timestamp': '2018-11-18T20:49:00.707Z',
+ timestamp: { us: 1542574140707006 },
+ agent: {
+ type: 'apm-server',
+ hostname: 'b359e3afece8',
+ version: '7.0.0-alpha1'
+ },
+ host: { name: 'b359e3afece8' },
+ processor: {
+ name: 'transaction',
+ event: 'transaction'
+ },
+ transaction: {
+ span_count: { started: 0 },
+ id: 'a8c87ebc7ec68bc0',
+ name: 'OPTIONS unknown route',
+ duration: { us: 2371 },
+ type: 'request',
+ result: 'HTTP 2xx',
+ sampled: true
+ },
+ context: {
+ user: {
+ id: '42',
+ username: 'kimchy',
+ email: 'kimchy@elastic.co'
+ },
+ tags: {
+ 'this-is-a-very-long-tag-name-without-any-spaces':
+ 'test',
+ 'multi-line': 'foo\nbar\nbaz',
+ foo: 'bar',
+ lorem:
+ 'ipsum dolor sit amet, consectetur adipiscing elit. Nulla finibus, ipsum id scelerisque consequat, enim leo vulputate massa, vel ultricies ante neque ac risus. Curabitur tincidunt vitae sapien id pulvinar. Mauris eu vestibulum tortor. Integer sit amet lorem fringilla, egestas tellus vitae, vulputate purus. Nulla feugiat blandit nunc et semper. Morbi purus libero, mattis sed mauris non, euismod iaculis lacus. Curabitur eleifend ante eros, non faucibus velit lacinia id. Duis posuere libero augue, at dignissim urna consectetur eget. Praesent eu congue est, iaculis finibus augue.'
+ },
+ custom: { containerId: 3775 },
+ request: {
+ socket: {
+ remote_address: '::ffff:172.18.0.10',
+ encrypted: false
+ },
+ headers: {
+ 'user-agent': 'workload/2.4.3',
+ host: 'opbeans-node:3000',
+ 'content-length': '0',
+ connection: 'close'
+ },
+ http_version: '1.1',
+ method: 'OPTIONS',
+ url: {
+ port: '3000',
+ pathname: '/',
+ full: 'http://opbeans-node:3000/',
+ raw: '/',
+ protocol: 'http:',
+ hostname: 'opbeans-node'
+ }
+ },
+ response: {
+ status_code: 200,
+ headers: {
+ 'content-type': 'text/html; charset=utf-8',
+ 'content-length': '8',
+ etag: 'W/"8-ZRAf8oNBS3Bjb/SU2GYZCmbtmXg"',
+ date: 'Sun, 18 Nov 2018 20:49:00 GMT',
+ connection: 'close',
+ 'x-powered-by': 'Express',
+ allow: 'GET,HEAD'
+ }
+ },
+ system: {
+ ip: '172.18.0.10',
+ hostname: '98195610c255',
+ architecture: 'x64',
+ platform: 'linux'
+ },
+ process: {
+ ppid: 1,
+ title: 'node /app/server.js',
+ argv: [
+ '/usr/local/bin/node',
+ '/usr/local/lib/node_modules/pm2/lib/ProcessContainerFork.js'
+ ],
+ pid: 3142
+ },
+ service: {
+ agent: { name: 'nodejs', version: '1.14.2' },
+ version: '1.0.0',
+ language: { name: 'javascript' },
+ runtime: { name: 'node', version: '8.12.0' },
+ name: 'opbeans-node'
+ }
+ },
+ trace: { id: '469e3e5f91ffe3195a8e58cdd1cdefa8' }
+ },
+ sort: [1542574140707]
+ }
+ ]
+ }
+ }
+ },
+ {
+ key: 'GET static file',
+ doc_count: 62606,
+ avg: { value: 2651.8784461553205 },
+ p95: { values: { '95.0': 6140.579335038363 } },
+ sample: {
+ hits: {
+ total: 62606,
+ max_score: null,
+ hits: [
+ {
+ _index: 'apm-7.0.0-alpha1-2018.11.18',
+ _type: 'doc',
+ _id: '-RKZKGcBVMxP8Wru1G13',
+ _score: null,
+ _source: {
+ '@timestamp': '2018-11-18T20:53:43.304Z',
+ context: {
+ system: {
+ platform: 'linux',
+ ip: '172.18.0.10',
+ hostname: '98195610c255',
+ architecture: 'x64'
+ },
+ process: {
+ title: 'node /app/server.js',
+ argv: [
+ '/usr/local/bin/node',
+ '/usr/local/lib/node_modules/pm2/lib/ProcessContainerFork.js'
+ ],
+ pid: 3756,
+ ppid: 1
+ },
+ service: {
+ name: 'opbeans-node',
+ agent: { name: 'nodejs', version: '1.14.2' },
+ version: '1.0.0',
+ language: { name: 'javascript' },
+ runtime: { name: 'node', version: '8.12.0' }
+ },
+ request: {
+ headers: {
+ 'user-agent': 'curl/7.38.0',
+ host: 'opbeans-node:3000',
+ accept: '*/*'
+ },
+ http_version: '1.1',
+ method: 'GET',
+ url: {
+ pathname: '/',
+ full: 'http://opbeans-node:3000/',
+ raw: '/',
+ protocol: 'http:',
+ hostname: 'opbeans-node',
+ port: '3000'
+ },
+ socket: {
+ encrypted: false,
+ remote_address: '::ffff:172.18.0.10'
+ }
+ },
+ response: {
+ status_code: 200,
+ headers: {
+ 'content-length': '640',
+ 'accept-ranges': 'bytes',
+ 'cache-control': 'public, max-age=0',
+ etag: 'W/"280-1670775e878"',
+ 'x-powered-by': 'Express',
+ 'last-modified': 'Mon, 12 Nov 2018 10:27:07 GMT',
+ 'content-type': 'text/html; charset=UTF-8',
+ date: 'Sun, 18 Nov 2018 20:53:43 GMT',
+ connection: 'keep-alive'
+ }
+ }
+ },
+ trace: { id: 'b303d2a4a007946b63b9db7fafe639a0' },
+ timestamp: { us: 1542574423304006 },
+ agent: {
+ type: 'apm-server',
+ hostname: 'b359e3afece8',
+ version: '7.0.0-alpha1'
+ },
+ host: { name: 'b359e3afece8' },
+ processor: {
+ name: 'transaction',
+ event: 'transaction'
+ },
+ transaction: {
+ span_count: { started: 0 },
+ id: '2869c13633534be5',
+ name: 'GET static file',
+ duration: { us: 1801 },
+ type: 'request',
+ result: 'HTTP 2xx',
+ sampled: true
+ }
+ },
+ sort: [1542574423304]
+ }
+ ]
+ }
+ }
+ },
+ {
+ key: 'GET unknown route',
+ doc_count: 7487,
+ avg: { value: 1422.926672899693 },
+ p95: { values: { '95.0': 2311.885238095238 } },
+ sample: {
+ hits: {
+ total: 7487,
+ max_score: null,
+ hits: [
+ {
+ _index: 'apm-7.0.0-alpha1-2018.11.18',
+ _type: 'doc',
+ _id: '6xKZKGcBVMxP8Wru1G13',
+ _score: null,
+ _source: {
+ '@timestamp': '2018-11-18T20:53:42.504Z',
+ processor: {
+ name: 'transaction',
+ event: 'transaction'
+ },
+ transaction: {
+ name: 'GET unknown route',
+ duration: { us: 911 },
+ type: 'request',
+ result: 'HTTP 2xx',
+ sampled: true,
+ span_count: { started: 0 },
+ id: '107881ae2be1b56d'
+ },
+ context: {
+ system: {
+ hostname: '98195610c255',
+ architecture: 'x64',
+ platform: 'linux',
+ ip: '172.18.0.10'
+ },
+ process: {
+ pid: 3756,
+ ppid: 1,
+ title: 'node /app/server.js',
+ argv: [
+ '/usr/local/bin/node',
+ '/usr/local/lib/node_modules/pm2/lib/ProcessContainerFork.js'
+ ]
+ },
+ service: {
+ agent: { version: '1.14.2', name: 'nodejs' },
+ version: '1.0.0',
+ language: { name: 'javascript' },
+ runtime: { name: 'node', version: '8.12.0' },
+ name: 'opbeans-node'
+ },
+ request: {
+ http_version: '1.1',
+ method: 'GET',
+ url: {
+ full: 'http://opbeans-node:3000/rum-config.js',
+ raw: '/rum-config.js',
+ protocol: 'http:',
+ hostname: 'opbeans-node',
+ port: '3000',
+ pathname: '/rum-config.js'
+ },
+ socket: {
+ remote_address: '::ffff:172.18.0.7',
+ encrypted: false
+ },
+ headers: {
+ connection: 'keep-alive',
+ 'user-agent': 'Chromeless 1.4.0',
+ accept: '*/*',
+ referer: 'http://opbeans-node:3000/dashboard',
+ 'accept-encoding': 'gzip, deflate',
+ host: 'opbeans-node:3000'
+ }
+ },
+ response: {
+ headers: {
+ 'x-powered-by': 'Express',
+ 'content-type': 'text/javascript',
+ 'content-length': '172',
+ date: 'Sun, 18 Nov 2018 20:53:42 GMT',
+ connection: 'keep-alive'
+ },
+ status_code: 200
+ }
+ },
+ trace: { id: '4399e7233e6e7b77e70c2fff111b8f28' },
+ timestamp: { us: 1542574422504004 },
+ agent: {
+ type: 'apm-server',
+ hostname: 'b359e3afece8',
+ version: '7.0.0-alpha1'
+ },
+ host: { name: 'b359e3afece8' }
+ },
+ sort: [1542574422504]
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ }
+} as unknown) as ESResponse;
diff --git a/x-pack/plugins/apm/server/lib/transaction_groups/transform.test.ts b/x-pack/plugins/apm/server/lib/transaction_groups/transform.test.ts
new file mode 100644
index 0000000000000..73053aa04643d
--- /dev/null
+++ b/x-pack/plugins/apm/server/lib/transaction_groups/transform.test.ts
@@ -0,0 +1,57 @@
+/*
+ * 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 { ESResponse } from './fetcher';
+import { transactionGroupsResponse } from './mock-responses/transactionGroupsResponse';
+import { transactionGroupsTransformer } from './transform';
+
+describe('transactionGroupsTransformer', () => {
+ it('should match snapshot', () => {
+ expect(
+ transactionGroupsTransformer({
+ response: transactionGroupsResponse,
+ start: 100,
+ end: 2000
+ })
+ ).toMatchSnapshot();
+ });
+
+ fit('should transform response correctly', () => {
+ const bucket = {
+ key: 'POST /api/orders',
+ doc_count: 180,
+ avg: { value: 255966.30555555556 },
+ p95: { values: { '95.0': 320238.5 } },
+ sample: {
+ hits: {
+ total: 180,
+ hits: [{ _source: 'sample source' }]
+ }
+ }
+ };
+
+ const response = ({
+ aggregations: {
+ transactions: {
+ buckets: [bucket]
+ }
+ }
+ } as unknown) as ESResponse;
+
+ expect(
+ transactionGroupsTransformer({ response, start: 100, end: 20000 })
+ ).toEqual([
+ {
+ averageResponseTime: 255966.30555555556,
+ impact: 0,
+ name: 'POST /api/orders',
+ p95: 320238.5,
+ sample: 'sample source',
+ transactionsPerMinute: 542.713567839196
+ }
+ ]);
+ });
+});
diff --git a/x-pack/plugins/apm/server/lib/transaction_groups/transform.ts b/x-pack/plugins/apm/server/lib/transaction_groups/transform.ts
new file mode 100644
index 0000000000000..229134025b18f
--- /dev/null
+++ b/x-pack/plugins/apm/server/lib/transaction_groups/transform.ts
@@ -0,0 +1,61 @@
+/*
+ * 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 moment from 'moment';
+import { oc } from 'ts-optchain';
+import { Transaction } from 'x-pack/plugins/apm/typings/Transaction';
+import { ESResponse } from './fetcher';
+
+export interface ITransactionGroup {
+ name: string;
+ sample: Transaction;
+ p95: number;
+ averageResponseTime: number;
+ transactionsPerMinute: number;
+ impact: number;
+}
+
+function calculateRelativeImpacts(results: ITransactionGroup[]) {
+ const values = results.map(({ impact }) => impact);
+ const max = Math.max(...values);
+ const min = Math.min(...values);
+
+ return results.map(bucket => ({
+ ...bucket,
+ impact: ((bucket.impact - min) / (max - min)) * 100 || 0
+ }));
+}
+
+export function transactionGroupsTransformer({
+ response,
+ start,
+ end
+}: {
+ response: ESResponse;
+ start: number;
+ end: number;
+}): ITransactionGroup[] {
+ const buckets = oc(response).aggregations.transactions.buckets([]);
+ const duration = moment.duration(end - start);
+ const minutes = duration.asMinutes();
+ const results = buckets.map(bucket => {
+ const averageResponseTime = bucket.avg.value;
+ const transactionsPerMinute = bucket.doc_count / minutes;
+ const impact = Math.round(averageResponseTime * transactionsPerMinute);
+ const sample = bucket.sample.hits.hits[0]._source;
+
+ return {
+ name: bucket.key,
+ sample,
+ p95: bucket.p95.values['95.0'],
+ averageResponseTime,
+ transactionsPerMinute,
+ impact
+ };
+ });
+
+ return calculateRelativeImpacts(results);
+}
diff --git a/x-pack/plugins/apm/server/lib/transactions/charts/__test__/__snapshots__/get_timeseries_data.test.js.snap b/x-pack/plugins/apm/server/lib/transactions/charts/__test__/__snapshots__/get_timeseries_data.test.js.snap
deleted file mode 100644
index 7cee615bee11e..0000000000000
--- a/x-pack/plugins/apm/server/lib/transactions/charts/__test__/__snapshots__/get_timeseries_data.test.js.snap
+++ /dev/null
@@ -1,1240 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`get_timeseries_data should call client with correct query 1`] = `
-Array [
- Array [
- "search",
- Object {
- "body": Object {
- "aggs": Object {
- "overall_avg_duration": Object {
- "avg": Object {
- "field": "transaction.duration.us",
- },
- },
- "response_times": Object {
- "aggs": Object {
- "avg": Object {
- "avg": Object {
- "field": "transaction.duration.us",
- },
- },
- "pct": Object {
- "percentiles": Object {
- "field": "transaction.duration.us",
- "percents": Array [
- 95,
- 99,
- ],
- },
- },
- },
- "date_histogram": Object {
- "extended_bounds": Object {
- "max": 1528977600000,
- "min": 1528113600000,
- },
- "field": "@timestamp",
- "interval": "10800s",
- "min_doc_count": 0,
- },
- },
- "transaction_results": Object {
- "aggs": Object {
- "timeseries": Object {
- "date_histogram": Object {
- "extended_bounds": Object {
- "max": 1528977600000,
- "min": 1528113600000,
- },
- "field": "@timestamp",
- "interval": "10800s",
- "min_doc_count": 0,
- },
- },
- },
- "terms": Object {
- "field": "transaction.result",
- "missing": "transaction_result_missing",
- },
- },
- },
- "query": Object {
- "bool": Object {
- "filter": Array [
- Object {
- "term": Object {
- "context.service.name": "myServiceName",
- },
- },
- Object {
- "term": Object {
- "transaction.type": "myTransactionType",
- },
- },
- Object {
- "range": Object {
- "@timestamp": Object {
- "format": "epoch_millis",
- "gte": 1528113600000,
- "lte": 1528977600000,
- },
- },
- },
- ],
- },
- },
- "size": 0,
- },
- "index": "myIndex",
- },
- ],
- Array [
- "search",
- Object {
- "body": Object {
- "aggs": Object {
- "ml_avg_response_times": Object {
- "aggs": Object {
- "anomaly_score": Object {
- "max": Object {
- "field": "anomaly_score",
- },
- },
- "lower": Object {
- "min": Object {
- "field": "model_lower",
- },
- },
- "upper": Object {
- "max": Object {
- "field": "model_upper",
- },
- },
- },
- "date_histogram": Object {
- "extended_bounds": Object {
- "max": 1528977600000,
- "min": 1528113600000,
- },
- "field": "timestamp",
- "interval": "10800s",
- "min_doc_count": 0,
- },
- },
- "top_hits": Object {
- "top_hits": Object {
- "_source": Object {
- "includes": Array [
- "bucket_span",
- ],
- },
- "size": 1,
- "sort": Array [
- "bucket_span",
- ],
- },
- },
- },
- "query": Object {
- "bool": Object {
- "filter": Array [
- Object {
- "range": Object {
- "timestamp": Object {
- "format": "epoch_millis",
- "gte": 1528113600000,
- "lte": 1528977600000,
- },
- },
- },
- ],
- },
- },
- "size": 0,
- },
- "index": ".ml-anomalies-myservicename-mytransactiontype-high_mean_response_time",
- },
- ],
-]
-`;
-
-exports[`get_timeseries_data should match snapshot 1`] = `
-Object {
- "dates": Array [
- 1528124400000,
- 1528135200000,
- 1528146000000,
- 1528156800000,
- 1528167600000,
- 1528178400000,
- 1528189200000,
- 1528200000000,
- 1528210800000,
- 1528221600000,
- 1528232400000,
- 1528243200000,
- 1528254000000,
- 1528264800000,
- 1528275600000,
- 1528286400000,
- 1528297200000,
- 1528308000000,
- 1528318800000,
- 1528329600000,
- 1528340400000,
- 1528351200000,
- 1528362000000,
- 1528372800000,
- 1528383600000,
- 1528394400000,
- 1528405200000,
- 1528416000000,
- 1528426800000,
- 1528437600000,
- 1528448400000,
- 1528459200000,
- 1528470000000,
- 1528480800000,
- 1528491600000,
- 1528502400000,
- 1528513200000,
- 1528524000000,
- 1528534800000,
- 1528545600000,
- 1528556400000,
- 1528567200000,
- 1528578000000,
- 1528588800000,
- 1528599600000,
- 1528610400000,
- 1528621200000,
- 1528632000000,
- 1528642800000,
- 1528653600000,
- 1528664400000,
- 1528675200000,
- 1528686000000,
- 1528696800000,
- 1528707600000,
- 1528718400000,
- 1528729200000,
- 1528740000000,
- 1528750800000,
- 1528761600000,
- 1528772400000,
- 1528783200000,
- 1528794000000,
- 1528804800000,
- 1528815600000,
- 1528826400000,
- 1528837200000,
- 1528848000000,
- 1528858800000,
- 1528869600000,
- 1528880400000,
- 1528891200000,
- 1528902000000,
- 1528912800000,
- 1528923600000,
- 1528934400000,
- 1528945200000,
- 1528956000000,
- 1528966800000,
- ],
- "overall_avg_duration": 32861.15660262639,
- "response_times": Object {
- "avg": Array [
- 26193.277795595466,
- 25291.787065995228,
- 24690.306474667796,
- 24809.8953814219,
- 25460.0394764508,
- 26360.440733498916,
- 27050.95205479452,
- 26555.857333903925,
- 26164.343359049206,
- 26989.84546419098,
- 26314.409430068266,
- 27460.774575018477,
- 26461.469107431974,
- 27657.584946692834,
- 27940.445967005213,
- 34454.377581534434,
- 44024.31809353839,
- 36374.53333333333,
- 36991.29442471209,
- 37178.002701986756,
- 37605.57078923814,
- 37319.89767295267,
- 38709.5041348433,
- 38140.131856255066,
- 34564.81091043125,
- 33256.37743828302,
- 37251.5625266752,
- 38681.89084929791,
- 40677.801045709355,
- 39987.86453616932,
- 41059.392914139804,
- 39630.710111535845,
- 41561.81331074284,
- 43079.490738297536,
- 43925.39609283509,
- 25821.91424646782,
- 27343.60011755486,
- 25249.95060523233,
- 25492.77199074074,
- 25991.647281682137,
- 26273.31290445375,
- 26234.98976780795,
- 23494.54873786408,
- 22008.80482069371,
- 22828.136655635586,
- 22138.7081404321,
- 22634.985579811735,
- 22202.780998080616,
- 23084.082780163997,
- 23109.666146341464,
- 23306.89028152719,
- 39341.022704095325,
- 37467.17153341258,
- 52457.50554180566,
- 31327.95780166252,
- 30695.334941163997,
- 28895.042785967435,
- 30649.363989982416,
- 29802.63622014101,
- 30759.03002829892,
- 30399.76549608631,
- 29421.610233534506,
- 32641.679897096656,
- 30621.65440666204,
- 31039.60391005818,
- 30954.760723541545,
- 31902.050234568553,
- 31594.350653473728,
- 31343.87243248879,
- 31200.14450867052,
- 28560.946668743833,
- 24700.216146371717,
- 25261.025210523563,
- 26041.39789649068,
- 26123.556295209142,
- 46231.36177177638,
- 45350.42005506141,
- 48256.049354513096,
- 52360.30017052116,
- ],
- "avg_anomalies": Object {
- "bucketSpanAsMillis": 10800000,
- "buckets": Array [
- Object {
- "anomaly_score": 0,
- "lower": 737.7398559597923,
- "upper": 27505.95012649385,
- },
- Object {
- "anomaly_score": 0,
- "lower": 740.6510789069575,
- "upper": 27831.385094457328,
- },
- Object {
- "anomaly_score": 0,
- "lower": 743.0092006506535,
- "upper": 28113.842130309873,
- },
- Object {
- "anomaly_score": 0,
- "lower": 745.266369017907,
- "upper": 28166.937431054437,
- },
- Object {
- "anomaly_score": 0.0214167,
- "lower": 747.3207728528188,
- "upper": 28506.23990430994,
- },
- Object {
- "anomaly_score": 0,
- "lower": 749.6894207909651,
- "upper": 29019.425285291298,
- },
- Object {
- "anomaly_score": 0.05939392,
- "lower": 752.7726473096143,
- "upper": 29293.392326541318,
- },
- Object {
- "anomaly_score": 0.01836784,
- "lower": 754.7407389918743,
- "upper": 29812.56398272085,
- },
- Object {
- "anomaly_score": 0,
- "lower": 757.2268079827784,
- "upper": 30060.955415439636,
- },
- Object {
- "anomaly_score": 0,
- "lower": 758.3112520555287,
- "upper": 30376.319798106222,
- },
- Object {
- "anomaly_score": 0,
- "lower": 761.9827340264112,
- "upper": 30627.243996529527,
- },
- Object {
- "anomaly_score": 0,
- "lower": 771.7209606007517,
- "upper": 31035.75952712361,
- },
- Object {
- "anomaly_score": 0,
- "lower": 822.9174906119024,
- "upper": 31062.244462967443,
- },
- Object {
- "anomaly_score": 0,
- "lower": 867.1132870297309,
- "upper": 31463.705363442183,
- },
- Object {
- "anomaly_score": 0,
- "lower": 871.6217257693573,
- "upper": 31743.78493690837,
- },
- Object {
- "anomaly_score": 93.09271062370188,
- "lower": 630.1794765317344,
- "upper": 42784.833235636936,
- },
- Object {
- "anomaly_score": 94.91969,
- "lower": 871.0283056454996,
- "upper": 34441.21907642463,
- },
- Object {
- "anomaly_score": 0.737564554333639,
- "lower": 872.694053998953,
- "upper": 35467.552283525925,
- },
- Object {
- "anomaly_score": 0.2233028643272195,
- "lower": 872.8967719351887,
- "upper": 36793.04873774251,
- },
- Object {
- "anomaly_score": 4.367981,
- "lower": 873.2094351335686,
- "upper": 37663.180967734144,
- },
- Object {
- "anomaly_score": 10.94823,
- "lower": 872.096335158222,
- "upper": 38704.9736025016,
- },
- Object {
- "anomaly_score": 0.025502508470513552,
- "lower": 870.7141079237686,
- "upper": 39411.4696425657,
- },
- Object {
- "anomaly_score": 0.04643894365231562,
- "lower": 865.6904233415615,
- "upper": 40436.89001900413,
- },
- Object {
- "anomaly_score": 0.08232853094836577,
- "lower": 864.5587212551438,
- "upper": 41583.671803791396,
- },
- Object {
- "anomaly_score": 0,
- "lower": 862.0456649399898,
- "upper": 41918.88300390927,
- },
- Object {
- "anomaly_score": 0,
- "lower": 862.6952960489333,
- "upper": 42346.34733913561,
- },
- Object {
- "anomaly_score": 0.09328928850624264,
- "lower": 859.02865711764,
- "upper": 43503.30873034762,
- },
- Object {
- "anomaly_score": 0.01490678070537287,
- "lower": 853.1249075544679,
- "upper": 43582.32622523151,
- },
- Object {
- "anomaly_score": 0.025631694904640304,
- "lower": 850.0412997919607,
- "upper": 44583.7194942183,
- },
- Object {
- "anomaly_score": 0,
- "lower": 846.9251200783423,
- "upper": 45027.0923125673,
- },
- Object {
- "anomaly_score": 0.1775235302080928,
- "lower": 839.9462033017412,
- "upper": 46355.1414826366,
- },
- Object {
- "anomaly_score": 0,
- "lower": 740.8424736560071,
- "upper": 46997.18507921725,
- },
- Object {
- "anomaly_score": 0,
- "lower": 675.2681661332581,
- "upper": 47730.52441880603,
- },
- Object {
- "anomaly_score": 0,
- "lower": 672.90202453507,
- "upper": 48709.29810572524,
- },
- Object {
- "anomaly_score": 0,
- "lower": 676.0944399455826,
- "upper": 49406.64628717409,
- },
- Object {
- "anomaly_score": 0,
- "lower": 682.4396257998045,
- "upper": 73477.3874808886,
- },
- Object {
- "anomaly_score": 0,
- "lower": 686.44341250381,
- "upper": 73487.82525090317,
- },
- Object {
- "anomaly_score": 0,
- "lower": 690.5371630779586,
- "upper": 72962.57745081023,
- },
- Object {
- "anomaly_score": 0,
- "lower": 695.8034104561633,
- "upper": 72489.77380542927,
- },
- Object {
- "anomaly_score": 0,
- "lower": 707.6839448592744,
- "upper": 72463.76348179985,
- },
- Object {
- "anomaly_score": 0.18086821490763677,
- "lower": 781.8674002616508,
- "upper": 72996.2561390666,
- },
- Object {
- "anomaly_score": 0,
- "lower": 846.540373740061,
- "upper": 73169.30855560771,
- },
- Object {
- "anomaly_score": 0,
- "lower": 860.5368537637945,
- "upper": 73491.08437587181,
- },
- Object {
- "anomaly_score": 0,
- "lower": 863.0293573898325,
- "upper": 72389.78456634001,
- },
- Object {
- "anomaly_score": 0,
- "lower": 863.4144235290587,
- "upper": 72311.41927730369,
- },
- Object {
- "anomaly_score": 0,
- "lower": 863.6781514985616,
- "upper": 71383.41956191002,
- },
- Object {
- "anomaly_score": 0,
- "lower": 863.4492510434609,
- "upper": 74565.86466696904,
- },
- Object {
- "anomaly_score": 0,
- "lower": 863.1958870174615,
- "upper": 71304.14035324028,
- },
- Object {
- "anomaly_score": 0,
- "lower": 862.6161500045084,
- "upper": 72434.51561823535,
- },
- Object {
- "anomaly_score": 0,
- "lower": 861.9526316405551,
- "upper": 71664.49530601672,
- },
- Object {
- "anomaly_score": 0,
- "lower": 861.1638627191994,
- "upper": 71264.41362778837,
- },
- Object {
- "anomaly_score": 0,
- "lower": 860.1741427701811,
- "upper": 49087.805718943775,
- },
- Object {
- "anomaly_score": 0,
- "lower": 862.4069845546885,
- "upper": 49089.84051479006,
- },
- Object {
- "anomaly_score": 2.718289217634223,
- "lower": 862.7834836635291,
- "upper": 51834.13246654848,
- },
- Object {
- "anomaly_score": 0,
- "lower": 863.5914163409548,
- "upper": 51136.66870946708,
- },
- Object {
- "anomaly_score": 0,
- "lower": 865.9550918866486,
- "upper": 50968.889501405334,
- },
- Object {
- "anomaly_score": 0,
- "lower": 866.5727896346234,
- "upper": 51039.136906324355,
- },
- Object {
- "anomaly_score": 0,
- "lower": 866.4824432593966,
- "upper": 50450.44063039239,
- },
- Object {
- "anomaly_score": 0,
- "lower": 869.2106974966512,
- "upper": 49883.2079974308,
- },
- Object {
- "anomaly_score": 0,
- "lower": 869.7908032042425,
- "upper": 50019.796552072105,
- },
- Object {
- "anomaly_score": 0,
- "lower": 872.0969808877924,
- "upper": 50352.19806206938,
- },
- Object {
- "anomaly_score": 0,
- "lower": 873.8327021716271,
- "upper": 49893.959882267525,
- },
- Object {
- "anomaly_score": 0,
- "lower": 875.6449156690691,
- "upper": 49882.868445094966,
- },
- Object {
- "anomaly_score": 0,
- "lower": 874.6294655070553,
- "upper": 49766.53895122279,
- },
- Object {
- "anomaly_score": 0,
- "lower": 878.2077083935897,
- "upper": 49424.25380462067,
- },
- Object {
- "anomaly_score": 0,
- "lower": 879.6702185935983,
- "upper": 50079.967231416216,
- },
- Object {
- "anomaly_score": 0,
- "lower": 880.9475908626134,
- "upper": 49447.853072406695,
- },
- Object {
- "anomaly_score": 0,
- "lower": 883.2355577302953,
- "upper": 49628.237099331986,
- },
- Object {
- "anomaly_score": 0,
- "lower": 885.0345875232065,
- "upper": 49121.655177004985,
- },
- Object {
- "anomaly_score": 0,
- "lower": 886.8375619687324,
- "upper": 49439.75445560749,
- },
- Object {
- "anomaly_score": 0,
- "lower": 888.2875318407426,
- "upper": 49095.91031920496,
- },
- Object {
- "anomaly_score": 0,
- "lower": 887.4807424937617,
- "upper": 48584.97256737151,
- },
- Object {
- "anomaly_score": 0,
- "lower": 885.3782512926099,
- "upper": 48401.4014885278,
- },
- Object {
- "anomaly_score": 0,
- "lower": 883.9626695681782,
- "upper": 48303.662251777845,
- },
- Object {
- "anomaly_score": 0,
- "lower": 881.5723811019918,
- "upper": 48079.01124458592,
- },
- Object {
- "anomaly_score": 66.42568,
- "lower": 0,
- "upper": 58715.507088231585,
- },
- Object {
- "anomaly_score": 0,
- "lower": 0,
- "upper": 49868.15796918666,
- },
- Object {
- "anomaly_score": 0.060750193569274885,
- "lower": 2003.2599232283408,
- "upper": 50310.902258087066,
- },
- Object {
- "anomaly_score": 0.2831448638843196,
- "lower": 1346.2241502014724,
- "upper": 51642.47679276076,
- },
- ],
- },
- "p95": Array [
- 80738.78571428556,
- 77058.03529411761,
- 77892.20721980717,
- 77085.86687499998,
- 80048.3462981744,
- 84089.21370223971,
- 84880.90143416924,
- 84554.8884781166,
- 81839.39583333326,
- 85993.55410163336,
- 85001.44588628765,
- 86980.16445312503,
- 84961.8710743802,
- 88906.54601889332,
- 90198.34708994703,
- 135627.71242424246,
- 167037.1993837535,
- 128293.12184873945,
- 130653.54236263742,
- 131630.8902645502,
- 133581.33541666638,
- 132697.92762266204,
- 140003.6918918918,
- 138149.5673529411,
- 121872.37504835591,
- 116378.03873517792,
- 131545.40999999995,
- 133111.25804878055,
- 144821.9855278593,
- 134737.3997727272,
- 141206.57726666646,
- 137731.8994082841,
- 141476.23189033198,
- 149636.31340909077,
- 151934.55000000002,
- 82198.17857142858,
- 85946.43199999983,
- 78617.66249999996,
- 79606.48333333322,
- 76297.93999999986,
- 80742.63333333324,
- 81291.45969696966,
- 73467.02500000004,
- 69177.66999999993,
- 71956.06111111109,
- 68480.91142857139,
- 68957.0999999999,
- 67489.50416666668,
- 71556.91249999998,
- 72157.65128205132,
- 76124.5625,
- 141709.34661835746,
- 132371.48641975303,
- 186783.51503759398,
- 99540.17819499348,
- 95982.62454212455,
- 89559.3525925925,
- 95769.83153735634,
- 94063.90833755062,
- 96399.67269119772,
- 96436.42520161276,
- 91860.16988095238,
- 105989.8333333334,
- 97937.60342555979,
- 98967.2249999999,
- 97561.02469135808,
- 102557.78813357186,
- 100137.87578595306,
- 98412.97120445351,
- 101607.8328012912,
- 92000.51368421057,
- 78027.29473684198,
- 80762.078801789,
- 81160.83425925927,
- 84215.58945578222,
- 194188.21428571426,
- 172616.2293896504,
- 182653.81858220184,
- 194970.75667682925,
- ],
- "p99": Array [
- 293257.27333333343,
- 290195.8800000004,
- 278548.1649999994,
- 290701.8973333341,
- 286839.5897777779,
- 287979.5149999999,
- 300107.5009999992,
- 294402.2179999999,
- 289849.459333332,
- 296942.86299999955,
- 292048.20571428596,
- 299308.7371666667,
- 292151.2377777781,
- 302274.4192592592,
- 299457.1612121209,
- 350398.59259259375,
- 421204.23333333334,
- 368166.68976190523,
- 367193.6128571426,
- 375658.10190476174,
- 368152.03822222137,
- 365705.8319999995,
- 380075.48533333326,
- 375697.1923809518,
- 351080.94111111073,
- 339294.12799999997,
- 378902.90649999987,
- 384483.3233333327,
- 394692.25000000105,
- 403362.50399999996,
- 396559.0274999993,
- 371815.8320000008,
- 405477.6133333326,
- 413542.18133333366,
- 424399.340000001,
- 303815.9000000001,
- 306305.0800000006,
- 297521.94999999984,
- 317938.0900000003,
- 312262.3000000003,
- 318428.8700000002,
- 295421.4099999999,
- 293067.86000000004,
- 264935.71999999933,
- 282795.0400000003,
- 285390.8400000001,
- 290402.24,
- 293655.53,
- 292723.56999999995,
- 301051.32000000105,
- 291322.0499999998,
- 379855.2444444447,
- 371175.2592000001,
- 498378.4238888898,
- 331118.6599999997,
- 328101.3999999988,
- 313951.54249999986,
- 323340.5274074075,
- 315055.5047619052,
- 330070.03599999985,
- 320531.54416666675,
- 315137.16628571344,
- 337251.4042424246,
- 327054.9243636365,
- 327653.0000000006,
- 324505.1399999999,
- 338040.3999999998,
- 328600.5173333335,
- 334060.93628571345,
- 328569.4964999998,
- 320227.32399999973,
- 292019.2899999998,
- 297757.72666666657,
- 308034.4466666669,
- 301128.4895238093,
- 447266.9,
- 409147.332500001,
- 423121.9773333328,
- 473485.4199999998,
- ],
- },
- "total_hits": 1297673,
- "tpm_buckets": Array [
- Object {
- "avg": 78.106329113924,
- "key": "HTTP 2xx",
- "values": Array [
- 90.5,
- 91.5,
- 91.7,
- 93.3,
- 92,
- 91.3,
- 91,
- 90.5,
- 92.8,
- 91.5,
- 91.5,
- 92,
- 92.6,
- 91.2,
- 90.3,
- 84.1,
- 89.9,
- 91.8,
- 90.1,
- 91.4,
- 91.7,
- 92.2,
- 91.8,
- 89.8,
- 91.8,
- 91.9,
- 90.6,
- 92.6,
- 90,
- 92.1,
- 90.7,
- 92,
- 91.9,
- 91.6,
- 91.1,
- 25.2,
- 25.3,
- 25.4,
- 25.5,
- 26,
- 26,
- 25.1,
- 25.6,
- 25.2,
- 25.6,
- 25.6,
- 25,
- 25.6,
- 25.5,
- 25.5,
- 25.6,
- 90.3,
- 93.5,
- 90.5,
- 91.6,
- 91.3,
- 94.5,
- 90.9,
- 92.5,
- 92.8,
- 91.7,
- 92.2,
- 92.7,
- 90.9,
- 92.5,
- 91.7,
- 91.2,
- 91.5,
- 93.1,
- 92.2,
- 93.4,
- 93.7,
- 92.5,
- 92.9,
- 92.1,
- 84,
- 91.3,
- 91.5,
- 90.9,
- ],
- },
- Object {
- "avg": 0.46835443037974683,
- "key": "HTTP 3xx",
- "values": Array [
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 22.5,
- 2.5,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 12,
- 0,
- 0,
- 0,
- ],
- },
- Object {
- "avg": 5.68354430379747,
- "key": "HTTP 4xx",
- "values": Array [
- 6.7,
- 6.7,
- 6.5,
- 6.9,
- 6.6,
- 7.1,
- 6.9,
- 6.5,
- 6.9,
- 6.8,
- 6.8,
- 6.7,
- 6.9,
- 6.8,
- 6.6,
- 6.3,
- 6.9,
- 6.9,
- 6.5,
- 6.8,
- 6.7,
- 6.6,
- 6.9,
- 6.6,
- 6.8,
- 6.7,
- 6.6,
- 6.8,
- 6.5,
- 6.8,
- 7,
- 6.9,
- 6.5,
- 7,
- 6.4,
- 1.6,
- 1.3,
- 1.5,
- 1.6,
- 1.6,
- 1.7,
- 1.5,
- 1.4,
- 1.6,
- 1.4,
- 1.6,
- 1.4,
- 1.7,
- 1.5,
- 1.6,
- 1.5,
- 6.5,
- 7.1,
- 6.5,
- 6.4,
- 6.8,
- 6.8,
- 6.6,
- 6.4,
- 6.7,
- 6.7,
- 7.1,
- 6.7,
- 6.6,
- 6.5,
- 6.5,
- 7.1,
- 6.8,
- 7,
- 6.7,
- 6.7,
- 7,
- 6.8,
- 7,
- 7.1,
- 6.6,
- 6.8,
- 6.7,
- 6.7,
- ],
- },
- Object {
- "avg": 5.689873417721517,
- "key": "HTTP 5xx",
- "values": Array [
- 6.7,
- 6.6,
- 6.8,
- 6.9,
- 7.1,
- 6.8,
- 6.8,
- 6.9,
- 6.9,
- 6.4,
- 6.8,
- 6.6,
- 6.9,
- 6.7,
- 6.6,
- 6.1,
- 6.5,
- 6.9,
- 6.7,
- 6.7,
- 7.2,
- 6.9,
- 6.8,
- 6.4,
- 6.9,
- 6.5,
- 6.9,
- 7,
- 6.6,
- 6.6,
- 6.8,
- 7.1,
- 6.5,
- 6.7,
- 6.9,
- 1.6,
- 1.7,
- 1.6,
- 1.7,
- 1.8,
- 1.5,
- 1.7,
- 1.5,
- 1.6,
- 1.5,
- 1.6,
- 1.3,
- 1.6,
- 1.4,
- 1.5,
- 1.6,
- 6.7,
- 7,
- 6.3,
- 6.9,
- 6.8,
- 6.9,
- 6.7,
- 6.7,
- 6.5,
- 6.7,
- 6.7,
- 6.5,
- 6.6,
- 6.9,
- 6.9,
- 7.1,
- 6.7,
- 6.5,
- 6.8,
- 6.9,
- 6.8,
- 6.9,
- 6.8,
- 6.8,
- 6,
- 6.9,
- 6.5,
- 6.6,
- ],
- },
- Object {
- "avg": NaN,
- "key": "A Custom Bucket (that should be last)",
- "values": Array [],
- },
- ],
-}
-`;
diff --git a/x-pack/plugins/apm/server/lib/transactions/charts/__test__/get_timeseries_data.test.js b/x-pack/plugins/apm/server/lib/transactions/charts/__test__/get_timeseries_data.test.js
deleted file mode 100644
index 36ac9a0aff72e..0000000000000
--- a/x-pack/plugins/apm/server/lib/transactions/charts/__test__/get_timeseries_data.test.js
+++ /dev/null
@@ -1,63 +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 _ from 'lodash';
-import { getTimeseriesData } from '../get_timeseries_data';
-import timeseriesResponse from './timeseries_response.json';
-import responseTimeAnomalyResponse from './response_time_anomaly_response.json';
-
-describe('get_timeseries_data', () => {
- let res;
- let clientSpy;
- beforeEach(async () => {
- clientSpy = jest
- .fn()
- .mockResolvedValueOnce(timeseriesResponse)
- .mockResolvedValueOnce(responseTimeAnomalyResponse);
-
- res = await getTimeseriesData({
- serviceName: 'myServiceName',
- transactionType: 'myTransactionType',
- transactionName: null,
- setup: {
- start: 1528113600000,
- end: 1528977600000,
- client: clientSpy,
- config: {
- get: () => 'myIndex'
- }
- }
- });
- });
-
- it('should call client with correct query', () => {
- expect(clientSpy.mock.calls).toMatchSnapshot();
- });
-
- it('should not contain first and last bucket', () => {
- const mockDates = timeseriesResponse.aggregations.transaction_results.buckets[0].timeseries.buckets.map(
- bucket => bucket.key
- );
-
- expect(res.dates).not.toContain(_.first(mockDates));
- expect(res.dates).not.toContain(_.last(mockDates));
- expect(res.tpm_buckets[0].values).toHaveLength(res.dates.length);
- });
-
- it('should have correct order', () => {
- expect(res.tpm_buckets.map(bucket => bucket.key)).toEqual([
- 'HTTP 2xx',
- 'HTTP 3xx',
- 'HTTP 4xx',
- 'HTTP 5xx',
- 'A Custom Bucket (that should be last)'
- ]);
- });
-
- it('should match snapshot', () => {
- expect(res).toMatchSnapshot();
- });
-});
diff --git a/x-pack/plugins/apm/server/lib/transactions/charts/__test__/response_time_anomaly_response.json b/x-pack/plugins/apm/server/lib/transactions/charts/__test__/response_time_anomaly_response.json
deleted file mode 100644
index 8f022a7778e8d..0000000000000
--- a/x-pack/plugins/apm/server/lib/transactions/charts/__test__/response_time_anomaly_response.json
+++ /dev/null
@@ -1,1175 +0,0 @@
-{
- "took": 14,
- "timed_out": false,
- "_shards": {
- "total": 5,
- "successful": 5,
- "skipped": 0,
- "failed": 0
- },
- "hits": {
- "total": 4117,
- "max_score": 0,
- "hits": []
- },
- "aggregations": {
- "ml_avg_response_times": {
- "buckets": [
- {
- "key_as_string": "2018-06-04T12:00:00.000Z",
- "key": 1528113600000,
- "doc_count": 60,
- "anomaly_score": {
- "value": 0.07062823
- },
- "upper": {
- "value": 26781.294783193
- },
- "lower": {
- "value": 734.6120832292385
- }
- },
- {
- "key_as_string": "2018-06-04T15:00:00.000Z",
- "key": 1528124400000,
- "doc_count": 48,
- "anomaly_score": {
- "value": 0
- },
- "upper": {
- "value": 27505.95012649385
- },
- "lower": {
- "value": 737.7398559597923
- }
- },
- {
- "key_as_string": "2018-06-04T18:00:00.000Z",
- "key": 1528135200000,
- "doc_count": 48,
- "anomaly_score": {
- "value": 0
- },
- "upper": {
- "value": 27831.385094457328
- },
- "lower": {
- "value": 740.6510789069575
- }
- },
- {
- "key_as_string": "2018-06-04T21:00:00.000Z",
- "key": 1528146000000,
- "doc_count": 48,
- "anomaly_score": {
- "value": 0
- },
- "upper": {
- "value": 28113.842130309873
- },
- "lower": {
- "value": 743.0092006506535
- }
- },
- {
- "key_as_string": "2018-06-05T00:00:00.000Z",
- "key": 1528156800000,
- "doc_count": 48,
- "anomaly_score": {
- "value": 0
- },
- "upper": {
- "value": 28166.937431054437
- },
- "lower": {
- "value": 745.266369017907
- }
- },
- {
- "key_as_string": "2018-06-05T03:00:00.000Z",
- "key": 1528167600000,
- "doc_count": 50,
- "anomaly_score": {
- "value": 0.0214167
- },
- "upper": {
- "value": 28506.23990430994
- },
- "lower": {
- "value": 747.3207728528188
- }
- },
- {
- "key_as_string": "2018-06-05T06:00:00.000Z",
- "key": 1528178400000,
- "doc_count": 48,
- "anomaly_score": {
- "value": 0
- },
- "upper": {
- "value": 29019.425285291298
- },
- "lower": {
- "value": 749.6894207909651
- }
- },
- {
- "key_as_string": "2018-06-05T09:00:00.000Z",
- "key": 1528189200000,
- "doc_count": 51,
- "anomaly_score": {
- "value": 0.05939392
- },
- "upper": {
- "value": 29293.392326541318
- },
- "lower": {
- "value": 752.7726473096143
- }
- },
- {
- "key_as_string": "2018-06-05T12:00:00.000Z",
- "key": 1528200000000,
- "doc_count": 50,
- "anomaly_score": {
- "value": 0.01836784
- },
- "upper": {
- "value": 29812.56398272085
- },
- "lower": {
- "value": 754.7407389918743
- }
- },
- {
- "key_as_string": "2018-06-05T15:00:00.000Z",
- "key": 1528210800000,
- "doc_count": 48,
- "anomaly_score": {
- "value": 0
- },
- "upper": {
- "value": 30060.955415439636
- },
- "lower": {
- "value": 757.2268079827784
- }
- },
- {
- "key_as_string": "2018-06-05T18:00:00.000Z",
- "key": 1528221600000,
- "doc_count": 48,
- "anomaly_score": {
- "value": 0
- },
- "upper": {
- "value": 30376.319798106222
- },
- "lower": {
- "value": 758.3112520555287
- }
- },
- {
- "key_as_string": "2018-06-05T21:00:00.000Z",
- "key": 1528232400000,
- "doc_count": 48,
- "anomaly_score": {
- "value": 0
- },
- "upper": {
- "value": 30627.243996529527
- },
- "lower": {
- "value": 761.9827340264112
- }
- },
- {
- "key_as_string": "2018-06-06T00:00:00.000Z",
- "key": 1528243200000,
- "doc_count": 48,
- "anomaly_score": {
- "value": 0
- },
- "upper": {
- "value": 31035.75952712361
- },
- "lower": {
- "value": 771.7209606007517
- }
- },
- {
- "key_as_string": "2018-06-06T03:00:00.000Z",
- "key": 1528254000000,
- "doc_count": 48,
- "anomaly_score": {
- "value": 0
- },
- "upper": {
- "value": 31062.244462967443
- },
- "lower": {
- "value": 822.9174906119024
- }
- },
- {
- "key_as_string": "2018-06-06T06:00:00.000Z",
- "key": 1528264800000,
- "doc_count": 48,
- "anomaly_score": {
- "value": 0
- },
- "upper": {
- "value": 31463.705363442183
- },
- "lower": {
- "value": 867.1132870297309
- }
- },
- {
- "key_as_string": "2018-06-06T09:00:00.000Z",
- "key": 1528275600000,
- "doc_count": 48,
- "anomaly_score": {
- "value": 0
- },
- "upper": {
- "value": 31743.78493690837
- },
- "lower": {
- "value": 871.6217257693573
- }
- },
- {
- "key_as_string": "2018-06-06T12:00:00.000Z",
- "key": 1528286400000,
- "doc_count": 86,
- "anomaly_score": {
- "value": 93.09271062370188
- },
- "upper": {
- "value": 42784.833235636936
- },
- "lower": {
- "value": 630.1794765317344
- }
- },
- {
- "key_as_string": "2018-06-06T15:00:00.000Z",
- "key": 1528297200000,
- "doc_count": 94,
- "anomaly_score": {
- "value": 94.91969
- },
- "upper": {
- "value": 34441.21907642463
- },
- "lower": {
- "value": 871.0283056454996
- }
- },
- {
- "key_as_string": "2018-06-06T18:00:00.000Z",
- "key": 1528308000000,
- "doc_count": 76,
- "anomaly_score": {
- "value": 0.737564554333639
- },
- "upper": {
- "value": 35467.552283525925
- },
- "lower": {
- "value": 872.694053998953
- }
- },
- {
- "key_as_string": "2018-06-06T21:00:00.000Z",
- "key": 1528318800000,
- "doc_count": 62,
- "anomaly_score": {
- "value": 0.2233028643272195
- },
- "upper": {
- "value": 36793.04873774251
- },
- "lower": {
- "value": 872.8967719351887
- }
- },
- {
- "key_as_string": "2018-06-07T00:00:00.000Z",
- "key": 1528329600000,
- "doc_count": 56,
- "anomaly_score": {
- "value": 4.367981
- },
- "upper": {
- "value": 37663.180967734144
- },
- "lower": {
- "value": 873.2094351335686
- }
- },
- {
- "key_as_string": "2018-06-07T03:00:00.000Z",
- "key": 1528340400000,
- "doc_count": 74,
- "anomaly_score": {
- "value": 10.94823
- },
- "upper": {
- "value": 38704.9736025016
- },
- "lower": {
- "value": 872.096335158222
- }
- },
- {
- "key_as_string": "2018-06-07T06:00:00.000Z",
- "key": 1528351200000,
- "doc_count": 50,
- "anomaly_score": {
- "value": 0.025502508470513552
- },
- "upper": {
- "value": 39411.4696425657
- },
- "lower": {
- "value": 870.7141079237686
- }
- },
- {
- "key_as_string": "2018-06-07T09:00:00.000Z",
- "key": 1528362000000,
- "doc_count": 52,
- "anomaly_score": {
- "value": 0.04643894365231562
- },
- "upper": {
- "value": 40436.89001900413
- },
- "lower": {
- "value": 865.6904233415615
- }
- },
- {
- "key_as_string": "2018-06-07T12:00:00.000Z",
- "key": 1528372800000,
- "doc_count": 52,
- "anomaly_score": {
- "value": 0.08232853094836577
- },
- "upper": {
- "value": 41583.671803791396
- },
- "lower": {
- "value": 864.5587212551438
- }
- },
- {
- "key_as_string": "2018-06-07T15:00:00.000Z",
- "key": 1528383600000,
- "doc_count": 48,
- "anomaly_score": {
- "value": 0
- },
- "upper": {
- "value": 41918.88300390927
- },
- "lower": {
- "value": 862.0456649399898
- }
- },
- {
- "key_as_string": "2018-06-07T18:00:00.000Z",
- "key": 1528394400000,
- "doc_count": 48,
- "anomaly_score": {
- "value": 0
- },
- "upper": {
- "value": 42346.34733913561
- },
- "lower": {
- "value": 862.6952960489333
- }
- },
- {
- "key_as_string": "2018-06-07T21:00:00.000Z",
- "key": 1528405200000,
- "doc_count": 50,
- "anomaly_score": {
- "value": 0.09328928850624264
- },
- "upper": {
- "value": 43503.30873034762
- },
- "lower": {
- "value": 859.02865711764
- }
- },
- {
- "key_as_string": "2018-06-08T00:00:00.000Z",
- "key": 1528416000000,
- "doc_count": 50,
- "anomaly_score": {
- "value": 0.01490678070537287
- },
- "upper": {
- "value": 43582.32622523151
- },
- "lower": {
- "value": 853.1249075544679
- }
- },
- {
- "key_as_string": "2018-06-08T03:00:00.000Z",
- "key": 1528426800000,
- "doc_count": 50,
- "anomaly_score": {
- "value": 0.025631694904640304
- },
- "upper": {
- "value": 44583.7194942183
- },
- "lower": {
- "value": 850.0412997919607
- }
- },
- {
- "key_as_string": "2018-06-08T06:00:00.000Z",
- "key": 1528437600000,
- "doc_count": 48,
- "anomaly_score": {
- "value": 0
- },
- "upper": {
- "value": 45027.0923125673
- },
- "lower": {
- "value": 846.9251200783423
- }
- },
- {
- "key_as_string": "2018-06-08T09:00:00.000Z",
- "key": 1528448400000,
- "doc_count": 52,
- "anomaly_score": {
- "value": 0.1775235302080928
- },
- "upper": {
- "value": 46355.1414826366
- },
- "lower": {
- "value": 839.9462033017412
- }
- },
- {
- "key_as_string": "2018-06-08T12:00:00.000Z",
- "key": 1528459200000,
- "doc_count": 48,
- "anomaly_score": {
- "value": 0
- },
- "upper": {
- "value": 46997.18507921725
- },
- "lower": {
- "value": 740.8424736560071
- }
- },
- {
- "key_as_string": "2018-06-08T15:00:00.000Z",
- "key": 1528470000000,
- "doc_count": 48,
- "anomaly_score": {
- "value": 0
- },
- "upper": {
- "value": 47730.52441880603
- },
- "lower": {
- "value": 675.2681661332581
- }
- },
- {
- "key_as_string": "2018-06-08T18:00:00.000Z",
- "key": 1528480800000,
- "doc_count": 50,
- "anomaly_score": {
- "value": 0
- },
- "upper": {
- "value": 48709.29810572524
- },
- "lower": {
- "value": 672.90202453507
- }
- },
- {
- "key_as_string": "2018-06-08T21:00:00.000Z",
- "key": 1528491600000,
- "doc_count": 50,
- "anomaly_score": {
- "value": 0
- },
- "upper": {
- "value": 49406.64628717409
- },
- "lower": {
- "value": 676.0944399455826
- }
- },
- {
- "key_as_string": "2018-06-09T00:00:00.000Z",
- "key": 1528502400000,
- "doc_count": 48,
- "anomaly_score": {
- "value": 0
- },
- "upper": {
- "value": 73477.3874808886
- },
- "lower": {
- "value": 682.4396257998045
- }
- },
- {
- "key_as_string": "2018-06-09T03:00:00.000Z",
- "key": 1528513200000,
- "doc_count": 48,
- "anomaly_score": {
- "value": 0
- },
- "upper": {
- "value": 73487.82525090317
- },
- "lower": {
- "value": 686.44341250381
- }
- },
- {
- "key_as_string": "2018-06-09T06:00:00.000Z",
- "key": 1528524000000,
- "doc_count": 48,
- "anomaly_score": {
- "value": 0
- },
- "upper": {
- "value": 72962.57745081023
- },
- "lower": {
- "value": 690.5371630779586
- }
- },
- {
- "key_as_string": "2018-06-09T09:00:00.000Z",
- "key": 1528534800000,
- "doc_count": 48,
- "anomaly_score": {
- "value": 0
- },
- "upper": {
- "value": 72489.77380542927
- },
- "lower": {
- "value": 695.8034104561633
- }
- },
- {
- "key_as_string": "2018-06-09T12:00:00.000Z",
- "key": 1528545600000,
- "doc_count": 48,
- "anomaly_score": {
- "value": 0
- },
- "upper": {
- "value": 72463.76348179985
- },
- "lower": {
- "value": 707.6839448592744
- }
- },
- {
- "key_as_string": "2018-06-09T15:00:00.000Z",
- "key": 1528556400000,
- "doc_count": 50,
- "anomaly_score": {
- "value": 0.18086821490763677
- },
- "upper": {
- "value": 72996.2561390666
- },
- "lower": {
- "value": 781.8674002616508
- }
- },
- {
- "key_as_string": "2018-06-09T18:00:00.000Z",
- "key": 1528567200000,
- "doc_count": 48,
- "anomaly_score": {
- "value": 0
- },
- "upper": {
- "value": 73169.30855560771
- },
- "lower": {
- "value": 846.540373740061
- }
- },
- {
- "key_as_string": "2018-06-09T21:00:00.000Z",
- "key": 1528578000000,
- "doc_count": 48,
- "anomaly_score": {
- "value": 0
- },
- "upper": {
- "value": 73491.08437587181
- },
- "lower": {
- "value": 860.5368537637945
- }
- },
- {
- "key_as_string": "2018-06-10T00:00:00.000Z",
- "key": 1528588800000,
- "doc_count": 49,
- "anomaly_score": {
- "value": 0
- },
- "upper": {
- "value": 72389.78456634001
- },
- "lower": {
- "value": 863.0293573898325
- }
- },
- {
- "key_as_string": "2018-06-10T03:00:00.000Z",
- "key": 1528599600000,
- "doc_count": 48,
- "anomaly_score": {
- "value": 0
- },
- "upper": {
- "value": 72311.41927730369
- },
- "lower": {
- "value": 863.4144235290587
- }
- },
- {
- "key_as_string": "2018-06-10T06:00:00.000Z",
- "key": 1528610400000,
- "doc_count": 48,
- "anomaly_score": {
- "value": 0
- },
- "upper": {
- "value": 71383.41956191002
- },
- "lower": {
- "value": 863.6781514985616
- }
- },
- {
- "key_as_string": "2018-06-10T09:00:00.000Z",
- "key": 1528621200000,
- "doc_count": 48,
- "anomaly_score": {
- "value": 0
- },
- "upper": {
- "value": 74565.86466696904
- },
- "lower": {
- "value": 863.4492510434609
- }
- },
- {
- "key_as_string": "2018-06-10T12:00:00.000Z",
- "key": 1528632000000,
- "doc_count": 48,
- "anomaly_score": {
- "value": 0
- },
- "upper": {
- "value": 71304.14035324028
- },
- "lower": {
- "value": 863.1958870174615
- }
- },
- {
- "key_as_string": "2018-06-10T15:00:00.000Z",
- "key": 1528642800000,
- "doc_count": 48,
- "anomaly_score": {
- "value": 0
- },
- "upper": {
- "value": 72434.51561823535
- },
- "lower": {
- "value": 862.6161500045084
- }
- },
- {
- "key_as_string": "2018-06-10T18:00:00.000Z",
- "key": 1528653600000,
- "doc_count": 48,
- "anomaly_score": {
- "value": 0
- },
- "upper": {
- "value": 71664.49530601672
- },
- "lower": {
- "value": 861.9526316405551
- }
- },
- {
- "key_as_string": "2018-06-10T21:00:00.000Z",
- "key": 1528664400000,
- "doc_count": 48,
- "anomaly_score": {
- "value": 0
- },
- "upper": {
- "value": 71264.41362778837
- },
- "lower": {
- "value": 861.1638627191994
- }
- },
- {
- "key_as_string": "2018-06-11T00:00:00.000Z",
- "key": 1528675200000,
- "doc_count": 48,
- "anomaly_score": {
- "value": 0
- },
- "upper": {
- "value": 49087.805718943775
- },
- "lower": {
- "value": 860.1741427701811
- }
- },
- {
- "key_as_string": "2018-06-11T03:00:00.000Z",
- "key": 1528686000000,
- "doc_count": 48,
- "anomaly_score": {
- "value": 0
- },
- "upper": {
- "value": 49089.84051479006
- },
- "lower": {
- "value": 862.4069845546885
- }
- },
- {
- "key_as_string": "2018-06-11T06:00:00.000Z",
- "key": 1528696800000,
- "doc_count": 60,
- "anomaly_score": {
- "value": 2.718289217634223
- },
- "upper": {
- "value": 51834.13246654848
- },
- "lower": {
- "value": 862.7834836635291
- }
- },
- {
- "key_as_string": "2018-06-11T09:00:00.000Z",
- "key": 1528707600000,
- "doc_count": 48,
- "anomaly_score": {
- "value": 0
- },
- "upper": {
- "value": 51136.66870946708
- },
- "lower": {
- "value": 863.5914163409548
- }
- },
- {
- "key_as_string": "2018-06-11T12:00:00.000Z",
- "key": 1528718400000,
- "doc_count": 48,
- "anomaly_score": {
- "value": 0
- },
- "upper": {
- "value": 50968.889501405334
- },
- "lower": {
- "value": 865.9550918866486
- }
- },
- {
- "key_as_string": "2018-06-11T15:00:00.000Z",
- "key": 1528729200000,
- "doc_count": 48,
- "anomaly_score": {
- "value": 0
- },
- "upper": {
- "value": 51039.136906324355
- },
- "lower": {
- "value": 866.5727896346234
- }
- },
- {
- "key_as_string": "2018-06-11T18:00:00.000Z",
- "key": 1528740000000,
- "doc_count": 48,
- "anomaly_score": {
- "value": 0
- },
- "upper": {
- "value": 50450.44063039239
- },
- "lower": {
- "value": 866.4824432593966
- }
- },
- {
- "key_as_string": "2018-06-11T21:00:00.000Z",
- "key": 1528750800000,
- "doc_count": 48,
- "anomaly_score": {
- "value": 0
- },
- "upper": {
- "value": 49883.2079974308
- },
- "lower": {
- "value": 869.2106974966512
- }
- },
- {
- "key_as_string": "2018-06-12T00:00:00.000Z",
- "key": 1528761600000,
- "doc_count": 48,
- "anomaly_score": {
- "value": 0
- },
- "upper": {
- "value": 50019.796552072105
- },
- "lower": {
- "value": 869.7908032042425
- }
- },
- {
- "key_as_string": "2018-06-12T03:00:00.000Z",
- "key": 1528772400000,
- "doc_count": 48,
- "anomaly_score": {
- "value": 0
- },
- "upper": {
- "value": 50352.19806206938
- },
- "lower": {
- "value": 872.0969808877924
- }
- },
- {
- "key_as_string": "2018-06-12T06:00:00.000Z",
- "key": 1528783200000,
- "doc_count": 48,
- "anomaly_score": {
- "value": 0
- },
- "upper": {
- "value": 49893.959882267525
- },
- "lower": {
- "value": 873.8327021716271
- }
- },
- {
- "key_as_string": "2018-06-12T09:00:00.000Z",
- "key": 1528794000000,
- "doc_count": 48,
- "anomaly_score": {
- "value": 0
- },
- "upper": {
- "value": 49882.868445094966
- },
- "lower": {
- "value": 875.6449156690691
- }
- },
- {
- "key_as_string": "2018-06-12T12:00:00.000Z",
- "key": 1528804800000,
- "doc_count": 48,
- "anomaly_score": {
- "value": 0
- },
- "upper": {
- "value": 49766.53895122279
- },
- "lower": {
- "value": 874.6294655070553
- }
- },
- {
- "key_as_string": "2018-06-12T15:00:00.000Z",
- "key": 1528815600000,
- "doc_count": 50,
- "anomaly_score": {
- "value": 0
- },
- "upper": {
- "value": 49424.25380462067
- },
- "lower": {
- "value": 878.2077083935897
- }
- },
- {
- "key_as_string": "2018-06-12T18:00:00.000Z",
- "key": 1528826400000,
- "doc_count": 50,
- "anomaly_score": {
- "value": 0
- },
- "upper": {
- "value": 50079.967231416216
- },
- "lower": {
- "value": 879.6702185935983
- }
- },
- {
- "key_as_string": "2018-06-12T21:00:00.000Z",
- "key": 1528837200000,
- "doc_count": 48,
- "anomaly_score": {
- "value": 0
- },
- "upper": {
- "value": 49447.853072406695
- },
- "lower": {
- "value": 880.9475908626134
- }
- },
- {
- "key_as_string": "2018-06-13T00:00:00.000Z",
- "key": 1528848000000,
- "doc_count": 51,
- "anomaly_score": {
- "value": 0
- },
- "upper": {
- "value": 49628.237099331986
- },
- "lower": {
- "value": 883.2355577302953
- }
- },
- {
- "key_as_string": "2018-06-13T03:00:00.000Z",
- "key": 1528858800000,
- "doc_count": 50,
- "anomaly_score": {
- "value": 0
- },
- "upper": {
- "value": 49121.655177004985
- },
- "lower": {
- "value": 885.0345875232065
- }
- },
- {
- "key_as_string": "2018-06-13T06:00:00.000Z",
- "key": 1528869600000,
- "doc_count": 50,
- "anomaly_score": {
- "value": 0
- },
- "upper": {
- "value": 49439.75445560749
- },
- "lower": {
- "value": 886.8375619687324
- }
- },
- {
- "key_as_string": "2018-06-13T09:00:00.000Z",
- "key": 1528880400000,
- "doc_count": 48,
- "anomaly_score": {
- "value": 0
- },
- "upper": {
- "value": 49095.91031920496
- },
- "lower": {
- "value": 888.2875318407426
- }
- },
- {
- "key_as_string": "2018-06-13T12:00:00.000Z",
- "key": 1528891200000,
- "doc_count": 50,
- "anomaly_score": {
- "value": 0
- },
- "upper": {
- "value": 48584.97256737151
- },
- "lower": {
- "value": 887.4807424937617
- }
- },
- {
- "key_as_string": "2018-06-13T15:00:00.000Z",
- "key": 1528902000000,
- "doc_count": 50,
- "anomaly_score": {
- "value": 0
- },
- "upper": {
- "value": 48401.4014885278
- },
- "lower": {
- "value": 885.3782512926099
- }
- },
- {
- "key_as_string": "2018-06-13T18:00:00.000Z",
- "key": 1528912800000,
- "doc_count": 50,
- "anomaly_score": {
- "value": 0
- },
- "upper": {
- "value": 48303.662251777845
- },
- "lower": {
- "value": 883.9626695681782
- }
- },
- {
- "key_as_string": "2018-06-13T21:00:00.000Z",
- "key": 1528923600000,
- "doc_count": 48,
- "anomaly_score": {
- "value": 0
- },
- "upper": {
- "value": 48079.01124458592
- },
- "lower": {
- "value": 881.5723811019918
- }
- },
- {
- "key_as_string": "2018-06-14T00:00:00.000Z",
- "key": 1528934400000,
- "doc_count": 60,
- "anomaly_score": {
- "value": 66.42568
- },
- "upper": {
- "value": 58715.507088231585
- },
- "lower": {
- "value": 0
- }
- },
- {
- "key_as_string": "2018-06-14T03:00:00.000Z",
- "key": 1528945200000,
- "doc_count": 55,
- "anomaly_score": {
- "value": 0
- },
- "upper": {
- "value": 49868.15796918666
- },
- "lower": {
- "value": 0
- }
- },
- {
- "key_as_string": "2018-06-14T06:00:00.000Z",
- "key": 1528956000000,
- "doc_count": 53,
- "anomaly_score": {
- "value": 0.060750193569274885
- },
- "upper": {
- "value": 50310.902258087066
- },
- "lower": {
- "value": 2003.2599232283408
- }
- },
- {
- "key_as_string": "2018-06-14T09:00:00.000Z",
- "key": 1528966800000,
- "doc_count": 62,
- "anomaly_score": {
- "value": 0.2831448638843196
- },
- "upper": {
- "value": 51642.47679276076
- },
- "lower": {
- "value": 1346.2241502014724
- }
- },
- {
- "key_as_string": "2018-06-14T12:00:00.000Z",
- "key": 1528977600000,
- "doc_count": 4,
- "anomaly_score": {
- "value": 0
- },
- "upper": {
- "value": 50550.64218576831
- },
- "lower": {
- "value": 1317.070500756407
- }
- }
- ]
- },
- "top_hits": {
- "hits": {
- "total": 4117,
- "max_score": null,
- "hits": [
- {
- "_index": ".ml-anomalies-shared",
- "_type": "doc",
- "_id": "opbeans-node-request-high_mean_response_time_model_plot_1528170300000_900_0_29791_0",
- "_score": null,
- "_source": {
- "bucket_span": 900
- },
- "sort": [
- 900
- ]
- }
- ]
- }
- }
- }
-}
diff --git a/x-pack/plugins/apm/server/lib/transactions/charts/__test__/timeseries_response.json b/x-pack/plugins/apm/server/lib/transactions/charts/__test__/timeseries_response.json
deleted file mode 100644
index 38aa0237aebd6..0000000000000
--- a/x-pack/plugins/apm/server/lib/transactions/charts/__test__/timeseries_response.json
+++ /dev/null
@@ -1,2821 +0,0 @@
-{
- "took": 368,
- "timed_out": false,
- "_shards": {
- "total": 90,
- "successful": 90,
- "skipped": 0,
- "failed": 0
- },
- "hits": {
- "total": 1297673,
- "max_score": 0,
- "hits": []
- },
- "aggregations": {
- "transaction_results": {
- "doc_count_error_upper_bound": 0,
- "sum_other_doc_count": 0,
- "buckets": [
- {
- "key": "A Custom Bucket (that should be last)",
- "doc_count": 0,
- "timeseries": { "buckets": [] }
- },
- {
- "key": "HTTP 2xx",
- "doc_count": 1127080,
- "timeseries": {
- "buckets": [
- {
- "key_as_string": "2018-06-04T12:00:00.000Z",
- "key": 1528113600000,
- "doc_count": 16446
- },
- {
- "key_as_string": "2018-06-04T15:00:00.000Z",
- "key": 1528124400000,
- "doc_count": 16292
- },
- {
- "key_as_string": "2018-06-04T18:00:00.000Z",
- "key": 1528135200000,
- "doc_count": 16464
- },
- {
- "key_as_string": "2018-06-04T21:00:00.000Z",
- "key": 1528146000000,
- "doc_count": 16497
- },
- {
- "key_as_string": "2018-06-05T00:00:00.000Z",
- "key": 1528156800000,
- "doc_count": 16799
- },
- {
- "key_as_string": "2018-06-05T03:00:00.000Z",
- "key": 1528167600000,
- "doc_count": 16561
- },
- {
- "key_as_string": "2018-06-05T06:00:00.000Z",
- "key": 1528178400000,
- "doc_count": 16431
- },
- {
- "key_as_string": "2018-06-05T09:00:00.000Z",
- "key": 1528189200000,
- "doc_count": 16383
- },
- {
- "key_as_string": "2018-06-05T12:00:00.000Z",
- "key": 1528200000000,
- "doc_count": 16295
- },
- {
- "key_as_string": "2018-06-05T15:00:00.000Z",
- "key": 1528210800000,
- "doc_count": 16702
- },
- {
- "key_as_string": "2018-06-05T18:00:00.000Z",
- "key": 1528221600000,
- "doc_count": 16469
- },
- {
- "key_as_string": "2018-06-05T21:00:00.000Z",
- "key": 1528232400000,
- "doc_count": 16466
- },
- {
- "key_as_string": "2018-06-06T00:00:00.000Z",
- "key": 1528243200000,
- "doc_count": 16551
- },
- {
- "key_as_string": "2018-06-06T03:00:00.000Z",
- "key": 1528254000000,
- "doc_count": 16675
- },
- {
- "key_as_string": "2018-06-06T06:00:00.000Z",
- "key": 1528264800000,
- "doc_count": 16410
- },
- {
- "key_as_string": "2018-06-06T09:00:00.000Z",
- "key": 1528275600000,
- "doc_count": 16247
- },
- {
- "key_as_string": "2018-06-06T12:00:00.000Z",
- "key": 1528286400000,
- "doc_count": 15145
- },
- {
- "key_as_string": "2018-06-06T15:00:00.000Z",
- "key": 1528297200000,
- "doc_count": 16178
- },
- {
- "key_as_string": "2018-06-06T18:00:00.000Z",
- "key": 1528308000000,
- "doc_count": 16530
- },
- {
- "key_as_string": "2018-06-06T21:00:00.000Z",
- "key": 1528318800000,
- "doc_count": 16211
- },
- {
- "key_as_string": "2018-06-07T00:00:00.000Z",
- "key": 1528329600000,
- "doc_count": 16453
- },
- {
- "key_as_string": "2018-06-07T03:00:00.000Z",
- "key": 1528340400000,
- "doc_count": 16503
- },
- {
- "key_as_string": "2018-06-07T06:00:00.000Z",
- "key": 1528351200000,
- "doc_count": 16604
- },
- {
- "key_as_string": "2018-06-07T09:00:00.000Z",
- "key": 1528362000000,
- "doc_count": 16522
- },
- {
- "key_as_string": "2018-06-07T12:00:00.000Z",
- "key": 1528372800000,
- "doc_count": 16164
- },
- {
- "key_as_string": "2018-06-07T15:00:00.000Z",
- "key": 1528383600000,
- "doc_count": 16520
- },
- {
- "key_as_string": "2018-06-07T18:00:00.000Z",
- "key": 1528394400000,
- "doc_count": 16534
- },
- {
- "key_as_string": "2018-06-07T21:00:00.000Z",
- "key": 1528405200000,
- "doc_count": 16311
- },
- {
- "key_as_string": "2018-06-08T00:00:00.000Z",
- "key": 1528416000000,
- "doc_count": 16670
- },
- {
- "key_as_string": "2018-06-08T03:00:00.000Z",
- "key": 1528426800000,
- "doc_count": 16192
- },
- {
- "key_as_string": "2018-06-08T06:00:00.000Z",
- "key": 1528437600000,
- "doc_count": 16579
- },
- {
- "key_as_string": "2018-06-08T09:00:00.000Z",
- "key": 1528448400000,
- "doc_count": 16330
- },
- {
- "key_as_string": "2018-06-08T12:00:00.000Z",
- "key": 1528459200000,
- "doc_count": 16565
- },
- {
- "key_as_string": "2018-06-08T15:00:00.000Z",
- "key": 1528470000000,
- "doc_count": 16543
- },
- {
- "key_as_string": "2018-06-08T18:00:00.000Z",
- "key": 1528480800000,
- "doc_count": 16492
- },
- {
- "key_as_string": "2018-06-08T21:00:00.000Z",
- "key": 1528491600000,
- "doc_count": 16404
- },
- {
- "key_as_string": "2018-06-09T00:00:00.000Z",
- "key": 1528502400000,
- "doc_count": 4528
- },
- {
- "key_as_string": "2018-06-09T03:00:00.000Z",
- "key": 1528513200000,
- "doc_count": 4557
- },
- {
- "key_as_string": "2018-06-09T06:00:00.000Z",
- "key": 1528524000000,
- "doc_count": 4566
- },
- {
- "key_as_string": "2018-06-09T09:00:00.000Z",
- "key": 1528534800000,
- "doc_count": 4586
- },
- {
- "key_as_string": "2018-06-09T12:00:00.000Z",
- "key": 1528545600000,
- "doc_count": 4672
- },
- {
- "key_as_string": "2018-06-09T15:00:00.000Z",
- "key": 1528556400000,
- "doc_count": 4685
- },
- {
- "key_as_string": "2018-06-09T18:00:00.000Z",
- "key": 1528567200000,
- "doc_count": 4521
- },
- {
- "key_as_string": "2018-06-09T21:00:00.000Z",
- "key": 1528578000000,
- "doc_count": 4612
- },
- {
- "key_as_string": "2018-06-10T00:00:00.000Z",
- "key": 1528588800000,
- "doc_count": 4535
- },
- {
- "key_as_string": "2018-06-10T03:00:00.000Z",
- "key": 1528599600000,
- "doc_count": 4606
- },
- {
- "key_as_string": "2018-06-10T06:00:00.000Z",
- "key": 1528610400000,
- "doc_count": 4614
- },
- {
- "key_as_string": "2018-06-10T09:00:00.000Z",
- "key": 1528621200000,
- "doc_count": 4507
- },
- {
- "key_as_string": "2018-06-10T12:00:00.000Z",
- "key": 1528632000000,
- "doc_count": 4611
- },
- {
- "key_as_string": "2018-06-10T15:00:00.000Z",
- "key": 1528642800000,
- "doc_count": 4587
- },
- {
- "key_as_string": "2018-06-10T18:00:00.000Z",
- "key": 1528653600000,
- "doc_count": 4582
- },
- {
- "key_as_string": "2018-06-10T21:00:00.000Z",
- "key": 1528664400000,
- "doc_count": 4615
- },
- {
- "key_as_string": "2018-06-11T00:00:00.000Z",
- "key": 1528675200000,
- "doc_count": 16251
- },
- {
- "key_as_string": "2018-06-11T03:00:00.000Z",
- "key": 1528686000000,
- "doc_count": 16825
- },
- {
- "key_as_string": "2018-06-11T06:00:00.000Z",
- "key": 1528696800000,
- "doc_count": 16288
- },
- {
- "key_as_string": "2018-06-11T09:00:00.000Z",
- "key": 1528707600000,
- "doc_count": 16492
- },
- {
- "key_as_string": "2018-06-11T12:00:00.000Z",
- "key": 1528718400000,
- "doc_count": 16434
- },
- {
- "key_as_string": "2018-06-11T15:00:00.000Z",
- "key": 1528729200000,
- "doc_count": 17003
- },
- {
- "key_as_string": "2018-06-11T18:00:00.000Z",
- "key": 1528740000000,
- "doc_count": 16364
- },
- {
- "key_as_string": "2018-06-11T21:00:00.000Z",
- "key": 1528750800000,
- "doc_count": 16645
- },
- {
- "key_as_string": "2018-06-12T00:00:00.000Z",
- "key": 1528761600000,
- "doc_count": 16695
- },
- {
- "key_as_string": "2018-06-12T03:00:00.000Z",
- "key": 1528772400000,
- "doc_count": 16498
- },
- {
- "key_as_string": "2018-06-12T06:00:00.000Z",
- "key": 1528783200000,
- "doc_count": 16588
- },
- {
- "key_as_string": "2018-06-12T09:00:00.000Z",
- "key": 1528794000000,
- "doc_count": 16685
- },
- {
- "key_as_string": "2018-06-12T12:00:00.000Z",
- "key": 1528804800000,
- "doc_count": 16361
- },
- {
- "key_as_string": "2018-06-12T15:00:00.000Z",
- "key": 1528815600000,
- "doc_count": 16658
- },
- {
- "key_as_string": "2018-06-12T18:00:00.000Z",
- "key": 1528826400000,
- "doc_count": 16507
- },
- {
- "key_as_string": "2018-06-12T21:00:00.000Z",
- "key": 1528837200000,
- "doc_count": 16418
- },
- {
- "key_as_string": "2018-06-13T00:00:00.000Z",
- "key": 1528848000000,
- "doc_count": 16477
- },
- {
- "key_as_string": "2018-06-13T03:00:00.000Z",
- "key": 1528858800000,
- "doc_count": 16755
- },
- {
- "key_as_string": "2018-06-13T06:00:00.000Z",
- "key": 1528869600000,
- "doc_count": 16594
- },
- {
- "key_as_string": "2018-06-13T09:00:00.000Z",
- "key": 1528880400000,
- "doc_count": 16812
- },
- {
- "key_as_string": "2018-06-13T12:00:00.000Z",
- "key": 1528891200000,
- "doc_count": 16863
- },
- {
- "key_as_string": "2018-06-13T15:00:00.000Z",
- "key": 1528902000000,
- "doc_count": 16655
- },
- {
- "key_as_string": "2018-06-13T18:00:00.000Z",
- "key": 1528912800000,
- "doc_count": 16723
- },
- {
- "key_as_string": "2018-06-13T21:00:00.000Z",
- "key": 1528923600000,
- "doc_count": 16577
- },
- {
- "key_as_string": "2018-06-14T00:00:00.000Z",
- "key": 1528934400000,
- "doc_count": 15125
- },
- {
- "key_as_string": "2018-06-14T03:00:00.000Z",
- "key": 1528945200000,
- "doc_count": 16432
- },
- {
- "key_as_string": "2018-06-14T06:00:00.000Z",
- "key": 1528956000000,
- "doc_count": 16464
- },
- {
- "key_as_string": "2018-06-14T09:00:00.000Z",
- "key": 1528966800000,
- "doc_count": 16369
- },
- {
- "key_as_string": "2018-06-14T12:00:00.000Z",
- "key": 1528977600000,
- "doc_count": 0
- }
- ]
- }
- },
- {
- "key": "HTTP 5xx",
- "doc_count": 82036,
- "timeseries": {
- "buckets": [
- {
- "key_as_string": "2018-06-04T12:00:00.000Z",
- "key": 1528113600000,
- "doc_count": 1209
- },
- {
- "key_as_string": "2018-06-04T15:00:00.000Z",
- "key": 1528124400000,
- "doc_count": 1203
- },
- {
- "key_as_string": "2018-06-04T18:00:00.000Z",
- "key": 1528135200000,
- "doc_count": 1196
- },
- {
- "key_as_string": "2018-06-04T21:00:00.000Z",
- "key": 1528146000000,
- "doc_count": 1230
- },
- {
- "key_as_string": "2018-06-05T00:00:00.000Z",
- "key": 1528156800000,
- "doc_count": 1233
- },
- {
- "key_as_string": "2018-06-05T03:00:00.000Z",
- "key": 1528167600000,
- "doc_count": 1272
- },
- {
- "key_as_string": "2018-06-05T06:00:00.000Z",
- "key": 1528178400000,
- "doc_count": 1218
- },
- {
- "key_as_string": "2018-06-05T09:00:00.000Z",
- "key": 1528189200000,
- "doc_count": 1217
- },
- {
- "key_as_string": "2018-06-05T12:00:00.000Z",
- "key": 1528200000000,
- "doc_count": 1235
- },
- {
- "key_as_string": "2018-06-05T15:00:00.000Z",
- "key": 1528210800000,
- "doc_count": 1249
- },
- {
- "key_as_string": "2018-06-05T18:00:00.000Z",
- "key": 1528221600000,
- "doc_count": 1158
- },
- {
- "key_as_string": "2018-06-05T21:00:00.000Z",
- "key": 1528232400000,
- "doc_count": 1215
- },
- {
- "key_as_string": "2018-06-06T00:00:00.000Z",
- "key": 1528243200000,
- "doc_count": 1191
- },
- {
- "key_as_string": "2018-06-06T03:00:00.000Z",
- "key": 1528254000000,
- "doc_count": 1235
- },
- {
- "key_as_string": "2018-06-06T06:00:00.000Z",
- "key": 1528264800000,
- "doc_count": 1212
- },
- {
- "key_as_string": "2018-06-06T09:00:00.000Z",
- "key": 1528275600000,
- "doc_count": 1180
- },
- {
- "key_as_string": "2018-06-06T12:00:00.000Z",
- "key": 1528286400000,
- "doc_count": 1091
- },
- {
- "key_as_string": "2018-06-06T15:00:00.000Z",
- "key": 1528297200000,
- "doc_count": 1176
- },
- {
- "key_as_string": "2018-06-06T18:00:00.000Z",
- "key": 1528308000000,
- "doc_count": 1243
- },
- {
- "key_as_string": "2018-06-06T21:00:00.000Z",
- "key": 1528318800000,
- "doc_count": 1208
- },
- {
- "key_as_string": "2018-06-07T00:00:00.000Z",
- "key": 1528329600000,
- "doc_count": 1202
- },
- {
- "key_as_string": "2018-06-07T03:00:00.000Z",
- "key": 1528340400000,
- "doc_count": 1288
- },
- {
- "key_as_string": "2018-06-07T06:00:00.000Z",
- "key": 1528351200000,
- "doc_count": 1241
- },
- {
- "key_as_string": "2018-06-07T09:00:00.000Z",
- "key": 1528362000000,
- "doc_count": 1215
- },
- {
- "key_as_string": "2018-06-07T12:00:00.000Z",
- "key": 1528372800000,
- "doc_count": 1152
- },
- {
- "key_as_string": "2018-06-07T15:00:00.000Z",
- "key": 1528383600000,
- "doc_count": 1241
- },
- {
- "key_as_string": "2018-06-07T18:00:00.000Z",
- "key": 1528394400000,
- "doc_count": 1177
- },
- {
- "key_as_string": "2018-06-07T21:00:00.000Z",
- "key": 1528405200000,
- "doc_count": 1243
- },
- {
- "key_as_string": "2018-06-08T00:00:00.000Z",
- "key": 1528416000000,
- "doc_count": 1255
- },
- {
- "key_as_string": "2018-06-08T03:00:00.000Z",
- "key": 1528426800000,
- "doc_count": 1189
- },
- {
- "key_as_string": "2018-06-08T06:00:00.000Z",
- "key": 1528437600000,
- "doc_count": 1183
- },
- {
- "key_as_string": "2018-06-08T09:00:00.000Z",
- "key": 1528448400000,
- "doc_count": 1215
- },
- {
- "key_as_string": "2018-06-08T12:00:00.000Z",
- "key": 1528459200000,
- "doc_count": 1282
- },
- {
- "key_as_string": "2018-06-08T15:00:00.000Z",
- "key": 1528470000000,
- "doc_count": 1177
- },
- {
- "key_as_string": "2018-06-08T18:00:00.000Z",
- "key": 1528480800000,
- "doc_count": 1199
- },
- {
- "key_as_string": "2018-06-08T21:00:00.000Z",
- "key": 1528491600000,
- "doc_count": 1234
- },
- {
- "key_as_string": "2018-06-09T00:00:00.000Z",
- "key": 1528502400000,
- "doc_count": 284
- },
- {
- "key_as_string": "2018-06-09T03:00:00.000Z",
- "key": 1528513200000,
- "doc_count": 307
- },
- {
- "key_as_string": "2018-06-09T06:00:00.000Z",
- "key": 1528524000000,
- "doc_count": 283
- },
- {
- "key_as_string": "2018-06-09T09:00:00.000Z",
- "key": 1528534800000,
- "doc_count": 303
- },
- {
- "key_as_string": "2018-06-09T12:00:00.000Z",
- "key": 1528545600000,
- "doc_count": 326
- },
- {
- "key_as_string": "2018-06-09T15:00:00.000Z",
- "key": 1528556400000,
- "doc_count": 269
- },
- {
- "key_as_string": "2018-06-09T18:00:00.000Z",
- "key": 1528567200000,
- "doc_count": 297
- },
- {
- "key_as_string": "2018-06-09T21:00:00.000Z",
- "key": 1528578000000,
- "doc_count": 278
- },
- {
- "key_as_string": "2018-06-10T00:00:00.000Z",
- "key": 1528588800000,
- "doc_count": 289
- },
- {
- "key_as_string": "2018-06-10T03:00:00.000Z",
- "key": 1528599600000,
- "doc_count": 272
- },
- {
- "key_as_string": "2018-06-10T06:00:00.000Z",
- "key": 1528610400000,
- "doc_count": 279
- },
- {
- "key_as_string": "2018-06-10T09:00:00.000Z",
- "key": 1528621200000,
- "doc_count": 238
- },
- {
- "key_as_string": "2018-06-10T12:00:00.000Z",
- "key": 1528632000000,
- "doc_count": 288
- },
- {
- "key_as_string": "2018-06-10T15:00:00.000Z",
- "key": 1528642800000,
- "doc_count": 258
- },
- {
- "key_as_string": "2018-06-10T18:00:00.000Z",
- "key": 1528653600000,
- "doc_count": 264
- },
- {
- "key_as_string": "2018-06-10T21:00:00.000Z",
- "key": 1528664400000,
- "doc_count": 296
- },
- {
- "key_as_string": "2018-06-11T00:00:00.000Z",
- "key": 1528675200000,
- "doc_count": 1213
- },
- {
- "key_as_string": "2018-06-11T03:00:00.000Z",
- "key": 1528686000000,
- "doc_count": 1254
- },
- {
- "key_as_string": "2018-06-11T06:00:00.000Z",
- "key": 1528696800000,
- "doc_count": 1135
- },
- {
- "key_as_string": "2018-06-11T09:00:00.000Z",
- "key": 1528707600000,
- "doc_count": 1240
- },
- {
- "key_as_string": "2018-06-11T12:00:00.000Z",
- "key": 1528718400000,
- "doc_count": 1215
- },
- {
- "key_as_string": "2018-06-11T15:00:00.000Z",
- "key": 1528729200000,
- "doc_count": 1239
- },
- {
- "key_as_string": "2018-06-11T18:00:00.000Z",
- "key": 1528740000000,
- "doc_count": 1209
- },
- {
- "key_as_string": "2018-06-11T21:00:00.000Z",
- "key": 1528750800000,
- "doc_count": 1208
- },
- {
- "key_as_string": "2018-06-12T00:00:00.000Z",
- "key": 1528761600000,
- "doc_count": 1176
- },
- {
- "key_as_string": "2018-06-12T03:00:00.000Z",
- "key": 1528772400000,
- "doc_count": 1207
- },
- {
- "key_as_string": "2018-06-12T06:00:00.000Z",
- "key": 1528783200000,
- "doc_count": 1198
- },
- {
- "key_as_string": "2018-06-12T09:00:00.000Z",
- "key": 1528794000000,
- "doc_count": 1165
- },
- {
- "key_as_string": "2018-06-12T12:00:00.000Z",
- "key": 1528804800000,
- "doc_count": 1188
- },
- {
- "key_as_string": "2018-06-12T15:00:00.000Z",
- "key": 1528815600000,
- "doc_count": 1245
- },
- {
- "key_as_string": "2018-06-12T18:00:00.000Z",
- "key": 1528826400000,
- "doc_count": 1238
- },
- {
- "key_as_string": "2018-06-12T21:00:00.000Z",
- "key": 1528837200000,
- "doc_count": 1283
- },
- {
- "key_as_string": "2018-06-13T00:00:00.000Z",
- "key": 1528848000000,
- "doc_count": 1198
- },
- {
- "key_as_string": "2018-06-13T03:00:00.000Z",
- "key": 1528858800000,
- "doc_count": 1172
- },
- {
- "key_as_string": "2018-06-13T06:00:00.000Z",
- "key": 1528869600000,
- "doc_count": 1229
- },
- {
- "key_as_string": "2018-06-13T09:00:00.000Z",
- "key": 1528880400000,
- "doc_count": 1239
- },
- {
- "key_as_string": "2018-06-13T12:00:00.000Z",
- "key": 1528891200000,
- "doc_count": 1231
- },
- {
- "key_as_string": "2018-06-13T15:00:00.000Z",
- "key": 1528902000000,
- "doc_count": 1248
- },
- {
- "key_as_string": "2018-06-13T18:00:00.000Z",
- "key": 1528912800000,
- "doc_count": 1220
- },
- {
- "key_as_string": "2018-06-13T21:00:00.000Z",
- "key": 1528923600000,
- "doc_count": 1224
- },
- {
- "key_as_string": "2018-06-14T00:00:00.000Z",
- "key": 1528934400000,
- "doc_count": 1088
- },
- {
- "key_as_string": "2018-06-14T03:00:00.000Z",
- "key": 1528945200000,
- "doc_count": 1235
- },
- {
- "key_as_string": "2018-06-14T06:00:00.000Z",
- "key": 1528956000000,
- "doc_count": 1161
- },
- {
- "key_as_string": "2018-06-14T09:00:00.000Z",
- "key": 1528966800000,
- "doc_count": 1183
- },
- {
- "key_as_string": "2018-06-14T12:00:00.000Z",
- "key": 1528977600000,
- "doc_count": 0
- }
- ]
- }
- },
- {
- "key": "HTTP 4xx",
- "doc_count": 81907,
- "timeseries": {
- "buckets": [
- {
- "key_as_string": "2018-06-04T12:00:00.000Z",
- "key": 1528113600000,
- "doc_count": 1186
- },
- {
- "key_as_string": "2018-06-04T15:00:00.000Z",
- "key": 1528124400000,
- "doc_count": 1213
- },
- {
- "key_as_string": "2018-06-04T18:00:00.000Z",
- "key": 1528135200000,
- "doc_count": 1205
- },
- {
- "key_as_string": "2018-06-04T21:00:00.000Z",
- "key": 1528146000000,
- "doc_count": 1162
- },
- {
- "key_as_string": "2018-06-05T00:00:00.000Z",
- "key": 1528156800000,
- "doc_count": 1238
- },
- {
- "key_as_string": "2018-06-05T03:00:00.000Z",
- "key": 1528167600000,
- "doc_count": 1191
- },
- {
- "key_as_string": "2018-06-05T06:00:00.000Z",
- "key": 1528178400000,
- "doc_count": 1274
- },
- {
- "key_as_string": "2018-06-05T09:00:00.000Z",
- "key": 1528189200000,
- "doc_count": 1234
- },
- {
- "key_as_string": "2018-06-05T12:00:00.000Z",
- "key": 1528200000000,
- "doc_count": 1164
- },
- {
- "key_as_string": "2018-06-05T15:00:00.000Z",
- "key": 1528210800000,
- "doc_count": 1233
- },
- {
- "key_as_string": "2018-06-05T18:00:00.000Z",
- "key": 1528221600000,
- "doc_count": 1223
- },
- {
- "key_as_string": "2018-06-05T21:00:00.000Z",
- "key": 1528232400000,
- "doc_count": 1216
- },
- {
- "key_as_string": "2018-06-06T00:00:00.000Z",
- "key": 1528243200000,
- "doc_count": 1200
- },
- {
- "key_as_string": "2018-06-06T03:00:00.000Z",
- "key": 1528254000000,
- "doc_count": 1237
- },
- {
- "key_as_string": "2018-06-06T06:00:00.000Z",
- "key": 1528264800000,
- "doc_count": 1231
- },
- {
- "key_as_string": "2018-06-06T09:00:00.000Z",
- "key": 1528275600000,
- "doc_count": 1182
- },
- {
- "key_as_string": "2018-06-06T12:00:00.000Z",
- "key": 1528286400000,
- "doc_count": 1125
- },
- {
- "key_as_string": "2018-06-06T15:00:00.000Z",
- "key": 1528297200000,
- "doc_count": 1243
- },
- {
- "key_as_string": "2018-06-06T18:00:00.000Z",
- "key": 1528308000000,
- "doc_count": 1247
- },
- {
- "key_as_string": "2018-06-06T21:00:00.000Z",
- "key": 1528318800000,
- "doc_count": 1163
- },
- {
- "key_as_string": "2018-06-07T00:00:00.000Z",
- "key": 1528329600000,
- "doc_count": 1220
- },
- {
- "key_as_string": "2018-06-07T03:00:00.000Z",
- "key": 1528340400000,
- "doc_count": 1202
- },
- {
- "key_as_string": "2018-06-07T06:00:00.000Z",
- "key": 1528351200000,
- "doc_count": 1192
- },
- {
- "key_as_string": "2018-06-07T09:00:00.000Z",
- "key": 1528362000000,
- "doc_count": 1248
- },
- {
- "key_as_string": "2018-06-07T12:00:00.000Z",
- "key": 1528372800000,
- "doc_count": 1189
- },
- {
- "key_as_string": "2018-06-07T15:00:00.000Z",
- "key": 1528383600000,
- "doc_count": 1230
- },
- {
- "key_as_string": "2018-06-07T18:00:00.000Z",
- "key": 1528394400000,
- "doc_count": 1206
- },
- {
- "key_as_string": "2018-06-07T21:00:00.000Z",
- "key": 1528405200000,
- "doc_count": 1190
- },
- {
- "key_as_string": "2018-06-08T00:00:00.000Z",
- "key": 1528416000000,
- "doc_count": 1232
- },
- {
- "key_as_string": "2018-06-08T03:00:00.000Z",
- "key": 1528426800000,
- "doc_count": 1171
- },
- {
- "key_as_string": "2018-06-08T06:00:00.000Z",
- "key": 1528437600000,
- "doc_count": 1232
- },
- {
- "key_as_string": "2018-06-08T09:00:00.000Z",
- "key": 1528448400000,
- "doc_count": 1253
- },
- {
- "key_as_string": "2018-06-08T12:00:00.000Z",
- "key": 1528459200000,
- "doc_count": 1250
- },
- {
- "key_as_string": "2018-06-08T15:00:00.000Z",
- "key": 1528470000000,
- "doc_count": 1167
- },
- {
- "key_as_string": "2018-06-08T18:00:00.000Z",
- "key": 1528480800000,
- "doc_count": 1258
- },
- {
- "key_as_string": "2018-06-08T21:00:00.000Z",
- "key": 1528491600000,
- "doc_count": 1148
- },
- {
- "key_as_string": "2018-06-09T00:00:00.000Z",
- "key": 1528502400000,
- "doc_count": 284
- },
- {
- "key_as_string": "2018-06-09T03:00:00.000Z",
- "key": 1528513200000,
- "doc_count": 240
- },
- {
- "key_as_string": "2018-06-09T06:00:00.000Z",
- "key": 1528524000000,
- "doc_count": 273
- },
- {
- "key_as_string": "2018-06-09T09:00:00.000Z",
- "key": 1528534800000,
- "doc_count": 295
- },
- {
- "key_as_string": "2018-06-09T12:00:00.000Z",
- "key": 1528545600000,
- "doc_count": 281
- },
- {
- "key_as_string": "2018-06-09T15:00:00.000Z",
- "key": 1528556400000,
- "doc_count": 300
- },
- {
- "key_as_string": "2018-06-09T18:00:00.000Z",
- "key": 1528567200000,
- "doc_count": 264
- },
- {
- "key_as_string": "2018-06-09T21:00:00.000Z",
- "key": 1528578000000,
- "doc_count": 260
- },
- {
- "key_as_string": "2018-06-10T00:00:00.000Z",
- "key": 1528588800000,
- "doc_count": 279
- },
- {
- "key_as_string": "2018-06-10T03:00:00.000Z",
- "key": 1528599600000,
- "doc_count": 259
- },
- {
- "key_as_string": "2018-06-10T06:00:00.000Z",
- "key": 1528610400000,
- "doc_count": 291
- },
- {
- "key_as_string": "2018-06-10T09:00:00.000Z",
- "key": 1528621200000,
- "doc_count": 248
- },
- {
- "key_as_string": "2018-06-10T12:00:00.000Z",
- "key": 1528632000000,
- "doc_count": 311
- },
- {
- "key_as_string": "2018-06-10T15:00:00.000Z",
- "key": 1528642800000,
- "doc_count": 277
- },
- {
- "key_as_string": "2018-06-10T18:00:00.000Z",
- "key": 1528653600000,
- "doc_count": 279
- },
- {
- "key_as_string": "2018-06-10T21:00:00.000Z",
- "key": 1528664400000,
- "doc_count": 275
- },
- {
- "key_as_string": "2018-06-11T00:00:00.000Z",
- "key": 1528675200000,
- "doc_count": 1167
- },
- {
- "key_as_string": "2018-06-11T03:00:00.000Z",
- "key": 1528686000000,
- "doc_count": 1270
- },
- {
- "key_as_string": "2018-06-11T06:00:00.000Z",
- "key": 1528696800000,
- "doc_count": 1163
- },
- {
- "key_as_string": "2018-06-11T09:00:00.000Z",
- "key": 1528707600000,
- "doc_count": 1155
- },
- {
- "key_as_string": "2018-06-11T12:00:00.000Z",
- "key": 1528718400000,
- "doc_count": 1217
- },
- {
- "key_as_string": "2018-06-11T15:00:00.000Z",
- "key": 1528729200000,
- "doc_count": 1227
- },
- {
- "key_as_string": "2018-06-11T18:00:00.000Z",
- "key": 1528740000000,
- "doc_count": 1194
- },
- {
- "key_as_string": "2018-06-11T21:00:00.000Z",
- "key": 1528750800000,
- "doc_count": 1153
- },
- {
- "key_as_string": "2018-06-12T00:00:00.000Z",
- "key": 1528761600000,
- "doc_count": 1211
- },
- {
- "key_as_string": "2018-06-12T03:00:00.000Z",
- "key": 1528772400000,
- "doc_count": 1203
- },
- {
- "key_as_string": "2018-06-12T06:00:00.000Z",
- "key": 1528783200000,
- "doc_count": 1269
- },
- {
- "key_as_string": "2018-06-12T09:00:00.000Z",
- "key": 1528794000000,
- "doc_count": 1197
- },
- {
- "key_as_string": "2018-06-12T12:00:00.000Z",
- "key": 1528804800000,
- "doc_count": 1184
- },
- {
- "key_as_string": "2018-06-12T15:00:00.000Z",
- "key": 1528815600000,
- "doc_count": 1176
- },
- {
- "key_as_string": "2018-06-12T18:00:00.000Z",
- "key": 1528826400000,
- "doc_count": 1162
- },
- {
- "key_as_string": "2018-06-12T21:00:00.000Z",
- "key": 1528837200000,
- "doc_count": 1270
- },
- {
- "key_as_string": "2018-06-13T00:00:00.000Z",
- "key": 1528848000000,
- "doc_count": 1224
- },
- {
- "key_as_string": "2018-06-13T03:00:00.000Z",
- "key": 1528858800000,
- "doc_count": 1255
- },
- {
- "key_as_string": "2018-06-13T06:00:00.000Z",
- "key": 1528869600000,
- "doc_count": 1207
- },
- {
- "key_as_string": "2018-06-13T09:00:00.000Z",
- "key": 1528880400000,
- "doc_count": 1206
- },
- {
- "key_as_string": "2018-06-13T12:00:00.000Z",
- "key": 1528891200000,
- "doc_count": 1254
- },
- {
- "key_as_string": "2018-06-13T15:00:00.000Z",
- "key": 1528902000000,
- "doc_count": 1216
- },
- {
- "key_as_string": "2018-06-13T18:00:00.000Z",
- "key": 1528912800000,
- "doc_count": 1263
- },
- {
- "key_as_string": "2018-06-13T21:00:00.000Z",
- "key": 1528923600000,
- "doc_count": 1277
- },
- {
- "key_as_string": "2018-06-14T00:00:00.000Z",
- "key": 1528934400000,
- "doc_count": 1183
- },
- {
- "key_as_string": "2018-06-14T03:00:00.000Z",
- "key": 1528945200000,
- "doc_count": 1221
- },
- {
- "key_as_string": "2018-06-14T06:00:00.000Z",
- "key": 1528956000000,
- "doc_count": 1198
- },
- {
- "key_as_string": "2018-06-14T09:00:00.000Z",
- "key": 1528966800000,
- "doc_count": 1214
- },
- {
- "key_as_string": "2018-06-14T12:00:00.000Z",
- "key": 1528977600000,
- "doc_count": 0
- }
- ]
- }
- },
- {
- "key": "HTTP 3xx",
- "doc_count": 6650,
- "timeseries": {
- "buckets": [
- {
- "key_as_string": "2018-06-04T12:00:00.000Z",
- "key": 1528113600000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-04T15:00:00.000Z",
- "key": 1528124400000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-04T18:00:00.000Z",
- "key": 1528135200000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-04T21:00:00.000Z",
- "key": 1528146000000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-05T00:00:00.000Z",
- "key": 1528156800000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-05T03:00:00.000Z",
- "key": 1528167600000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-05T06:00:00.000Z",
- "key": 1528178400000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-05T09:00:00.000Z",
- "key": 1528189200000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-05T12:00:00.000Z",
- "key": 1528200000000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-05T15:00:00.000Z",
- "key": 1528210800000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-05T18:00:00.000Z",
- "key": 1528221600000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-05T21:00:00.000Z",
- "key": 1528232400000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-06T00:00:00.000Z",
- "key": 1528243200000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-06T03:00:00.000Z",
- "key": 1528254000000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-06T06:00:00.000Z",
- "key": 1528264800000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-06T09:00:00.000Z",
- "key": 1528275600000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-06T12:00:00.000Z",
- "key": 1528286400000,
- "doc_count": 4041
- },
- {
- "key_as_string": "2018-06-06T15:00:00.000Z",
- "key": 1528297200000,
- "doc_count": 454
- },
- {
- "key_as_string": "2018-06-06T18:00:00.000Z",
- "key": 1528308000000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-06T21:00:00.000Z",
- "key": 1528318800000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-07T00:00:00.000Z",
- "key": 1528329600000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-07T03:00:00.000Z",
- "key": 1528340400000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-07T06:00:00.000Z",
- "key": 1528351200000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-07T09:00:00.000Z",
- "key": 1528362000000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-07T12:00:00.000Z",
- "key": 1528372800000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-07T15:00:00.000Z",
- "key": 1528383600000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-07T18:00:00.000Z",
- "key": 1528394400000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-07T21:00:00.000Z",
- "key": 1528405200000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-08T00:00:00.000Z",
- "key": 1528416000000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-08T03:00:00.000Z",
- "key": 1528426800000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-08T06:00:00.000Z",
- "key": 1528437600000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-08T09:00:00.000Z",
- "key": 1528448400000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-08T12:00:00.000Z",
- "key": 1528459200000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-08T15:00:00.000Z",
- "key": 1528470000000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-08T18:00:00.000Z",
- "key": 1528480800000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-08T21:00:00.000Z",
- "key": 1528491600000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-09T00:00:00.000Z",
- "key": 1528502400000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-09T03:00:00.000Z",
- "key": 1528513200000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-09T06:00:00.000Z",
- "key": 1528524000000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-09T09:00:00.000Z",
- "key": 1528534800000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-09T12:00:00.000Z",
- "key": 1528545600000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-09T15:00:00.000Z",
- "key": 1528556400000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-09T18:00:00.000Z",
- "key": 1528567200000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-09T21:00:00.000Z",
- "key": 1528578000000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-10T00:00:00.000Z",
- "key": 1528588800000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-10T03:00:00.000Z",
- "key": 1528599600000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-10T06:00:00.000Z",
- "key": 1528610400000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-10T09:00:00.000Z",
- "key": 1528621200000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-10T12:00:00.000Z",
- "key": 1528632000000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-10T15:00:00.000Z",
- "key": 1528642800000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-10T18:00:00.000Z",
- "key": 1528653600000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-10T21:00:00.000Z",
- "key": 1528664400000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-11T00:00:00.000Z",
- "key": 1528675200000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-11T03:00:00.000Z",
- "key": 1528686000000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-11T06:00:00.000Z",
- "key": 1528696800000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-11T09:00:00.000Z",
- "key": 1528707600000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-11T12:00:00.000Z",
- "key": 1528718400000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-11T15:00:00.000Z",
- "key": 1528729200000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-11T18:00:00.000Z",
- "key": 1528740000000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-11T21:00:00.000Z",
- "key": 1528750800000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-12T00:00:00.000Z",
- "key": 1528761600000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-12T03:00:00.000Z",
- "key": 1528772400000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-12T06:00:00.000Z",
- "key": 1528783200000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-12T09:00:00.000Z",
- "key": 1528794000000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-12T12:00:00.000Z",
- "key": 1528804800000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-12T15:00:00.000Z",
- "key": 1528815600000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-12T18:00:00.000Z",
- "key": 1528826400000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-12T21:00:00.000Z",
- "key": 1528837200000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-13T00:00:00.000Z",
- "key": 1528848000000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-13T03:00:00.000Z",
- "key": 1528858800000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-13T06:00:00.000Z",
- "key": 1528869600000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-13T09:00:00.000Z",
- "key": 1528880400000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-13T12:00:00.000Z",
- "key": 1528891200000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-13T15:00:00.000Z",
- "key": 1528902000000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-13T18:00:00.000Z",
- "key": 1528912800000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-13T21:00:00.000Z",
- "key": 1528923600000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-14T00:00:00.000Z",
- "key": 1528934400000,
- "doc_count": 2155
- },
- {
- "key_as_string": "2018-06-14T03:00:00.000Z",
- "key": 1528945200000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-14T06:00:00.000Z",
- "key": 1528956000000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-14T09:00:00.000Z",
- "key": 1528966800000,
- "doc_count": 0
- },
- {
- "key_as_string": "2018-06-14T12:00:00.000Z",
- "key": 1528977600000,
- "doc_count": 0
- }
- ]
- }
- }
- ]
- },
- "response_times": {
- "buckets": [
- {
- "key_as_string": "2018-06-04T12:00:00.000Z",
- "key": 1528113600000,
- "doc_count": 18841,
- "pct": {
- "values": {
- "95.0": 82172.85648714812,
- "99.0": 293866.3866666665
- }
- },
- "avg": {
- "value": 26310.63483891513
- }
- },
- {
- "key_as_string": "2018-06-04T15:00:00.000Z",
- "key": 1528124400000,
- "doc_count": 18708,
- "pct": {
- "values": {
- "95.0": 80738.78571428556,
- "99.0": 293257.27333333343
- }
- },
- "avg": {
- "value": 26193.277795595466
- }
- },
- {
- "key_as_string": "2018-06-04T18:00:00.000Z",
- "key": 1528135200000,
- "doc_count": 18865,
- "pct": {
- "values": {
- "95.0": 77058.03529411761,
- "99.0": 290195.8800000004
- }
- },
- "avg": {
- "value": 25291.787065995228
- }
- },
- {
- "key_as_string": "2018-06-04T21:00:00.000Z",
- "key": 1528146000000,
- "doc_count": 18889,
- "pct": {
- "values": {
- "95.0": 77892.20721980717,
- "99.0": 278548.1649999994
- }
- },
- "avg": {
- "value": 24690.306474667796
- }
- },
- {
- "key_as_string": "2018-06-05T00:00:00.000Z",
- "key": 1528156800000,
- "doc_count": 19270,
- "pct": {
- "values": {
- "95.0": 77085.86687499998,
- "99.0": 290701.8973333341
- }
- },
- "avg": {
- "value": 24809.8953814219
- }
- },
- {
- "key_as_string": "2018-06-05T03:00:00.000Z",
- "key": 1528167600000,
- "doc_count": 19024,
- "pct": {
- "values": {
- "95.0": 80048.3462981744,
- "99.0": 286839.5897777779
- }
- },
- "avg": {
- "value": 25460.0394764508
- }
- },
- {
- "key_as_string": "2018-06-05T06:00:00.000Z",
- "key": 1528178400000,
- "doc_count": 18923,
- "pct": {
- "values": {
- "95.0": 84089.21370223971,
- "99.0": 287979.5149999999
- }
- },
- "avg": {
- "value": 26360.440733498916
- }
- },
- {
- "key_as_string": "2018-06-05T09:00:00.000Z",
- "key": 1528189200000,
- "doc_count": 18834,
- "pct": {
- "values": {
- "95.0": 84880.90143416924,
- "99.0": 300107.5009999992
- }
- },
- "avg": {
- "value": 27050.95205479452
- }
- },
- {
- "key_as_string": "2018-06-05T12:00:00.000Z",
- "key": 1528200000000,
- "doc_count": 18694,
- "pct": {
- "values": {
- "95.0": 84554.8884781166,
- "99.0": 294402.2179999999
- }
- },
- "avg": {
- "value": 26555.857333903925
- }
- },
- {
- "key_as_string": "2018-06-05T15:00:00.000Z",
- "key": 1528210800000,
- "doc_count": 19184,
- "pct": {
- "values": {
- "95.0": 81839.39583333326,
- "99.0": 289849.459333332
- }
- },
- "avg": {
- "value": 26164.343359049206
- }
- },
- {
- "key_as_string": "2018-06-05T18:00:00.000Z",
- "key": 1528221600000,
- "doc_count": 18850,
- "pct": {
- "values": {
- "95.0": 85993.55410163336,
- "99.0": 296942.86299999955
- }
- },
- "avg": {
- "value": 26989.84546419098
- }
- },
- {
- "key_as_string": "2018-06-05T21:00:00.000Z",
- "key": 1528232400000,
- "doc_count": 18897,
- "pct": {
- "values": {
- "95.0": 85001.44588628765,
- "99.0": 292048.20571428596
- }
- },
- "avg": {
- "value": 26314.409430068266
- }
- },
- {
- "key_as_string": "2018-06-06T00:00:00.000Z",
- "key": 1528243200000,
- "doc_count": 18942,
- "pct": {
- "values": {
- "95.0": 86980.16445312503,
- "99.0": 299308.7371666667
- }
- },
- "avg": {
- "value": 27460.774575018477
- }
- },
- {
- "key_as_string": "2018-06-06T03:00:00.000Z",
- "key": 1528254000000,
- "doc_count": 19147,
- "pct": {
- "values": {
- "95.0": 84961.8710743802,
- "99.0": 292151.2377777781
- }
- },
- "avg": {
- "value": 26461.469107431974
- }
- },
- {
- "key_as_string": "2018-06-06T06:00:00.000Z",
- "key": 1528264800000,
- "doc_count": 18853,
- "pct": {
- "values": {
- "95.0": 88906.54601889332,
- "99.0": 302274.4192592592
- }
- },
- "avg": {
- "value": 27657.584946692834
- }
- },
- {
- "key_as_string": "2018-06-06T09:00:00.000Z",
- "key": 1528275600000,
- "doc_count": 18609,
- "pct": {
- "values": {
- "95.0": 90198.34708994703,
- "99.0": 299457.1612121209
- }
- },
- "avg": {
- "value": 27940.445967005213
- }
- },
- {
- "key_as_string": "2018-06-06T12:00:00.000Z",
- "key": 1528286400000,
- "doc_count": 21402,
- "pct": {
- "values": {
- "95.0": 135627.71242424246,
- "99.0": 350398.59259259375
- }
- },
- "avg": {
- "value": 34454.377581534434
- }
- },
- {
- "key_as_string": "2018-06-06T15:00:00.000Z",
- "key": 1528297200000,
- "doc_count": 19051,
- "pct": {
- "values": {
- "95.0": 167037.1993837535,
- "99.0": 421204.23333333334
- }
- },
- "avg": {
- "value": 44024.31809353839
- }
- },
- {
- "key_as_string": "2018-06-06T18:00:00.000Z",
- "key": 1528308000000,
- "doc_count": 19020,
- "pct": {
- "values": {
- "95.0": 128293.12184873945,
- "99.0": 368166.68976190523
- }
- },
- "avg": {
- "value": 36374.53333333333
- }
- },
- {
- "key_as_string": "2018-06-06T21:00:00.000Z",
- "key": 1528318800000,
- "doc_count": 18582,
- "pct": {
- "values": {
- "95.0": 130653.54236263742,
- "99.0": 367193.6128571426
- }
- },
- "avg": {
- "value": 36991.29442471209
- }
- },
- {
- "key_as_string": "2018-06-07T00:00:00.000Z",
- "key": 1528329600000,
- "doc_count": 18875,
- "pct": {
- "values": {
- "95.0": 131630.8902645502,
- "99.0": 375658.10190476174
- }
- },
- "avg": {
- "value": 37178.002701986756
- }
- },
- {
- "key_as_string": "2018-06-07T03:00:00.000Z",
- "key": 1528340400000,
- "doc_count": 18993,
- "pct": {
- "values": {
- "95.0": 133581.33541666638,
- "99.0": 368152.03822222137
- }
- },
- "avg": {
- "value": 37605.57078923814
- }
- },
- {
- "key_as_string": "2018-06-07T06:00:00.000Z",
- "key": 1528351200000,
- "doc_count": 19037,
- "pct": {
- "values": {
- "95.0": 132697.92762266204,
- "99.0": 365705.8319999995
- }
- },
- "avg": {
- "value": 37319.89767295267
- }
- },
- {
- "key_as_string": "2018-06-07T09:00:00.000Z",
- "key": 1528362000000,
- "doc_count": 18985,
- "pct": {
- "values": {
- "95.0": 140003.6918918918,
- "99.0": 380075.48533333326
- }
- },
- "avg": {
- "value": 38709.5041348433
- }
- },
- {
- "key_as_string": "2018-06-07T12:00:00.000Z",
- "key": 1528372800000,
- "doc_count": 18505,
- "pct": {
- "values": {
- "95.0": 138149.5673529411,
- "99.0": 375697.1923809518
- }
- },
- "avg": {
- "value": 38140.131856255066
- }
- },
- {
- "key_as_string": "2018-06-07T15:00:00.000Z",
- "key": 1528383600000,
- "doc_count": 18991,
- "pct": {
- "values": {
- "95.0": 121872.37504835591,
- "99.0": 351080.94111111073
- }
- },
- "avg": {
- "value": 34564.81091043125
- }
- },
- {
- "key_as_string": "2018-06-07T18:00:00.000Z",
- "key": 1528394400000,
- "doc_count": 18917,
- "pct": {
- "values": {
- "95.0": 116378.03873517792,
- "99.0": 339294.12799999997
- }
- },
- "avg": {
- "value": 33256.37743828302
- }
- },
- {
- "key_as_string": "2018-06-07T21:00:00.000Z",
- "key": 1528405200000,
- "doc_count": 18744,
- "pct": {
- "values": {
- "95.0": 131545.40999999995,
- "99.0": 378902.90649999987
- }
- },
- "avg": {
- "value": 37251.5625266752
- }
- },
- {
- "key_as_string": "2018-06-08T00:00:00.000Z",
- "key": 1528416000000,
- "doc_count": 19157,
- "pct": {
- "values": {
- "95.0": 133111.25804878055,
- "99.0": 384483.3233333327
- }
- },
- "avg": {
- "value": 38681.89084929791
- }
- },
- {
- "key_as_string": "2018-06-08T03:00:00.000Z",
- "key": 1528426800000,
- "doc_count": 18552,
- "pct": {
- "values": {
- "95.0": 144821.9855278593,
- "99.0": 394692.25000000105
- }
- },
- "avg": {
- "value": 40677.801045709355
- }
- },
- {
- "key_as_string": "2018-06-08T06:00:00.000Z",
- "key": 1528437600000,
- "doc_count": 18994,
- "pct": {
- "values": {
- "95.0": 134737.3997727272,
- "99.0": 403362.50399999996
- }
- },
- "avg": {
- "value": 39987.86453616932
- }
- },
- {
- "key_as_string": "2018-06-08T09:00:00.000Z",
- "key": 1528448400000,
- "doc_count": 18798,
- "pct": {
- "values": {
- "95.0": 141206.57726666646,
- "99.0": 396559.0274999993
- }
- },
- "avg": {
- "value": 41059.392914139804
- }
- },
- {
- "key_as_string": "2018-06-08T12:00:00.000Z",
- "key": 1528459200000,
- "doc_count": 19097,
- "pct": {
- "values": {
- "95.0": 137731.8994082841,
- "99.0": 371815.8320000008
- }
- },
- "avg": {
- "value": 39630.710111535845
- }
- },
- {
- "key_as_string": "2018-06-08T15:00:00.000Z",
- "key": 1528470000000,
- "doc_count": 18887,
- "pct": {
- "values": {
- "95.0": 141476.23189033198,
- "99.0": 405477.6133333326
- }
- },
- "avg": {
- "value": 41561.81331074284
- }
- },
- {
- "key_as_string": "2018-06-08T18:00:00.000Z",
- "key": 1528480800000,
- "doc_count": 18949,
- "pct": {
- "values": {
- "95.0": 149636.31340909077,
- "99.0": 413542.18133333366
- }
- },
- "avg": {
- "value": 43079.490738297536
- }
- },
- {
- "key_as_string": "2018-06-08T21:00:00.000Z",
- "key": 1528491600000,
- "doc_count": 18786,
- "pct": {
- "values": {
- "95.0": 151934.55000000002,
- "99.0": 424399.340000001
- }
- },
- "avg": {
- "value": 43925.39609283509
- }
- },
- {
- "key_as_string": "2018-06-09T00:00:00.000Z",
- "key": 1528502400000,
- "doc_count": 5096,
- "pct": {
- "values": {
- "95.0": 82198.17857142858,
- "99.0": 303815.9000000001
- }
- },
- "avg": {
- "value": 25821.91424646782
- }
- },
- {
- "key_as_string": "2018-06-09T03:00:00.000Z",
- "key": 1528513200000,
- "doc_count": 5104,
- "pct": {
- "values": {
- "95.0": 85946.43199999983,
- "99.0": 306305.0800000006
- }
- },
- "avg": {
- "value": 27343.60011755486
- }
- },
- {
- "key_as_string": "2018-06-09T06:00:00.000Z",
- "key": 1528524000000,
- "doc_count": 5122,
- "pct": {
- "values": {
- "95.0": 78617.66249999996,
- "99.0": 297521.94999999984
- }
- },
- "avg": {
- "value": 25249.95060523233
- }
- },
- {
- "key_as_string": "2018-06-09T09:00:00.000Z",
- "key": 1528534800000,
- "doc_count": 5184,
- "pct": {
- "values": {
- "95.0": 79606.48333333322,
- "99.0": 317938.0900000003
- }
- },
- "avg": {
- "value": 25492.77199074074
- }
- },
- {
- "key_as_string": "2018-06-09T12:00:00.000Z",
- "key": 1528545600000,
- "doc_count": 5279,
- "pct": {
- "values": {
- "95.0": 76297.93999999986,
- "99.0": 312262.3000000003
- }
- },
- "avg": {
- "value": 25991.647281682137
- }
- },
- {
- "key_as_string": "2018-06-09T15:00:00.000Z",
- "key": 1528556400000,
- "doc_count": 5254,
- "pct": {
- "values": {
- "95.0": 80742.63333333324,
- "99.0": 318428.8700000002
- }
- },
- "avg": {
- "value": 26273.31290445375
- }
- },
- {
- "key_as_string": "2018-06-09T18:00:00.000Z",
- "key": 1528567200000,
- "doc_count": 5082,
- "pct": {
- "values": {
- "95.0": 81291.45969696966,
- "99.0": 295421.4099999999
- }
- },
- "avg": {
- "value": 26234.98976780795
- }
- },
- {
- "key_as_string": "2018-06-09T21:00:00.000Z",
- "key": 1528578000000,
- "doc_count": 5150,
- "pct": {
- "values": {
- "95.0": 73467.02500000004,
- "99.0": 293067.86000000004
- }
- },
- "avg": {
- "value": 23494.54873786408
- }
- },
- {
- "key_as_string": "2018-06-10T00:00:00.000Z",
- "key": 1528588800000,
- "doc_count": 5103,
- "pct": {
- "values": {
- "95.0": 69177.66999999993,
- "99.0": 264935.71999999933
- }
- },
- "avg": {
- "value": 22008.80482069371
- }
- },
- {
- "key_as_string": "2018-06-10T03:00:00.000Z",
- "key": 1528599600000,
- "doc_count": 5137,
- "pct": {
- "values": {
- "95.0": 71956.06111111109,
- "99.0": 282795.0400000003
- }
- },
- "avg": {
- "value": 22828.136655635586
- }
- },
- {
- "key_as_string": "2018-06-10T06:00:00.000Z",
- "key": 1528610400000,
- "doc_count": 5184,
- "pct": {
- "values": {
- "95.0": 68480.91142857139,
- "99.0": 285390.8400000001
- }
- },
- "avg": {
- "value": 22138.7081404321
- }
- },
- {
- "key_as_string": "2018-06-10T09:00:00.000Z",
- "key": 1528621200000,
- "doc_count": 4993,
- "pct": {
- "values": {
- "95.0": 68957.0999999999,
- "99.0": 290402.24
- }
- },
- "avg": {
- "value": 22634.985579811735
- }
- },
- {
- "key_as_string": "2018-06-10T12:00:00.000Z",
- "key": 1528632000000,
- "doc_count": 5210,
- "pct": {
- "values": {
- "95.0": 67489.50416666668,
- "99.0": 293655.53
- }
- },
- "avg": {
- "value": 22202.780998080616
- }
- },
- {
- "key_as_string": "2018-06-10T15:00:00.000Z",
- "key": 1528642800000,
- "doc_count": 5122,
- "pct": {
- "values": {
- "95.0": 71556.91249999998,
- "99.0": 292723.56999999995
- }
- },
- "avg": {
- "value": 23084.082780163997
- }
- },
- {
- "key_as_string": "2018-06-10T18:00:00.000Z",
- "key": 1528653600000,
- "doc_count": 5125,
- "pct": {
- "values": {
- "95.0": 72157.65128205132,
- "99.0": 301051.32000000105
- }
- },
- "avg": {
- "value": 23109.666146341464
- }
- },
- {
- "key_as_string": "2018-06-10T21:00:00.000Z",
- "key": 1528664400000,
- "doc_count": 5186,
- "pct": {
- "values": {
- "95.0": 76124.5625,
- "99.0": 291322.0499999998
- }
- },
- "avg": {
- "value": 23306.89028152719
- }
- },
- {
- "key_as_string": "2018-06-11T00:00:00.000Z",
- "key": 1528675200000,
- "doc_count": 18631,
- "pct": {
- "values": {
- "95.0": 141709.34661835746,
- "99.0": 379855.2444444447
- }
- },
- "avg": {
- "value": 39341.022704095325
- }
- },
- {
- "key_as_string": "2018-06-11T03:00:00.000Z",
- "key": 1528686000000,
- "doc_count": 19349,
- "pct": {
- "values": {
- "95.0": 132371.48641975303,
- "99.0": 371175.2592000001
- }
- },
- "avg": {
- "value": 37467.17153341258
- }
- },
- {
- "key_as_string": "2018-06-11T06:00:00.000Z",
- "key": 1528696800000,
- "doc_count": 18586,
- "pct": {
- "values": {
- "95.0": 186783.51503759398,
- "99.0": 498378.4238888898
- }
- },
- "avg": {
- "value": 52457.50554180566
- }
- },
- {
- "key_as_string": "2018-06-11T09:00:00.000Z",
- "key": 1528707600000,
- "doc_count": 18887,
- "pct": {
- "values": {
- "95.0": 99540.17819499348,
- "99.0": 331118.6599999997
- }
- },
- "avg": {
- "value": 31327.95780166252
- }
- },
- {
- "key_as_string": "2018-06-11T12:00:00.000Z",
- "key": 1528718400000,
- "doc_count": 18866,
- "pct": {
- "values": {
- "95.0": 95982.62454212455,
- "99.0": 328101.3999999988
- }
- },
- "avg": {
- "value": 30695.334941163997
- }
- },
- {
- "key_as_string": "2018-06-11T15:00:00.000Z",
- "key": 1528729200000,
- "doc_count": 19469,
- "pct": {
- "values": {
- "95.0": 89559.3525925925,
- "99.0": 313951.54249999986
- }
- },
- "avg": {
- "value": 28895.042785967435
- }
- },
- {
- "key_as_string": "2018-06-11T18:00:00.000Z",
- "key": 1528740000000,
- "doc_count": 18767,
- "pct": {
- "values": {
- "95.0": 95769.83153735634,
- "99.0": 323340.5274074075
- }
- },
- "avg": {
- "value": 30649.363989982416
- }
- },
- {
- "key_as_string": "2018-06-11T21:00:00.000Z",
- "key": 1528750800000,
- "doc_count": 19006,
- "pct": {
- "values": {
- "95.0": 94063.90833755062,
- "99.0": 315055.5047619052
- }
- },
- "avg": {
- "value": 29802.63622014101
- }
- },
- {
- "key_as_string": "2018-06-12T00:00:00.000Z",
- "key": 1528761600000,
- "doc_count": 19082,
- "pct": {
- "values": {
- "95.0": 96399.67269119772,
- "99.0": 330070.03599999985
- }
- },
- "avg": {
- "value": 30759.03002829892
- }
- },
- {
- "key_as_string": "2018-06-12T03:00:00.000Z",
- "key": 1528772400000,
- "doc_count": 18908,
- "pct": {
- "values": {
- "95.0": 96436.42520161276,
- "99.0": 320531.54416666675
- }
- },
- "avg": {
- "value": 30399.76549608631
- }
- },
- {
- "key_as_string": "2018-06-12T06:00:00.000Z",
- "key": 1528783200000,
- "doc_count": 19055,
- "pct": {
- "values": {
- "95.0": 91860.16988095238,
- "99.0": 315137.16628571344
- }
- },
- "avg": {
- "value": 29421.610233534506
- }
- },
- {
- "key_as_string": "2018-06-12T09:00:00.000Z",
- "key": 1528794000000,
- "doc_count": 19047,
- "pct": {
- "values": {
- "95.0": 105989.8333333334,
- "99.0": 337251.4042424246
- }
- },
- "avg": {
- "value": 32641.679897096656
- }
- },
- {
- "key_as_string": "2018-06-12T12:00:00.000Z",
- "key": 1528804800000,
- "doc_count": 18733,
- "pct": {
- "values": {
- "95.0": 97937.60342555979,
- "99.0": 327054.9243636365
- }
- },
- "avg": {
- "value": 30621.65440666204
- }
- },
- {
- "key_as_string": "2018-06-12T15:00:00.000Z",
- "key": 1528815600000,
- "doc_count": 19079,
- "pct": {
- "values": {
- "95.0": 98967.2249999999,
- "99.0": 327653.0000000006
- }
- },
- "avg": {
- "value": 31039.60391005818
- }
- },
- {
- "key_as_string": "2018-06-12T18:00:00.000Z",
- "key": 1528826400000,
- "doc_count": 18907,
- "pct": {
- "values": {
- "95.0": 97561.02469135808,
- "99.0": 324505.1399999999
- }
- },
- "avg": {
- "value": 30954.760723541545
- }
- },
- {
- "key_as_string": "2018-06-12T21:00:00.000Z",
- "key": 1528837200000,
- "doc_count": 18971,
- "pct": {
- "values": {
- "95.0": 102557.78813357186,
- "99.0": 338040.3999999998
- }
- },
- "avg": {
- "value": 31902.050234568553
- }
- },
- {
- "key_as_string": "2018-06-13T00:00:00.000Z",
- "key": 1528848000000,
- "doc_count": 18899,
- "pct": {
- "values": {
- "95.0": 100137.87578595306,
- "99.0": 328600.5173333335
- }
- },
- "avg": {
- "value": 31594.350653473728
- }
- },
- {
- "key_as_string": "2018-06-13T03:00:00.000Z",
- "key": 1528858800000,
- "doc_count": 19182,
- "pct": {
- "values": {
- "95.0": 98412.97120445351,
- "99.0": 334060.93628571345
- }
- },
- "avg": {
- "value": 31343.87243248879
- }
- },
- {
- "key_as_string": "2018-06-13T06:00:00.000Z",
- "key": 1528869600000,
- "doc_count": 19030,
- "pct": {
- "values": {
- "95.0": 101607.8328012912,
- "99.0": 328569.4964999998
- }
- },
- "avg": {
- "value": 31200.14450867052
- }
- },
- {
- "key_as_string": "2018-06-13T09:00:00.000Z",
- "key": 1528880400000,
- "doc_count": 19257,
- "pct": {
- "values": {
- "95.0": 92000.51368421057,
- "99.0": 320227.32399999973
- }
- },
- "avg": {
- "value": 28560.946668743833
- }
- },
- {
- "key_as_string": "2018-06-13T12:00:00.000Z",
- "key": 1528891200000,
- "doc_count": 19348,
- "pct": {
- "values": {
- "95.0": 78027.29473684198,
- "99.0": 292019.2899999998
- }
- },
- "avg": {
- "value": 24700.216146371717
- }
- },
- {
- "key_as_string": "2018-06-13T15:00:00.000Z",
- "key": 1528902000000,
- "doc_count": 19119,
- "pct": {
- "values": {
- "95.0": 80762.078801789,
- "99.0": 297757.72666666657
- }
- },
- "avg": {
- "value": 25261.025210523563
- }
- },
- {
- "key_as_string": "2018-06-13T18:00:00.000Z",
- "key": 1528912800000,
- "doc_count": 19206,
- "pct": {
- "values": {
- "95.0": 81160.83425925927,
- "99.0": 308034.4466666669
- }
- },
- "avg": {
- "value": 26041.39789649068
- }
- },
- {
- "key_as_string": "2018-06-13T21:00:00.000Z",
- "key": 1528923600000,
- "doc_count": 19078,
- "pct": {
- "values": {
- "95.0": 84215.58945578222,
- "99.0": 301128.4895238093
- }
- },
- "avg": {
- "value": 26123.556295209142
- }
- },
- {
- "key_as_string": "2018-06-14T00:00:00.000Z",
- "key": 1528934400000,
- "doc_count": 19551,
- "pct": {
- "values": {
- "95.0": 194188.21428571426,
- "99.0": 447266.9
- }
- },
- "avg": {
- "value": 46231.36177177638
- }
- },
- {
- "key_as_string": "2018-06-14T03:00:00.000Z",
- "key": 1528945200000,
- "doc_count": 18888,
- "pct": {
- "values": {
- "95.0": 172616.2293896504,
- "99.0": 409147.332500001
- }
- },
- "avg": {
- "value": 45350.42005506141
- }
- },
- {
- "key_as_string": "2018-06-14T06:00:00.000Z",
- "key": 1528956000000,
- "doc_count": 18823,
- "pct": {
- "values": {
- "95.0": 182653.81858220184,
- "99.0": 423121.9773333328
- }
- },
- "avg": {
- "value": 48256.049354513096
- }
- },
- {
- "key_as_string": "2018-06-14T09:00:00.000Z",
- "key": 1528966800000,
- "doc_count": 18766,
- "pct": {
- "values": {
- "95.0": 194970.75667682925,
- "99.0": 473485.4199999998
- }
- },
- "avg": {
- "value": 52360.30017052116
- }
- },
- {
- "key_as_string": "2018-06-14T12:00:00.000Z",
- "key": 1528977600000,
- "doc_count": 0,
- "pct": {
- "values": {
- "95.0": "NaN",
- "99.0": "NaN"
- }
- },
- "avg": {
- "value": null
- }
- }
- ]
- },
- "overall_avg_duration": {
- "value": 32861.15660262639
- }
- }
-}
diff --git a/x-pack/plugins/apm/server/lib/transactions/charts/get_avg_response_time_anomalies/__snapshots__/get_buckets_with_initial_anomaly_bounds.test.ts.snap b/x-pack/plugins/apm/server/lib/transactions/charts/get_avg_response_time_anomalies/__snapshots__/get_buckets_with_initial_anomaly_bounds.test.ts.snap
new file mode 100644
index 0000000000000..072a819e75398
--- /dev/null
+++ b/x-pack/plugins/apm/server/lib/transactions/charts/get_avg_response_time_anomalies/__snapshots__/get_buckets_with_initial_anomaly_bounds.test.ts.snap
@@ -0,0 +1,46 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`get_buckets_with_initial_anomaly_bounds should return correct buckets 1`] = `
+Array [
+ Object {
+ "anomalyScore": 0,
+ "lower": 17688.182675688193,
+ "upper": 50381.01051622894,
+ },
+ Object {
+ "anomalyScore": null,
+ "lower": null,
+ "upper": null,
+ },
+ Object {
+ "anomalyScore": null,
+ "lower": null,
+ "upper": null,
+ },
+ Object {
+ "anomalyScore": 0,
+ "lower": 16034.081569306454,
+ "upper": 54158.77731018045,
+ },
+ Object {
+ "anomalyScore": null,
+ "lower": null,
+ "upper": null,
+ },
+ Object {
+ "anomalyScore": 0,
+ "lower": 16034.081569306454,
+ "upper": 54158.77731018045,
+ },
+ Object {
+ "anomalyScore": null,
+ "lower": null,
+ "upper": null,
+ },
+ Object {
+ "anomalyScore": 0,
+ "lower": 16034.081569306454,
+ "upper": 54158.77731018045,
+ },
+]
+`;
diff --git a/x-pack/plugins/apm/server/lib/transactions/charts/get_avg_response_time_anomalies/__test__/__snapshots__/get_buckets_with_initial_anomaly_bounds.test.js.snap b/x-pack/plugins/apm/server/lib/transactions/charts/get_avg_response_time_anomalies/__test__/__snapshots__/get_buckets_with_initial_anomaly_bounds.test.js.snap
deleted file mode 100644
index 6809efff957af..0000000000000
--- a/x-pack/plugins/apm/server/lib/transactions/charts/get_avg_response_time_anomalies/__test__/__snapshots__/get_buckets_with_initial_anomaly_bounds.test.js.snap
+++ /dev/null
@@ -1,118 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`get_buckets_with_initial_anomaly_bounds should return correct buckets 1`] = `
-Array [
- Object {
- "anomaly_score": Object {
- "value": null,
- },
- "doc_count": 0,
- "key": 1530523000000,
- "key_as_string": "2018-07-02T09:16:40.000Z",
- "lower": Object {
- "value": 17688.182675688193,
- },
- "upper": Object {
- "value": 50381.01051622894,
- },
- },
- Object {
- "anomaly_score": Object {
- "value": null,
- },
- "doc_count": 4,
- "key": 1530523500000,
- "key_as_string": "2018-07-02T09:25:00.000Z",
- "lower": Object {
- "value": null,
- },
- "upper": Object {
- "value": null,
- },
- },
- Object {
- "anomaly_score": Object {
- "value": null,
- },
- "doc_count": 0,
- "key": 1530524000000,
- "key_as_string": "2018-07-02T09:33:20.000Z",
- "lower": Object {
- "value": null,
- },
- "upper": Object {
- "value": null,
- },
- },
- Object {
- "anomaly_score": Object {
- "value": 0,
- },
- "doc_count": 2,
- "key": 1530524500000,
- "key_as_string": "2018-07-02T09:41:40.000Z",
- "lower": Object {
- "value": 16034.081569306454,
- },
- "upper": Object {
- "value": 54158.77731018045,
- },
- },
- Object {
- "anomaly_score": Object {
- "value": null,
- },
- "doc_count": 0,
- "key": 1530525000000,
- "key_as_string": "2018-07-02T09:50:00.000Z",
- "lower": Object {
- "value": null,
- },
- "upper": Object {
- "value": null,
- },
- },
- Object {
- "anomaly_score": Object {
- "value": 0,
- },
- "doc_count": 2,
- "key": 1530525500000,
- "key_as_string": "2018-07-02T09:58:20.000Z",
- "lower": Object {
- "value": 16034.081569306454,
- },
- "upper": Object {
- "value": 54158.77731018045,
- },
- },
- Object {
- "anomaly_score": Object {
- "value": null,
- },
- "doc_count": 0,
- "key": 1530526000000,
- "key_as_string": "2018-07-02T10:06:40.000Z",
- "lower": Object {
- "value": null,
- },
- "upper": Object {
- "value": null,
- },
- },
- Object {
- "anomaly_score": Object {
- "value": 0,
- },
- "doc_count": 2,
- "key": 1530526500000,
- "key_as_string": "2018-07-02T10:15:00.000Z",
- "lower": Object {
- "value": 16034.081569306454,
- },
- "upper": Object {
- "value": 54158.77731018045,
- },
- },
-]
-`;
diff --git a/x-pack/plugins/apm/server/lib/transactions/charts/get_avg_response_time_anomalies/__test__/get_anomaly_aggs.test.ts b/x-pack/plugins/apm/server/lib/transactions/charts/get_avg_response_time_anomalies/__test__/get_anomaly_aggs.test.ts
deleted file mode 100644
index 7ded075a7ae65..0000000000000
--- a/x-pack/plugins/apm/server/lib/transactions/charts/get_avg_response_time_anomalies/__test__/get_anomaly_aggs.test.ts
+++ /dev/null
@@ -1,27 +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.
- */
-
-// @ts-ignore
-import { getAnomalyAggs } from '../get_anomaly_aggs';
-
-test('getAnomalyAggs should swallow HTTP errors', () => {
- const httpError = new Error('anomaly lookup failed') as any;
- httpError.statusCode = 418;
- const failClient = jest.fn(() => Promise.reject(httpError));
-
- return expect(getAnomalyAggs({ client: failClient })).resolves.toEqual(null);
-});
-
-test('getAnomalyAggs should throw other errors', () => {
- const otherError = new Error('anomaly lookup ASPLODED') as any;
- const failClient = jest.fn(() => Promise.reject(otherError));
-
- return expect(
- getAnomalyAggs({
- client: failClient
- })
- ).rejects.toThrow(otherError);
-});
diff --git a/x-pack/plugins/apm/server/lib/transactions/charts/get_avg_response_time_anomalies/__test__/mockData/firstBucketsResponse.json b/x-pack/plugins/apm/server/lib/transactions/charts/get_avg_response_time_anomalies/__test__/mockData/firstBucketsResponse.json
deleted file mode 100644
index 08851e34c86f2..0000000000000
--- a/x-pack/plugins/apm/server/lib/transactions/charts/get_avg_response_time_anomalies/__test__/mockData/firstBucketsResponse.json
+++ /dev/null
@@ -1,83 +0,0 @@
-{
- "took": 22,
- "timed_out": false,
- "_shards": {
- "total": 5,
- "successful": 5,
- "skipped": 0,
- "failed": 0
- },
- "hits": {
- "total": 2,
- "max_score": 0,
- "hits": []
- },
- "aggregations": {
- "ml_avg_response_times": {
- "buckets": [
- {
- "key_as_string": "2018-07-02T09:00:00.000Z",
- "key": 1530522000000,
- "doc_count": 0,
- "anomaly_score": {
- "value": null
- },
- "upper": {
- "value": null
- },
- "lower": {
- "value": null
- }
- },
- {
- "key_as_string": "2018-07-02T09:08:20.000Z",
- "key": 1530522500000,
- "doc_count": 2,
- "anomaly_score": {
- "value": 0
- },
- "upper": {
- "value": 50381.01051622894
- },
- "lower": {
- "value": 17688.182675688193
- }
- },
- {
- "key_as_string": "2018-07-02T09:16:40.000Z",
- "key": 1530523000000,
- "doc_count": 0,
- "anomaly_score": {
- "value": null
- },
- "upper": {
- "value": null
- },
- "lower": {
- "value": null
- }
- }
- ]
- },
- "top_hits": {
- "hits": {
- "total": 2,
- "max_score": null,
- "hits": [
- {
- "_index": ".ml-anomalies-shared",
- "_type": "doc",
- "_id": "opbeans-node-request-high_mean_response_time_model_plot_1530522900000_900_0_29791_0",
- "_score": null,
- "_source": {
- "bucket_span": 900
- },
- "sort": [
- 900
- ]
- }
- ]
- }
- }
- }
-}
diff --git a/x-pack/plugins/apm/server/lib/transactions/charts/get_avg_response_time_anomalies/__test__/mockData/mainBucketsResponse.json b/x-pack/plugins/apm/server/lib/transactions/charts/get_avg_response_time_anomalies/__test__/mockData/mainBucketsResponse.json
deleted file mode 100644
index 4c32ff9108ed1..0000000000000
--- a/x-pack/plugins/apm/server/lib/transactions/charts/get_avg_response_time_anomalies/__test__/mockData/mainBucketsResponse.json
+++ /dev/null
@@ -1,152 +0,0 @@
-{
- "took": 3,
- "timed_out": false,
- "_shards": {
- "total": 5,
- "successful": 5,
- "skipped": 0,
- "failed": 0
- },
- "hits": {
- "total": 10,
- "max_score": 0,
- "hits": []
- },
- "aggregations": {
- "ml_avg_response_times": {
- "buckets": [
- {
- "key_as_string": "2018-07-02T09:16:40.000Z",
- "key": 1530523000000,
- "doc_count": 0,
- "anomaly_score": {
- "value": null
- },
- "upper": {
- "value": null
- },
- "lower": {
- "value": null
- }
- },
- {
- "key_as_string": "2018-07-02T09:25:00.000Z",
- "key": 1530523500000,
- "doc_count": 4,
- "anomaly_score": {
- "value": null
- },
- "upper": {
- "value": null
- },
- "lower": {
- "value": null
- }
- },
- {
- "key_as_string": "2018-07-02T09:33:20.000Z",
- "key": 1530524000000,
- "doc_count": 0,
- "anomaly_score": {
- "value": null
- },
- "upper": {
- "value": null
- },
- "lower": {
- "value": null
- }
- },
- {
- "key_as_string": "2018-07-02T09:41:40.000Z",
- "key": 1530524500000,
- "doc_count": 2,
- "anomaly_score": {
- "value": 0
- },
- "upper": {
- "value": 54158.77731018045
- },
- "lower": {
- "value": 16034.081569306454
- }
- },
- {
- "key_as_string": "2018-07-02T09:50:00.000Z",
- "key": 1530525000000,
- "doc_count": 0,
- "anomaly_score": {
- "value": null
- },
- "upper": {
- "value": null
- },
- "lower": {
- "value": null
- }
- },
- {
- "key_as_string": "2018-07-02T09:58:20.000Z",
- "key": 1530525500000,
- "doc_count": 2,
- "anomaly_score": {
- "value": 0
- },
- "upper": {
- "value": 54158.77731018045
- },
- "lower": {
- "value": 16034.081569306454
- }
- },
- {
- "key_as_string": "2018-07-02T10:06:40.000Z",
- "key": 1530526000000,
- "doc_count": 0,
- "anomaly_score": {
- "value": null
- },
- "upper": {
- "value": null
- },
- "lower": {
- "value": null
- }
- },
- {
- "key_as_string": "2018-07-02T10:15:00.000Z",
- "key": 1530526500000,
- "doc_count": 2,
- "anomaly_score": {
- "value": 0
- },
- "upper": {
- "value": 54158.77731018045
- },
- "lower": {
- "value": 16034.081569306454
- }
- }
- ]
- },
- "top_hits": {
- "hits": {
- "total": 2,
- "max_score": null,
- "hits": [
- {
- "_index": ".ml-anomalies-shared",
- "_type": "doc",
- "_id":
- "opbeans-node-request-high_mean_response_time_model_plot_1530522900000_900_0_29791_0",
- "_score": null,
- "_source": {
- "bucket_span": 900
- },
- "sort": [900]
- }
- ]
- }
- }
- }
-}
diff --git a/x-pack/plugins/apm/server/lib/transactions/charts/get_avg_response_time_anomalies/get_anomaly_aggs/__snapshots__/fetcher.test.ts.snap b/x-pack/plugins/apm/server/lib/transactions/charts/get_avg_response_time_anomalies/get_anomaly_aggs/__snapshots__/fetcher.test.ts.snap
new file mode 100644
index 0000000000000..f3436641f3f1a
--- /dev/null
+++ b/x-pack/plugins/apm/server/lib/transactions/charts/get_avg_response_time_anomalies/get_anomaly_aggs/__snapshots__/fetcher.test.ts.snap
@@ -0,0 +1,73 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`anomalyAggsFetcher when ES returns valid response should call client with correct query 1`] = `
+Array [
+ Array [
+ "search",
+ Object {
+ "body": Object {
+ "aggs": Object {
+ "ml_avg_response_times": Object {
+ "aggs": Object {
+ "anomaly_score": Object {
+ "max": Object {
+ "field": "anomaly_score",
+ },
+ },
+ "lower": Object {
+ "min": Object {
+ "field": "model_lower",
+ },
+ },
+ "upper": Object {
+ "max": Object {
+ "field": "model_upper",
+ },
+ },
+ },
+ "date_histogram": Object {
+ "extended_bounds": Object {
+ "max": 1,
+ "min": 0,
+ },
+ "field": "timestamp",
+ "interval": "myInterval",
+ "min_doc_count": 0,
+ },
+ },
+ "top_hits": Object {
+ "top_hits": Object {
+ "_source": Object {
+ "includes": Array [
+ "bucket_span",
+ ],
+ },
+ "size": 1,
+ "sort": Array [
+ "bucket_span",
+ ],
+ },
+ },
+ },
+ "query": Object {
+ "bool": Object {
+ "filter": Array [
+ Object {
+ "range": Object {
+ "timestamp": Object {
+ "format": "epoch_millis",
+ "gte": 0,
+ "lte": 1,
+ },
+ },
+ },
+ ],
+ },
+ },
+ "size": 0,
+ },
+ "index": ".ml-anomalies-myservicename-mytransactiontype-high_mean_response_time",
+ },
+ ],
+]
+`;
diff --git a/x-pack/plugins/apm/server/lib/transactions/charts/get_avg_response_time_anomalies/get_anomaly_aggs/__snapshots__/transform.test.ts.snap b/x-pack/plugins/apm/server/lib/transactions/charts/get_avg_response_time_anomalies/get_anomaly_aggs/__snapshots__/transform.test.ts.snap
new file mode 100644
index 0000000000000..1eeac5ae02e5e
--- /dev/null
+++ b/x-pack/plugins/apm/server/lib/transactions/charts/get_avg_response_time_anomalies/get_anomaly_aggs/__snapshots__/transform.test.ts.snap
@@ -0,0 +1,49 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`anomalyAggsTransform should match snapshot 1`] = `
+Object {
+ "bucketSize": 900,
+ "buckets": Array [
+ Object {
+ "anomalyScore": null,
+ "lower": null,
+ "upper": null,
+ },
+ Object {
+ "anomalyScore": null,
+ "lower": null,
+ "upper": null,
+ },
+ Object {
+ "anomalyScore": null,
+ "lower": null,
+ "upper": null,
+ },
+ Object {
+ "anomalyScore": 0,
+ "lower": 16034.081569306454,
+ "upper": 54158.77731018045,
+ },
+ Object {
+ "anomalyScore": null,
+ "lower": null,
+ "upper": null,
+ },
+ Object {
+ "anomalyScore": 0,
+ "lower": 16034.081569306454,
+ "upper": 54158.77731018045,
+ },
+ Object {
+ "anomalyScore": null,
+ "lower": null,
+ "upper": null,
+ },
+ Object {
+ "anomalyScore": 0,
+ "lower": 16034.081569306454,
+ "upper": 54158.77731018045,
+ },
+ ],
+}
+`;
diff --git a/x-pack/plugins/apm/server/lib/transactions/charts/get_avg_response_time_anomalies/get_anomaly_aggs/fetcher.test.ts b/x-pack/plugins/apm/server/lib/transactions/charts/get_avg_response_time_anomalies/get_anomaly_aggs/fetcher.test.ts
new file mode 100644
index 0000000000000..7eaf84be12e79
--- /dev/null
+++ b/x-pack/plugins/apm/server/lib/transactions/charts/get_avg_response_time_anomalies/get_anomaly_aggs/fetcher.test.ts
@@ -0,0 +1,55 @@
+/*
+ * 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 { anomalyAggsFetcher, ESResponse } from './fetcher';
+
+describe('anomalyAggsFetcher', () => {
+ describe('when ES returns valid response', () => {
+ let response: ESResponse;
+ let clientSpy: jest.Mock;
+
+ beforeEach(async () => {
+ clientSpy = jest.fn().mockReturnValue('ES Response');
+ response = await anomalyAggsFetcher({
+ serviceName: 'myServiceName',
+ transactionType: 'myTransactionType',
+ intervalString: 'myInterval',
+ client: clientSpy,
+ start: 0,
+ end: 1
+ });
+ });
+
+ it('should call client with correct query', () => {
+ expect(clientSpy.mock.calls).toMatchSnapshot();
+ });
+
+ it('should return correct response', () => {
+ expect(response).toBe('ES Response');
+ });
+ });
+
+ it('should swallow HTTP errors', () => {
+ const httpError = new Error('anomaly lookup failed') as any;
+ httpError.statusCode = 418;
+ const failClient = jest.fn(() => Promise.reject(httpError));
+
+ return expect(
+ anomalyAggsFetcher({ client: failClient } as any)
+ ).resolves.toEqual(null);
+ });
+
+ it('should throw other errors', () => {
+ const otherError = new Error('anomaly lookup ASPLODED') as any;
+ const failClient = jest.fn(() => Promise.reject(otherError));
+
+ return expect(
+ anomalyAggsFetcher({
+ client: failClient
+ } as any)
+ ).rejects.toThrow(otherError);
+ });
+});
diff --git a/x-pack/plugins/apm/server/lib/transactions/charts/get_avg_response_time_anomalies/get_anomaly_aggs.js b/x-pack/plugins/apm/server/lib/transactions/charts/get_avg_response_time_anomalies/get_anomaly_aggs/fetcher.ts
similarity index 61%
rename from x-pack/plugins/apm/server/lib/transactions/charts/get_avg_response_time_anomalies/get_anomaly_aggs.js
rename to x-pack/plugins/apm/server/lib/transactions/charts/get_avg_response_time_anomalies/get_anomaly_aggs/fetcher.ts
index cae78df06f725..eeb1fc32b8f68 100644
--- a/x-pack/plugins/apm/server/lib/transactions/charts/get_avg_response_time_anomalies/get_anomaly_aggs.js
+++ b/x-pack/plugins/apm/server/lib/transactions/charts/get_avg_response_time_anomalies/get_anomaly_aggs/fetcher.ts
@@ -4,14 +4,53 @@
* you may not use this file except in compliance with the Elastic License.
*/
-export async function getAnomalyAggs({
+import { AggregationSearchResponse } from 'elasticsearch';
+import { TopHits } from 'x-pack/plugins/apm/typings/elasticsearch';
+import { ESClient } from '../../../../helpers/setup_request';
+
+export interface IOptions {
+ serviceName: string;
+ transactionType: string;
+ intervalString: string;
+ client: ESClient;
+ start: number;
+ end: number;
+}
+
+interface Bucket {
+ key_as_string: string;
+ key: number;
+ doc_count: number;
+ anomaly_score: {
+ value: number | null;
+ };
+ lower: {
+ value: number | null;
+ };
+ upper: {
+ value: number | null;
+ };
+}
+
+interface Aggs {
+ ml_avg_response_times: {
+ buckets: Bucket[];
+ };
+ top_hits: TopHits<{
+ bucket_span: number;
+ }>;
+}
+
+export type ESResponse = AggregationSearchResponse | null;
+
+export async function anomalyAggsFetcher({
serviceName,
transactionType,
intervalString,
client,
start,
end
-}) {
+}: IOptions): Promise {
const params = {
index: `.ml-anomalies-${serviceName}-${transactionType}-high_mean_response_time`.toLowerCase(),
body: {
@@ -60,15 +99,12 @@ export async function getAnomalyAggs({
};
try {
- const resp = await client('search', params);
- return resp.aggregations;
+ return await client('search', params);
} catch (err) {
- if ('statusCode' in err) {
- // swallow HTTP errors because there are lots of reasons
- // the ml index lookup may fail, and we're ok with that
+ const isHttpError = 'statusCode' in err;
+ if (isHttpError) {
return null;
}
-
throw err;
}
}
diff --git a/x-pack/plugins/apm/server/lib/transactions/charts/get_avg_response_time_anomalies/get_anomaly_aggs/index.ts b/x-pack/plugins/apm/server/lib/transactions/charts/get_avg_response_time_anomalies/get_anomaly_aggs/index.ts
new file mode 100644
index 0000000000000..c3df288527442
--- /dev/null
+++ b/x-pack/plugins/apm/server/lib/transactions/charts/get_avg_response_time_anomalies/get_anomaly_aggs/index.ts
@@ -0,0 +1,13 @@
+/*
+ * 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 { anomalyAggsFetcher, IOptions } from './fetcher';
+import { anomalyAggsTransform } from './transform';
+
+export async function getAnomalyAggs(options: IOptions) {
+ const response = await anomalyAggsFetcher(options);
+ return anomalyAggsTransform(response);
+}
diff --git a/x-pack/plugins/apm/server/lib/transactions/charts/get_avg_response_time_anomalies/get_anomaly_aggs/transform.test.ts b/x-pack/plugins/apm/server/lib/transactions/charts/get_avg_response_time_anomalies/get_anomaly_aggs/transform.test.ts
new file mode 100644
index 0000000000000..1b1dbf8848cfc
--- /dev/null
+++ b/x-pack/plugins/apm/server/lib/transactions/charts/get_avg_response_time_anomalies/get_anomaly_aggs/transform.test.ts
@@ -0,0 +1,18 @@
+/*
+ * 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 { mainBucketsResponse } from '../mock-responses/mainBucketsResponse';
+import { anomalyAggsTransform } from './transform';
+
+describe('anomalyAggsTransform', () => {
+ it('should return null if response is empty', () => {
+ expect(anomalyAggsTransform(null)).toBe(null);
+ });
+
+ it('should match snapshot', () => {
+ expect(anomalyAggsTransform(mainBucketsResponse)).toMatchSnapshot();
+ });
+});
diff --git a/x-pack/plugins/apm/server/lib/transactions/charts/get_avg_response_time_anomalies/get_anomaly_aggs/transform.ts b/x-pack/plugins/apm/server/lib/transactions/charts/get_avg_response_time_anomalies/get_anomaly_aggs/transform.ts
new file mode 100644
index 0000000000000..d6ebb3ba7a3a7
--- /dev/null
+++ b/x-pack/plugins/apm/server/lib/transactions/charts/get_avg_response_time_anomalies/get_anomaly_aggs/transform.ts
@@ -0,0 +1,37 @@
+/*
+ * 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 { oc } from 'ts-optchain';
+import { ESResponse } from './fetcher';
+
+export interface AvgAnomalyBucket {
+ anomalyScore: number | null;
+ lower: number | null;
+ upper: number | null;
+}
+
+export function anomalyAggsTransform(response: ESResponse) {
+ if (!response) {
+ return null;
+ }
+
+ const buckets = oc(response)
+ .aggregations.ml_avg_response_times.buckets([])
+ .map(bucket => {
+ return {
+ anomalyScore: bucket.anomaly_score.value,
+ lower: bucket.lower.value,
+ upper: bucket.upper.value
+ };
+ });
+
+ return {
+ buckets,
+ bucketSize: oc(
+ response
+ ).aggregations.top_hits.hits.hits[0]._source.bucket_span(0)
+ };
+}
diff --git a/x-pack/plugins/apm/server/lib/transactions/charts/get_avg_response_time_anomalies/get_buckets_with_initial_anomaly_bounds.js b/x-pack/plugins/apm/server/lib/transactions/charts/get_avg_response_time_anomalies/get_buckets_with_initial_anomaly_bounds.js
deleted file mode 100644
index 5d71559232445..0000000000000
--- a/x-pack/plugins/apm/server/lib/transactions/charts/get_avg_response_time_anomalies/get_buckets_with_initial_anomaly_bounds.js
+++ /dev/null
@@ -1,52 +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 { last, get } from 'lodash';
-import { getAnomalyAggs } from './get_anomaly_aggs';
-
-export async function getBucketWithInitialAnomalyBounds({
- serviceName,
- transactionType,
- client,
- start,
- mainBuckets,
- anomalyBucketSpan
-}) {
- // abort if first bucket already has values for initial anomaly bounds
- if (mainBuckets[0].lower.value || !anomalyBucketSpan) {
- return mainBuckets;
- }
-
- const newStart = start - anomalyBucketSpan * 1000;
- const newEnd = start;
-
- const aggs = await getAnomalyAggs({
- serviceName,
- transactionType,
- intervalString: `${anomalyBucketSpan}s`,
- client,
- start: newStart,
- end: newEnd
- });
-
- const firstBucketWithBounds = last(
- get(aggs, 'ml_avg_response_times.buckets', []).filter(
- bucket => bucket.lower.value
- )
- );
-
- return mainBuckets.map((bucket, i) => {
- // replace first item
- if (i === 0 && firstBucketWithBounds) {
- return {
- ...bucket,
- upper: { value: firstBucketWithBounds.upper.value },
- lower: { value: firstBucketWithBounds.lower.value }
- };
- }
- return bucket;
- });
-}
diff --git a/x-pack/plugins/apm/server/lib/transactions/charts/get_avg_response_time_anomalies/__test__/get_buckets_with_initial_anomaly_bounds.test.js b/x-pack/plugins/apm/server/lib/transactions/charts/get_avg_response_time_anomalies/get_buckets_with_initial_anomaly_bounds.test.ts
similarity index 55%
rename from x-pack/plugins/apm/server/lib/transactions/charts/get_avg_response_time_anomalies/__test__/get_buckets_with_initial_anomaly_bounds.test.js
rename to x-pack/plugins/apm/server/lib/transactions/charts/get_avg_response_time_anomalies/get_buckets_with_initial_anomaly_bounds.test.ts
index e8b37ee490642..f1fb18e2a035a 100644
--- a/x-pack/plugins/apm/server/lib/transactions/charts/get_avg_response_time_anomalies/__test__/get_buckets_with_initial_anomaly_bounds.test.js
+++ b/x-pack/plugins/apm/server/lib/transactions/charts/get_avg_response_time_anomalies/get_buckets_with_initial_anomaly_bounds.test.ts
@@ -4,24 +4,34 @@
* you may not use this file except in compliance with the Elastic License.
*/
-import { getBucketWithInitialAnomalyBounds } from '../get_buckets_with_initial_anomaly_bounds';
-import mainBucketsResponse from './mockData/mainBucketsResponse';
-import firstBucketsResponse from './mockData/firstBucketsResponse';
+import { getAnomalyAggs } from './get_anomaly_aggs';
+import { AvgAnomalyBucket } from './get_anomaly_aggs/transform';
+import { getBucketWithInitialAnomalyBounds } from './get_buckets_with_initial_anomaly_bounds';
+import { firstBucketsResponse } from './mock-responses/firstBucketsResponse';
+import { mainBucketsResponse } from './mock-responses/mainBucketsResponse';
describe('get_buckets_with_initial_anomaly_bounds', () => {
- const mainBuckets =
- mainBucketsResponse.aggregations.ml_avg_response_times.buckets;
- let buckets;
+ let buckets: AvgAnomalyBucket[];
+ let mainBuckets: AvgAnomalyBucket[];
beforeEach(async () => {
+ const response = await getAnomalyAggs({
+ serviceName: 'myServiceName',
+ transactionType: 'myTransactionType',
+ intervalString: '',
+ client: () => mainBucketsResponse as any,
+ start: 0,
+ end: 1
+ });
+
+ mainBuckets = response!.buckets;
buckets = await getBucketWithInitialAnomalyBounds({
serviceName: 'myServiceName',
transactionType: 'myTransactionType',
- intervalString: '60s',
start: 1530523322742,
- client: () => firstBucketsResponse,
- mainBuckets,
- anomalyBucketSpan: 900
+ client: () => firstBucketsResponse as any,
+ buckets: mainBuckets,
+ bucketSize: 900
});
});
diff --git a/x-pack/plugins/apm/server/lib/transactions/charts/get_avg_response_time_anomalies/get_buckets_with_initial_anomaly_bounds.ts b/x-pack/plugins/apm/server/lib/transactions/charts/get_avg_response_time_anomalies/get_buckets_with_initial_anomaly_bounds.ts
new file mode 100644
index 0000000000000..a56b656671672
--- /dev/null
+++ b/x-pack/plugins/apm/server/lib/transactions/charts/get_avg_response_time_anomalies/get_buckets_with_initial_anomaly_bounds.ts
@@ -0,0 +1,66 @@
+/*
+ * 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 { last } from 'lodash';
+import { ESClient } from '../../../helpers/setup_request';
+import { getAnomalyAggs } from './get_anomaly_aggs';
+import { AvgAnomalyBucket } from './get_anomaly_aggs/transform';
+
+interface Props {
+ serviceName: string;
+ transactionType: string;
+ buckets: AvgAnomalyBucket[];
+ bucketSize: number;
+ start: number;
+ client: ESClient;
+}
+
+export async function getBucketWithInitialAnomalyBounds({
+ serviceName,
+ transactionType,
+ buckets,
+ bucketSize,
+ start,
+ client
+}: Props) {
+ // abort if first bucket already has values for initial anomaly bounds
+ if (buckets[0].lower || !bucketSize) {
+ return buckets;
+ }
+
+ const newStart = start - bucketSize * 1000;
+ const newEnd = start;
+
+ const aggs = await getAnomalyAggs({
+ serviceName,
+ transactionType,
+ intervalString: `${bucketSize}s`,
+ client,
+ start: newStart,
+ end: newEnd
+ });
+
+ if (!aggs) {
+ return buckets;
+ }
+
+ const firstBucketWithBounds = last(
+ aggs.buckets.filter(bucket => bucket.lower)
+ );
+
+ if (!firstBucketWithBounds) {
+ return buckets;
+ }
+
+ return replaceFirstItem(buckets, firstBucketWithBounds);
+}
+
+// copy array and replace first item
+function replaceFirstItem(array: T[], value: T) {
+ const ret = array.slice(0);
+ ret[0] = value;
+ return ret;
+}
diff --git a/x-pack/plugins/apm/server/lib/transactions/charts/get_avg_response_time_anomalies/__test__/get_avg_response_time_anomalies.test.js b/x-pack/plugins/apm/server/lib/transactions/charts/get_avg_response_time_anomalies/index.test.ts
similarity index 66%
rename from x-pack/plugins/apm/server/lib/transactions/charts/get_avg_response_time_anomalies/__test__/get_avg_response_time_anomalies.test.js
rename to x-pack/plugins/apm/server/lib/transactions/charts/get_avg_response_time_anomalies/index.test.ts
index c44c5ffe4fc80..468c2c7e3a074 100644
--- a/x-pack/plugins/apm/server/lib/transactions/charts/get_avg_response_time_anomalies/__test__/get_avg_response_time_anomalies.test.js
+++ b/x-pack/plugins/apm/server/lib/transactions/charts/get_avg_response_time_anomalies/index.test.ts
@@ -4,9 +4,9 @@
* you may not use this file except in compliance with the Elastic License.
*/
-import { getAvgResponseTimeAnomalies } from '../get_avg_response_time_anomalies';
-import mainBucketsResponse from './mockData/mainBucketsResponse';
-import firstBucketsResponse from './mockData/firstBucketsResponse';
+import { getAvgResponseTimeAnomalies } from '.';
+import { firstBucketsResponse } from './mock-responses/firstBucketsResponse';
+import { mainBucketsResponse } from './mock-responses/mainBucketsResponse';
describe('get_avg_response_time_anomalies', () => {
it('', async () => {
@@ -23,32 +23,32 @@ describe('get_avg_response_time_anomalies', () => {
end: 1528977600000,
client: clientSpy,
config: {
- get: () => 'myIndex'
+ get: () => 'myIndex' as any
}
}
});
expect(avgAnomalies).toEqual({
- bucketSpanAsMillis: 10800000,
+ bucketSizeAsMillis: 10800000,
buckets: [
{
- anomaly_score: null,
+ anomalyScore: 0,
lower: 17688.182675688193,
upper: 50381.01051622894
},
- { anomaly_score: null, lower: null, upper: null },
+ { anomalyScore: null, lower: null, upper: null },
{
- anomaly_score: 0,
+ anomalyScore: 0,
lower: 16034.081569306454,
upper: 54158.77731018045
},
- { anomaly_score: null, lower: null, upper: null },
+ { anomalyScore: null, lower: null, upper: null },
{
- anomaly_score: 0,
+ anomalyScore: 0,
lower: 16034.081569306454,
upper: 54158.77731018045
},
- { anomaly_score: null, lower: null, upper: null }
+ { anomalyScore: null, lower: null, upper: null }
]
});
});
diff --git a/x-pack/plugins/apm/server/lib/transactions/charts/get_avg_response_time_anomalies/get_avg_response_time_anomalies.js b/x-pack/plugins/apm/server/lib/transactions/charts/get_avg_response_time_anomalies/index.ts
similarity index 54%
rename from x-pack/plugins/apm/server/lib/transactions/charts/get_avg_response_time_anomalies/get_avg_response_time_anomalies.js
rename to x-pack/plugins/apm/server/lib/transactions/charts/get_avg_response_time_anomalies/index.ts
index 3e950d919b6cc..31ee4a9d1a6d7 100644
--- a/x-pack/plugins/apm/server/lib/transactions/charts/get_avg_response_time_anomalies/get_avg_response_time_anomalies.js
+++ b/x-pack/plugins/apm/server/lib/transactions/charts/get_avg_response_time_anomalies/index.ts
@@ -4,23 +4,31 @@
* you may not use this file except in compliance with the Elastic License.
*/
-import { get } from 'lodash';
import { getBucketSize } from '../../../helpers/get_bucket_size';
+import { IOptions } from '../get_timeseries_data';
import { getAnomalyAggs } from './get_anomaly_aggs';
+import { AvgAnomalyBucket } from './get_anomaly_aggs/transform';
import { getBucketWithInitialAnomalyBounds } from './get_buckets_with_initial_anomaly_bounds';
+export interface IAvgAnomalies {
+ bucketSizeAsMillis: number;
+ buckets: AvgAnomalyBucket[];
+}
+
+export type IAvgAnomaliesResponse = IAvgAnomalies | undefined;
+
export async function getAvgResponseTimeAnomalies({
serviceName,
transactionType,
transactionName,
setup
-}) {
+}: IOptions): Promise {
const { start, end, client } = setup;
const { intervalString, bucketSize } = getBucketSize(start, end, 'auto');
// don't fetch anomalies for transaction details page
if (transactionName) {
- return [];
+ return;
}
const aggs = await getAnomalyAggs({
@@ -33,42 +41,20 @@ export async function getAvgResponseTimeAnomalies({
});
if (!aggs) {
- return {
- message: 'Error reading machine learning index'
- };
+ return;
}
- const anomalyBucketSpan = get(
- aggs,
- 'top_hits.hits.hits[0]._source.bucket_span'
- );
-
- const mainBuckets = get(aggs, 'ml_avg_response_times.buckets', []).slice(
- 1,
- -1
- );
-
- const bucketsWithInitialAnomalyBounds = await getBucketWithInitialAnomalyBounds(
- {
- serviceName,
- transactionType,
- client,
- start,
- mainBuckets,
- anomalyBucketSpan
- }
- );
-
- const buckets = bucketsWithInitialAnomalyBounds.map(bucket => {
- return {
- anomaly_score: bucket.anomaly_score.value,
- lower: bucket.lower.value,
- upper: bucket.upper.value
- };
+ const buckets = await getBucketWithInitialAnomalyBounds({
+ serviceName,
+ transactionType,
+ buckets: aggs.buckets.slice(1, -1),
+ bucketSize: aggs.bucketSize,
+ start,
+ client
});
return {
- bucketSpanAsMillis: Math.max(bucketSize, anomalyBucketSpan) * 1000,
- buckets
+ buckets,
+ bucketSizeAsMillis: Math.max(bucketSize, aggs.bucketSize) * 1000
};
}
diff --git a/x-pack/plugins/apm/server/lib/transactions/charts/get_avg_response_time_anomalies/mock-responses/firstBucketsResponse.ts b/x-pack/plugins/apm/server/lib/transactions/charts/get_avg_response_time_anomalies/mock-responses/firstBucketsResponse.ts
new file mode 100644
index 0000000000000..d23807764af85
--- /dev/null
+++ b/x-pack/plugins/apm/server/lib/transactions/charts/get_avg_response_time_anomalies/mock-responses/firstBucketsResponse.ts
@@ -0,0 +1,89 @@
+/*
+ * 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 { ESResponse } from '../get_anomaly_aggs/fetcher';
+
+export const firstBucketsResponse: ESResponse = {
+ took: 22,
+ timed_out: false,
+ _shards: {
+ total: 5,
+ successful: 5,
+ skipped: 0,
+ failed: 0
+ },
+ hits: {
+ total: 2,
+ max_score: 0,
+ hits: []
+ },
+ aggregations: {
+ ml_avg_response_times: {
+ buckets: [
+ {
+ key_as_string: '2018-07-02T09:00:00.000Z',
+ key: 1530522000000,
+ doc_count: 0,
+ anomaly_score: {
+ value: null
+ },
+ upper: {
+ value: null
+ },
+ lower: {
+ value: null
+ }
+ },
+ {
+ key_as_string: '2018-07-02T09:08:20.000Z',
+ key: 1530522500000,
+ doc_count: 2,
+ anomaly_score: {
+ value: 0
+ },
+ upper: {
+ value: 50381.01051622894
+ },
+ lower: {
+ value: 17688.182675688193
+ }
+ },
+ {
+ key_as_string: '2018-07-02T09:16:40.000Z',
+ key: 1530523000000,
+ doc_count: 0,
+ anomaly_score: {
+ value: null
+ },
+ upper: {
+ value: null
+ },
+ lower: {
+ value: null
+ }
+ }
+ ]
+ },
+ top_hits: {
+ hits: {
+ total: 2,
+ max_score: 0,
+ hits: [
+ {
+ _index: '.ml-anomalies-shared',
+ _type: 'doc',
+ _id:
+ 'opbeans-node-request-high_mean_response_time_model_plot_1530522900000_900_0_29791_0',
+ _score: 0,
+ _source: {
+ bucket_span: 900
+ }
+ }
+ ]
+ }
+ }
+ }
+};
diff --git a/x-pack/plugins/apm/server/lib/transactions/charts/get_avg_response_time_anomalies/mock-responses/mainBucketsResponse.ts b/x-pack/plugins/apm/server/lib/transactions/charts/get_avg_response_time_anomalies/mock-responses/mainBucketsResponse.ts
new file mode 100644
index 0000000000000..21983541af24b
--- /dev/null
+++ b/x-pack/plugins/apm/server/lib/transactions/charts/get_avg_response_time_anomalies/mock-responses/mainBucketsResponse.ts
@@ -0,0 +1,159 @@
+/*
+ * 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 { ESResponse } from '../get_anomaly_aggs/fetcher';
+
+export const mainBucketsResponse: ESResponse = {
+ took: 3,
+ timed_out: false,
+ _shards: {
+ total: 5,
+ successful: 5,
+ skipped: 0,
+ failed: 0
+ },
+ hits: {
+ total: 10,
+ max_score: 0,
+ hits: []
+ },
+ aggregations: {
+ ml_avg_response_times: {
+ buckets: [
+ {
+ key_as_string: '2018-07-02T09:16:40.000Z',
+ key: 1530523000000,
+ doc_count: 0,
+ anomaly_score: {
+ value: null
+ },
+ upper: {
+ value: null
+ },
+ lower: {
+ value: null
+ }
+ },
+ {
+ key_as_string: '2018-07-02T09:25:00.000Z',
+ key: 1530523500000,
+ doc_count: 4,
+ anomaly_score: {
+ value: null
+ },
+ upper: {
+ value: null
+ },
+ lower: {
+ value: null
+ }
+ },
+ {
+ key_as_string: '2018-07-02T09:33:20.000Z',
+ key: 1530524000000,
+ doc_count: 0,
+ anomaly_score: {
+ value: null
+ },
+ upper: {
+ value: null
+ },
+ lower: {
+ value: null
+ }
+ },
+ {
+ key_as_string: '2018-07-02T09:41:40.000Z',
+ key: 1530524500000,
+ doc_count: 2,
+ anomaly_score: {
+ value: 0
+ },
+ upper: {
+ value: 54158.77731018045
+ },
+ lower: {
+ value: 16034.081569306454
+ }
+ },
+ {
+ key_as_string: '2018-07-02T09:50:00.000Z',
+ key: 1530525000000,
+ doc_count: 0,
+ anomaly_score: {
+ value: null
+ },
+ upper: {
+ value: null
+ },
+ lower: {
+ value: null
+ }
+ },
+ {
+ key_as_string: '2018-07-02T09:58:20.000Z',
+ key: 1530525500000,
+ doc_count: 2,
+ anomaly_score: {
+ value: 0
+ },
+ upper: {
+ value: 54158.77731018045
+ },
+ lower: {
+ value: 16034.081569306454
+ }
+ },
+ {
+ key_as_string: '2018-07-02T10:06:40.000Z',
+ key: 1530526000000,
+ doc_count: 0,
+ anomaly_score: {
+ value: null
+ },
+ upper: {
+ value: null
+ },
+ lower: {
+ value: null
+ }
+ },
+ {
+ key_as_string: '2018-07-02T10:15:00.000Z',
+ key: 1530526500000,
+ doc_count: 2,
+ anomaly_score: {
+ value: 0
+ },
+ upper: {
+ value: 54158.77731018045
+ },
+ lower: {
+ value: 16034.081569306454
+ }
+ }
+ ]
+ },
+ top_hits: {
+ hits: {
+ total: 2,
+ max_score: 0,
+ hits: [
+ {
+ _index: '.ml-anomalies-shared',
+ _type: 'doc',
+ _id:
+ 'opbeans-node-request-high_mean_response_time_model_plot_1530522900000_900_0_29791_0',
+ _score: 0,
+ _source: {
+ bucket_span: 900
+ }
+ }
+ ]
+ }
+ }
+ }
+};
diff --git a/x-pack/plugins/apm/server/lib/transactions/charts/get_timeseries_data/__snapshots__/fetcher.test.ts.snap b/x-pack/plugins/apm/server/lib/transactions/charts/get_timeseries_data/__snapshots__/fetcher.test.ts.snap
new file mode 100644
index 0000000000000..6e55d560a8931
--- /dev/null
+++ b/x-pack/plugins/apm/server/lib/transactions/charts/get_timeseries_data/__snapshots__/fetcher.test.ts.snap
@@ -0,0 +1,93 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`timeseriesFetcher should call client with correct query 1`] = `
+Array [
+ Array [
+ "search",
+ Object {
+ "body": Object {
+ "aggs": Object {
+ "overall_avg_duration": Object {
+ "avg": Object {
+ "field": "transaction.duration.us",
+ },
+ },
+ "response_times": Object {
+ "aggs": Object {
+ "avg": Object {
+ "avg": Object {
+ "field": "transaction.duration.us",
+ },
+ },
+ "pct": Object {
+ "percentiles": Object {
+ "field": "transaction.duration.us",
+ "percents": Array [
+ 95,
+ 99,
+ ],
+ },
+ },
+ },
+ "date_histogram": Object {
+ "extended_bounds": Object {
+ "max": 1528977600000,
+ "min": 1528113600000,
+ },
+ "field": "@timestamp",
+ "interval": "10800s",
+ "min_doc_count": 0,
+ },
+ },
+ "transaction_results": Object {
+ "aggs": Object {
+ "timeseries": Object {
+ "date_histogram": Object {
+ "extended_bounds": Object {
+ "max": 1528977600000,
+ "min": 1528113600000,
+ },
+ "field": "@timestamp",
+ "interval": "10800s",
+ "min_doc_count": 0,
+ },
+ },
+ },
+ "terms": Object {
+ "field": "transaction.result",
+ "missing": "transaction_result_missing",
+ },
+ },
+ },
+ "query": Object {
+ "bool": Object {
+ "filter": Array [
+ Object {
+ "term": Object {
+ "context.service.name": "myServiceName",
+ },
+ },
+ Object {
+ "term": Object {
+ "transaction.type": "myTransactionType",
+ },
+ },
+ Object {
+ "range": Object {
+ "@timestamp": Object {
+ "format": "epoch_millis",
+ "gte": 1528113600000,
+ "lte": 1528977600000,
+ },
+ },
+ },
+ ],
+ },
+ },
+ "size": 0,
+ },
+ "index": "myIndex",
+ },
+ ],
+]
+`;
diff --git a/x-pack/plugins/apm/server/lib/transactions/charts/get_timeseries_data/__snapshots__/transform.test.ts.snap b/x-pack/plugins/apm/server/lib/transactions/charts/get_timeseries_data/__snapshots__/transform.test.ts.snap
new file mode 100644
index 0000000000000..d94348c4f8513
--- /dev/null
+++ b/x-pack/plugins/apm/server/lib/transactions/charts/get_timeseries_data/__snapshots__/transform.test.ts.snap
@@ -0,0 +1,682 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`timeseriesTransformer should match snapshot 1`] = `
+Object {
+ "dates": Array [
+ 1528124400000,
+ 1528135200000,
+ 1528146000000,
+ 1528156800000,
+ 1528167600000,
+ 1528178400000,
+ 1528189200000,
+ 1528200000000,
+ 1528210800000,
+ 1528221600000,
+ 1528232400000,
+ 1528243200000,
+ 1528254000000,
+ 1528264800000,
+ 1528275600000,
+ 1528286400000,
+ 1528297200000,
+ 1528308000000,
+ 1528318800000,
+ 1528329600000,
+ 1528340400000,
+ 1528351200000,
+ 1528362000000,
+ 1528372800000,
+ 1528383600000,
+ 1528394400000,
+ 1528405200000,
+ 1528416000000,
+ 1528426800000,
+ 1528437600000,
+ 1528448400000,
+ 1528459200000,
+ 1528470000000,
+ 1528480800000,
+ 1528491600000,
+ 1528502400000,
+ 1528513200000,
+ 1528524000000,
+ 1528534800000,
+ 1528545600000,
+ 1528556400000,
+ 1528567200000,
+ 1528578000000,
+ 1528588800000,
+ 1528599600000,
+ 1528610400000,
+ 1528621200000,
+ 1528632000000,
+ 1528642800000,
+ 1528653600000,
+ 1528664400000,
+ 1528675200000,
+ 1528686000000,
+ 1528696800000,
+ 1528707600000,
+ 1528718400000,
+ 1528729200000,
+ 1528740000000,
+ 1528750800000,
+ 1528761600000,
+ 1528772400000,
+ 1528783200000,
+ 1528794000000,
+ 1528804800000,
+ 1528815600000,
+ 1528826400000,
+ 1528837200000,
+ 1528848000000,
+ 1528858800000,
+ 1528869600000,
+ 1528880400000,
+ 1528891200000,
+ 1528902000000,
+ 1528912800000,
+ 1528923600000,
+ 1528934400000,
+ 1528945200000,
+ 1528956000000,
+ 1528966800000,
+ ],
+ "overallAvgDuration": 32861.15660262639,
+ "responseTimes": Object {
+ "avg": Array [
+ 26193.277795595466,
+ 25291.787065995228,
+ 24690.306474667796,
+ 24809.8953814219,
+ 25460.0394764508,
+ 26360.440733498916,
+ 27050.95205479452,
+ 26555.857333903925,
+ 26164.343359049206,
+ 26989.84546419098,
+ 26314.409430068266,
+ 27460.774575018477,
+ 26461.469107431974,
+ 27657.584946692834,
+ 27940.445967005213,
+ 34454.377581534434,
+ 44024.31809353839,
+ 36374.53333333333,
+ 36991.29442471209,
+ 37178.002701986756,
+ 37605.57078923814,
+ 37319.89767295267,
+ 38709.5041348433,
+ 38140.131856255066,
+ 34564.81091043125,
+ 33256.37743828302,
+ 37251.5625266752,
+ 38681.89084929791,
+ 40677.801045709355,
+ 39987.86453616932,
+ 41059.392914139804,
+ 39630.710111535845,
+ 41561.81331074284,
+ 43079.490738297536,
+ 43925.39609283509,
+ 25821.91424646782,
+ 27343.60011755486,
+ 25249.95060523233,
+ 25492.77199074074,
+ 25991.647281682137,
+ 26273.31290445375,
+ 26234.98976780795,
+ 23494.54873786408,
+ 22008.80482069371,
+ 22828.136655635586,
+ 22138.7081404321,
+ 22634.985579811735,
+ 22202.780998080616,
+ 23084.082780163997,
+ 23109.666146341464,
+ 23306.89028152719,
+ 39341.022704095325,
+ 37467.17153341258,
+ 52457.50554180566,
+ 31327.95780166252,
+ 30695.334941163997,
+ 28895.042785967435,
+ 30649.363989982416,
+ 29802.63622014101,
+ 30759.03002829892,
+ 30399.76549608631,
+ 29421.610233534506,
+ 32641.679897096656,
+ 30621.65440666204,
+ 31039.60391005818,
+ 30954.760723541545,
+ 31902.050234568553,
+ 31594.350653473728,
+ 31343.87243248879,
+ 31200.14450867052,
+ 28560.946668743833,
+ 24700.216146371717,
+ 25261.025210523563,
+ 26041.39789649068,
+ 26123.556295209142,
+ 46231.36177177638,
+ 45350.42005506141,
+ 48256.049354513096,
+ 52360.30017052116,
+ ],
+ "avgAnomalies": undefined,
+ "p95": Array [
+ 80738.78571428556,
+ 77058.03529411761,
+ 77892.20721980717,
+ 77085.86687499998,
+ 80048.3462981744,
+ 84089.21370223971,
+ 84880.90143416924,
+ 84554.8884781166,
+ 81839.39583333326,
+ 85993.55410163336,
+ 85001.44588628765,
+ 86980.16445312503,
+ 84961.8710743802,
+ 88906.54601889332,
+ 90198.34708994703,
+ 135627.71242424246,
+ 167037.1993837535,
+ 128293.12184873945,
+ 130653.54236263742,
+ 131630.8902645502,
+ 133581.33541666638,
+ 132697.92762266204,
+ 140003.6918918918,
+ 138149.5673529411,
+ 121872.37504835591,
+ 116378.03873517792,
+ 131545.40999999995,
+ 133111.25804878055,
+ 144821.9855278593,
+ 134737.3997727272,
+ 141206.57726666646,
+ 137731.8994082841,
+ 141476.23189033198,
+ 149636.31340909077,
+ 151934.55000000002,
+ 82198.17857142858,
+ 85946.43199999983,
+ 78617.66249999996,
+ 79606.48333333322,
+ 76297.93999999986,
+ 80742.63333333324,
+ 81291.45969696966,
+ 73467.02500000004,
+ 69177.66999999993,
+ 71956.06111111109,
+ 68480.91142857139,
+ 68957.0999999999,
+ 67489.50416666668,
+ 71556.91249999998,
+ 72157.65128205132,
+ 76124.5625,
+ 141709.34661835746,
+ 132371.48641975303,
+ 186783.51503759398,
+ 99540.17819499348,
+ 95982.62454212455,
+ 89559.3525925925,
+ 95769.83153735634,
+ 94063.90833755062,
+ 96399.67269119772,
+ 96436.42520161276,
+ 91860.16988095238,
+ 105989.8333333334,
+ 97937.60342555979,
+ 98967.2249999999,
+ 97561.02469135808,
+ 102557.78813357186,
+ 100137.87578595306,
+ 98412.97120445351,
+ 101607.8328012912,
+ 92000.51368421057,
+ 78027.29473684198,
+ 80762.078801789,
+ 81160.83425925927,
+ 84215.58945578222,
+ 194188.21428571426,
+ 172616.2293896504,
+ 182653.81858220184,
+ 194970.75667682925,
+ ],
+ "p99": Array [
+ 293257.27333333343,
+ 290195.8800000004,
+ 278548.1649999994,
+ 290701.8973333341,
+ 286839.5897777779,
+ 287979.5149999999,
+ 300107.5009999992,
+ 294402.2179999999,
+ 289849.459333332,
+ 296942.86299999955,
+ 292048.20571428596,
+ 299308.7371666667,
+ 292151.2377777781,
+ 302274.4192592592,
+ 299457.1612121209,
+ 350398.59259259375,
+ 421204.23333333334,
+ 368166.68976190523,
+ 367193.6128571426,
+ 375658.10190476174,
+ 368152.03822222137,
+ 365705.8319999995,
+ 380075.48533333326,
+ 375697.1923809518,
+ 351080.94111111073,
+ 339294.12799999997,
+ 378902.90649999987,
+ 384483.3233333327,
+ 394692.25000000105,
+ 403362.50399999996,
+ 396559.0274999993,
+ 371815.8320000008,
+ 405477.6133333326,
+ 413542.18133333366,
+ 424399.340000001,
+ 303815.9000000001,
+ 306305.0800000006,
+ 297521.94999999984,
+ 317938.0900000003,
+ 312262.3000000003,
+ 318428.8700000002,
+ 295421.4099999999,
+ 293067.86000000004,
+ 264935.71999999933,
+ 282795.0400000003,
+ 285390.8400000001,
+ 290402.24,
+ 293655.53,
+ 292723.56999999995,
+ 301051.32000000105,
+ 291322.0499999998,
+ 379855.2444444447,
+ 371175.2592000001,
+ 498378.4238888898,
+ 331118.6599999997,
+ 328101.3999999988,
+ 313951.54249999986,
+ 323340.5274074075,
+ 315055.5047619052,
+ 330070.03599999985,
+ 320531.54416666675,
+ 315137.16628571344,
+ 337251.4042424246,
+ 327054.9243636365,
+ 327653.0000000006,
+ 324505.1399999999,
+ 338040.3999999998,
+ 328600.5173333335,
+ 334060.93628571345,
+ 328569.4964999998,
+ 320227.32399999973,
+ 292019.2899999998,
+ 297757.72666666657,
+ 308034.4466666669,
+ 301128.4895238093,
+ 447266.9,
+ 409147.332500001,
+ 423121.9773333328,
+ 473485.4199999998,
+ ],
+ },
+ "totalHits": 1297673,
+ "tpmBuckets": Array [
+ Object {
+ "avg": 70293.29113924051,
+ "key": "HTTP 2xx",
+ "values": Array [
+ 81460,
+ 82320,
+ 82485,
+ 83995,
+ 82805,
+ 82155,
+ 81915,
+ 81475,
+ 83510,
+ 82345,
+ 82330,
+ 82755,
+ 83375,
+ 82050,
+ 81235,
+ 75725,
+ 80890,
+ 82650,
+ 81055,
+ 82265,
+ 82515,
+ 83020,
+ 82610,
+ 80820,
+ 82600,
+ 82670,
+ 81555,
+ 83350,
+ 80960,
+ 82895,
+ 81650,
+ 82825,
+ 82715,
+ 82460,
+ 82020,
+ 22640,
+ 22785,
+ 22830,
+ 22930,
+ 23360,
+ 23425,
+ 22605,
+ 23060,
+ 22675,
+ 23030,
+ 23070,
+ 22535,
+ 23055,
+ 22935,
+ 22910,
+ 23075,
+ 81255,
+ 84125,
+ 81440,
+ 82460,
+ 82170,
+ 85015,
+ 81820,
+ 83225,
+ 83475,
+ 82490,
+ 82940,
+ 83425,
+ 81805,
+ 83290,
+ 82535,
+ 82090,
+ 82385,
+ 83775,
+ 82970,
+ 84060,
+ 84315,
+ 83275,
+ 83615,
+ 82885,
+ 75625,
+ 82160,
+ 82320,
+ 81845,
+ ],
+ },
+ Object {
+ "avg": 420.88607594936707,
+ "key": "HTTP 3xx",
+ "values": Array [
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 20205,
+ 2270,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 10775,
+ 0,
+ 0,
+ 0,
+ ],
+ },
+ Object {
+ "avg": 5108.9240506329115,
+ "key": "HTTP 4xx",
+ "values": Array [
+ 6065,
+ 6025,
+ 5810,
+ 6190,
+ 5955,
+ 6370,
+ 6170,
+ 5820,
+ 6165,
+ 6115,
+ 6080,
+ 6000,
+ 6185,
+ 6155,
+ 5910,
+ 5625,
+ 6215,
+ 6235,
+ 5815,
+ 6100,
+ 6010,
+ 5960,
+ 6240,
+ 5945,
+ 6150,
+ 6030,
+ 5950,
+ 6160,
+ 5855,
+ 6160,
+ 6265,
+ 6250,
+ 5835,
+ 6290,
+ 5740,
+ 1420,
+ 1200,
+ 1365,
+ 1475,
+ 1405,
+ 1500,
+ 1320,
+ 1300,
+ 1395,
+ 1295,
+ 1455,
+ 1240,
+ 1555,
+ 1385,
+ 1395,
+ 1375,
+ 5835,
+ 6350,
+ 5815,
+ 5775,
+ 6085,
+ 6135,
+ 5970,
+ 5765,
+ 6055,
+ 6015,
+ 6345,
+ 5985,
+ 5920,
+ 5880,
+ 5810,
+ 6350,
+ 6120,
+ 6275,
+ 6035,
+ 6030,
+ 6270,
+ 6080,
+ 6315,
+ 6385,
+ 5915,
+ 6105,
+ 5990,
+ 6070,
+ ],
+ },
+ Object {
+ "avg": 5115.632911392405,
+ "key": "HTTP 5xx",
+ "values": Array [
+ 6015,
+ 5980,
+ 6150,
+ 6165,
+ 6360,
+ 6090,
+ 6085,
+ 6175,
+ 6245,
+ 5790,
+ 6075,
+ 5955,
+ 6175,
+ 6060,
+ 5900,
+ 5455,
+ 5880,
+ 6215,
+ 6040,
+ 6010,
+ 6440,
+ 6205,
+ 6075,
+ 5760,
+ 6205,
+ 5885,
+ 6215,
+ 6275,
+ 5945,
+ 5915,
+ 6075,
+ 6410,
+ 5885,
+ 5995,
+ 6170,
+ 1420,
+ 1535,
+ 1415,
+ 1515,
+ 1630,
+ 1345,
+ 1485,
+ 1390,
+ 1445,
+ 1360,
+ 1395,
+ 1190,
+ 1440,
+ 1290,
+ 1320,
+ 1480,
+ 6065,
+ 6270,
+ 5675,
+ 6200,
+ 6075,
+ 6195,
+ 6045,
+ 6040,
+ 5880,
+ 6035,
+ 5990,
+ 5825,
+ 5940,
+ 6225,
+ 6190,
+ 6415,
+ 5990,
+ 5860,
+ 6145,
+ 6195,
+ 6155,
+ 6240,
+ 6100,
+ 6120,
+ 5440,
+ 6175,
+ 5805,
+ 5915,
+ ],
+ },
+ Object {
+ "avg": NaN,
+ "key": "A Custom Bucket (that should be last)",
+ "values": Array [],
+ },
+ ],
+}
+`;
diff --git a/x-pack/plugins/apm/server/lib/transactions/charts/get_timeseries_data/fetcher.test.ts b/x-pack/plugins/apm/server/lib/transactions/charts/get_timeseries_data/fetcher.test.ts
new file mode 100644
index 0000000000000..a756185eda701
--- /dev/null
+++ b/x-pack/plugins/apm/server/lib/transactions/charts/get_timeseries_data/fetcher.test.ts
@@ -0,0 +1,37 @@
+/*
+ * 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 { ESResponse, timeseriesFetcher } from './fetcher';
+
+describe('timeseriesFetcher', () => {
+ let res: ESResponse;
+ let clientSpy: jest.Mock;
+ beforeEach(async () => {
+ clientSpy = jest.fn().mockResolvedValueOnce('ES response');
+
+ res = await timeseriesFetcher({
+ serviceName: 'myServiceName',
+ transactionType: 'myTransactionType',
+ transactionName: undefined,
+ setup: {
+ start: 1528113600000,
+ end: 1528977600000,
+ client: clientSpy,
+ config: {
+ get: () => 'myIndex' as any
+ }
+ }
+ });
+ });
+
+ it('should call client with correct query', () => {
+ expect(clientSpy.mock.calls).toMatchSnapshot();
+ });
+
+ it('should return correct response', () => {
+ expect(res).toBe('ES response');
+ });
+});
diff --git a/x-pack/plugins/apm/server/lib/transactions/charts/get_timeseries_data.js b/x-pack/plugins/apm/server/lib/transactions/charts/get_timeseries_data/fetcher.ts
similarity index 52%
rename from x-pack/plugins/apm/server/lib/transactions/charts/get_timeseries_data.js
rename to x-pack/plugins/apm/server/lib/transactions/charts/get_timeseries_data/fetcher.ts
index 8a9c68c013336..7360114c1df8d 100644
--- a/x-pack/plugins/apm/server/lib/transactions/charts/get_timeseries_data.js
+++ b/x-pack/plugins/apm/server/lib/transactions/charts/get_timeseries_data/fetcher.ts
@@ -4,28 +4,70 @@
* you may not use this file except in compliance with the Elastic License.
*/
+import { AggregationSearchResponse } from 'elasticsearch';
+import { IOptions } from '.';
import {
+ SERVICE_NAME,
TRANSACTION_DURATION,
+ TRANSACTION_NAME,
TRANSACTION_RESULT,
- SERVICE_NAME,
- TRANSACTION_TYPE,
- TRANSACTION_NAME
-} from '../../../../common/constants';
-import { get, sortBy, round } from 'lodash';
-import mean from 'lodash.mean';
-import { getBucketSize } from '../../helpers/get_bucket_size';
-import { getAvgResponseTimeAnomalies } from './get_avg_response_time_anomalies/get_avg_response_time_anomalies';
+ TRANSACTION_TYPE
+} from '../../../../../common/constants';
+import { getBucketSize } from '../../../helpers/get_bucket_size';
+
+interface ResponseTimeBucket {
+ key_as_string: string;
+ key: number;
+ doc_count: number;
+ avg: {
+ value: number | null;
+ };
+ pct: {
+ values: {
+ '95.0': number | 'NaN';
+ '99.0': number | 'NaN';
+ };
+ };
+}
+
+interface TransactionResultBucket {
+ key: string;
+ doc_count: number;
+ timeseries: {
+ buckets: Array<{
+ key_as_string: string;
+ key: number;
+ doc_count: number;
+ }>;
+ };
+}
+
+interface Aggs {
+ response_times: {
+ buckets: ResponseTimeBucket[];
+ };
+ transaction_results: {
+ doc_count_error_upper_bound: number;
+ sum_other_doc_count: number;
+ buckets: TransactionResultBucket[];
+ };
+ overall_avg_duration: {
+ value: number;
+ };
+}
+
+export type ESResponse = AggregationSearchResponse;
-export async function getTimeseriesData({
+export function timeseriesFetcher({
serviceName,
transactionType,
transactionName,
setup
-}) {
+}: IOptions): Promise {
const { start, end, esFilterQuery, client, config } = setup;
- const { intervalString, bucketSize } = getBucketSize(start, end, 'auto');
+ const { intervalString } = getBucketSize(start, end, 'auto');
- const params = {
+ const params: any = {
index: config.get('apm_oss.transactionIndices'),
body: {
size: 0,
@@ -105,69 +147,5 @@ export async function getTimeseriesData({
];
}
- const resp = await client('search', params);
- const responseTimeBuckets = get(
- resp,
- 'aggregations.response_times.buckets',
- []
- ).slice(1, -1);
-
- const transactionResultBuckets = get(
- resp,
- 'aggregations.transaction_results.buckets',
- []
- );
-
- const overallAvgDuration = get(
- resp,
- 'aggregations.overall_avg_duration.value'
- );
- const dates = responseTimeBuckets.map(bucket => bucket.key);
-
- const responseTime = responseTimeBuckets.reduce(
- (acc, bucket) => {
- const { '95.0': p95, '99.0': p99 } = bucket.pct.values;
-
- acc.avg.push(bucket.avg.value);
- acc.p95.push(p95 >= 0 ? p95 : null);
- acc.p99.push(p99 >= 0 ? p99 : null);
- return acc;
- },
- { avg: [], p95: [], p99: [] }
- );
-
- const tpmBuckets = sortBy(
- transactionResultBuckets.map(({ key, timeseries }) => {
- const tpmValues = timeseries.buckets
- .slice(1, -1)
- .map(bucket => round(bucket.doc_count * (60 / bucketSize), 1));
-
- return {
- key,
- avg: mean(tpmValues),
- values: tpmValues
- };
- }),
- bucket => bucket.key.replace(/^HTTP (\d)xx$/, '00$1') // ensure that HTTP 3xx are sorted at the top
- );
-
- const avgResponseTimesAnomalies = await getAvgResponseTimeAnomalies({
- serviceName,
- transactionType,
- transactionName,
- setup
- });
-
- return {
- total_hits: resp.hits.total,
- dates: dates,
- response_times: {
- avg: responseTime.avg,
- p95: responseTime.p95,
- p99: responseTime.p99,
- avg_anomalies: avgResponseTimesAnomalies
- },
- tpm_buckets: tpmBuckets,
- overall_avg_duration: overallAvgDuration || 0
- };
+ return client('search', params);
}
diff --git a/x-pack/plugins/apm/server/lib/transactions/charts/get_timeseries_data/index.ts b/x-pack/plugins/apm/server/lib/transactions/charts/get_timeseries_data/index.ts
new file mode 100644
index 0000000000000..8327193d82111
--- /dev/null
+++ b/x-pack/plugins/apm/server/lib/transactions/charts/get_timeseries_data/index.ts
@@ -0,0 +1,31 @@
+/*
+ * 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 { getBucketSize } from '../../../helpers/get_bucket_size';
+import { Setup } from '../../../helpers/setup_request';
+import { getAvgResponseTimeAnomalies } from '../get_avg_response_time_anomalies';
+import { timeseriesFetcher } from './fetcher';
+import { timeseriesTransformer } from './transform';
+
+export interface IOptions {
+ serviceName: string;
+ transactionType: string;
+ transactionName?: string;
+ setup: Setup;
+}
+
+export async function getTimeseriesData(options: IOptions) {
+ const { start, end } = options.setup;
+ const { bucketSize } = getBucketSize(start, end, 'auto');
+
+ const avgAnomaliesResponse = await getAvgResponseTimeAnomalies(options);
+ const timeseriesResponse = await timeseriesFetcher(options);
+ return timeseriesTransformer({
+ timeseriesResponse,
+ avgAnomaliesResponse,
+ bucketSize
+ });
+}
diff --git a/x-pack/plugins/apm/server/lib/transactions/charts/get_timeseries_data/mock-responses/timeseries_response.ts b/x-pack/plugins/apm/server/lib/transactions/charts/get_timeseries_data/mock-responses/timeseries_response.ts
new file mode 100644
index 0000000000000..075ede23fb38e
--- /dev/null
+++ b/x-pack/plugins/apm/server/lib/transactions/charts/get_timeseries_data/mock-responses/timeseries_response.ts
@@ -0,0 +1,2829 @@
+/*
+ * 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 { ESResponse } from '../fetcher';
+
+export const timeseriesResponse: ESResponse = {
+ took: 368,
+ timed_out: false,
+ _shards: {
+ total: 90,
+ successful: 90,
+ skipped: 0,
+ failed: 0
+ },
+ hits: {
+ total: 1297673,
+ max_score: 0,
+ hits: []
+ },
+ aggregations: {
+ transaction_results: {
+ doc_count_error_upper_bound: 0,
+ sum_other_doc_count: 0,
+ buckets: [
+ {
+ key: 'A Custom Bucket (that should be last)',
+ doc_count: 0,
+ timeseries: { buckets: [] }
+ },
+ {
+ key: 'HTTP 2xx',
+ doc_count: 1127080,
+ timeseries: {
+ buckets: [
+ {
+ key_as_string: '2018-06-04T12:00:00.000Z',
+ key: 1528113600000,
+ doc_count: 16446
+ },
+ {
+ key_as_string: '2018-06-04T15:00:00.000Z',
+ key: 1528124400000,
+ doc_count: 16292
+ },
+ {
+ key_as_string: '2018-06-04T18:00:00.000Z',
+ key: 1528135200000,
+ doc_count: 16464
+ },
+ {
+ key_as_string: '2018-06-04T21:00:00.000Z',
+ key: 1528146000000,
+ doc_count: 16497
+ },
+ {
+ key_as_string: '2018-06-05T00:00:00.000Z',
+ key: 1528156800000,
+ doc_count: 16799
+ },
+ {
+ key_as_string: '2018-06-05T03:00:00.000Z',
+ key: 1528167600000,
+ doc_count: 16561
+ },
+ {
+ key_as_string: '2018-06-05T06:00:00.000Z',
+ key: 1528178400000,
+ doc_count: 16431
+ },
+ {
+ key_as_string: '2018-06-05T09:00:00.000Z',
+ key: 1528189200000,
+ doc_count: 16383
+ },
+ {
+ key_as_string: '2018-06-05T12:00:00.000Z',
+ key: 1528200000000,
+ doc_count: 16295
+ },
+ {
+ key_as_string: '2018-06-05T15:00:00.000Z',
+ key: 1528210800000,
+ doc_count: 16702
+ },
+ {
+ key_as_string: '2018-06-05T18:00:00.000Z',
+ key: 1528221600000,
+ doc_count: 16469
+ },
+ {
+ key_as_string: '2018-06-05T21:00:00.000Z',
+ key: 1528232400000,
+ doc_count: 16466
+ },
+ {
+ key_as_string: '2018-06-06T00:00:00.000Z',
+ key: 1528243200000,
+ doc_count: 16551
+ },
+ {
+ key_as_string: '2018-06-06T03:00:00.000Z',
+ key: 1528254000000,
+ doc_count: 16675
+ },
+ {
+ key_as_string: '2018-06-06T06:00:00.000Z',
+ key: 1528264800000,
+ doc_count: 16410
+ },
+ {
+ key_as_string: '2018-06-06T09:00:00.000Z',
+ key: 1528275600000,
+ doc_count: 16247
+ },
+ {
+ key_as_string: '2018-06-06T12:00:00.000Z',
+ key: 1528286400000,
+ doc_count: 15145
+ },
+ {
+ key_as_string: '2018-06-06T15:00:00.000Z',
+ key: 1528297200000,
+ doc_count: 16178
+ },
+ {
+ key_as_string: '2018-06-06T18:00:00.000Z',
+ key: 1528308000000,
+ doc_count: 16530
+ },
+ {
+ key_as_string: '2018-06-06T21:00:00.000Z',
+ key: 1528318800000,
+ doc_count: 16211
+ },
+ {
+ key_as_string: '2018-06-07T00:00:00.000Z',
+ key: 1528329600000,
+ doc_count: 16453
+ },
+ {
+ key_as_string: '2018-06-07T03:00:00.000Z',
+ key: 1528340400000,
+ doc_count: 16503
+ },
+ {
+ key_as_string: '2018-06-07T06:00:00.000Z',
+ key: 1528351200000,
+ doc_count: 16604
+ },
+ {
+ key_as_string: '2018-06-07T09:00:00.000Z',
+ key: 1528362000000,
+ doc_count: 16522
+ },
+ {
+ key_as_string: '2018-06-07T12:00:00.000Z',
+ key: 1528372800000,
+ doc_count: 16164
+ },
+ {
+ key_as_string: '2018-06-07T15:00:00.000Z',
+ key: 1528383600000,
+ doc_count: 16520
+ },
+ {
+ key_as_string: '2018-06-07T18:00:00.000Z',
+ key: 1528394400000,
+ doc_count: 16534
+ },
+ {
+ key_as_string: '2018-06-07T21:00:00.000Z',
+ key: 1528405200000,
+ doc_count: 16311
+ },
+ {
+ key_as_string: '2018-06-08T00:00:00.000Z',
+ key: 1528416000000,
+ doc_count: 16670
+ },
+ {
+ key_as_string: '2018-06-08T03:00:00.000Z',
+ key: 1528426800000,
+ doc_count: 16192
+ },
+ {
+ key_as_string: '2018-06-08T06:00:00.000Z',
+ key: 1528437600000,
+ doc_count: 16579
+ },
+ {
+ key_as_string: '2018-06-08T09:00:00.000Z',
+ key: 1528448400000,
+ doc_count: 16330
+ },
+ {
+ key_as_string: '2018-06-08T12:00:00.000Z',
+ key: 1528459200000,
+ doc_count: 16565
+ },
+ {
+ key_as_string: '2018-06-08T15:00:00.000Z',
+ key: 1528470000000,
+ doc_count: 16543
+ },
+ {
+ key_as_string: '2018-06-08T18:00:00.000Z',
+ key: 1528480800000,
+ doc_count: 16492
+ },
+ {
+ key_as_string: '2018-06-08T21:00:00.000Z',
+ key: 1528491600000,
+ doc_count: 16404
+ },
+ {
+ key_as_string: '2018-06-09T00:00:00.000Z',
+ key: 1528502400000,
+ doc_count: 4528
+ },
+ {
+ key_as_string: '2018-06-09T03:00:00.000Z',
+ key: 1528513200000,
+ doc_count: 4557
+ },
+ {
+ key_as_string: '2018-06-09T06:00:00.000Z',
+ key: 1528524000000,
+ doc_count: 4566
+ },
+ {
+ key_as_string: '2018-06-09T09:00:00.000Z',
+ key: 1528534800000,
+ doc_count: 4586
+ },
+ {
+ key_as_string: '2018-06-09T12:00:00.000Z',
+ key: 1528545600000,
+ doc_count: 4672
+ },
+ {
+ key_as_string: '2018-06-09T15:00:00.000Z',
+ key: 1528556400000,
+ doc_count: 4685
+ },
+ {
+ key_as_string: '2018-06-09T18:00:00.000Z',
+ key: 1528567200000,
+ doc_count: 4521
+ },
+ {
+ key_as_string: '2018-06-09T21:00:00.000Z',
+ key: 1528578000000,
+ doc_count: 4612
+ },
+ {
+ key_as_string: '2018-06-10T00:00:00.000Z',
+ key: 1528588800000,
+ doc_count: 4535
+ },
+ {
+ key_as_string: '2018-06-10T03:00:00.000Z',
+ key: 1528599600000,
+ doc_count: 4606
+ },
+ {
+ key_as_string: '2018-06-10T06:00:00.000Z',
+ key: 1528610400000,
+ doc_count: 4614
+ },
+ {
+ key_as_string: '2018-06-10T09:00:00.000Z',
+ key: 1528621200000,
+ doc_count: 4507
+ },
+ {
+ key_as_string: '2018-06-10T12:00:00.000Z',
+ key: 1528632000000,
+ doc_count: 4611
+ },
+ {
+ key_as_string: '2018-06-10T15:00:00.000Z',
+ key: 1528642800000,
+ doc_count: 4587
+ },
+ {
+ key_as_string: '2018-06-10T18:00:00.000Z',
+ key: 1528653600000,
+ doc_count: 4582
+ },
+ {
+ key_as_string: '2018-06-10T21:00:00.000Z',
+ key: 1528664400000,
+ doc_count: 4615
+ },
+ {
+ key_as_string: '2018-06-11T00:00:00.000Z',
+ key: 1528675200000,
+ doc_count: 16251
+ },
+ {
+ key_as_string: '2018-06-11T03:00:00.000Z',
+ key: 1528686000000,
+ doc_count: 16825
+ },
+ {
+ key_as_string: '2018-06-11T06:00:00.000Z',
+ key: 1528696800000,
+ doc_count: 16288
+ },
+ {
+ key_as_string: '2018-06-11T09:00:00.000Z',
+ key: 1528707600000,
+ doc_count: 16492
+ },
+ {
+ key_as_string: '2018-06-11T12:00:00.000Z',
+ key: 1528718400000,
+ doc_count: 16434
+ },
+ {
+ key_as_string: '2018-06-11T15:00:00.000Z',
+ key: 1528729200000,
+ doc_count: 17003
+ },
+ {
+ key_as_string: '2018-06-11T18:00:00.000Z',
+ key: 1528740000000,
+ doc_count: 16364
+ },
+ {
+ key_as_string: '2018-06-11T21:00:00.000Z',
+ key: 1528750800000,
+ doc_count: 16645
+ },
+ {
+ key_as_string: '2018-06-12T00:00:00.000Z',
+ key: 1528761600000,
+ doc_count: 16695
+ },
+ {
+ key_as_string: '2018-06-12T03:00:00.000Z',
+ key: 1528772400000,
+ doc_count: 16498
+ },
+ {
+ key_as_string: '2018-06-12T06:00:00.000Z',
+ key: 1528783200000,
+ doc_count: 16588
+ },
+ {
+ key_as_string: '2018-06-12T09:00:00.000Z',
+ key: 1528794000000,
+ doc_count: 16685
+ },
+ {
+ key_as_string: '2018-06-12T12:00:00.000Z',
+ key: 1528804800000,
+ doc_count: 16361
+ },
+ {
+ key_as_string: '2018-06-12T15:00:00.000Z',
+ key: 1528815600000,
+ doc_count: 16658
+ },
+ {
+ key_as_string: '2018-06-12T18:00:00.000Z',
+ key: 1528826400000,
+ doc_count: 16507
+ },
+ {
+ key_as_string: '2018-06-12T21:00:00.000Z',
+ key: 1528837200000,
+ doc_count: 16418
+ },
+ {
+ key_as_string: '2018-06-13T00:00:00.000Z',
+ key: 1528848000000,
+ doc_count: 16477
+ },
+ {
+ key_as_string: '2018-06-13T03:00:00.000Z',
+ key: 1528858800000,
+ doc_count: 16755
+ },
+ {
+ key_as_string: '2018-06-13T06:00:00.000Z',
+ key: 1528869600000,
+ doc_count: 16594
+ },
+ {
+ key_as_string: '2018-06-13T09:00:00.000Z',
+ key: 1528880400000,
+ doc_count: 16812
+ },
+ {
+ key_as_string: '2018-06-13T12:00:00.000Z',
+ key: 1528891200000,
+ doc_count: 16863
+ },
+ {
+ key_as_string: '2018-06-13T15:00:00.000Z',
+ key: 1528902000000,
+ doc_count: 16655
+ },
+ {
+ key_as_string: '2018-06-13T18:00:00.000Z',
+ key: 1528912800000,
+ doc_count: 16723
+ },
+ {
+ key_as_string: '2018-06-13T21:00:00.000Z',
+ key: 1528923600000,
+ doc_count: 16577
+ },
+ {
+ key_as_string: '2018-06-14T00:00:00.000Z',
+ key: 1528934400000,
+ doc_count: 15125
+ },
+ {
+ key_as_string: '2018-06-14T03:00:00.000Z',
+ key: 1528945200000,
+ doc_count: 16432
+ },
+ {
+ key_as_string: '2018-06-14T06:00:00.000Z',
+ key: 1528956000000,
+ doc_count: 16464
+ },
+ {
+ key_as_string: '2018-06-14T09:00:00.000Z',
+ key: 1528966800000,
+ doc_count: 16369
+ },
+ {
+ key_as_string: '2018-06-14T12:00:00.000Z',
+ key: 1528977600000,
+ doc_count: 0
+ }
+ ]
+ }
+ },
+ {
+ key: 'HTTP 5xx',
+ doc_count: 82036,
+ timeseries: {
+ buckets: [
+ {
+ key_as_string: '2018-06-04T12:00:00.000Z',
+ key: 1528113600000,
+ doc_count: 1209
+ },
+ {
+ key_as_string: '2018-06-04T15:00:00.000Z',
+ key: 1528124400000,
+ doc_count: 1203
+ },
+ {
+ key_as_string: '2018-06-04T18:00:00.000Z',
+ key: 1528135200000,
+ doc_count: 1196
+ },
+ {
+ key_as_string: '2018-06-04T21:00:00.000Z',
+ key: 1528146000000,
+ doc_count: 1230
+ },
+ {
+ key_as_string: '2018-06-05T00:00:00.000Z',
+ key: 1528156800000,
+ doc_count: 1233
+ },
+ {
+ key_as_string: '2018-06-05T03:00:00.000Z',
+ key: 1528167600000,
+ doc_count: 1272
+ },
+ {
+ key_as_string: '2018-06-05T06:00:00.000Z',
+ key: 1528178400000,
+ doc_count: 1218
+ },
+ {
+ key_as_string: '2018-06-05T09:00:00.000Z',
+ key: 1528189200000,
+ doc_count: 1217
+ },
+ {
+ key_as_string: '2018-06-05T12:00:00.000Z',
+ key: 1528200000000,
+ doc_count: 1235
+ },
+ {
+ key_as_string: '2018-06-05T15:00:00.000Z',
+ key: 1528210800000,
+ doc_count: 1249
+ },
+ {
+ key_as_string: '2018-06-05T18:00:00.000Z',
+ key: 1528221600000,
+ doc_count: 1158
+ },
+ {
+ key_as_string: '2018-06-05T21:00:00.000Z',
+ key: 1528232400000,
+ doc_count: 1215
+ },
+ {
+ key_as_string: '2018-06-06T00:00:00.000Z',
+ key: 1528243200000,
+ doc_count: 1191
+ },
+ {
+ key_as_string: '2018-06-06T03:00:00.000Z',
+ key: 1528254000000,
+ doc_count: 1235
+ },
+ {
+ key_as_string: '2018-06-06T06:00:00.000Z',
+ key: 1528264800000,
+ doc_count: 1212
+ },
+ {
+ key_as_string: '2018-06-06T09:00:00.000Z',
+ key: 1528275600000,
+ doc_count: 1180
+ },
+ {
+ key_as_string: '2018-06-06T12:00:00.000Z',
+ key: 1528286400000,
+ doc_count: 1091
+ },
+ {
+ key_as_string: '2018-06-06T15:00:00.000Z',
+ key: 1528297200000,
+ doc_count: 1176
+ },
+ {
+ key_as_string: '2018-06-06T18:00:00.000Z',
+ key: 1528308000000,
+ doc_count: 1243
+ },
+ {
+ key_as_string: '2018-06-06T21:00:00.000Z',
+ key: 1528318800000,
+ doc_count: 1208
+ },
+ {
+ key_as_string: '2018-06-07T00:00:00.000Z',
+ key: 1528329600000,
+ doc_count: 1202
+ },
+ {
+ key_as_string: '2018-06-07T03:00:00.000Z',
+ key: 1528340400000,
+ doc_count: 1288
+ },
+ {
+ key_as_string: '2018-06-07T06:00:00.000Z',
+ key: 1528351200000,
+ doc_count: 1241
+ },
+ {
+ key_as_string: '2018-06-07T09:00:00.000Z',
+ key: 1528362000000,
+ doc_count: 1215
+ },
+ {
+ key_as_string: '2018-06-07T12:00:00.000Z',
+ key: 1528372800000,
+ doc_count: 1152
+ },
+ {
+ key_as_string: '2018-06-07T15:00:00.000Z',
+ key: 1528383600000,
+ doc_count: 1241
+ },
+ {
+ key_as_string: '2018-06-07T18:00:00.000Z',
+ key: 1528394400000,
+ doc_count: 1177
+ },
+ {
+ key_as_string: '2018-06-07T21:00:00.000Z',
+ key: 1528405200000,
+ doc_count: 1243
+ },
+ {
+ key_as_string: '2018-06-08T00:00:00.000Z',
+ key: 1528416000000,
+ doc_count: 1255
+ },
+ {
+ key_as_string: '2018-06-08T03:00:00.000Z',
+ key: 1528426800000,
+ doc_count: 1189
+ },
+ {
+ key_as_string: '2018-06-08T06:00:00.000Z',
+ key: 1528437600000,
+ doc_count: 1183
+ },
+ {
+ key_as_string: '2018-06-08T09:00:00.000Z',
+ key: 1528448400000,
+ doc_count: 1215
+ },
+ {
+ key_as_string: '2018-06-08T12:00:00.000Z',
+ key: 1528459200000,
+ doc_count: 1282
+ },
+ {
+ key_as_string: '2018-06-08T15:00:00.000Z',
+ key: 1528470000000,
+ doc_count: 1177
+ },
+ {
+ key_as_string: '2018-06-08T18:00:00.000Z',
+ key: 1528480800000,
+ doc_count: 1199
+ },
+ {
+ key_as_string: '2018-06-08T21:00:00.000Z',
+ key: 1528491600000,
+ doc_count: 1234
+ },
+ {
+ key_as_string: '2018-06-09T00:00:00.000Z',
+ key: 1528502400000,
+ doc_count: 284
+ },
+ {
+ key_as_string: '2018-06-09T03:00:00.000Z',
+ key: 1528513200000,
+ doc_count: 307
+ },
+ {
+ key_as_string: '2018-06-09T06:00:00.000Z',
+ key: 1528524000000,
+ doc_count: 283
+ },
+ {
+ key_as_string: '2018-06-09T09:00:00.000Z',
+ key: 1528534800000,
+ doc_count: 303
+ },
+ {
+ key_as_string: '2018-06-09T12:00:00.000Z',
+ key: 1528545600000,
+ doc_count: 326
+ },
+ {
+ key_as_string: '2018-06-09T15:00:00.000Z',
+ key: 1528556400000,
+ doc_count: 269
+ },
+ {
+ key_as_string: '2018-06-09T18:00:00.000Z',
+ key: 1528567200000,
+ doc_count: 297
+ },
+ {
+ key_as_string: '2018-06-09T21:00:00.000Z',
+ key: 1528578000000,
+ doc_count: 278
+ },
+ {
+ key_as_string: '2018-06-10T00:00:00.000Z',
+ key: 1528588800000,
+ doc_count: 289
+ },
+ {
+ key_as_string: '2018-06-10T03:00:00.000Z',
+ key: 1528599600000,
+ doc_count: 272
+ },
+ {
+ key_as_string: '2018-06-10T06:00:00.000Z',
+ key: 1528610400000,
+ doc_count: 279
+ },
+ {
+ key_as_string: '2018-06-10T09:00:00.000Z',
+ key: 1528621200000,
+ doc_count: 238
+ },
+ {
+ key_as_string: '2018-06-10T12:00:00.000Z',
+ key: 1528632000000,
+ doc_count: 288
+ },
+ {
+ key_as_string: '2018-06-10T15:00:00.000Z',
+ key: 1528642800000,
+ doc_count: 258
+ },
+ {
+ key_as_string: '2018-06-10T18:00:00.000Z',
+ key: 1528653600000,
+ doc_count: 264
+ },
+ {
+ key_as_string: '2018-06-10T21:00:00.000Z',
+ key: 1528664400000,
+ doc_count: 296
+ },
+ {
+ key_as_string: '2018-06-11T00:00:00.000Z',
+ key: 1528675200000,
+ doc_count: 1213
+ },
+ {
+ key_as_string: '2018-06-11T03:00:00.000Z',
+ key: 1528686000000,
+ doc_count: 1254
+ },
+ {
+ key_as_string: '2018-06-11T06:00:00.000Z',
+ key: 1528696800000,
+ doc_count: 1135
+ },
+ {
+ key_as_string: '2018-06-11T09:00:00.000Z',
+ key: 1528707600000,
+ doc_count: 1240
+ },
+ {
+ key_as_string: '2018-06-11T12:00:00.000Z',
+ key: 1528718400000,
+ doc_count: 1215
+ },
+ {
+ key_as_string: '2018-06-11T15:00:00.000Z',
+ key: 1528729200000,
+ doc_count: 1239
+ },
+ {
+ key_as_string: '2018-06-11T18:00:00.000Z',
+ key: 1528740000000,
+ doc_count: 1209
+ },
+ {
+ key_as_string: '2018-06-11T21:00:00.000Z',
+ key: 1528750800000,
+ doc_count: 1208
+ },
+ {
+ key_as_string: '2018-06-12T00:00:00.000Z',
+ key: 1528761600000,
+ doc_count: 1176
+ },
+ {
+ key_as_string: '2018-06-12T03:00:00.000Z',
+ key: 1528772400000,
+ doc_count: 1207
+ },
+ {
+ key_as_string: '2018-06-12T06:00:00.000Z',
+ key: 1528783200000,
+ doc_count: 1198
+ },
+ {
+ key_as_string: '2018-06-12T09:00:00.000Z',
+ key: 1528794000000,
+ doc_count: 1165
+ },
+ {
+ key_as_string: '2018-06-12T12:00:00.000Z',
+ key: 1528804800000,
+ doc_count: 1188
+ },
+ {
+ key_as_string: '2018-06-12T15:00:00.000Z',
+ key: 1528815600000,
+ doc_count: 1245
+ },
+ {
+ key_as_string: '2018-06-12T18:00:00.000Z',
+ key: 1528826400000,
+ doc_count: 1238
+ },
+ {
+ key_as_string: '2018-06-12T21:00:00.000Z',
+ key: 1528837200000,
+ doc_count: 1283
+ },
+ {
+ key_as_string: '2018-06-13T00:00:00.000Z',
+ key: 1528848000000,
+ doc_count: 1198
+ },
+ {
+ key_as_string: '2018-06-13T03:00:00.000Z',
+ key: 1528858800000,
+ doc_count: 1172
+ },
+ {
+ key_as_string: '2018-06-13T06:00:00.000Z',
+ key: 1528869600000,
+ doc_count: 1229
+ },
+ {
+ key_as_string: '2018-06-13T09:00:00.000Z',
+ key: 1528880400000,
+ doc_count: 1239
+ },
+ {
+ key_as_string: '2018-06-13T12:00:00.000Z',
+ key: 1528891200000,
+ doc_count: 1231
+ },
+ {
+ key_as_string: '2018-06-13T15:00:00.000Z',
+ key: 1528902000000,
+ doc_count: 1248
+ },
+ {
+ key_as_string: '2018-06-13T18:00:00.000Z',
+ key: 1528912800000,
+ doc_count: 1220
+ },
+ {
+ key_as_string: '2018-06-13T21:00:00.000Z',
+ key: 1528923600000,
+ doc_count: 1224
+ },
+ {
+ key_as_string: '2018-06-14T00:00:00.000Z',
+ key: 1528934400000,
+ doc_count: 1088
+ },
+ {
+ key_as_string: '2018-06-14T03:00:00.000Z',
+ key: 1528945200000,
+ doc_count: 1235
+ },
+ {
+ key_as_string: '2018-06-14T06:00:00.000Z',
+ key: 1528956000000,
+ doc_count: 1161
+ },
+ {
+ key_as_string: '2018-06-14T09:00:00.000Z',
+ key: 1528966800000,
+ doc_count: 1183
+ },
+ {
+ key_as_string: '2018-06-14T12:00:00.000Z',
+ key: 1528977600000,
+ doc_count: 0
+ }
+ ]
+ }
+ },
+ {
+ key: 'HTTP 4xx',
+ doc_count: 81907,
+ timeseries: {
+ buckets: [
+ {
+ key_as_string: '2018-06-04T12:00:00.000Z',
+ key: 1528113600000,
+ doc_count: 1186
+ },
+ {
+ key_as_string: '2018-06-04T15:00:00.000Z',
+ key: 1528124400000,
+ doc_count: 1213
+ },
+ {
+ key_as_string: '2018-06-04T18:00:00.000Z',
+ key: 1528135200000,
+ doc_count: 1205
+ },
+ {
+ key_as_string: '2018-06-04T21:00:00.000Z',
+ key: 1528146000000,
+ doc_count: 1162
+ },
+ {
+ key_as_string: '2018-06-05T00:00:00.000Z',
+ key: 1528156800000,
+ doc_count: 1238
+ },
+ {
+ key_as_string: '2018-06-05T03:00:00.000Z',
+ key: 1528167600000,
+ doc_count: 1191
+ },
+ {
+ key_as_string: '2018-06-05T06:00:00.000Z',
+ key: 1528178400000,
+ doc_count: 1274
+ },
+ {
+ key_as_string: '2018-06-05T09:00:00.000Z',
+ key: 1528189200000,
+ doc_count: 1234
+ },
+ {
+ key_as_string: '2018-06-05T12:00:00.000Z',
+ key: 1528200000000,
+ doc_count: 1164
+ },
+ {
+ key_as_string: '2018-06-05T15:00:00.000Z',
+ key: 1528210800000,
+ doc_count: 1233
+ },
+ {
+ key_as_string: '2018-06-05T18:00:00.000Z',
+ key: 1528221600000,
+ doc_count: 1223
+ },
+ {
+ key_as_string: '2018-06-05T21:00:00.000Z',
+ key: 1528232400000,
+ doc_count: 1216
+ },
+ {
+ key_as_string: '2018-06-06T00:00:00.000Z',
+ key: 1528243200000,
+ doc_count: 1200
+ },
+ {
+ key_as_string: '2018-06-06T03:00:00.000Z',
+ key: 1528254000000,
+ doc_count: 1237
+ },
+ {
+ key_as_string: '2018-06-06T06:00:00.000Z',
+ key: 1528264800000,
+ doc_count: 1231
+ },
+ {
+ key_as_string: '2018-06-06T09:00:00.000Z',
+ key: 1528275600000,
+ doc_count: 1182
+ },
+ {
+ key_as_string: '2018-06-06T12:00:00.000Z',
+ key: 1528286400000,
+ doc_count: 1125
+ },
+ {
+ key_as_string: '2018-06-06T15:00:00.000Z',
+ key: 1528297200000,
+ doc_count: 1243
+ },
+ {
+ key_as_string: '2018-06-06T18:00:00.000Z',
+ key: 1528308000000,
+ doc_count: 1247
+ },
+ {
+ key_as_string: '2018-06-06T21:00:00.000Z',
+ key: 1528318800000,
+ doc_count: 1163
+ },
+ {
+ key_as_string: '2018-06-07T00:00:00.000Z',
+ key: 1528329600000,
+ doc_count: 1220
+ },
+ {
+ key_as_string: '2018-06-07T03:00:00.000Z',
+ key: 1528340400000,
+ doc_count: 1202
+ },
+ {
+ key_as_string: '2018-06-07T06:00:00.000Z',
+ key: 1528351200000,
+ doc_count: 1192
+ },
+ {
+ key_as_string: '2018-06-07T09:00:00.000Z',
+ key: 1528362000000,
+ doc_count: 1248
+ },
+ {
+ key_as_string: '2018-06-07T12:00:00.000Z',
+ key: 1528372800000,
+ doc_count: 1189
+ },
+ {
+ key_as_string: '2018-06-07T15:00:00.000Z',
+ key: 1528383600000,
+ doc_count: 1230
+ },
+ {
+ key_as_string: '2018-06-07T18:00:00.000Z',
+ key: 1528394400000,
+ doc_count: 1206
+ },
+ {
+ key_as_string: '2018-06-07T21:00:00.000Z',
+ key: 1528405200000,
+ doc_count: 1190
+ },
+ {
+ key_as_string: '2018-06-08T00:00:00.000Z',
+ key: 1528416000000,
+ doc_count: 1232
+ },
+ {
+ key_as_string: '2018-06-08T03:00:00.000Z',
+ key: 1528426800000,
+ doc_count: 1171
+ },
+ {
+ key_as_string: '2018-06-08T06:00:00.000Z',
+ key: 1528437600000,
+ doc_count: 1232
+ },
+ {
+ key_as_string: '2018-06-08T09:00:00.000Z',
+ key: 1528448400000,
+ doc_count: 1253
+ },
+ {
+ key_as_string: '2018-06-08T12:00:00.000Z',
+ key: 1528459200000,
+ doc_count: 1250
+ },
+ {
+ key_as_string: '2018-06-08T15:00:00.000Z',
+ key: 1528470000000,
+ doc_count: 1167
+ },
+ {
+ key_as_string: '2018-06-08T18:00:00.000Z',
+ key: 1528480800000,
+ doc_count: 1258
+ },
+ {
+ key_as_string: '2018-06-08T21:00:00.000Z',
+ key: 1528491600000,
+ doc_count: 1148
+ },
+ {
+ key_as_string: '2018-06-09T00:00:00.000Z',
+ key: 1528502400000,
+ doc_count: 284
+ },
+ {
+ key_as_string: '2018-06-09T03:00:00.000Z',
+ key: 1528513200000,
+ doc_count: 240
+ },
+ {
+ key_as_string: '2018-06-09T06:00:00.000Z',
+ key: 1528524000000,
+ doc_count: 273
+ },
+ {
+ key_as_string: '2018-06-09T09:00:00.000Z',
+ key: 1528534800000,
+ doc_count: 295
+ },
+ {
+ key_as_string: '2018-06-09T12:00:00.000Z',
+ key: 1528545600000,
+ doc_count: 281
+ },
+ {
+ key_as_string: '2018-06-09T15:00:00.000Z',
+ key: 1528556400000,
+ doc_count: 300
+ },
+ {
+ key_as_string: '2018-06-09T18:00:00.000Z',
+ key: 1528567200000,
+ doc_count: 264
+ },
+ {
+ key_as_string: '2018-06-09T21:00:00.000Z',
+ key: 1528578000000,
+ doc_count: 260
+ },
+ {
+ key_as_string: '2018-06-10T00:00:00.000Z',
+ key: 1528588800000,
+ doc_count: 279
+ },
+ {
+ key_as_string: '2018-06-10T03:00:00.000Z',
+ key: 1528599600000,
+ doc_count: 259
+ },
+ {
+ key_as_string: '2018-06-10T06:00:00.000Z',
+ key: 1528610400000,
+ doc_count: 291
+ },
+ {
+ key_as_string: '2018-06-10T09:00:00.000Z',
+ key: 1528621200000,
+ doc_count: 248
+ },
+ {
+ key_as_string: '2018-06-10T12:00:00.000Z',
+ key: 1528632000000,
+ doc_count: 311
+ },
+ {
+ key_as_string: '2018-06-10T15:00:00.000Z',
+ key: 1528642800000,
+ doc_count: 277
+ },
+ {
+ key_as_string: '2018-06-10T18:00:00.000Z',
+ key: 1528653600000,
+ doc_count: 279
+ },
+ {
+ key_as_string: '2018-06-10T21:00:00.000Z',
+ key: 1528664400000,
+ doc_count: 275
+ },
+ {
+ key_as_string: '2018-06-11T00:00:00.000Z',
+ key: 1528675200000,
+ doc_count: 1167
+ },
+ {
+ key_as_string: '2018-06-11T03:00:00.000Z',
+ key: 1528686000000,
+ doc_count: 1270
+ },
+ {
+ key_as_string: '2018-06-11T06:00:00.000Z',
+ key: 1528696800000,
+ doc_count: 1163
+ },
+ {
+ key_as_string: '2018-06-11T09:00:00.000Z',
+ key: 1528707600000,
+ doc_count: 1155
+ },
+ {
+ key_as_string: '2018-06-11T12:00:00.000Z',
+ key: 1528718400000,
+ doc_count: 1217
+ },
+ {
+ key_as_string: '2018-06-11T15:00:00.000Z',
+ key: 1528729200000,
+ doc_count: 1227
+ },
+ {
+ key_as_string: '2018-06-11T18:00:00.000Z',
+ key: 1528740000000,
+ doc_count: 1194
+ },
+ {
+ key_as_string: '2018-06-11T21:00:00.000Z',
+ key: 1528750800000,
+ doc_count: 1153
+ },
+ {
+ key_as_string: '2018-06-12T00:00:00.000Z',
+ key: 1528761600000,
+ doc_count: 1211
+ },
+ {
+ key_as_string: '2018-06-12T03:00:00.000Z',
+ key: 1528772400000,
+ doc_count: 1203
+ },
+ {
+ key_as_string: '2018-06-12T06:00:00.000Z',
+ key: 1528783200000,
+ doc_count: 1269
+ },
+ {
+ key_as_string: '2018-06-12T09:00:00.000Z',
+ key: 1528794000000,
+ doc_count: 1197
+ },
+ {
+ key_as_string: '2018-06-12T12:00:00.000Z',
+ key: 1528804800000,
+ doc_count: 1184
+ },
+ {
+ key_as_string: '2018-06-12T15:00:00.000Z',
+ key: 1528815600000,
+ doc_count: 1176
+ },
+ {
+ key_as_string: '2018-06-12T18:00:00.000Z',
+ key: 1528826400000,
+ doc_count: 1162
+ },
+ {
+ key_as_string: '2018-06-12T21:00:00.000Z',
+ key: 1528837200000,
+ doc_count: 1270
+ },
+ {
+ key_as_string: '2018-06-13T00:00:00.000Z',
+ key: 1528848000000,
+ doc_count: 1224
+ },
+ {
+ key_as_string: '2018-06-13T03:00:00.000Z',
+ key: 1528858800000,
+ doc_count: 1255
+ },
+ {
+ key_as_string: '2018-06-13T06:00:00.000Z',
+ key: 1528869600000,
+ doc_count: 1207
+ },
+ {
+ key_as_string: '2018-06-13T09:00:00.000Z',
+ key: 1528880400000,
+ doc_count: 1206
+ },
+ {
+ key_as_string: '2018-06-13T12:00:00.000Z',
+ key: 1528891200000,
+ doc_count: 1254
+ },
+ {
+ key_as_string: '2018-06-13T15:00:00.000Z',
+ key: 1528902000000,
+ doc_count: 1216
+ },
+ {
+ key_as_string: '2018-06-13T18:00:00.000Z',
+ key: 1528912800000,
+ doc_count: 1263
+ },
+ {
+ key_as_string: '2018-06-13T21:00:00.000Z',
+ key: 1528923600000,
+ doc_count: 1277
+ },
+ {
+ key_as_string: '2018-06-14T00:00:00.000Z',
+ key: 1528934400000,
+ doc_count: 1183
+ },
+ {
+ key_as_string: '2018-06-14T03:00:00.000Z',
+ key: 1528945200000,
+ doc_count: 1221
+ },
+ {
+ key_as_string: '2018-06-14T06:00:00.000Z',
+ key: 1528956000000,
+ doc_count: 1198
+ },
+ {
+ key_as_string: '2018-06-14T09:00:00.000Z',
+ key: 1528966800000,
+ doc_count: 1214
+ },
+ {
+ key_as_string: '2018-06-14T12:00:00.000Z',
+ key: 1528977600000,
+ doc_count: 0
+ }
+ ]
+ }
+ },
+ {
+ key: 'HTTP 3xx',
+ doc_count: 6650,
+ timeseries: {
+ buckets: [
+ {
+ key_as_string: '2018-06-04T12:00:00.000Z',
+ key: 1528113600000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-04T15:00:00.000Z',
+ key: 1528124400000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-04T18:00:00.000Z',
+ key: 1528135200000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-04T21:00:00.000Z',
+ key: 1528146000000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-05T00:00:00.000Z',
+ key: 1528156800000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-05T03:00:00.000Z',
+ key: 1528167600000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-05T06:00:00.000Z',
+ key: 1528178400000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-05T09:00:00.000Z',
+ key: 1528189200000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-05T12:00:00.000Z',
+ key: 1528200000000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-05T15:00:00.000Z',
+ key: 1528210800000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-05T18:00:00.000Z',
+ key: 1528221600000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-05T21:00:00.000Z',
+ key: 1528232400000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-06T00:00:00.000Z',
+ key: 1528243200000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-06T03:00:00.000Z',
+ key: 1528254000000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-06T06:00:00.000Z',
+ key: 1528264800000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-06T09:00:00.000Z',
+ key: 1528275600000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-06T12:00:00.000Z',
+ key: 1528286400000,
+ doc_count: 4041
+ },
+ {
+ key_as_string: '2018-06-06T15:00:00.000Z',
+ key: 1528297200000,
+ doc_count: 454
+ },
+ {
+ key_as_string: '2018-06-06T18:00:00.000Z',
+ key: 1528308000000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-06T21:00:00.000Z',
+ key: 1528318800000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-07T00:00:00.000Z',
+ key: 1528329600000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-07T03:00:00.000Z',
+ key: 1528340400000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-07T06:00:00.000Z',
+ key: 1528351200000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-07T09:00:00.000Z',
+ key: 1528362000000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-07T12:00:00.000Z',
+ key: 1528372800000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-07T15:00:00.000Z',
+ key: 1528383600000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-07T18:00:00.000Z',
+ key: 1528394400000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-07T21:00:00.000Z',
+ key: 1528405200000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-08T00:00:00.000Z',
+ key: 1528416000000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-08T03:00:00.000Z',
+ key: 1528426800000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-08T06:00:00.000Z',
+ key: 1528437600000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-08T09:00:00.000Z',
+ key: 1528448400000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-08T12:00:00.000Z',
+ key: 1528459200000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-08T15:00:00.000Z',
+ key: 1528470000000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-08T18:00:00.000Z',
+ key: 1528480800000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-08T21:00:00.000Z',
+ key: 1528491600000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-09T00:00:00.000Z',
+ key: 1528502400000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-09T03:00:00.000Z',
+ key: 1528513200000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-09T06:00:00.000Z',
+ key: 1528524000000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-09T09:00:00.000Z',
+ key: 1528534800000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-09T12:00:00.000Z',
+ key: 1528545600000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-09T15:00:00.000Z',
+ key: 1528556400000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-09T18:00:00.000Z',
+ key: 1528567200000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-09T21:00:00.000Z',
+ key: 1528578000000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-10T00:00:00.000Z',
+ key: 1528588800000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-10T03:00:00.000Z',
+ key: 1528599600000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-10T06:00:00.000Z',
+ key: 1528610400000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-10T09:00:00.000Z',
+ key: 1528621200000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-10T12:00:00.000Z',
+ key: 1528632000000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-10T15:00:00.000Z',
+ key: 1528642800000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-10T18:00:00.000Z',
+ key: 1528653600000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-10T21:00:00.000Z',
+ key: 1528664400000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-11T00:00:00.000Z',
+ key: 1528675200000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-11T03:00:00.000Z',
+ key: 1528686000000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-11T06:00:00.000Z',
+ key: 1528696800000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-11T09:00:00.000Z',
+ key: 1528707600000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-11T12:00:00.000Z',
+ key: 1528718400000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-11T15:00:00.000Z',
+ key: 1528729200000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-11T18:00:00.000Z',
+ key: 1528740000000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-11T21:00:00.000Z',
+ key: 1528750800000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-12T00:00:00.000Z',
+ key: 1528761600000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-12T03:00:00.000Z',
+ key: 1528772400000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-12T06:00:00.000Z',
+ key: 1528783200000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-12T09:00:00.000Z',
+ key: 1528794000000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-12T12:00:00.000Z',
+ key: 1528804800000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-12T15:00:00.000Z',
+ key: 1528815600000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-12T18:00:00.000Z',
+ key: 1528826400000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-12T21:00:00.000Z',
+ key: 1528837200000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-13T00:00:00.000Z',
+ key: 1528848000000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-13T03:00:00.000Z',
+ key: 1528858800000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-13T06:00:00.000Z',
+ key: 1528869600000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-13T09:00:00.000Z',
+ key: 1528880400000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-13T12:00:00.000Z',
+ key: 1528891200000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-13T15:00:00.000Z',
+ key: 1528902000000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-13T18:00:00.000Z',
+ key: 1528912800000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-13T21:00:00.000Z',
+ key: 1528923600000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-14T00:00:00.000Z',
+ key: 1528934400000,
+ doc_count: 2155
+ },
+ {
+ key_as_string: '2018-06-14T03:00:00.000Z',
+ key: 1528945200000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-14T06:00:00.000Z',
+ key: 1528956000000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-14T09:00:00.000Z',
+ key: 1528966800000,
+ doc_count: 0
+ },
+ {
+ key_as_string: '2018-06-14T12:00:00.000Z',
+ key: 1528977600000,
+ doc_count: 0
+ }
+ ]
+ }
+ }
+ ]
+ },
+ response_times: {
+ buckets: [
+ {
+ key_as_string: '2018-06-04T12:00:00.000Z',
+ key: 1528113600000,
+ doc_count: 18841,
+ pct: {
+ values: {
+ '95.0': 82172.85648714812,
+ '99.0': 293866.3866666665
+ }
+ },
+ avg: {
+ value: 26310.63483891513
+ }
+ },
+ {
+ key_as_string: '2018-06-04T15:00:00.000Z',
+ key: 1528124400000,
+ doc_count: 18708,
+ pct: {
+ values: {
+ '95.0': 80738.78571428556,
+ '99.0': 293257.27333333343
+ }
+ },
+ avg: {
+ value: 26193.277795595466
+ }
+ },
+ {
+ key_as_string: '2018-06-04T18:00:00.000Z',
+ key: 1528135200000,
+ doc_count: 18865,
+ pct: {
+ values: {
+ '95.0': 77058.03529411761,
+ '99.0': 290195.8800000004
+ }
+ },
+ avg: {
+ value: 25291.787065995228
+ }
+ },
+ {
+ key_as_string: '2018-06-04T21:00:00.000Z',
+ key: 1528146000000,
+ doc_count: 18889,
+ pct: {
+ values: {
+ '95.0': 77892.20721980717,
+ '99.0': 278548.1649999994
+ }
+ },
+ avg: {
+ value: 24690.306474667796
+ }
+ },
+ {
+ key_as_string: '2018-06-05T00:00:00.000Z',
+ key: 1528156800000,
+ doc_count: 19270,
+ pct: {
+ values: {
+ '95.0': 77085.86687499998,
+ '99.0': 290701.8973333341
+ }
+ },
+ avg: {
+ value: 24809.8953814219
+ }
+ },
+ {
+ key_as_string: '2018-06-05T03:00:00.000Z',
+ key: 1528167600000,
+ doc_count: 19024,
+ pct: {
+ values: {
+ '95.0': 80048.3462981744,
+ '99.0': 286839.5897777779
+ }
+ },
+ avg: {
+ value: 25460.0394764508
+ }
+ },
+ {
+ key_as_string: '2018-06-05T06:00:00.000Z',
+ key: 1528178400000,
+ doc_count: 18923,
+ pct: {
+ values: {
+ '95.0': 84089.21370223971,
+ '99.0': 287979.5149999999
+ }
+ },
+ avg: {
+ value: 26360.440733498916
+ }
+ },
+ {
+ key_as_string: '2018-06-05T09:00:00.000Z',
+ key: 1528189200000,
+ doc_count: 18834,
+ pct: {
+ values: {
+ '95.0': 84880.90143416924,
+ '99.0': 300107.5009999992
+ }
+ },
+ avg: {
+ value: 27050.95205479452
+ }
+ },
+ {
+ key_as_string: '2018-06-05T12:00:00.000Z',
+ key: 1528200000000,
+ doc_count: 18694,
+ pct: {
+ values: {
+ '95.0': 84554.8884781166,
+ '99.0': 294402.2179999999
+ }
+ },
+ avg: {
+ value: 26555.857333903925
+ }
+ },
+ {
+ key_as_string: '2018-06-05T15:00:00.000Z',
+ key: 1528210800000,
+ doc_count: 19184,
+ pct: {
+ values: {
+ '95.0': 81839.39583333326,
+ '99.0': 289849.459333332
+ }
+ },
+ avg: {
+ value: 26164.343359049206
+ }
+ },
+ {
+ key_as_string: '2018-06-05T18:00:00.000Z',
+ key: 1528221600000,
+ doc_count: 18850,
+ pct: {
+ values: {
+ '95.0': 85993.55410163336,
+ '99.0': 296942.86299999955
+ }
+ },
+ avg: {
+ value: 26989.84546419098
+ }
+ },
+ {
+ key_as_string: '2018-06-05T21:00:00.000Z',
+ key: 1528232400000,
+ doc_count: 18897,
+ pct: {
+ values: {
+ '95.0': 85001.44588628765,
+ '99.0': 292048.20571428596
+ }
+ },
+ avg: {
+ value: 26314.409430068266
+ }
+ },
+ {
+ key_as_string: '2018-06-06T00:00:00.000Z',
+ key: 1528243200000,
+ doc_count: 18942,
+ pct: {
+ values: {
+ '95.0': 86980.16445312503,
+ '99.0': 299308.7371666667
+ }
+ },
+ avg: {
+ value: 27460.774575018477
+ }
+ },
+ {
+ key_as_string: '2018-06-06T03:00:00.000Z',
+ key: 1528254000000,
+ doc_count: 19147,
+ pct: {
+ values: {
+ '95.0': 84961.8710743802,
+ '99.0': 292151.2377777781
+ }
+ },
+ avg: {
+ value: 26461.469107431974
+ }
+ },
+ {
+ key_as_string: '2018-06-06T06:00:00.000Z',
+ key: 1528264800000,
+ doc_count: 18853,
+ pct: {
+ values: {
+ '95.0': 88906.54601889332,
+ '99.0': 302274.4192592592
+ }
+ },
+ avg: {
+ value: 27657.584946692834
+ }
+ },
+ {
+ key_as_string: '2018-06-06T09:00:00.000Z',
+ key: 1528275600000,
+ doc_count: 18609,
+ pct: {
+ values: {
+ '95.0': 90198.34708994703,
+ '99.0': 299457.1612121209
+ }
+ },
+ avg: {
+ value: 27940.445967005213
+ }
+ },
+ {
+ key_as_string: '2018-06-06T12:00:00.000Z',
+ key: 1528286400000,
+ doc_count: 21402,
+ pct: {
+ values: {
+ '95.0': 135627.71242424246,
+ '99.0': 350398.59259259375
+ }
+ },
+ avg: {
+ value: 34454.377581534434
+ }
+ },
+ {
+ key_as_string: '2018-06-06T15:00:00.000Z',
+ key: 1528297200000,
+ doc_count: 19051,
+ pct: {
+ values: {
+ '95.0': 167037.1993837535,
+ '99.0': 421204.23333333334
+ }
+ },
+ avg: {
+ value: 44024.31809353839
+ }
+ },
+ {
+ key_as_string: '2018-06-06T18:00:00.000Z',
+ key: 1528308000000,
+ doc_count: 19020,
+ pct: {
+ values: {
+ '95.0': 128293.12184873945,
+ '99.0': 368166.68976190523
+ }
+ },
+ avg: {
+ value: 36374.53333333333
+ }
+ },
+ {
+ key_as_string: '2018-06-06T21:00:00.000Z',
+ key: 1528318800000,
+ doc_count: 18582,
+ pct: {
+ values: {
+ '95.0': 130653.54236263742,
+ '99.0': 367193.6128571426
+ }
+ },
+ avg: {
+ value: 36991.29442471209
+ }
+ },
+ {
+ key_as_string: '2018-06-07T00:00:00.000Z',
+ key: 1528329600000,
+ doc_count: 18875,
+ pct: {
+ values: {
+ '95.0': 131630.8902645502,
+ '99.0': 375658.10190476174
+ }
+ },
+ avg: {
+ value: 37178.002701986756
+ }
+ },
+ {
+ key_as_string: '2018-06-07T03:00:00.000Z',
+ key: 1528340400000,
+ doc_count: 18993,
+ pct: {
+ values: {
+ '95.0': 133581.33541666638,
+ '99.0': 368152.03822222137
+ }
+ },
+ avg: {
+ value: 37605.57078923814
+ }
+ },
+ {
+ key_as_string: '2018-06-07T06:00:00.000Z',
+ key: 1528351200000,
+ doc_count: 19037,
+ pct: {
+ values: {
+ '95.0': 132697.92762266204,
+ '99.0': 365705.8319999995
+ }
+ },
+ avg: {
+ value: 37319.89767295267
+ }
+ },
+ {
+ key_as_string: '2018-06-07T09:00:00.000Z',
+ key: 1528362000000,
+ doc_count: 18985,
+ pct: {
+ values: {
+ '95.0': 140003.6918918918,
+ '99.0': 380075.48533333326
+ }
+ },
+ avg: {
+ value: 38709.5041348433
+ }
+ },
+ {
+ key_as_string: '2018-06-07T12:00:00.000Z',
+ key: 1528372800000,
+ doc_count: 18505,
+ pct: {
+ values: {
+ '95.0': 138149.5673529411,
+ '99.0': 375697.1923809518
+ }
+ },
+ avg: {
+ value: 38140.131856255066
+ }
+ },
+ {
+ key_as_string: '2018-06-07T15:00:00.000Z',
+ key: 1528383600000,
+ doc_count: 18991,
+ pct: {
+ values: {
+ '95.0': 121872.37504835591,
+ '99.0': 351080.94111111073
+ }
+ },
+ avg: {
+ value: 34564.81091043125
+ }
+ },
+ {
+ key_as_string: '2018-06-07T18:00:00.000Z',
+ key: 1528394400000,
+ doc_count: 18917,
+ pct: {
+ values: {
+ '95.0': 116378.03873517792,
+ '99.0': 339294.12799999997
+ }
+ },
+ avg: {
+ value: 33256.37743828302
+ }
+ },
+ {
+ key_as_string: '2018-06-07T21:00:00.000Z',
+ key: 1528405200000,
+ doc_count: 18744,
+ pct: {
+ values: {
+ '95.0': 131545.40999999995,
+ '99.0': 378902.90649999987
+ }
+ },
+ avg: {
+ value: 37251.5625266752
+ }
+ },
+ {
+ key_as_string: '2018-06-08T00:00:00.000Z',
+ key: 1528416000000,
+ doc_count: 19157,
+ pct: {
+ values: {
+ '95.0': 133111.25804878055,
+ '99.0': 384483.3233333327
+ }
+ },
+ avg: {
+ value: 38681.89084929791
+ }
+ },
+ {
+ key_as_string: '2018-06-08T03:00:00.000Z',
+ key: 1528426800000,
+ doc_count: 18552,
+ pct: {
+ values: {
+ '95.0': 144821.9855278593,
+ '99.0': 394692.25000000105
+ }
+ },
+ avg: {
+ value: 40677.801045709355
+ }
+ },
+ {
+ key_as_string: '2018-06-08T06:00:00.000Z',
+ key: 1528437600000,
+ doc_count: 18994,
+ pct: {
+ values: {
+ '95.0': 134737.3997727272,
+ '99.0': 403362.50399999996
+ }
+ },
+ avg: {
+ value: 39987.86453616932
+ }
+ },
+ {
+ key_as_string: '2018-06-08T09:00:00.000Z',
+ key: 1528448400000,
+ doc_count: 18798,
+ pct: {
+ values: {
+ '95.0': 141206.57726666646,
+ '99.0': 396559.0274999993
+ }
+ },
+ avg: {
+ value: 41059.392914139804
+ }
+ },
+ {
+ key_as_string: '2018-06-08T12:00:00.000Z',
+ key: 1528459200000,
+ doc_count: 19097,
+ pct: {
+ values: {
+ '95.0': 137731.8994082841,
+ '99.0': 371815.8320000008
+ }
+ },
+ avg: {
+ value: 39630.710111535845
+ }
+ },
+ {
+ key_as_string: '2018-06-08T15:00:00.000Z',
+ key: 1528470000000,
+ doc_count: 18887,
+ pct: {
+ values: {
+ '95.0': 141476.23189033198,
+ '99.0': 405477.6133333326
+ }
+ },
+ avg: {
+ value: 41561.81331074284
+ }
+ },
+ {
+ key_as_string: '2018-06-08T18:00:00.000Z',
+ key: 1528480800000,
+ doc_count: 18949,
+ pct: {
+ values: {
+ '95.0': 149636.31340909077,
+ '99.0': 413542.18133333366
+ }
+ },
+ avg: {
+ value: 43079.490738297536
+ }
+ },
+ {
+ key_as_string: '2018-06-08T21:00:00.000Z',
+ key: 1528491600000,
+ doc_count: 18786,
+ pct: {
+ values: {
+ '95.0': 151934.55000000002,
+ '99.0': 424399.340000001
+ }
+ },
+ avg: {
+ value: 43925.39609283509
+ }
+ },
+ {
+ key_as_string: '2018-06-09T00:00:00.000Z',
+ key: 1528502400000,
+ doc_count: 5096,
+ pct: {
+ values: {
+ '95.0': 82198.17857142858,
+ '99.0': 303815.9000000001
+ }
+ },
+ avg: {
+ value: 25821.91424646782
+ }
+ },
+ {
+ key_as_string: '2018-06-09T03:00:00.000Z',
+ key: 1528513200000,
+ doc_count: 5104,
+ pct: {
+ values: {
+ '95.0': 85946.43199999983,
+ '99.0': 306305.0800000006
+ }
+ },
+ avg: {
+ value: 27343.60011755486
+ }
+ },
+ {
+ key_as_string: '2018-06-09T06:00:00.000Z',
+ key: 1528524000000,
+ doc_count: 5122,
+ pct: {
+ values: {
+ '95.0': 78617.66249999996,
+ '99.0': 297521.94999999984
+ }
+ },
+ avg: {
+ value: 25249.95060523233
+ }
+ },
+ {
+ key_as_string: '2018-06-09T09:00:00.000Z',
+ key: 1528534800000,
+ doc_count: 5184,
+ pct: {
+ values: {
+ '95.0': 79606.48333333322,
+ '99.0': 317938.0900000003
+ }
+ },
+ avg: {
+ value: 25492.77199074074
+ }
+ },
+ {
+ key_as_string: '2018-06-09T12:00:00.000Z',
+ key: 1528545600000,
+ doc_count: 5279,
+ pct: {
+ values: {
+ '95.0': 76297.93999999986,
+ '99.0': 312262.3000000003
+ }
+ },
+ avg: {
+ value: 25991.647281682137
+ }
+ },
+ {
+ key_as_string: '2018-06-09T15:00:00.000Z',
+ key: 1528556400000,
+ doc_count: 5254,
+ pct: {
+ values: {
+ '95.0': 80742.63333333324,
+ '99.0': 318428.8700000002
+ }
+ },
+ avg: {
+ value: 26273.31290445375
+ }
+ },
+ {
+ key_as_string: '2018-06-09T18:00:00.000Z',
+ key: 1528567200000,
+ doc_count: 5082,
+ pct: {
+ values: {
+ '95.0': 81291.45969696966,
+ '99.0': 295421.4099999999
+ }
+ },
+ avg: {
+ value: 26234.98976780795
+ }
+ },
+ {
+ key_as_string: '2018-06-09T21:00:00.000Z',
+ key: 1528578000000,
+ doc_count: 5150,
+ pct: {
+ values: {
+ '95.0': 73467.02500000004,
+ '99.0': 293067.86000000004
+ }
+ },
+ avg: {
+ value: 23494.54873786408
+ }
+ },
+ {
+ key_as_string: '2018-06-10T00:00:00.000Z',
+ key: 1528588800000,
+ doc_count: 5103,
+ pct: {
+ values: {
+ '95.0': 69177.66999999993,
+ '99.0': 264935.71999999933
+ }
+ },
+ avg: {
+ value: 22008.80482069371
+ }
+ },
+ {
+ key_as_string: '2018-06-10T03:00:00.000Z',
+ key: 1528599600000,
+ doc_count: 5137,
+ pct: {
+ values: {
+ '95.0': 71956.06111111109,
+ '99.0': 282795.0400000003
+ }
+ },
+ avg: {
+ value: 22828.136655635586
+ }
+ },
+ {
+ key_as_string: '2018-06-10T06:00:00.000Z',
+ key: 1528610400000,
+ doc_count: 5184,
+ pct: {
+ values: {
+ '95.0': 68480.91142857139,
+ '99.0': 285390.8400000001
+ }
+ },
+ avg: {
+ value: 22138.7081404321
+ }
+ },
+ {
+ key_as_string: '2018-06-10T09:00:00.000Z',
+ key: 1528621200000,
+ doc_count: 4993,
+ pct: {
+ values: {
+ '95.0': 68957.0999999999,
+ '99.0': 290402.24
+ }
+ },
+ avg: {
+ value: 22634.985579811735
+ }
+ },
+ {
+ key_as_string: '2018-06-10T12:00:00.000Z',
+ key: 1528632000000,
+ doc_count: 5210,
+ pct: {
+ values: {
+ '95.0': 67489.50416666668,
+ '99.0': 293655.53
+ }
+ },
+ avg: {
+ value: 22202.780998080616
+ }
+ },
+ {
+ key_as_string: '2018-06-10T15:00:00.000Z',
+ key: 1528642800000,
+ doc_count: 5122,
+ pct: {
+ values: {
+ '95.0': 71556.91249999998,
+ '99.0': 292723.56999999995
+ }
+ },
+ avg: {
+ value: 23084.082780163997
+ }
+ },
+ {
+ key_as_string: '2018-06-10T18:00:00.000Z',
+ key: 1528653600000,
+ doc_count: 5125,
+ pct: {
+ values: {
+ '95.0': 72157.65128205132,
+ '99.0': 301051.32000000105
+ }
+ },
+ avg: {
+ value: 23109.666146341464
+ }
+ },
+ {
+ key_as_string: '2018-06-10T21:00:00.000Z',
+ key: 1528664400000,
+ doc_count: 5186,
+ pct: {
+ values: {
+ '95.0': 76124.5625,
+ '99.0': 291322.0499999998
+ }
+ },
+ avg: {
+ value: 23306.89028152719
+ }
+ },
+ {
+ key_as_string: '2018-06-11T00:00:00.000Z',
+ key: 1528675200000,
+ doc_count: 18631,
+ pct: {
+ values: {
+ '95.0': 141709.34661835746,
+ '99.0': 379855.2444444447
+ }
+ },
+ avg: {
+ value: 39341.022704095325
+ }
+ },
+ {
+ key_as_string: '2018-06-11T03:00:00.000Z',
+ key: 1528686000000,
+ doc_count: 19349,
+ pct: {
+ values: {
+ '95.0': 132371.48641975303,
+ '99.0': 371175.2592000001
+ }
+ },
+ avg: {
+ value: 37467.17153341258
+ }
+ },
+ {
+ key_as_string: '2018-06-11T06:00:00.000Z',
+ key: 1528696800000,
+ doc_count: 18586,
+ pct: {
+ values: {
+ '95.0': 186783.51503759398,
+ '99.0': 498378.4238888898
+ }
+ },
+ avg: {
+ value: 52457.50554180566
+ }
+ },
+ {
+ key_as_string: '2018-06-11T09:00:00.000Z',
+ key: 1528707600000,
+ doc_count: 18887,
+ pct: {
+ values: {
+ '95.0': 99540.17819499348,
+ '99.0': 331118.6599999997
+ }
+ },
+ avg: {
+ value: 31327.95780166252
+ }
+ },
+ {
+ key_as_string: '2018-06-11T12:00:00.000Z',
+ key: 1528718400000,
+ doc_count: 18866,
+ pct: {
+ values: {
+ '95.0': 95982.62454212455,
+ '99.0': 328101.3999999988
+ }
+ },
+ avg: {
+ value: 30695.334941163997
+ }
+ },
+ {
+ key_as_string: '2018-06-11T15:00:00.000Z',
+ key: 1528729200000,
+ doc_count: 19469,
+ pct: {
+ values: {
+ '95.0': 89559.3525925925,
+ '99.0': 313951.54249999986
+ }
+ },
+ avg: {
+ value: 28895.042785967435
+ }
+ },
+ {
+ key_as_string: '2018-06-11T18:00:00.000Z',
+ key: 1528740000000,
+ doc_count: 18767,
+ pct: {
+ values: {
+ '95.0': 95769.83153735634,
+ '99.0': 323340.5274074075
+ }
+ },
+ avg: {
+ value: 30649.363989982416
+ }
+ },
+ {
+ key_as_string: '2018-06-11T21:00:00.000Z',
+ key: 1528750800000,
+ doc_count: 19006,
+ pct: {
+ values: {
+ '95.0': 94063.90833755062,
+ '99.0': 315055.5047619052
+ }
+ },
+ avg: {
+ value: 29802.63622014101
+ }
+ },
+ {
+ key_as_string: '2018-06-12T00:00:00.000Z',
+ key: 1528761600000,
+ doc_count: 19082,
+ pct: {
+ values: {
+ '95.0': 96399.67269119772,
+ '99.0': 330070.03599999985
+ }
+ },
+ avg: {
+ value: 30759.03002829892
+ }
+ },
+ {
+ key_as_string: '2018-06-12T03:00:00.000Z',
+ key: 1528772400000,
+ doc_count: 18908,
+ pct: {
+ values: {
+ '95.0': 96436.42520161276,
+ '99.0': 320531.54416666675
+ }
+ },
+ avg: {
+ value: 30399.76549608631
+ }
+ },
+ {
+ key_as_string: '2018-06-12T06:00:00.000Z',
+ key: 1528783200000,
+ doc_count: 19055,
+ pct: {
+ values: {
+ '95.0': 91860.16988095238,
+ '99.0': 315137.16628571344
+ }
+ },
+ avg: {
+ value: 29421.610233534506
+ }
+ },
+ {
+ key_as_string: '2018-06-12T09:00:00.000Z',
+ key: 1528794000000,
+ doc_count: 19047,
+ pct: {
+ values: {
+ '95.0': 105989.8333333334,
+ '99.0': 337251.4042424246
+ }
+ },
+ avg: {
+ value: 32641.679897096656
+ }
+ },
+ {
+ key_as_string: '2018-06-12T12:00:00.000Z',
+ key: 1528804800000,
+ doc_count: 18733,
+ pct: {
+ values: {
+ '95.0': 97937.60342555979,
+ '99.0': 327054.9243636365
+ }
+ },
+ avg: {
+ value: 30621.65440666204
+ }
+ },
+ {
+ key_as_string: '2018-06-12T15:00:00.000Z',
+ key: 1528815600000,
+ doc_count: 19079,
+ pct: {
+ values: {
+ '95.0': 98967.2249999999,
+ '99.0': 327653.0000000006
+ }
+ },
+ avg: {
+ value: 31039.60391005818
+ }
+ },
+ {
+ key_as_string: '2018-06-12T18:00:00.000Z',
+ key: 1528826400000,
+ doc_count: 18907,
+ pct: {
+ values: {
+ '95.0': 97561.02469135808,
+ '99.0': 324505.1399999999
+ }
+ },
+ avg: {
+ value: 30954.760723541545
+ }
+ },
+ {
+ key_as_string: '2018-06-12T21:00:00.000Z',
+ key: 1528837200000,
+ doc_count: 18971,
+ pct: {
+ values: {
+ '95.0': 102557.78813357186,
+ '99.0': 338040.3999999998
+ }
+ },
+ avg: {
+ value: 31902.050234568553
+ }
+ },
+ {
+ key_as_string: '2018-06-13T00:00:00.000Z',
+ key: 1528848000000,
+ doc_count: 18899,
+ pct: {
+ values: {
+ '95.0': 100137.87578595306,
+ '99.0': 328600.5173333335
+ }
+ },
+ avg: {
+ value: 31594.350653473728
+ }
+ },
+ {
+ key_as_string: '2018-06-13T03:00:00.000Z',
+ key: 1528858800000,
+ doc_count: 19182,
+ pct: {
+ values: {
+ '95.0': 98412.97120445351,
+ '99.0': 334060.93628571345
+ }
+ },
+ avg: {
+ value: 31343.87243248879
+ }
+ },
+ {
+ key_as_string: '2018-06-13T06:00:00.000Z',
+ key: 1528869600000,
+ doc_count: 19030,
+ pct: {
+ values: {
+ '95.0': 101607.8328012912,
+ '99.0': 328569.4964999998
+ }
+ },
+ avg: {
+ value: 31200.14450867052
+ }
+ },
+ {
+ key_as_string: '2018-06-13T09:00:00.000Z',
+ key: 1528880400000,
+ doc_count: 19257,
+ pct: {
+ values: {
+ '95.0': 92000.51368421057,
+ '99.0': 320227.32399999973
+ }
+ },
+ avg: {
+ value: 28560.946668743833
+ }
+ },
+ {
+ key_as_string: '2018-06-13T12:00:00.000Z',
+ key: 1528891200000,
+ doc_count: 19348,
+ pct: {
+ values: {
+ '95.0': 78027.29473684198,
+ '99.0': 292019.2899999998
+ }
+ },
+ avg: {
+ value: 24700.216146371717
+ }
+ },
+ {
+ key_as_string: '2018-06-13T15:00:00.000Z',
+ key: 1528902000000,
+ doc_count: 19119,
+ pct: {
+ values: {
+ '95.0': 80762.078801789,
+ '99.0': 297757.72666666657
+ }
+ },
+ avg: {
+ value: 25261.025210523563
+ }
+ },
+ {
+ key_as_string: '2018-06-13T18:00:00.000Z',
+ key: 1528912800000,
+ doc_count: 19206,
+ pct: {
+ values: {
+ '95.0': 81160.83425925927,
+ '99.0': 308034.4466666669
+ }
+ },
+ avg: {
+ value: 26041.39789649068
+ }
+ },
+ {
+ key_as_string: '2018-06-13T21:00:00.000Z',
+ key: 1528923600000,
+ doc_count: 19078,
+ pct: {
+ values: {
+ '95.0': 84215.58945578222,
+ '99.0': 301128.4895238093
+ }
+ },
+ avg: {
+ value: 26123.556295209142
+ }
+ },
+ {
+ key_as_string: '2018-06-14T00:00:00.000Z',
+ key: 1528934400000,
+ doc_count: 19551,
+ pct: {
+ values: {
+ '95.0': 194188.21428571426,
+ '99.0': 447266.9
+ }
+ },
+ avg: {
+ value: 46231.36177177638
+ }
+ },
+ {
+ key_as_string: '2018-06-14T03:00:00.000Z',
+ key: 1528945200000,
+ doc_count: 18888,
+ pct: {
+ values: {
+ '95.0': 172616.2293896504,
+ '99.0': 409147.332500001
+ }
+ },
+ avg: {
+ value: 45350.42005506141
+ }
+ },
+ {
+ key_as_string: '2018-06-14T06:00:00.000Z',
+ key: 1528956000000,
+ doc_count: 18823,
+ pct: {
+ values: {
+ '95.0': 182653.81858220184,
+ '99.0': 423121.9773333328
+ }
+ },
+ avg: {
+ value: 48256.049354513096
+ }
+ },
+ {
+ key_as_string: '2018-06-14T09:00:00.000Z',
+ key: 1528966800000,
+ doc_count: 18766,
+ pct: {
+ values: {
+ '95.0': 194970.75667682925,
+ '99.0': 473485.4199999998
+ }
+ },
+ avg: {
+ value: 52360.30017052116
+ }
+ },
+ {
+ key_as_string: '2018-06-14T12:00:00.000Z',
+ key: 1528977600000,
+ doc_count: 0,
+ pct: {
+ values: {
+ '95.0': 'NaN',
+ '99.0': 'NaN'
+ }
+ },
+ avg: {
+ value: null
+ }
+ }
+ ]
+ },
+ overall_avg_duration: {
+ value: 32861.15660262639
+ }
+ }
+};
diff --git a/x-pack/plugins/apm/server/lib/transactions/charts/get_timeseries_data/transform.test.ts b/x-pack/plugins/apm/server/lib/transactions/charts/get_timeseries_data/transform.test.ts
new file mode 100644
index 0000000000000..ecf64e393b191
--- /dev/null
+++ b/x-pack/plugins/apm/server/lib/transactions/charts/get_timeseries_data/transform.test.ts
@@ -0,0 +1,116 @@
+/*
+ * 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 { first, last } from 'lodash';
+import { timeseriesResponse } from './mock-responses/timeseries_response';
+import {
+ getTpmBuckets,
+ TimeSeriesAPIResponse,
+ timeseriesTransformer
+} from './transform';
+
+describe('timeseriesTransformer', () => {
+ let res: TimeSeriesAPIResponse;
+ beforeEach(async () => {
+ res = await timeseriesTransformer({
+ timeseriesResponse,
+ avgAnomaliesResponse: undefined,
+ bucketSize: 12
+ });
+ });
+
+ it('should not contain first and last bucket', () => {
+ const mockDates = timeseriesResponse.aggregations.transaction_results.buckets[0].timeseries.buckets.map(
+ bucket => bucket.key
+ );
+
+ expect(res.dates).not.toContain(first(mockDates));
+ expect(res.dates).not.toContain(last(mockDates));
+ expect(res.tpmBuckets[0].values).toHaveLength(res.dates.length);
+ });
+
+ it('should have correct order', () => {
+ expect(res.tpmBuckets.map(bucket => bucket.key)).toEqual([
+ 'HTTP 2xx',
+ 'HTTP 3xx',
+ 'HTTP 4xx',
+ 'HTTP 5xx',
+ 'A Custom Bucket (that should be last)'
+ ]);
+ });
+
+ it('should match snapshot', () => {
+ expect(res).toMatchSnapshot();
+ });
+});
+
+describe('getTpmBuckets', () => {
+ it('should return response', () => {
+ const buckets = [
+ {
+ key: 'HTTP 4xx',
+ doc_count: 300,
+ timeseries: {
+ buckets: [
+ {
+ key_as_string: '',
+ key: 0,
+ doc_count: 0
+ },
+ {
+ key_as_string: '',
+ key: 1,
+ doc_count: 200
+ },
+ {
+ key_as_string: '',
+ key: 2,
+ doc_count: 300
+ },
+ {
+ key_as_string: '',
+ key: 3,
+ doc_count: 1337
+ }
+ ]
+ }
+ },
+ {
+ key: 'HTTP 5xx',
+ doc_count: 400,
+ timeseries: {
+ buckets: [
+ {
+ key_as_string: '',
+ key: 0,
+ doc_count: 0
+ },
+ {
+ key_as_string: '',
+ key: 1,
+ doc_count: 500
+ },
+ {
+ key_as_string: '',
+ key: 2,
+ doc_count: 100
+ },
+ {
+ key_as_string: '',
+ key: 3,
+ doc_count: 1337
+ }
+ ]
+ }
+ }
+ ];
+ const bucketSize = 10;
+ expect(getTpmBuckets(buckets, bucketSize)).toEqual([
+ { avg: 1500, key: 'HTTP 4xx', values: [1200, 1800] },
+ { avg: 1800, key: 'HTTP 5xx', values: [3000, 600] }
+ ]);
+ });
+});
diff --git a/x-pack/plugins/apm/server/lib/transactions/charts/get_timeseries_data/transform.ts b/x-pack/plugins/apm/server/lib/transactions/charts/get_timeseries_data/transform.ts
new file mode 100644
index 0000000000000..ff9b28239b521
--- /dev/null
+++ b/x-pack/plugins/apm/server/lib/transactions/charts/get_timeseries_data/transform.ts
@@ -0,0 +1,107 @@
+/*
+ * 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 { isNumber, round, sortBy } from 'lodash';
+import mean from 'lodash.mean';
+import { oc } from 'ts-optchain';
+import { IAvgAnomaliesResponse } from '../get_avg_response_time_anomalies';
+import { ESResponse } from './fetcher';
+
+type MaybeNumber = number | null;
+
+export interface TimeSeriesAPIResponse {
+ totalHits: number;
+ dates: number[];
+ responseTimes: {
+ avg: MaybeNumber[];
+ p95: MaybeNumber[];
+ p99: MaybeNumber[];
+ avgAnomalies?: IAvgAnomaliesResponse;
+ };
+ tpmBuckets: Array<{
+ key: string;
+ avg: number;
+ values: number[];
+ }>;
+ overallAvgDuration?: number;
+}
+
+export function timeseriesTransformer({
+ timeseriesResponse,
+ avgAnomaliesResponse,
+ bucketSize
+}: {
+ timeseriesResponse: ESResponse;
+ avgAnomaliesResponse: IAvgAnomaliesResponse;
+ bucketSize: number;
+}): TimeSeriesAPIResponse {
+ const aggs = timeseriesResponse.aggregations;
+ const overallAvgDuration = oc(aggs).overall_avg_duration.value();
+
+ const responseTimeBuckets = oc(aggs)
+ .response_times.buckets([])
+ .slice(1, -1);
+ const dates = responseTimeBuckets.map(bucket => bucket.key);
+ const { avg, p95, p99 } = getResponseTime(responseTimeBuckets);
+
+ const transactionResultBuckets = oc(aggs).transaction_results.buckets([]);
+ const tpmBuckets = getTpmBuckets(transactionResultBuckets, bucketSize);
+
+ return {
+ totalHits: timeseriesResponse.hits.total,
+ dates,
+ responseTimes: {
+ avg,
+ p95,
+ p99,
+ avgAnomalies: avgAnomaliesResponse
+ },
+ tpmBuckets,
+ overallAvgDuration
+ };
+}
+
+export function getTpmBuckets(
+ transactionResultBuckets: ESResponse['aggregations']['transaction_results']['buckets'],
+ bucketSize: number
+) {
+ const buckets = transactionResultBuckets.map(({ key, timeseries }) => {
+ const tpmValues = timeseries.buckets
+ .slice(1, -1)
+ .map(bucket => round(bucket.doc_count * (60 / bucketSize), 1));
+
+ return {
+ key,
+ avg: mean(tpmValues),
+ values: tpmValues
+ };
+ });
+
+ return sortBy(
+ buckets,
+ bucket => bucket.key.replace(/^HTTP (\d)xx$/, '00$1') // ensure that HTTP 3xx are sorted at the top
+ );
+}
+
+function getResponseTime(
+ responseTimeBuckets: ESResponse['aggregations']['response_times']['buckets']
+) {
+ return responseTimeBuckets.reduce(
+ (acc, bucket) => {
+ const { '95.0': p95, '99.0': p99 } = bucket.pct.values;
+
+ acc.avg.push(bucket.avg.value);
+ acc.p95.push(isNumber(p95) ? p95 : null);
+ acc.p99.push(isNumber(p99) ? p99 : null);
+ return acc;
+ },
+ {
+ avg: [] as MaybeNumber[],
+ p95: [] as MaybeNumber[],
+ p99: [] as MaybeNumber[]
+ }
+ );
+}
diff --git a/x-pack/plugins/apm/server/lib/transactions/distribution/calculate_bucket_size.ts b/x-pack/plugins/apm/server/lib/transactions/distribution/calculate_bucket_size.ts
index 38025110730bf..cb0209f648b92 100644
--- a/x-pack/plugins/apm/server/lib/transactions/distribution/calculate_bucket_size.ts
+++ b/x-pack/plugins/apm/server/lib/transactions/distribution/calculate_bucket_size.ts
@@ -54,11 +54,16 @@ export async function calculateBucketSize(
params.body.query.bool.filter.push(esFilterQuery);
}
- const resp = await client('search', params);
+ interface Aggs {
+ stats: {
+ max: number;
+ };
+ }
+
+ const resp = await client('search', params);
const minBucketSize: number = config.get('xpack.apm.minimumBucketSize');
const bucketTargetCount: number = config.get('xpack.apm.bucketTargetCount');
- const max: number = resp.aggregations.stats.max;
+ const max = resp.aggregations.stats.max;
const bucketSize = Math.floor(max / bucketTargetCount);
-
return bucketSize > minBucketSize ? bucketSize : minBucketSize;
}
diff --git a/x-pack/plugins/apm/server/lib/transactions/distribution/get_buckets.ts b/x-pack/plugins/apm/server/lib/transactions/distribution/get_buckets/fetcher.ts
similarity index 58%
rename from x-pack/plugins/apm/server/lib/transactions/distribution/get_buckets.ts
rename to x-pack/plugins/apm/server/lib/transactions/distribution/get_buckets/fetcher.ts
index b552d7e3146e7..c7334fc233591 100644
--- a/x-pack/plugins/apm/server/lib/transactions/distribution/get_buckets.ts
+++ b/x-pack/plugins/apm/server/lib/transactions/distribution/get_buckets/fetcher.ts
@@ -4,8 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
-import { SearchParams, SearchResponse } from 'elasticsearch';
-import { oc } from 'ts-optchain';
+import { AggregationSearchResponse, SearchResponse } from 'elasticsearch';
import {
SERVICE_NAME,
TRACE_ID,
@@ -13,27 +12,11 @@ import {
TRANSACTION_ID,
TRANSACTION_NAME,
TRANSACTION_SAMPLED
-} from '../../../../common/constants';
-import { Transaction } from '../../../../typings/Transaction';
-import { Setup } from '../../helpers/setup_request';
+} from 'x-pack/plugins/apm/common/constants';
+import { Setup } from 'x-pack/plugins/apm/server/lib/helpers/setup_request';
+import { Transaction } from 'x-pack/plugins/apm/typings/Transaction';
-export interface IBucket {
- key: number;
- count: number;
- sample?: IBucketSample;
-}
-
-interface IBucketSample {
- traceId?: string;
- transactionId?: string;
-}
-
-interface IBucketsResponse {
- totalHits: number;
- buckets: IBucket[];
-}
-
-interface ESBucket {
+interface Bucket {
key: number;
doc_count: number;
sample: SearchResponse<{
@@ -44,16 +27,24 @@ interface ESBucket {
}>;
}
-export async function getBuckets(
+interface Aggs {
+ distribution: {
+ buckets: Bucket[];
+ };
+}
+
+export type ESResponse = AggregationSearchResponse;
+
+export function bucketFetcher(
serviceName: string,
transactionName: string,
bucketSize: number,
setup: Setup
-): Promise {
+): Promise {
const { start, end, esFilterQuery, client, config } = setup;
- const bucketTargetCount: number = config.get('xpack.apm.bucketTargetCount');
- const params: SearchParams = {
- index: config.get('apm_oss.transactionIndices'),
+ const bucketTargetCount = config.get('xpack.apm.bucketTargetCount');
+ const params = {
+ index: config.get('apm_oss.transactionIndices'),
body: {
size: 0,
query: {
@@ -102,26 +93,5 @@ export async function getBuckets(
params.body.query.bool.filter.push(esFilterQuery);
}
- const resp = await client('search', params);
- const buckets = (resp.aggregations.distribution.buckets as ESBucket[]).map(
- bucket => {
- const sampleSource = oc(bucket).sample.hits.hits[0]._source();
- const isSampled = oc(sampleSource).transaction.sampled(false);
- const sample = {
- traceId: oc(sampleSource).trace.id(),
- transactionId: oc(sampleSource).transaction.id()
- };
-
- return {
- key: bucket.key,
- count: bucket.doc_count,
- sample: isSampled ? sample : undefined
- };
- }
- );
-
- return {
- totalHits: resp.hits.total,
- buckets
- };
+ return client('search', params);
}
diff --git a/x-pack/plugins/apm/server/lib/transactions/distribution/get_buckets/index.ts b/x-pack/plugins/apm/server/lib/transactions/distribution/get_buckets/index.ts
new file mode 100644
index 0000000000000..80ad247edf9f5
--- /dev/null
+++ b/x-pack/plugins/apm/server/lib/transactions/distribution/get_buckets/index.ts
@@ -0,0 +1,25 @@
+/*
+ * 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 { Setup } from '../../../helpers/setup_request';
+import { bucketFetcher } from './fetcher';
+import { bucketTransformer } from './transform';
+
+export async function getBuckets(
+ serviceName: string,
+ transactionName: string,
+ bucketSize: number,
+ setup: Setup
+) {
+ const response = await bucketFetcher(
+ serviceName,
+ transactionName,
+ bucketSize,
+ setup
+ );
+
+ return bucketTransformer(response);
+}
diff --git a/x-pack/plugins/apm/server/lib/transactions/distribution/get_buckets/transform.ts b/x-pack/plugins/apm/server/lib/transactions/distribution/get_buckets/transform.ts
new file mode 100644
index 0000000000000..1f8b76b54c2e1
--- /dev/null
+++ b/x-pack/plugins/apm/server/lib/transactions/distribution/get_buckets/transform.ts
@@ -0,0 +1,62 @@
+/*
+ * 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 { isEmpty } from 'lodash';
+import { oc } from 'ts-optchain';
+import { ESResponse } from './fetcher';
+
+export interface IBucket {
+ key: number;
+ count: number;
+ sample?: IBucketSample;
+}
+
+interface IBucketSample {
+ traceId?: string;
+ transactionId?: string;
+}
+
+interface IBucketsResponse {
+ totalHits: number;
+ buckets: IBucket[];
+ defaultSample?: IBucketSample;
+}
+
+function getDefaultSample(buckets: IBucket[]) {
+ const samples = buckets
+ .filter(bucket => bucket.count > 0 && bucket.sample)
+ .map(bucket => bucket.sample);
+
+ if (isEmpty(samples)) {
+ return;
+ }
+
+ const middleIndex = Math.floor(samples.length / 2);
+ return samples[middleIndex];
+}
+
+export function bucketTransformer(response: ESResponse): IBucketsResponse {
+ const buckets = response.aggregations.distribution.buckets.map(bucket => {
+ const sampleSource = oc(bucket).sample.hits.hits[0]._source();
+ const isSampled = oc(sampleSource).transaction.sampled(false);
+ const sample = {
+ traceId: oc(sampleSource).trace.id(),
+ transactionId: oc(sampleSource).transaction.id()
+ };
+
+ return {
+ key: bucket.key,
+ count: bucket.doc_count,
+ sample: isSampled ? sample : undefined
+ };
+ });
+
+ return {
+ totalHits: response.hits.total,
+ buckets,
+ defaultSample: getDefaultSample(buckets)
+ };
+}
diff --git a/x-pack/plugins/apm/server/lib/transactions/distribution/get_distribution.ts b/x-pack/plugins/apm/server/lib/transactions/distribution/index.ts
similarity index 59%
rename from x-pack/plugins/apm/server/lib/transactions/distribution/get_distribution.ts
rename to x-pack/plugins/apm/server/lib/transactions/distribution/index.ts
index c3ba7d53c23e3..4ad022ef911ee 100644
--- a/x-pack/plugins/apm/server/lib/transactions/distribution/get_distribution.ts
+++ b/x-pack/plugins/apm/server/lib/transactions/distribution/index.ts
@@ -4,42 +4,30 @@
* you may not use this file except in compliance with the Elastic License.
*/
-import { isEmpty } from 'lodash';
import { Setup } from '../../helpers/setup_request';
import { calculateBucketSize } from './calculate_bucket_size';
-import { getBuckets, IBucket } from './get_buckets';
+import { getBuckets } from './get_buckets';
+import { IBucket } from './get_buckets/transform';
-export interface IDistributionResponse {
+export interface ITransactionDistributionAPIResponse {
totalHits: number;
buckets: IBucket[];
bucketSize: number;
defaultSample?: IBucket['sample'];
}
-function getDefaultSample(buckets: IBucket[]) {
- const samples = buckets
- .filter(bucket => bucket.count > 0 && bucket.sample)
- .map(bucket => bucket.sample);
-
- if (isEmpty(samples)) {
- return;
- }
-
- const middleIndex = Math.floor(samples.length / 2);
- return samples[middleIndex];
-}
-
export async function getDistribution(
serviceName: string,
transactionName: string,
setup: Setup
-): Promise {
+): Promise {
const bucketSize = await calculateBucketSize(
serviceName,
transactionName,
setup
);
- const { buckets, totalHits } = await getBuckets(
+
+ const { defaultSample, buckets, totalHits } = await getBuckets(
serviceName,
transactionName,
bucketSize,
@@ -50,6 +38,6 @@ export async function getDistribution(
totalHits,
buckets,
bucketSize,
- defaultSample: getDefaultSample(buckets)
+ defaultSample
};
}
diff --git a/x-pack/plugins/apm/server/lib/transactions/get_top_transactions.ts b/x-pack/plugins/apm/server/lib/transactions/get_top_transactions.ts
deleted file mode 100644
index 059d3710b969a..0000000000000
--- a/x-pack/plugins/apm/server/lib/transactions/get_top_transactions.ts
+++ /dev/null
@@ -1,63 +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 { SearchParams, SearchResponse } from 'elasticsearch';
-import { get } from 'lodash';
-import {
- PROCESSOR_EVENT,
- SERVICE_NAME,
- TRANSACTION_TYPE
-} from '../../../common/constants';
-import { Transaction } from '../../../typings/Transaction';
-import { ITransactionGroup } from '../../../typings/TransactionGroup';
-import { Setup } from '../helpers/setup_request';
-import {
- prepareTransactionGroups,
- TRANSACTION_GROUP_AGGREGATES
-} from '../helpers/transaction_group_query';
-
-export async function getTopTransactions({
- setup,
- transactionType,
- serviceName
-}: {
- setup: Setup;
- transactionType: string;
- serviceName: string;
-}): Promise {
- const { start, end, esFilterQuery, client, config } = setup;
-
- const params: SearchParams = {
- index: config.get('apm_oss.transactionIndices'),
- body: {
- size: 0,
- query: {
- bool: {
- filter: [
- { term: { [SERVICE_NAME]: serviceName } },
- { term: { [TRANSACTION_TYPE]: transactionType } },
- { term: { [PROCESSOR_EVENT]: 'transaction' } },
- {
- range: {
- '@timestamp': { gte: start, lte: end, format: 'epoch_millis' }
- }
- }
- ]
- }
- },
- aggs: TRANSACTION_GROUP_AGGREGATES
- }
- };
-
- if (esFilterQuery) {
- params.body.query.bool.filter.push(esFilterQuery);
- }
-
- const response: SearchResponse = await client('search', params);
- const buckets = get(response, 'aggregations.transactions.buckets', []);
-
- return prepareTransactionGroups({ buckets, start, end });
-}
diff --git a/x-pack/plugins/apm/server/lib/transactions/get_top_transactions/index.ts b/x-pack/plugins/apm/server/lib/transactions/get_top_transactions/index.ts
new file mode 100644
index 0000000000000..8b1fe99a0d3e7
--- /dev/null
+++ b/x-pack/plugins/apm/server/lib/transactions/get_top_transactions/index.ts
@@ -0,0 +1,47 @@
+/*
+ * 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 {
+ PROCESSOR_EVENT,
+ SERVICE_NAME,
+ TRANSACTION_TYPE
+} from 'x-pack/plugins/apm/common/constants';
+import { Setup } from 'x-pack/plugins/apm/server/lib/helpers/setup_request';
+import { getTransactionGroups } from '../../transaction_groups';
+import { ITransactionGroup } from '../../transaction_groups/transform';
+
+export interface IOptions {
+ setup: Setup;
+ transactionType: string;
+ serviceName: string;
+}
+
+export type TransactionListAPIResponse = ITransactionGroup[];
+
+export async function getTopTransactions({
+ setup,
+ transactionType,
+ serviceName
+}: IOptions) {
+ const { start, end } = setup;
+
+ const bodyQuery = {
+ bool: {
+ filter: [
+ { term: { [SERVICE_NAME]: serviceName } },
+ { term: { [TRANSACTION_TYPE]: transactionType } },
+ { term: { [PROCESSOR_EVENT]: 'transaction' } },
+ {
+ range: {
+ '@timestamp': { gte: start, lte: end, format: 'epoch_millis' }
+ }
+ }
+ ]
+ }
+ };
+
+ return getTransactionGroups(setup, bodyQuery);
+}
diff --git a/x-pack/plugins/apm/server/lib/transactions/get_transaction.ts b/x-pack/plugins/apm/server/lib/transactions/get_transaction/index.ts
similarity index 82%
rename from x-pack/plugins/apm/server/lib/transactions/get_transaction.ts
rename to x-pack/plugins/apm/server/lib/transactions/get_transaction/index.ts
index 301e54d1f2a03..e88b17d4ef99c 100644
--- a/x-pack/plugins/apm/server/lib/transactions/get_transaction.ts
+++ b/x-pack/plugins/apm/server/lib/transactions/get_transaction/index.ts
@@ -4,21 +4,23 @@
* you may not use this file except in compliance with the Elastic License.
*/
-import { SearchParams, SearchResponse } from 'elasticsearch';
+import { SearchParams } from 'elasticsearch';
import { oc } from 'ts-optchain';
import { Transaction } from 'x-pack/plugins/apm/typings/Transaction';
import {
PROCESSOR_EVENT,
TRACE_ID,
TRANSACTION_ID
-} from '../../../common/constants';
-import { Setup } from '../helpers/setup_request';
+} from '../../../../common/constants';
+import { Setup } from '../../helpers/setup_request';
+
+export type TransactionAPIResponse = Transaction | null;
export async function getTransaction(
transactionId: string,
traceId: string | undefined,
setup: Setup
-) {
+): Promise {
const { start, end, esFilterQuery, client, config } = setup;
const params: SearchParams = {
@@ -53,6 +55,6 @@ export async function getTransaction(
params.body.query.bool.filter.push({ term: { [TRACE_ID]: traceId } });
}
- const resp: SearchResponse = await client('search', params);
+ const resp = await client('search', params);
return oc(resp).hits.hits[0]._source() || null;
}
diff --git a/x-pack/plugins/apm/server/lib/transactions/spans/get_spans.ts b/x-pack/plugins/apm/server/lib/transactions/spans/get_spans.ts
index dc587dfd2f49b..e3c794c01a033 100644
--- a/x-pack/plugins/apm/server/lib/transactions/spans/get_spans.ts
+++ b/x-pack/plugins/apm/server/lib/transactions/spans/get_spans.ts
@@ -4,7 +4,6 @@
* you may not use this file except in compliance with the Elastic License.
*/
-import { SearchResponse } from 'elasticsearch';
import { Span } from 'x-pack/plugins/apm/typings/Span';
import {
PROCESSOR_EVENT,
@@ -14,11 +13,16 @@ import {
} from '../../../../common/constants';
import { Setup } from '../../helpers/setup_request';
-export async function getSpans(transactionId: string, setup: Setup) {
+export type SpanListAPIResponse = Span[];
+
+export async function getSpans(
+ transactionId: string,
+ setup: Setup
+): Promise {
const { start, end, client, config } = setup;
const params = {
- index: config.get('apm_oss.spanIndices'),
+ index: config.get('apm_oss.spanIndices'),
body: {
size: 500,
query: {
@@ -50,6 +54,6 @@ export async function getSpans(transactionId: string, setup: Setup) {
}
};
- const resp: SearchResponse = await client('search', params);
+ const resp = await client('search', params);
return resp.hits.hits.map(hit => hit._source);
}
diff --git a/x-pack/plugins/apm/server/routes/services.ts b/x-pack/plugins/apm/server/routes/services.ts
index ef7bbf6c86c86..e5d225c739356 100644
--- a/x-pack/plugins/apm/server/routes/services.ts
+++ b/x-pack/plugins/apm/server/routes/services.ts
@@ -21,7 +21,6 @@ const pre = [{ method: setupRequest, assign: 'setup' }];
const defaultErrorHandler = (err: Error) => {
// tslint:disable-next-line
console.error(err.stack);
- // @ts-ignore
throw Boom.boomify(err, { statusCode: 400 });
};
diff --git a/x-pack/plugins/apm/server/routes/traces.ts b/x-pack/plugins/apm/server/routes/traces.ts
index 7c291cf785128..f8a8a042286ca 100644
--- a/x-pack/plugins/apm/server/routes/traces.ts
+++ b/x-pack/plugins/apm/server/routes/traces.ts
@@ -16,7 +16,6 @@ const ROOT = '/api/apm/traces';
const defaultErrorHandler = (err: Error) => {
// tslint:disable-next-line
console.error(err.stack);
- // @ts-ignore
throw Boom.boomify(err, { statusCode: 400 });
};
diff --git a/x-pack/plugins/apm/server/routes/transactions.ts b/x-pack/plugins/apm/server/routes/transactions.ts
index 01311f896ef8d..fa1104534c074 100644
--- a/x-pack/plugins/apm/server/routes/transactions.ts
+++ b/x-pack/plugins/apm/server/routes/transactions.ts
@@ -9,9 +9,8 @@ import { Server } from 'hapi';
import Joi from 'joi';
import { withDefaultValidators } from '../lib/helpers/input_validation';
import { setupRequest } from '../lib/helpers/setup_request';
-// @ts-ignore
import { getTimeseriesData } from '../lib/transactions/charts/get_timeseries_data';
-import { getDistribution } from '../lib/transactions/distribution/get_distribution';
+import { getDistribution } from '../lib/transactions/distribution';
import { getTopTransactions } from '../lib/transactions/get_top_transactions';
import { getTransaction } from '../lib/transactions/get_transaction';
import { getSpans } from '../lib/transactions/spans/get_spans';
@@ -21,7 +20,6 @@ const ROOT = '/api/apm/services/{serviceName}/transactions';
const defaultErrorHandler = (err: Error) => {
// tslint:disable-next-line
console.error(err.stack);
- // @ts-ignore
throw Boom.boomify(err, { statusCode: 400 });
};
diff --git a/x-pack/plugins/apm/typings/APMDoc.ts b/x-pack/plugins/apm/typings/APMDoc.ts
index dc8fffad9bc30..1ca520132ba61 100644
--- a/x-pack/plugins/apm/typings/APMDoc.ts
+++ b/x-pack/plugins/apm/typings/APMDoc.ts
@@ -14,6 +14,7 @@ export interface APMDocV1 {
host: {
name: string;
};
+ agent?: object;
}
export interface APMDocV2 extends APMDocV1 {
@@ -46,6 +47,7 @@ export interface ContextService {
name: string;
version?: string;
};
+ [key: string]: unknown;
}
export interface Stackframe {
@@ -70,7 +72,7 @@ export interface Stackframe {
updated?: boolean;
error?: string;
};
- vars?: any;
+ vars?: unknown;
orig?: {
filename?: string;
abs_path?: string;
diff --git a/x-pack/plugins/apm/typings/Error.ts b/x-pack/plugins/apm/typings/Error.ts
index a4bacfeff62ce..b422b1d801a80 100644
--- a/x-pack/plugins/apm/typings/Error.ts
+++ b/x-pack/plugins/apm/typings/Error.ts
@@ -31,7 +31,7 @@ export interface Error extends APMDocV1 {
type?: string;
code?: string;
module?: string;
- attributes?: any;
+ attributes?: unknown;
handled?: boolean;
stacktrace?: Stackframe[];
};
diff --git a/x-pack/plugins/apm/typings/Span.ts b/x-pack/plugins/apm/typings/Span.ts
index b14a328a85988..5079d75c1d8a9 100644
--- a/x-pack/plugins/apm/typings/Span.ts
+++ b/x-pack/plugins/apm/typings/Span.ts
@@ -21,7 +21,7 @@ interface Processor {
interface Context {
db?: DbContext;
service: ContextService;
- [key: string]: any;
+ [key: string]: unknown;
}
export interface SpanV1 extends APMDocV1 {
diff --git a/x-pack/plugins/apm/typings/Transaction.ts b/x-pack/plugins/apm/typings/Transaction.ts
index 88ddcccff7de3..8498d47b00c01 100644
--- a/x-pack/plugins/apm/typings/Transaction.ts
+++ b/x-pack/plugins/apm/typings/Transaction.ts
@@ -21,19 +21,24 @@ interface ContextSystem {
interface Context {
process?: {
pid: number;
+ [key: string]: unknown;
};
service: ContextService;
system?: ContextSystem;
request: {
url: {
full: string;
+ [key: string]: string;
};
method: string;
+ [key: string]: unknown;
};
user?: {
id: string;
+ username?: string;
+ email?: string;
};
- [key: string]: any;
+ [key: string]: unknown;
}
interface Marks {
diff --git a/x-pack/plugins/apm/typings/TransactionGroup.ts b/x-pack/plugins/apm/typings/TransactionGroup.ts
deleted file mode 100644
index 3967d4d94d5cf..0000000000000
--- a/x-pack/plugins/apm/typings/TransactionGroup.ts
+++ /dev/null
@@ -1,16 +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 { Transaction } from './Transaction';
-
-export interface ITransactionGroup {
- name: string;
- sample: Transaction;
- p95: number;
- averageResponseTime: number;
- transactionsPerMinute: number;
- impact: number;
-}
diff --git a/x-pack/plugins/apm/typings/elasticsearch.ts b/x-pack/plugins/apm/typings/elasticsearch.ts
index f3a536e8993ff..35b58795ed1ca 100644
--- a/x-pack/plugins/apm/typings/elasticsearch.ts
+++ b/x-pack/plugins/apm/typings/elasticsearch.ts
@@ -4,7 +4,23 @@
* you may not use this file except in compliance with the Elastic License.
*/
+import { SearchResponse } from 'elasticsearch';
+
export interface TermsAggsBucket {
key: string;
doc_count: number;
}
+
+type Omit = Pick>;
+export type TopHits = Omit<
+ SearchResponse,
+ 'took' | 'timed_out' | '_shards'
+>;
+
+declare module 'elasticsearch' {
+ // extending SearchResponse to be able to have typed aggregations
+ export interface AggregationSearchResponse
+ extends SearchResponse {
+ aggregations: U;
+ }
+}
diff --git a/x-pack/plugins/apm/typings/waterfall.ts b/x-pack/plugins/apm/typings/lodash.mean.d.ts
similarity index 64%
rename from x-pack/plugins/apm/typings/waterfall.ts
rename to x-pack/plugins/apm/typings/lodash.mean.d.ts
index d33cdcda65cc3..c61f9adf9efd4 100644
--- a/x-pack/plugins/apm/typings/waterfall.ts
+++ b/x-pack/plugins/apm/typings/lodash.mean.d.ts
@@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
-import { Span } from './Span';
-import { Transaction } from './Transaction';
-
-export type WaterfallResponse = Array;
+declare module 'lodash.mean' {
+ function mean(numbers: number[]): number;
+ export = mean;
+}
diff --git a/x-pack/plugins/apm/typings/numeral.d.ts b/x-pack/plugins/apm/typings/numeral.d.ts
index d21595041f14d..f08f99f5ef11a 100644
--- a/x-pack/plugins/apm/typings/numeral.d.ts
+++ b/x-pack/plugins/apm/typings/numeral.d.ts
@@ -5,7 +5,7 @@
*/
interface Numeral {
- (value?: any): Numeral;
+ (value?: unknown): Numeral;
format: (pattern: string) => string;
}
diff --git a/yarn.lock b/yarn.lock
index e12b32d3a855a..13efda1fa47aa 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1032,143 +1032,16 @@
"@types/cp-file" "*"
"@types/glob" "*"
-"@types/d3-array@*":
- version "1.2.3"
- resolved "https://registry.yarnpkg.com/@types/d3-array/-/d3-array-1.2.3.tgz#dd141e3ba311485fffbf0792a1b01a7f2ec12dc1"
- integrity sha512-yTO4ws1jnWC7iSKK8j7sUAGKIcJ628ioiGTdyXmPd36cNnuY9fDcjgEW2r19yXWuQFLu61/JhHVZ8RYYTEzFSg==
-
"@types/d3-array@^1.2.1":
version "1.2.1"
resolved "https://registry.yarnpkg.com/@types/d3-array/-/d3-array-1.2.1.tgz#e489605208d46a1c9d980d2e5772fa9c75d9ec65"
integrity sha512-YBaAfimGdWE4nDuoGVKsH89/dkz2hWZ0i8qC+xxqmqi+XJ/aXiRF0jPtzXmN7VdkpVjy1xuDmM5/m1FNuB6VWA==
-"@types/d3-axis@*":
- version "1.0.11"
- resolved "https://registry.yarnpkg.com/@types/d3-axis/-/d3-axis-1.0.11.tgz#efd975f9fec14c2afd03828f3acec0ef97d37c3b"
- integrity sha512-cuigApCyCwYJxaQPghj+BqaxzbdRdT/lpZBMtF7EuEIJ61NMQ8yvGnqFvHCIgJEmUu2Wb2wiZqy9kiHi3Ddftg==
- dependencies:
- "@types/d3-selection" "*"
-
-"@types/d3-brush@*":
- version "1.0.9"
- resolved "https://registry.yarnpkg.com/@types/d3-brush/-/d3-brush-1.0.9.tgz#c71070845946eeee4cf330e04123a3997e6476bf"
- integrity sha512-mAx8IVc0luUHfk51pl0UN1vzybnAzLMUsvIwLt3fbsqqPkSXr+Pu1AxOPPeyNc27LhHJnfH/LCV7Jlv+Yzqu1A==
- dependencies:
- "@types/d3-selection" "*"
-
-"@types/d3-chord@*":
- version "1.0.8"
- resolved "https://registry.yarnpkg.com/@types/d3-chord/-/d3-chord-1.0.8.tgz#08c0fbb10281be0a5b3fdf48c9c081af02f79fb6"
- integrity sha512-F0ftYOo7FenAIxsRjXLt8vbij0NLDuVcL+xaGY7R9jUmF2Mrpj1T5XukBI9Cad+Ei7YSxEWREIO+CYcaKCl2qQ==
-
-"@types/d3-collection@*":
- version "1.0.7"
- resolved "https://registry.yarnpkg.com/@types/d3-collection/-/d3-collection-1.0.7.tgz#829e1db477d6bbbcdc038cbc489f22798752d707"
- integrity sha512-vR3BT0GwHc5y93Jv6bxn3zoxP/vGu+GdXu/r1ApjbP9dLk9I2g6NiV7iP/QMQSuFZd0It0n/qWrfXHxCWwHIkg==
-
-"@types/d3-color@*":
- version "1.2.1"
- resolved "https://registry.yarnpkg.com/@types/d3-color/-/d3-color-1.2.1.tgz#26141c3c554e320edd40726b793570a3ae57397e"
- integrity sha512-xwb1tqvYNWllbHuhMFhiXk63Imf+QNq/dJdmbXmr2wQVnwGenCuj3/0IWJ9hdIFQIqzvhT7T37cvx93jtAsDbQ==
-
-"@types/d3-contour@*":
- version "1.2.2"
- resolved "https://registry.yarnpkg.com/@types/d3-contour/-/d3-contour-1.2.2.tgz#b32256b55aed9e2113f88a8ea23846e357fa386c"
- integrity sha512-2BIp8c80HWJP/K6t7hov6CX6G/9LWPaf1IkRXmAY3xRDr293u6OxQDSsJNc8IHl3SDWfrUw9mZhBIavS5UOGKg==
- dependencies:
- "@types/d3-array" "*"
- "@types/geojson" "*"
-
-"@types/d3-dispatch@*":
- version "1.0.6"
- resolved "https://registry.yarnpkg.com/@types/d3-dispatch/-/d3-dispatch-1.0.6.tgz#19b173f669cd2ab7dd3d862e8037aae1a98c7508"
- integrity sha512-xyWJQMr832vqhu6fD/YqX+MSFBWnkxasNhcStvlhqygXxj0cKqPft0wuGoH5TIq5ADXgP83qeNVa4R7bEYN3uA==
-
-"@types/d3-drag@*":
- version "1.2.1"
- resolved "https://registry.yarnpkg.com/@types/d3-drag/-/d3-drag-1.2.1.tgz#6394bcf2f6414140b3b0d521259cadc6fa1da926"
- integrity sha512-J9liJ4NNeV0oN40MzPiqwWjqNi3YHCRtHNfNMZ1d3uL9yh1+vDuo346LBEr8yyBm30WHvrHssAkExVZrGCswtA==
- dependencies:
- "@types/d3-selection" "*"
-
-"@types/d3-dsv@*":
- version "1.0.33"
- resolved "https://registry.yarnpkg.com/@types/d3-dsv/-/d3-dsv-1.0.33.tgz#18de1867927f7ec898671aef82f730f16d4c7fcb"
- integrity sha512-jx5YvaVC3Wfh6LobaiWTeU1NkvL2wPmmpmajk618bD+xVz98yNWzmZMvmlPHGK0HXbMeHmW/6oVX48V9AH1bRQ==
-
-"@types/d3-ease@*":
- version "1.0.7"
- resolved "https://registry.yarnpkg.com/@types/d3-ease/-/d3-ease-1.0.7.tgz#93a301868be9e15061f3d44343b1ab3f8acb6f09"
- integrity sha1-k6MBhovp4VBh89RDQ7GrP4rLbwk=
-
-"@types/d3-fetch@*":
- version "1.1.2"
- resolved "https://registry.yarnpkg.com/@types/d3-fetch/-/d3-fetch-1.1.2.tgz#a59921477e25850ca6b3353e03d5d29e5a0e8e03"
- integrity sha512-w6ANZv/mUh+6IV3drT22zgPWMRobzuGXhzOZC8JPD+ygce0/Vx6vTci3m3dizkocnQQCOwNbrWWWPYqpWiKzRQ==
- dependencies:
- "@types/d3-dsv" "*"
-
-"@types/d3-force@*":
- version "1.1.1"
- resolved "https://registry.yarnpkg.com/@types/d3-force/-/d3-force-1.1.1.tgz#185c18b77932df63457894bd36d0d6e9692546c0"
- integrity sha512-ePkELuaFWY4yOuf+Bvx5Xd+ihFiYG4bdnW0BlvigovIm8Sob2t76e9RGO6lybQbv6AlW9Icn9HuZ9fmdzEoJyg==
-
-"@types/d3-format@*":
- version "1.3.0"
- resolved "https://registry.yarnpkg.com/@types/d3-format/-/d3-format-1.3.0.tgz#c5e115fac8e6861ce656fe9861892b22f6b0cfcb"
- integrity sha512-ZiY4j3iJvAdOwzwW24WjlZbUNvqOsnPAMfPBmdXqxj3uKJbrzBlRrdGl5uC89pZpFs9Dc92E81KcwG2uEgkIZA==
-
-"@types/d3-geo@*":
- version "1.10.3"
- resolved "https://registry.yarnpkg.com/@types/d3-geo/-/d3-geo-1.10.3.tgz#3c01b2baa480e1108301096328dc2837e7ff4d8a"
- integrity sha512-hfdaxM2L0wA9mDZrrSf2o+DyhEpnJYCiAN+lHFtpfZOVCQrYBA5g33sGRpUbAvjSMyO5jkHbftMWPEhuCMChSg==
- dependencies:
- "@types/geojson" "*"
-
-"@types/d3-hierarchy@*":
- version "1.1.4"
- resolved "https://registry.yarnpkg.com/@types/d3-hierarchy/-/d3-hierarchy-1.1.4.tgz#b04dfcb1f2074da789ada10fe4942d13f0bce421"
- integrity sha512-+d2VLfLPgW66VB7k56T8tC4LobfS6Rrhm+1pmYPMmlCpO5rccJLuwux7YXl/eGVst3Bhb5PJTN5/oaJERpNw8g==
-
-"@types/d3-interpolate@*":
- version "1.3.0"
- resolved "https://registry.yarnpkg.com/@types/d3-interpolate/-/d3-interpolate-1.3.0.tgz#65b9627900bfdd82474875d9b23d574a4388af7c"
- integrity sha512-Ng4ds7kPSvP/c3W3J5PPUQlgewif1tGBqCeh5lgY+UG82Y7H9zQ8c2gILsEFDLg7wRGOwnuKZ940Q/LSN14w9w==
- dependencies:
- "@types/d3-color" "*"
-
"@types/d3-path@*":
version "1.0.7"
resolved "https://registry.yarnpkg.com/@types/d3-path/-/d3-path-1.0.7.tgz#a0736fceed688a695f48265a82ff7a3369414b81"
integrity sha512-U8dFRG+8WhkLJr2sxZ9Cw/5WeRgBnNqMxGdA1+Z0+ZG6tK0s75OQ4OXnxeyfKuh6E4wQPY8OAKr1+iNDx01BEQ==
-"@types/d3-polygon@*":
- version "1.0.6"
- resolved "https://registry.yarnpkg.com/@types/d3-polygon/-/d3-polygon-1.0.6.tgz#db25c630a2afb9191fe51ba61dd37baee9dd44c7"
- integrity sha512-E6Kyodn9JThgLq20nxSbEce9ow5/ePgm9PX2EO6W1INIL4DayM7cFaiG10DStuamjYAd0X4rntW2q+GRjiIktw==
-
-"@types/d3-quadtree@*":
- version "1.0.6"
- resolved "https://registry.yarnpkg.com/@types/d3-quadtree/-/d3-quadtree-1.0.6.tgz#45da9e603688ba90eedd3d40f6e504764e06e493"
- integrity sha512-sphVuDdiSIaxLt9kQgebJW98pTktQ/xuN7Ysd8X68Rnjeg/q8+c36/ShlqU52qoKg9nob/JEHH1uQMdxURZidQ==
-
-"@types/d3-random@*":
- version "1.1.1"
- resolved "https://registry.yarnpkg.com/@types/d3-random/-/d3-random-1.1.1.tgz#38647ce2ff4ce7d0d56974334c1c4092513c8b9f"
- integrity sha512-jUPeBq1XKK9/5XasTvy5QAUwFeMsjma2yt/nP02yC2Tijovx7i/W5776U/HZugxc5SSmtpx4Z3g9KFVon0QrjQ==
-
-"@types/d3-scale-chromatic@*":
- version "1.3.0"
- resolved "https://registry.yarnpkg.com/@types/d3-scale-chromatic/-/d3-scale-chromatic-1.3.0.tgz#b8b58a7a262a583fc1c95ce851d5a75811875034"
- integrity sha512-JqQH5uu1kmdQEa6XSu7NYzQM71lL1YreBPS5o8SnmEDcBRKL6ooykXa8iFPPOEUiTah25ydi+cTrbsogBSMNSQ==
-
-"@types/d3-scale@*":
- version "2.0.2"
- resolved "https://registry.yarnpkg.com/@types/d3-scale/-/d3-scale-2.0.2.tgz#61145948aa1a52ab31384766cd013308699112b3"
- integrity sha512-pnmZsEVwTyX+68bjG9r3XXUBASUF6z3Ir2nlrv81mWCH9yqeRscR98myMNP5OwDd9urUnvjNabJul5B9K0+F2w==
- dependencies:
- "@types/d3-time" "*"
-
"@types/d3-scale@^2.0.0":
version "2.0.1"
resolved "https://registry.yarnpkg.com/@types/d3-scale/-/d3-scale-2.0.1.tgz#f94cd991c50422b2e68d8f43be3f9fffdb1ae7be"
@@ -1176,18 +1049,6 @@
dependencies:
"@types/d3-time" "*"
-"@types/d3-selection@*":
- version "1.3.2"
- resolved "https://registry.yarnpkg.com/@types/d3-selection/-/d3-selection-1.3.2.tgz#dd5661a560ba9ce3aba823c424b8d4a1bc7e833f"
- integrity sha512-K23sDOi7yMussv7aiqk097IWWbjFYbJpcDppQAcaf6DfmHxAsjr+6N4HJGokETLDuV7y/qJeeIJINPnkWJM5Hg==
-
-"@types/d3-shape@*":
- version "1.2.4"
- resolved "https://registry.yarnpkg.com/@types/d3-shape/-/d3-shape-1.2.4.tgz#e65585f2254d83ae42c47af2e730dd9b97952996"
- integrity sha512-X4Xq2mpChPIMDMAXwLfxHKLbqv+sowkJ94bENeSMqqhQJ5v4oXuoyLo0vnIkydVbuQ52ZwPplk219K0m2HJODg==
- dependencies:
- "@types/d3-path" "*"
-
"@types/d3-shape@^1.2.2":
version "1.2.3"
resolved "https://registry.yarnpkg.com/@types/d3-shape/-/d3-shape-1.2.3.tgz#cadc9f93a626db9190f306048a650df4ffa4e500"
@@ -1195,7 +1056,7 @@
dependencies:
"@types/d3-path" "*"
-"@types/d3-time-format@*", "@types/d3-time-format@^2.1.0":
+"@types/d3-time-format@^2.1.0":
version "2.1.0"
resolved "https://registry.yarnpkg.com/@types/d3-time-format/-/d3-time-format-2.1.0.tgz#011e0fb7937be34a9a8f580ae1e2f2f1336a8a22"
integrity sha512-/myT3I7EwlukNOX2xVdMzb8FRgNzRMpsZddwst9Ld/VFe6LyJyRp0s32l/V9XoUzk+Gqu56F/oGk6507+8BxrA==
@@ -1205,67 +1066,10 @@
resolved "https://registry.yarnpkg.com/@types/d3-time/-/d3-time-1.0.8.tgz#6c083127b330b3c2fc65cd0f3a6e9cbd9607b28c"
integrity sha512-/UCphyyw97YAq4zKsuXH33R3UNB4jDSza0fLvMubWr/ONh9IePi1NbgFP222blhiCe724ebJs8U87+aDuAq/jA==
-"@types/d3-timer@*":
- version "1.0.8"
- resolved "https://registry.yarnpkg.com/@types/d3-timer/-/d3-timer-1.0.8.tgz#a3441d9605367059e14ad8c3494132143cbc8d58"
- integrity sha512-AKUgQ/nljUFcUO2P3gK24weVI5XwUTdJvjoh8gJ0yxT4aJ+d7t2Or3TB+k9dEYl14BAjoj32D0ky+YzQSVszfg==
-
-"@types/d3-transition@*":
- version "1.1.3"
- resolved "https://registry.yarnpkg.com/@types/d3-transition/-/d3-transition-1.1.3.tgz#efcf4941dae22135d595514ba488f4f370d396b0"
- integrity sha512-1EukXNuVu/z2G1GZpZagzFJnie9C5zze17ox/vhTgGXNy46rYAm4UkhLLlUeeZ1ndq88k95SOeC8898RpKMLOQ==
- dependencies:
- "@types/d3-selection" "*"
-
-"@types/d3-voronoi@*":
- version "1.1.8"
- resolved "https://registry.yarnpkg.com/@types/d3-voronoi/-/d3-voronoi-1.1.8.tgz#a039cb8368bce4efc1a70aebe744d210851cf1a7"
- integrity sha512-zqNhW7QsYQGlfOdrwPNPG3Wk64zUa4epKRurkJ/dVc6oeXrB+iTDt8sRZ0KZKOOXvvfa1dcdB0e45TZeLBiodQ==
-
-"@types/d3-zoom@*":
- version "1.7.2"
- resolved "https://registry.yarnpkg.com/@types/d3-zoom/-/d3-zoom-1.7.2.tgz#ee67f063199c179949d83b6b1e6166207de5f06e"
- integrity sha512-/ORNUzQ0g7h2f34L/hD1o+IytOjpNLwEf403yKmYAA+z3LC8eCH6xCKaCc0weuCWwiaZ2UqBW41Y6ciqjd+ndQ==
- dependencies:
- "@types/d3-interpolate" "*"
- "@types/d3-selection" "*"
-
-"@types/d3@^5.0.0":
- version "5.0.0"
- resolved "https://registry.yarnpkg.com/@types/d3/-/d3-5.0.0.tgz#fec49f2aea0f0784f829eff38132926e92676d57"
- integrity sha512-BVfPw7ha+UgsG24v6ymerMY4+pJgQ/6p+hJA4loCeaaqV9snGS/G6ReVaQEn8Himn67dWn/Je9WhRbnDO7MzLw==
- dependencies:
- "@types/d3-array" "*"
- "@types/d3-axis" "*"
- "@types/d3-brush" "*"
- "@types/d3-chord" "*"
- "@types/d3-collection" "*"
- "@types/d3-color" "*"
- "@types/d3-contour" "*"
- "@types/d3-dispatch" "*"
- "@types/d3-drag" "*"
- "@types/d3-dsv" "*"
- "@types/d3-ease" "*"
- "@types/d3-fetch" "*"
- "@types/d3-force" "*"
- "@types/d3-format" "*"
- "@types/d3-geo" "*"
- "@types/d3-hierarchy" "*"
- "@types/d3-interpolate" "*"
- "@types/d3-path" "*"
- "@types/d3-polygon" "*"
- "@types/d3-quadtree" "*"
- "@types/d3-random" "*"
- "@types/d3-scale" "*"
- "@types/d3-scale-chromatic" "*"
- "@types/d3-selection" "*"
- "@types/d3-shape" "*"
- "@types/d3-time" "*"
- "@types/d3-time-format" "*"
- "@types/d3-timer" "*"
- "@types/d3-transition" "*"
- "@types/d3-voronoi" "*"
- "@types/d3-zoom" "*"
+"@types/d3@^3.5.41":
+ version "3.5.41"
+ resolved "https://registry.yarnpkg.com/@types/d3/-/d3-3.5.41.tgz#57f08fc79b75f0fecb0b3547abc22e46e9d660e4"
+ integrity sha512-dInnr7nSPsofnLggOf70xvsInUjf3tRrE8XmxsioXALWQHkwEWi7RhTBCa9mYmiUDHMtuanSDN/JOW187ChIhw==
"@types/dedent@^0.7.0":
version "0.7.0"
@@ -1353,11 +1157,6 @@
dependencies:
"@types/node" "*"
-"@types/geojson@*":
- version "7946.0.4"
- resolved "https://registry.yarnpkg.com/@types/geojson/-/geojson-7946.0.4.tgz#4e049756383c3f055dd8f3d24e63fb543e98eb07"
- integrity sha512-MHmwBtCb7OCv1DSivz2UNJXPGU/1btAWRKlqJ2saEhVJkpkvqHMMaOpKg0v4sAbDWSQekHGvPVMM8nQ+Jen03Q==
-
"@types/getopts@^2.0.0":
version "2.0.0"
resolved "https://registry.yarnpkg.com/@types/getopts/-/getopts-2.0.0.tgz#8a603370cb367d3192bd8012ad39ab2320b5b476"
@@ -1435,6 +1234,11 @@
resolved "https://registry.yarnpkg.com/@types/hoek/-/hoek-4.1.3.tgz#d1982d48fb0d2a0e5d7e9d91838264d8e428d337"
integrity sha1-0ZgtSPsNKg5dfp2Rg4Jk2OQo0zc=
+"@types/humps@^1.1.2":
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/@types/humps/-/humps-1.1.2.tgz#fbcaf596d20ff2ed78f8f511c5d6a943b51101d6"
+ integrity sha1-+8r1ltIP8u14+PURxdapQ7URAdY=
+
"@types/indent-string@^3.0.0":
version "3.0.0"
resolved "https://registry.yarnpkg.com/@types/indent-string/-/indent-string-3.0.0.tgz#9ebb391ceda548926f5819ad16405349641b999f"