diff --git a/x-pack/plugins/apm/public/components/app/TraceOverview/TraceList.tsx b/x-pack/plugins/apm/public/components/app/TraceOverview/TraceList.tsx index 898e32f5c2c093..f54255ec0cd186 100644 --- a/x-pack/plugins/apm/public/components/app/TraceOverview/TraceList.tsx +++ b/x-pack/plugins/apm/public/components/app/TraceOverview/TraceList.tsx @@ -9,7 +9,7 @@ import { i18n } from '@kbn/i18n'; import React from 'react'; import styled from 'styled-components'; // eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { ITransactionGroup } from '../../../../server/lib/transaction_groups/transform'; +import { TransactionGroup } from '../../../../server/lib/transaction_groups/fetcher'; import { fontSizes, truncate } from '../../../style/variables'; import { asMillisecondDuration } from '../../../utils/formatters'; import { EmptyMessage } from '../../shared/EmptyMessage'; @@ -24,11 +24,11 @@ const StyledTransactionLink = styled(TransactionDetailLink)` `; interface Props { - items: ITransactionGroup[]; + items: TransactionGroup[]; isLoading: boolean; } -const traceListColumns: Array> = [ +const traceListColumns: Array> = [ { field: 'name', name: i18n.translate('xpack.apm.tracesTable.nameColumnLabel', { @@ -36,8 +36,8 @@ const traceListColumns: Array> = [ }), width: '40%', sortable: true, - render: (name: string, { sample }: ITransactionGroup) => ( - + render: (_: string, { sample }: TransactionGroup) => ( + > = [ transactionName={sample.transaction.name} transactionType={sample.transaction.type} > - {name} + {sample.transaction.name} ), diff --git a/x-pack/plugins/apm/public/components/app/TransactionOverview/List/index.tsx b/x-pack/plugins/apm/public/components/app/TransactionOverview/List/index.tsx index ae1b07bde0c87a..2b1c1b8e8c11c8 100644 --- a/x-pack/plugins/apm/public/components/app/TransactionOverview/List/index.tsx +++ b/x-pack/plugins/apm/public/components/app/TransactionOverview/List/index.tsx @@ -10,7 +10,7 @@ import React, { useMemo } from 'react'; import styled from 'styled-components'; import { NOT_AVAILABLE_LABEL } from '../../../../../common/i18n'; // eslint-disable-next-line @kbn/eslint/no-restricted-paths -import { ITransactionGroup } from '../../../../../server/lib/transaction_groups/transform'; +import { TransactionGroup } from '../../../../../server/lib/transaction_groups/fetcher'; import { fontFamilyCode, truncate } from '../../../../style/variables'; import { asDecimal, asMillisecondDuration } from '../../../../utils/formatters'; import { ImpactBar } from '../../../shared/ImpactBar'; @@ -25,12 +25,12 @@ const TransactionNameLink = styled(TransactionDetailLink)` `; interface Props { - items: ITransactionGroup[]; + items: TransactionGroup[]; isLoading: boolean; } export function TransactionList({ items, isLoading }: Props) { - const columns: Array> = useMemo( + const columns: Array> = useMemo( () => [ { field: 'name', @@ -39,11 +39,11 @@ export function TransactionList({ items, isLoading }: Props) { }), width: '50%', sortable: true, - render: (transactionName: string, { sample }: ITransactionGroup) => { + render: (_, { sample }: TransactionGroup) => { return ( - {transactionName || NOT_AVAILABLE_LABEL} + {sample.transaction.name || NOT_AVAILABLE_LABEL} ); diff --git a/x-pack/plugins/apm/public/hooks/useTransactionList.ts b/x-pack/plugins/apm/public/hooks/useTransactionList.ts index ed6bb9309a557c..0ad221b95b4ffe 100644 --- a/x-pack/plugins/apm/public/hooks/useTransactionList.ts +++ b/x-pack/plugins/apm/public/hooks/useTransactionList.ts @@ -4,45 +4,15 @@ * you may not use this file except in compliance with the Elastic License. */ -import { useMemo } from 'react'; import { IUrlParams } from '../context/UrlParamsContext/types'; import { useUiFilters } from '../context/UrlParamsContext'; import { useFetcher } from './useFetcher'; import { APIReturnType } from '../services/rest/createCallApmApi'; -const getRelativeImpact = ( - impact: number, - impactMin: number, - impactMax: number -) => - Math.max( - ((impact - impactMin) / Math.max(impactMax - impactMin, 1)) * 100, - 1 - ); - type TransactionsAPIResponse = APIReturnType< '/api/apm/services/{serviceName}/transaction_groups' >; -function getWithRelativeImpact(items: TransactionsAPIResponse['items']) { - const impacts = items - .map(({ impact }) => impact) - .filter((impact) => impact !== null) as number[]; - - const impactMin = Math.min(...impacts); - const impactMax = Math.max(...impacts); - - return items.map((item) => { - return { - ...item, - impactRelative: - item.impact !== null - ? getRelativeImpact(item.impact, impactMin, impactMax) - : null, - }; - }); -} - const DEFAULT_RESPONSE: TransactionsAPIResponse = { items: [], isAggregationAccurate: true, @@ -72,16 +42,8 @@ export function useTransactionList(urlParams: IUrlParams) { [serviceName, start, end, transactionType, uiFilters] ); - const memoizedData = useMemo( - () => ({ - items: getWithRelativeImpact(data.items), - isAggregationAccurate: data.isAggregationAccurate, - bucketSize: data.bucketSize, - }), - [data] - ); return { - data: memoizedData, + data, status, error, }; diff --git a/x-pack/plugins/apm/scripts/aggregate-latency-metrics/index.ts b/x-pack/plugins/apm/scripts/aggregate-latency-metrics/index.ts index 28b095335e93d8..c3cf363cbec057 100644 --- a/x-pack/plugins/apm/scripts/aggregate-latency-metrics/index.ts +++ b/x-pack/plugins/apm/scripts/aggregate-latency-metrics/index.ts @@ -10,7 +10,7 @@ import pLimit from 'p-limit'; import pRetry from 'p-retry'; import { parse, format } from 'url'; import { set } from '@elastic/safer-lodash-set'; -import { unique, without, merge, flatten } from 'lodash'; +import { uniq, without, merge, flatten } from 'lodash'; import * as histogram from 'hdr-histogram-js'; import { ESSearchResponse } from '../../typings/elasticsearch'; import { @@ -114,8 +114,8 @@ export async function aggregateLatencyMetrics() { .filter(Boolean) as string[]; const fields = only.length - ? unique(only) - : without(unique([...include, ...defaultFields]), ...exclude); + ? uniq(only) + : without(uniq([...include, ...defaultFields]), ...exclude); const globalFilter = argv.filter ? JSON.parse(String(argv.filter)) : {}; diff --git a/x-pack/plugins/apm/scripts/shared/read-kibana-config.ts b/x-pack/plugins/apm/scripts/shared/read-kibana-config.ts index bc5f1afc63cacb..fe226c8ab27d23 100644 --- a/x-pack/plugins/apm/scripts/shared/read-kibana-config.ts +++ b/x-pack/plugins/apm/scripts/shared/read-kibana-config.ts @@ -6,7 +6,7 @@ import path from 'path'; import fs from 'fs'; import yaml from 'js-yaml'; -import { identity, pick } from 'lodash'; +import { identity, pickBy } from 'lodash'; export type KibanaConfig = ReturnType; @@ -22,7 +22,7 @@ export const readKibanaConfig = () => { ) ) || {}) as {}; - const cliEsCredentials = pick( + const cliEsCredentials = pickBy( { 'elasticsearch.username': process.env.ELASTICSEARCH_USERNAME, 'elasticsearch.password': process.env.ELASTICSEARCH_PASSWORD, diff --git a/x-pack/plugins/apm/server/lib/alerts/register_transaction_duration_alert_type.ts b/x-pack/plugins/apm/server/lib/alerts/register_transaction_duration_alert_type.ts index 1d14c509274a89..a922457b14cea7 100644 --- a/x-pack/plugins/apm/server/lib/alerts/register_transaction_duration_alert_type.ts +++ b/x-pack/plugins/apm/server/lib/alerts/register_transaction_duration_alert_type.ts @@ -157,7 +157,7 @@ export function registerTransactionDurationAlertType({ const { agg } = response.aggregations; - const value = 'values' in agg ? agg.values[0] : agg?.value; + const value = 'values' in agg ? Object.values(agg.values)[0] : agg?.value; if (value && value > alertParams.threshold * 1000) { const alertInstance = services.alertInstanceFactory( diff --git a/x-pack/plugins/apm/server/lib/metrics/fetch_and_transform_metrics.ts b/x-pack/plugins/apm/server/lib/metrics/fetch_and_transform_metrics.ts index 6de2728ee4366b..895920a9b6c7d5 100644 --- a/x-pack/plugins/apm/server/lib/metrics/fetch_and_transform_metrics.ts +++ b/x-pack/plugins/apm/server/lib/metrics/fetch_and_transform_metrics.ts @@ -4,7 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ -import { Unionize } from 'utility-types'; +import { Unionize, Overwrite } from 'utility-types'; +import { ESSearchRequest } from '../../../typings/elasticsearch'; import { Setup, SetupTimeRange, @@ -17,14 +18,28 @@ import { getMetricsProjection } from '../../../common/projections/metrics'; import { mergeProjection } from '../../../common/projections/util/merge_projection'; import { AggregationOptionsByType } from '../../../typings/elasticsearch/aggregations'; -interface Aggs { - [key: string]: Unionize<{ - min: AggregationOptionsByType['min']; - max: AggregationOptionsByType['max']; - sum: AggregationOptionsByType['sum']; - avg: AggregationOptionsByType['avg']; - }>; -} +type MetricsAggregationMap = Unionize<{ + min: AggregationOptionsByType['min']; + max: AggregationOptionsByType['max']; + sum: AggregationOptionsByType['sum']; + avg: AggregationOptionsByType['avg']; +}>; + +type MetricAggs = Record; + +export type GenericMetricsRequest = Overwrite< + ESSearchRequest, + { + body: { + aggs: { + timeseriesData: { + date_histogram: AggregationOptionsByType['date_histogram']; + aggs: MetricAggs; + }; + } & MetricAggs; + }; + } +>; interface Filter { exists?: { @@ -35,7 +50,7 @@ interface Filter { }; } -export async function fetchAndTransformMetrics({ +export async function fetchAndTransformMetrics({ setup, serviceName, serviceNodeName, @@ -58,7 +73,7 @@ export async function fetchAndTransformMetrics({ serviceNodeName, }); - const params = mergeProjection(projection, { + const params: GenericMetricsRequest = mergeProjection(projection, { body: { size: 0, query: { diff --git a/x-pack/plugins/apm/server/lib/metrics/transform_metrics_chart.ts b/x-pack/plugins/apm/server/lib/metrics/transform_metrics_chart.ts index affb7c2a120750..a191d5400e36cf 100644 --- a/x-pack/plugins/apm/server/lib/metrics/transform_metrics_chart.ts +++ b/x-pack/plugins/apm/server/lib/metrics/transform_metrics_chart.ts @@ -4,40 +4,15 @@ * you may not use this file except in compliance with the Elastic License. */ import theme from '@elastic/eui/dist/eui_theme_light.json'; -import { Unionize, Overwrite } from 'utility-types'; import { ChartBase } from './types'; -import { - ESSearchResponse, - ESSearchRequest, -} from '../../../typings/elasticsearch'; -import { AggregationOptionsByType } from '../../../typings/elasticsearch/aggregations'; +import { ESSearchResponse } from '../../../typings/elasticsearch'; import { getVizColorForIndex } from '../../../common/viz_colors'; +import { GenericMetricsRequest } from './fetch_and_transform_metrics'; export type GenericMetricsChart = ReturnType< typeof transformDataToMetricsChart >; -interface MetricsAggregationMap { - min: AggregationOptionsByType['min']; - max: AggregationOptionsByType['max']; - sum: AggregationOptionsByType['sum']; - avg: AggregationOptionsByType['avg']; -} - -type GenericMetricsRequest = Overwrite< - ESSearchRequest, - { - body: { - aggs: { - timeseriesData: { - date_histogram: AggregationOptionsByType['date_histogram']; - aggs: Record>; - }; - } & Record>; - }; - } ->; - export function transformDataToMetricsChart( result: ESSearchResponse, chartBase: ChartBase @@ -51,11 +26,7 @@ export function transformDataToMetricsChart( yUnit: chartBase.yUnit, noHits: hits.total.value === 0, series: Object.keys(chartBase.series).map((seriesKey, i) => { - const overallValue = (aggregations?.[seriesKey] as - | { - value: number | null; - } - | undefined)?.value; + const overallValue = aggregations?.[seriesKey]?.value; return { title: chartBase.series[seriesKey].title, @@ -66,7 +37,7 @@ export function transformDataToMetricsChart( overallValue, data: timeseriesData?.buckets.map((bucket) => { - const { value } = bucket[seriesKey] as { value: number | null }; + const { value } = bucket[seriesKey]; const y = value === null || isNaN(value) ? null : value; return { x: bucket.key, diff --git a/x-pack/plugins/apm/server/lib/services/get_services/get_services_items_stats.ts b/x-pack/plugins/apm/server/lib/services/get_services/get_services_items_stats.ts index c28bcad841ffd8..de699028f56754 100644 --- a/x-pack/plugins/apm/server/lib/services/get_services/get_services_items_stats.ts +++ b/x-pack/plugins/apm/server/lib/services/get_services/get_services_items_stats.ts @@ -4,7 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -import { arrayUnionToCallable } from '../../../../common/utils/array_union_to_callable'; import { PROCESSOR_EVENT, TRANSACTION_DURATION, @@ -187,7 +186,7 @@ export const getTransactionRates = async ({ const deltaAsMinutes = getDeltaAsMinutes(setup); - return arrayUnionToCallable(aggregations.services.buckets).map((bucket) => { + return aggregations.services.buckets.map((bucket) => { const transactionsPerMinute = bucket.doc_count / deltaAsMinutes; return { serviceName: bucket.key as string, 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 deleted file mode 100644 index b354d3ed1f88db..00000000000000 --- a/x-pack/plugins/apm/server/lib/transaction_groups/__snapshots__/fetcher.test.ts.snap +++ /dev/null @@ -1,228 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`transactionGroupsFetcher type: top_traces should call client.search with correct query 1`] = ` -Array [ - Array [ - Object { - "body": Object { - "aggs": Object { - "transaction_groups": Object { - "aggs": Object { - "avg": Object { - "avg": Object { - "field": "transaction.duration.us", - }, - }, - "p95": Object { - "percentiles": Object { - "field": "transaction.duration.us", - "hdr": Object { - "number_of_significant_value_digits": 2, - }, - "percents": Array [ - 95, - ], - }, - }, - "sample": Object { - "top_hits": Object { - "size": 1, - "sort": Array [ - Object { - "_score": "desc", - }, - Object { - "@timestamp": Object { - "order": "desc", - }, - }, - ], - }, - }, - "sum": Object { - "sum": Object { - "field": "transaction.duration.us", - }, - }, - }, - "composite": Object { - "size": 10000, - "sources": Array [ - Object { - "service": Object { - "terms": Object { - "field": "service.name", - }, - }, - }, - Object { - "transaction": Object { - "terms": Object { - "field": "transaction.name", - }, - }, - }, - ], - }, - }, - }, - "query": Object { - "bool": Object { - "filter": Array [ - Object { - "range": Object { - "@timestamp": Object { - "format": "epoch_millis", - "gte": 1528113600000, - "lte": 1528977600000, - }, - }, - }, - Object { - "term": Object { - "processor.event": "transaction", - }, - }, - Object { - "term": Object { - "service.environment": "test", - }, - }, - ], - "must_not": Array [ - Object { - "exists": Object { - "field": "parent.id", - }, - }, - ], - "should": Array [ - Object { - "term": Object { - "transaction.sampled": true, - }, - }, - ], - }, - }, - "size": 0, - }, - "index": "myIndex", - }, - ], -] -`; - -exports[`transactionGroupsFetcher type: top_transactions should call client.search with correct query 1`] = ` -Array [ - Array [ - Object { - "body": Object { - "aggs": Object { - "transaction_groups": Object { - "aggs": Object { - "avg": Object { - "avg": Object { - "field": "transaction.duration.us", - }, - }, - "p95": Object { - "percentiles": Object { - "field": "transaction.duration.us", - "hdr": Object { - "number_of_significant_value_digits": 2, - }, - "percents": Array [ - 95, - ], - }, - }, - "sample": Object { - "top_hits": Object { - "size": 1, - "sort": Array [ - Object { - "_score": "desc", - }, - Object { - "@timestamp": Object { - "order": "desc", - }, - }, - ], - }, - }, - "sum": Object { - "sum": Object { - "field": "transaction.duration.us", - }, - }, - }, - "composite": Object { - "size": 101, - "sources": Array [ - Object { - "transaction": Object { - "terms": Object { - "field": "transaction.name", - }, - }, - }, - ], - }, - }, - "transactions": Object { - "terms": Object { - "field": "transaction.name", - }, - }, - }, - "query": Object { - "bool": Object { - "filter": Array [ - Object { - "range": Object { - "@timestamp": Object { - "format": "epoch_millis", - "gte": 1528113600000, - "lte": 1528977600000, - }, - }, - }, - Object { - "term": Object { - "processor.event": "transaction", - }, - }, - Object { - "term": Object { - "transaction.type": "request", - }, - }, - Object { - "term": Object { - "service.name": "opbeans-node", - }, - }, - Object { - "term": Object { - "service.environment": "test", - }, - }, - ], - "should": Array [ - Object { - "term": Object { - "transaction.sampled": true, - }, - }, - ], - }, - }, - "size": 0, - }, - "index": "myIndex", - }, - ], -] -`; diff --git a/x-pack/plugins/apm/server/lib/transaction_groups/__snapshots__/queries.test.ts.snap b/x-pack/plugins/apm/server/lib/transaction_groups/__snapshots__/queries.test.ts.snap index 884a7d18cc4d4e..deca46f4ebd0cd 100644 --- a/x-pack/plugins/apm/server/lib/transaction_groups/__snapshots__/queries.test.ts.snap +++ b/x-pack/plugins/apm/server/lib/transaction_groups/__snapshots__/queries.test.ts.snap @@ -1,220 +1,479 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`transaction group queries fetches top traces 1`] = ` -Object { - "body": Object { - "aggs": Object { - "transaction_groups": Object { - "aggs": Object { - "avg": Object { - "avg": Object { - "field": "transaction.duration.us", - }, - }, - "p95": Object { - "percentiles": Object { - "field": "transaction.duration.us", - "hdr": Object { - "number_of_significant_value_digits": 2, +Array [ + Object { + "body": Object { + "aggs": Object { + "transaction_groups": Object { + "aggs": Object { + "sample": Object { + "top_hits": Object { + "size": 1, }, - "percents": Array [ - 95, - ], }, }, - "sample": Object { - "top_hits": Object { - "size": 1, - "sort": Array [ - Object { - "_score": "desc", + "composite": Object { + "size": 10000, + "sources": Array [ + Object { + "service.name": Object { + "terms": Object { + "field": "service.name", + }, }, - Object { - "@timestamp": Object { - "order": "desc", + }, + Object { + "transaction.name": Object { + "terms": Object { + "field": "transaction.name", }, }, - ], + }, + ], + }, + }, + }, + "query": Object { + "bool": Object { + "filter": Array [ + Object { + "range": Object { + "@timestamp": Object { + "format": "epoch_millis", + "gte": 1528113600000, + "lte": 1528977600000, + }, + }, + }, + Object { + "term": Object { + "processor.event": "transaction", + }, + }, + Object { + "term": Object { + "my.custom.ui.filter": "foo-bar", + }, + }, + ], + "must_not": Array [ + Object { + "exists": Object { + "field": "parent.id", + }, + }, + ], + "should": Array [ + Object { + "term": Object { + "transaction.sampled": true, + }, }, + ], + }, + }, + "sort": Array [ + Object { + "_score": "desc", + }, + Object { + "@timestamp": Object { + "order": "desc", }, - "sum": Object { - "sum": Object { - "field": "transaction.duration.us", + }, + ], + }, + "index": "myIndex", + "size": 0, + }, + Object { + "body": Object { + "aggs": Object { + "transaction_groups": Object { + "aggs": Object { + "avg": Object { + "avg": Object { + "field": "transaction.duration.us", + }, }, }, + "composite": Object { + "size": 10000, + "sources": Array [ + Object { + "service.name": Object { + "terms": Object { + "field": "service.name", + }, + }, + }, + Object { + "transaction.name": Object { + "terms": Object { + "field": "transaction.name", + }, + }, + }, + ], + }, }, - "composite": Object { - "size": 10000, - "sources": Array [ + }, + "query": Object { + "bool": Object { + "filter": Array [ Object { - "service": Object { - "terms": Object { - "field": "service.name", + "range": Object { + "@timestamp": Object { + "format": "epoch_millis", + "gte": 1528113600000, + "lte": 1528977600000, }, }, }, Object { - "transaction": Object { - "terms": Object { - "field": "transaction.name", - }, + "term": Object { + "processor.event": "transaction", + }, + }, + Object { + "term": Object { + "my.custom.ui.filter": "foo-bar", + }, + }, + ], + "must_not": Array [ + Object { + "exists": Object { + "field": "parent.id", }, }, ], }, }, }, - "query": Object { - "bool": Object { - "filter": Array [ - Object { - "range": Object { - "@timestamp": Object { - "format": "epoch_millis", - "gte": 1528113600000, - "lte": 1528977600000, + "index": "myIndex", + "size": 0, + }, + Object { + "body": Object { + "aggs": Object { + "transaction_groups": Object { + "aggs": Object { + "sum": Object { + "sum": Object { + "field": "transaction.duration.us", }, }, }, - Object { - "term": Object { - "processor.event": "transaction", - }, + "composite": Object { + "size": 10000, + "sources": Array [ + Object { + "service.name": Object { + "terms": Object { + "field": "service.name", + }, + }, + }, + Object { + "transaction.name": Object { + "terms": Object { + "field": "transaction.name", + }, + }, + }, + ], }, - Object { - "term": Object { - "my.custom.ui.filter": "foo-bar", + }, + }, + "query": Object { + "bool": Object { + "filter": Array [ + Object { + "range": Object { + "@timestamp": Object { + "format": "epoch_millis", + "gte": 1528113600000, + "lte": 1528977600000, + }, + }, }, - }, - ], - "must_not": Array [ - Object { - "exists": Object { - "field": "parent.id", + Object { + "term": Object { + "processor.event": "transaction", + }, }, - }, - ], - "should": Array [ - Object { - "term": Object { - "transaction.sampled": true, + Object { + "term": Object { + "my.custom.ui.filter": "foo-bar", + }, }, - }, - ], + ], + "must_not": Array [ + Object { + "exists": Object { + "field": "parent.id", + }, + }, + ], + }, }, }, + "index": "myIndex", "size": 0, }, - "index": "myIndex", -} +] `; exports[`transaction group queries fetches top transactions 1`] = ` -Object { - "body": Object { - "aggs": Object { - "transaction_groups": Object { - "aggs": Object { - "avg": Object { - "avg": Object { - "field": "transaction.duration.us", - }, - }, - "p95": Object { - "percentiles": Object { - "field": "transaction.duration.us", - "hdr": Object { - "number_of_significant_value_digits": 2, +Array [ + Object { + "body": Object { + "aggs": Object { + "transaction_groups": Object { + "aggs": Object { + "sample": Object { + "top_hits": Object { + "size": 1, }, - "percents": Array [ - 95, - ], }, }, - "sample": Object { - "top_hits": Object { - "size": 1, - "sort": Array [ - Object { - "_score": "desc", - }, - Object { - "@timestamp": Object { - "order": "desc", - }, + "terms": Object { + "field": "transaction.name", + "size": 101, + }, + }, + }, + "query": Object { + "bool": Object { + "filter": Array [ + Object { + "range": Object { + "@timestamp": Object { + "format": "epoch_millis", + "gte": 1528113600000, + "lte": 1528977600000, }, - ], + }, }, + Object { + "term": Object { + "processor.event": "transaction", + }, + }, + Object { + "term": Object { + "transaction.type": "bar", + }, + }, + Object { + "term": Object { + "service.name": "foo", + }, + }, + Object { + "term": Object { + "my.custom.ui.filter": "foo-bar", + }, + }, + ], + "should": Array [ + Object { + "term": Object { + "transaction.sampled": true, + }, + }, + ], + }, + }, + "sort": Array [ + Object { + "_score": "desc", + }, + Object { + "@timestamp": Object { + "order": "desc", }, - "sum": Object { - "sum": Object { - "field": "transaction.duration.us", + }, + ], + }, + "index": "myIndex", + "size": 0, + }, + Object { + "body": Object { + "aggs": Object { + "transaction_groups": Object { + "aggs": Object { + "avg": Object { + "avg": Object { + "field": "transaction.duration.us", + }, }, }, + "terms": Object { + "field": "transaction.name", + "size": 101, + }, }, - "composite": Object { - "size": 101, - "sources": Array [ + }, + "query": Object { + "bool": Object { + "filter": Array [ Object { - "transaction": Object { - "terms": Object { - "field": "transaction.name", + "range": Object { + "@timestamp": Object { + "format": "epoch_millis", + "gte": 1528113600000, + "lte": 1528977600000, }, }, }, + Object { + "term": Object { + "processor.event": "transaction", + }, + }, + Object { + "term": Object { + "transaction.type": "bar", + }, + }, + Object { + "term": Object { + "service.name": "foo", + }, + }, + Object { + "term": Object { + "my.custom.ui.filter": "foo-bar", + }, + }, ], }, }, - "transactions": Object { - "terms": Object { - "field": "transaction.name", + }, + "index": "myIndex", + "size": 0, + }, + Object { + "body": Object { + "aggs": Object { + "transaction_groups": Object { + "aggs": Object { + "sum": Object { + "sum": Object { + "field": "transaction.duration.us", + }, + }, + }, + "terms": Object { + "field": "transaction.name", + "size": 101, + }, + }, + }, + "query": Object { + "bool": Object { + "filter": Array [ + Object { + "range": Object { + "@timestamp": Object { + "format": "epoch_millis", + "gte": 1528113600000, + "lte": 1528977600000, + }, + }, + }, + Object { + "term": Object { + "processor.event": "transaction", + }, + }, + Object { + "term": Object { + "transaction.type": "bar", + }, + }, + Object { + "term": Object { + "service.name": "foo", + }, + }, + Object { + "term": Object { + "my.custom.ui.filter": "foo-bar", + }, + }, + ], }, }, }, - "query": Object { - "bool": Object { - "filter": Array [ - Object { - "range": Object { - "@timestamp": Object { - "format": "epoch_millis", - "gte": 1528113600000, - "lte": 1528977600000, + "index": "myIndex", + "size": 0, + }, + Object { + "body": Object { + "aggs": Object { + "transaction_groups": Object { + "aggs": Object { + "p95": Object { + "percentiles": Object { + "field": "transaction.duration.us", + "hdr": Object { + "number_of_significant_value_digits": 2, + }, + "percents": Array [ + 95, + ], }, }, }, - Object { - "term": Object { - "processor.event": "transaction", - }, + "terms": Object { + "field": "transaction.name", + "size": 101, }, - Object { - "term": Object { - "transaction.type": "bar", + }, + }, + "query": Object { + "bool": Object { + "filter": Array [ + Object { + "range": Object { + "@timestamp": Object { + "format": "epoch_millis", + "gte": 1528113600000, + "lte": 1528977600000, + }, + }, }, - }, - Object { - "term": Object { - "service.name": "foo", + Object { + "term": Object { + "processor.event": "transaction", + }, }, - }, - Object { - "term": Object { - "my.custom.ui.filter": "foo-bar", + Object { + "term": Object { + "transaction.type": "bar", + }, }, - }, - ], - "should": Array [ - Object { - "term": Object { - "transaction.sampled": true, + Object { + "term": Object { + "service.name": "foo", + }, }, - }, - ], + Object { + "term": Object { + "my.custom.ui.filter": "foo-bar", + }, + }, + ], + }, }, }, + "index": "myIndex", "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 deleted file mode 100644 index 66b805ab2efc15..00000000000000 --- a/x-pack/plugins/apm/server/lib/transaction_groups/__snapshots__/transform.test.ts.snap +++ /dev/null @@ -1,2822 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`transactionGroupsTransformer should match snapshot 1`] = ` -Array [ - 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": 2651.8784461553205, - "impact": 15.770246496477105, - "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": 32554.36257814184, - "impact": 14.344171563678346, - "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": 32159.926322043968, - "impact": 10.27904952170656, - "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": 33265.03326147213, - "impact": 10.256357027376065, - "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": 27516.89144558744, - "impact": 9.651458992731666, - "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": 12683.190864600327, - "impact": 4.4239778504968, - "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": 255966.30555555556, - "impact": 4.3693406535517445, - "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": 17189.329210275926, - "impact": 3.424381787142002, - "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": 11257.757916666667, - "impact": 2.558180605569336, - "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": 3504.5108924806746, - "impact": 2.3600993453143766, - "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": 32387.73641304348, - "impact": 2.2558112380477584, - "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": 32900.72714285714, - "impact": 2.1791207411745854, - "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": 10548.218597063622, - "impact": 1.8338763992340905, - "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.7722323960215767, - "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": 12763.68806073154, - "impact": 1.7479924334286208, - "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": 10584.05144193297, - "impact": 1.280810614916383, - "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": 1422.926672899693, - "impact": 1.0027124806135428, - "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, - }, - Object { - "averageResponseTime": 21331.714285714286, - "impact": 0.28817487960409877, - "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": 4694.005586592179, - "impact": 0.1498515000753004, - "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.13543365054509587, - "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": 2742.4615384615386, - "impact": 0.08501028923348058, - "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": 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, - }, -] -`; 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 deleted file mode 100644 index a26c3d85a3fc47..00000000000000 --- a/x-pack/plugins/apm/server/lib/transaction_groups/fetcher.test.ts +++ /dev/null @@ -1,64 +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 { transactionGroupsFetcher } from './fetcher'; -import { APMConfig } from '../..'; - -function getSetup() { - return { - start: 1528113600000, - end: 1528977600000, - client: { - search: jest.fn(), - } as any, - internalClient: { - search: jest.fn(), - } as any, - config: { - 'xpack.apm.ui.transactionGroupBucketSize': 100, - } as APMConfig, - uiFiltersES: [{ term: { 'service.environment': 'test' } }], - indices: { - 'apm_oss.sourcemapIndices': 'myIndex', - 'apm_oss.errorIndices': 'myIndex', - 'apm_oss.onboardingIndices': 'myIndex', - 'apm_oss.spanIndices': 'myIndex', - 'apm_oss.transactionIndices': 'myIndex', - 'apm_oss.metricsIndices': 'myIndex', - apmAgentConfigurationIndex: 'myIndex', - apmCustomLinkIndex: 'myIndex', - }, - dynamicIndexPattern: null as any, - }; -} - -describe('transactionGroupsFetcher', () => { - describe('type: top_traces', () => { - it('should call client.search with correct query', async () => { - const setup = getSetup(); - const bucketSize = 100; - await transactionGroupsFetcher({ type: 'top_traces' }, setup, bucketSize); - expect(setup.client.search.mock.calls).toMatchSnapshot(); - }); - }); - - describe('type: top_transactions', () => { - it('should call client.search with correct query', async () => { - const setup = getSetup(); - const bucketSize = 100; - await transactionGroupsFetcher( - { - type: 'top_transactions', - serviceName: 'opbeans-node', - transactionType: 'request', - }, - setup, - bucketSize - ); - expect(setup.client.search.mock.calls).toMatchSnapshot(); - }); - }); -}); diff --git a/x-pack/plugins/apm/server/lib/transaction_groups/fetcher.ts b/x-pack/plugins/apm/server/lib/transaction_groups/fetcher.ts index a5cc74b18a7ef5..73bf1d01924e71 100644 --- a/x-pack/plugins/apm/server/lib/transaction_groups/fetcher.ts +++ b/x-pack/plugins/apm/server/lib/transaction_groups/fetcher.ts @@ -3,23 +3,31 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ - +import { take, sortBy } from 'lodash'; +import { Unionize } from 'utility-types'; +import moment from 'moment'; +import { joinByKey } from '../../../common/utils/join_by_key'; +import { ESSearchRequest } from '../../../typings/elasticsearch'; import { SERVICE_NAME, - TRANSACTION_DURATION, - TRANSACTION_SAMPLED, TRANSACTION_NAME, } from '../../../common/elasticsearch_fieldnames'; import { getTransactionGroupsProjection } from '../../../common/projections/transaction_groups'; import { mergeProjection } from '../../../common/projections/util/merge_projection'; import { PromiseReturnType } from '../../../../observability/typings/common'; -import { SortOptions } from '../../../typings/elasticsearch/aggregations'; +import { AggregationOptionsByType } from '../../../typings/elasticsearch/aggregations'; import { Transaction } from '../../../typings/es_schemas/ui/transaction'; import { Setup, SetupTimeRange, SetupUIFilters, } from '../helpers/setup_request'; +import { + getSamples, + getAverages, + getSums, + getPercentiles, +} from './get_transaction_group_stats'; interface TopTransactionOptions { type: 'top_transactions'; @@ -36,68 +44,149 @@ interface TopTraceOptions { export type Options = TopTransactionOptions | TopTraceOptions; export type ESResponse = PromiseReturnType; + +export type TransactionGroupRequestBase = ESSearchRequest & { + body: { + aggs: { + transaction_groups: Unionize< + Pick + >; + }; + }; +}; + +export type TransactionGroupSetup = Setup & SetupTimeRange & SetupUIFilters; + +function getItemsWithRelativeImpact( + setup: TransactionGroupSetup, + items: Array<{ + sum?: number | null; + key: string | Record; + avg?: number | null; + count?: number | null; + p95?: number; + sample?: Transaction; + }> +) { + const values = items + .map(({ sum }) => sum) + .filter((value) => value !== null) as number[]; + + const max = Math.max(...values); + const min = Math.min(...values); + + const duration = moment.duration(setup.end - setup.start); + const minutes = duration.asMinutes(); + + const itemsWithRelativeImpact: TransactionGroup[] = items + .map((item) => { + return { + key: item.key, + averageResponseTime: item.avg, + transactionsPerMinute: (item.count ?? 0) / minutes, + impact: + item.sum !== null && item.sum !== undefined + ? ((item.sum - min) / (max - min)) * 100 || 0 + : 0, + p95: item.p95, + sample: item.sample!, + }; + }) + .filter((item) => item.sample); + + return itemsWithRelativeImpact; +} + export async function transactionGroupsFetcher( options: Options, - setup: Setup & SetupTimeRange & SetupUIFilters, + setup: TransactionGroupSetup, bucketSize: number ) { - const { client } = setup; - const projection = getTransactionGroupsProjection({ setup, options, }); - const sort: SortOptions = [ - { _score: 'desc' as const }, // sort by _score to ensure that buckets with sampled:true ends up on top - { '@timestamp': { order: 'desc' as const } }, - ]; - const isTopTraces = options.type === 'top_traces'; - if (isTopTraces) { - // Delete the projection aggregation when searching for traces, as it should use the combined aggregation instead - delete projection.body.aggs; - } + delete projection.body.aggs; + + // traces overview is hardcoded to 10000 + // transactions overview: 1 extra bucket is added to check whether the total number of buckets exceed the specified bucket size. + const expectedBucketSize = isTopTraces ? 10000 : bucketSize; + const size = isTopTraces ? 10000 : expectedBucketSize + 1; - const params = mergeProjection(projection, { + const request = mergeProjection(projection, { + size: 0, body: { - size: 0, - query: { - bool: { - // prefer sampled transactions - should: [{ term: { [TRANSACTION_SAMPLED]: true } }], - }, - }, aggs: { transaction_groups: { - composite: { - // traces overview is hardcoded to 10000 - // transactions overview: 1 extra bucket is added to check whether the total number of buckets exceed the specified bucket size. - size: isTopTraces ? 10000 : bucketSize + 1, - sources: [ - ...(isTopTraces - ? [{ service: { terms: { field: SERVICE_NAME } } }] - : []), - { transaction: { terms: { field: TRANSACTION_NAME } } }, - ], - }, - aggs: { - sample: { top_hits: { size: 1, sort } }, - avg: { avg: { field: TRANSACTION_DURATION } }, - p95: { - percentiles: { - field: TRANSACTION_DURATION, - percents: [95], - hdr: { number_of_significant_value_digits: 2 }, - }, - }, - sum: { sum: { field: TRANSACTION_DURATION } }, - }, + ...(isTopTraces + ? { + composite: { + sources: [ + { [SERVICE_NAME]: { terms: { field: SERVICE_NAME } } }, + { + [TRANSACTION_NAME]: { + terms: { field: TRANSACTION_NAME }, + }, + }, + ], + size, + }, + } + : { + terms: { + field: TRANSACTION_NAME, + size, + }, + }), }, }, }, }); - return client.search(params); + const params = { + request, + setup, + }; + + const [samples, averages, sums, percentiles] = await Promise.all([ + getSamples(params), + getAverages(params), + getSums(params), + !isTopTraces ? getPercentiles(params) : Promise.resolve(undefined), + ]); + + const stats = [ + ...samples, + ...averages, + ...sums, + ...(percentiles ? percentiles : []), + ]; + + const items = joinByKey(stats, 'key'); + + const itemsWithRelativeImpact = getItemsWithRelativeImpact(setup, items); + + return { + items: take( + // sort by impact by default so most impactful services are not cut off + sortBy(itemsWithRelativeImpact, 'impact').reverse(), + expectedBucketSize + ), + // The aggregation is considered accurate if the configured bucket size is larger or equal to the number of buckets returned + // the actual number of buckets retrieved are `bucketsize + 1` to detect whether it's above the limit + isAggregationAccurate: expectedBucketSize >= itemsWithRelativeImpact.length, + bucketSize, + }; +} + +export interface TransactionGroup { + key: Record | string; + averageResponseTime: number | null | undefined; + transactionsPerMinute: number; + p95: number | undefined; + impact: number; + sample: Transaction; } diff --git a/x-pack/plugins/apm/server/lib/transaction_groups/get_transaction_group_stats.ts b/x-pack/plugins/apm/server/lib/transaction_groups/get_transaction_group_stats.ts new file mode 100644 index 00000000000000..59fb370113ec27 --- /dev/null +++ b/x-pack/plugins/apm/server/lib/transaction_groups/get_transaction_group_stats.ts @@ -0,0 +1,144 @@ +/* + * 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 { merge } from 'lodash'; +import { arrayUnionToCallable } from '../../../common/utils/array_union_to_callable'; +import { Transaction } from '../../../typings/es_schemas/ui/transaction'; +import { + TRANSACTION_SAMPLED, + TRANSACTION_DURATION, +} from '../../../common/elasticsearch_fieldnames'; +import { + AggregationInputMap, + SortOptions, +} from '../../../typings/elasticsearch/aggregations'; +import { TransactionGroupRequestBase, TransactionGroupSetup } from './fetcher'; + +interface MetricParams { + request: TransactionGroupRequestBase; + setup: TransactionGroupSetup; +} + +type BucketKey = string | Record; + +function mergeRequestWithAggs< + TRequestBase extends TransactionGroupRequestBase, + TInputMap extends AggregationInputMap +>(request: TRequestBase, aggs: TInputMap) { + return merge({}, request, { + body: { + aggs: { + transaction_groups: { + aggs, + }, + }, + }, + }); +} + +export async function getSamples({ request, setup }: MetricParams) { + const params = mergeRequestWithAggs(request, { + sample: { + top_hits: { + size: 1, + }, + }, + }); + + const sort: SortOptions = [ + { _score: 'desc' as const }, // sort by _score to ensure that buckets with sampled:true ends up on top + { '@timestamp': { order: 'desc' as const } }, + ]; + + const response = await setup.client.search({ + ...params, + body: { + ...params.body, + query: { + ...params.body.query, + bool: { + ...params.body.query.bool, + should: [{ term: { [TRANSACTION_SAMPLED]: true } }], + }, + }, + sort, + }, + }); + + return arrayUnionToCallable( + response.aggregations?.transaction_groups.buckets ?? [] + ).map((bucket) => { + return { + key: bucket.key as BucketKey, + count: bucket.doc_count, + sample: bucket.sample.hits.hits[0]._source as Transaction, + }; + }); +} + +export async function getAverages({ request, setup }: MetricParams) { + const params = mergeRequestWithAggs(request, { + avg: { + avg: { + field: TRANSACTION_DURATION, + }, + }, + }); + + const response = await setup.client.search(params); + + return arrayUnionToCallable( + response.aggregations?.transaction_groups.buckets ?? [] + ).map((bucket) => { + return { + key: bucket.key as BucketKey, + avg: bucket.avg.value, + }; + }); +} + +export async function getSums({ request, setup }: MetricParams) { + const params = mergeRequestWithAggs(request, { + sum: { + sum: { + field: TRANSACTION_DURATION, + }, + }, + }); + + const response = await setup.client.search(params); + + return arrayUnionToCallable( + response.aggregations?.transaction_groups.buckets ?? [] + ).map((bucket) => { + return { + key: bucket.key as BucketKey, + sum: bucket.sum.value, + }; + }); +} + +export async function getPercentiles({ request, setup }: MetricParams) { + const params = mergeRequestWithAggs(request, { + p95: { + percentiles: { + field: TRANSACTION_DURATION, + hdr: { number_of_significant_value_digits: 2 }, + percents: [95], + }, + }, + }); + + const response = await setup.client.search(params); + + return arrayUnionToCallable( + response.aggregations?.transaction_groups.buckets ?? [] + ).map((bucket) => { + return { + key: bucket.key as BucketKey, + p95: Object.values(bucket.p95.values)[0], + }; + }); +} diff --git a/x-pack/plugins/apm/server/lib/transaction_groups/index.ts b/x-pack/plugins/apm/server/lib/transaction_groups/index.ts index 893e586b351a80..6e0d619268d444 100644 --- a/x-pack/plugins/apm/server/lib/transaction_groups/index.ts +++ b/x-pack/plugins/apm/server/lib/transaction_groups/index.ts @@ -10,19 +10,11 @@ import { SetupUIFilters, } from '../helpers/setup_request'; import { transactionGroupsFetcher, Options } from './fetcher'; -import { transactionGroupsTransformer } from './transform'; export async function getTransactionGroupList( options: Options, setup: Setup & SetupTimeRange & SetupUIFilters ) { - const { start, end } = setup; const bucketSize = setup.config['xpack.apm.ui.transactionGroupBucketSize']; - const response = await transactionGroupsFetcher(options, setup, bucketSize); - return transactionGroupsTransformer({ - response, - start, - end, - bucketSize, - }); + return await transactionGroupsFetcher(options, setup, bucketSize); } diff --git a/x-pack/plugins/apm/server/lib/transaction_groups/queries.test.ts b/x-pack/plugins/apm/server/lib/transaction_groups/queries.test.ts index 2c5aa79bb3483c..0b2ff3a72975ba 100644 --- a/x-pack/plugins/apm/server/lib/transaction_groups/queries.test.ts +++ b/x-pack/plugins/apm/server/lib/transaction_groups/queries.test.ts @@ -31,7 +31,9 @@ describe('transaction group queries', () => { ) ); - expect(mock.params).toMatchSnapshot(); + const allParams = mock.spy.mock.calls.map((call) => call[0]); + + expect(allParams).toMatchSnapshot(); }); it('fetches top traces', async () => { @@ -46,6 +48,8 @@ describe('transaction group queries', () => { ) ); - expect(mock.params).toMatchSnapshot(); + const allParams = mock.spy.mock.calls.map((call) => call[0]); + + expect(allParams).toMatchSnapshot(); }); }); 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 deleted file mode 100644 index 0bb29e27f0219e..00000000000000 --- a/x-pack/plugins/apm/server/lib/transaction_groups/transform.test.ts +++ /dev/null @@ -1,135 +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 { ESResponse } from './fetcher'; -import { transactionGroupsResponse } from './mock_responses/transaction_groups_response'; -import { transactionGroupsTransformer } from './transform'; - -describe('transactionGroupsTransformer', () => { - it('should match snapshot', () => { - const { - bucketSize, - isAggregationAccurate, - items, - } = transactionGroupsTransformer({ - response: transactionGroupsResponse, - start: 100, - end: 2000, - bucketSize: 100, - }); - - expect(bucketSize).toBe(100); - expect(isAggregationAccurate).toBe(true); - expect(items).toMatchSnapshot(); - }); - - it('should transform response correctly', () => { - const bucket = { - key: { transaction: 'POST /api/orders' }, - doc_count: 180, - avg: { value: 255966.30555555556 }, - p95: { values: { '95.0': 320238.5 } }, - sum: { value: 3000000000 }, - sample: { - hits: { - total: 180, - hits: [{ _source: 'sample source' }], - }, - }, - }; - - const response = ({ - aggregations: { - transaction_groups: { - buckets: [bucket], - }, - }, - } as unknown) as ESResponse; - - expect( - transactionGroupsTransformer({ - response, - start: 100, - end: 20000, - bucketSize: 100, - }) - ).toEqual({ - bucketSize: 100, - isAggregationAccurate: true, - items: [ - { - averageResponseTime: 255966.30555555556, - impact: 0, - name: 'POST /api/orders', - p95: 320238.5, - sample: 'sample source', - transactionsPerMinute: 542.713567839196, - }, - ], - }); - }); - - it('`isAggregationAccurate` should be false if number of bucket is higher than `bucketSize`', () => { - const bucket = { - key: { transaction: 'POST /api/orders' }, - doc_count: 180, - avg: { value: 255966.30555555556 }, - p95: { values: { '95.0': 320238.5 } }, - sum: { value: 3000000000 }, - sample: { - hits: { - total: 180, - hits: [{ _source: 'sample source' }], - }, - }, - }; - - const response = ({ - aggregations: { - transaction_groups: { - buckets: [bucket, bucket, bucket, bucket], // four buckets returned - }, - }, - } as unknown) as ESResponse; - - const { isAggregationAccurate } = transactionGroupsTransformer({ - response, - start: 100, - end: 20000, - bucketSize: 3, // bucket size of three - }); - - expect(isAggregationAccurate).toEqual(false); - }); - - it('should calculate impact from sum', () => { - const getBucket = (sum: number) => ({ - key: { transaction: 'POST /api/orders' }, - doc_count: 180, - avg: { value: 300000 }, - p95: { values: { '95.0': 320000 } }, - sum: { value: sum }, - sample: { hits: { total: 180, hits: [{ _source: 'sample source' }] } }, - }); - - const response = ({ - aggregations: { - transaction_groups: { - buckets: [getBucket(10), getBucket(20), getBucket(50)], - }, - }, - } as unknown) as ESResponse; - - const { items } = transactionGroupsTransformer({ - response, - start: 100, - end: 20000, - bucketSize: 100, - }); - - expect(items.map((bucket) => bucket.impact)).toEqual([100, 25, 0]); - }); -}); diff --git a/x-pack/plugins/apm/server/lib/transaction_groups/transform.ts b/x-pack/plugins/apm/server/lib/transaction_groups/transform.ts deleted file mode 100644 index b04ff6764675df..00000000000000 --- a/x-pack/plugins/apm/server/lib/transaction_groups/transform.ts +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */ - -import moment from 'moment'; -import { orderBy } from 'lodash'; -import { ESResponse } from './fetcher'; - -function calculateRelativeImpacts(items: ITransactionGroup[]) { - const values = items - .map(({ impact }) => impact) - .filter((value) => value !== null) as number[]; - - const max = Math.max(...values); - const min = Math.min(...values); - - return items.map((bucket) => ({ - ...bucket, - impact: - bucket.impact !== null - ? ((bucket.impact - min) / (max - min)) * 100 || 0 - : 0, - })); -} - -const getBuckets = (response: ESResponse) => { - if (response.aggregations) { - return orderBy( - response.aggregations.transaction_groups.buckets, - ['sum.value'], - ['desc'] - ); - } - return []; -}; - -export type ITransactionGroup = ReturnType; -function getTransactionGroup( - bucket: ReturnType[0], - minutes: number -) { - const averageResponseTime = bucket.avg.value; - const transactionsPerMinute = bucket.doc_count / minutes; - const impact = bucket.sum.value; - const sample = bucket.sample.hits.hits[0]._source; - - return { - name: bucket.key.transaction, - sample, - p95: bucket.p95.values['95.0'], - averageResponseTime, - transactionsPerMinute, - impact, - }; -} - -export function transactionGroupsTransformer({ - response, - start, - end, - bucketSize, -}: { - response: ESResponse; - start: number; - end: number; - bucketSize: number; -}): { - items: ITransactionGroup[]; - isAggregationAccurate: boolean; - bucketSize: number; -} { - const buckets = getBuckets(response); - const duration = moment.duration(end - start); - const minutes = duration.asMinutes(); - const items = buckets.map((bucket) => getTransactionGroup(bucket, minutes)); - - const itemsWithRelativeImpact = calculateRelativeImpacts(items); - - return { - items: itemsWithRelativeImpact, - - // The aggregation is considered accurate if the configured bucket size is larger or equal to the number of buckets returned - // the actual number of buckets retrieved are `bucketsize + 1` to detect whether it's above the limit - isAggregationAccurate: bucketSize >= buckets.length, - bucketSize, - }; -} diff --git a/x-pack/plugins/apm/server/lib/ui_filters/local_ui_filters/get_local_filter_query.ts b/x-pack/plugins/apm/server/lib/ui_filters/local_ui_filters/get_local_filter_query.ts index 1cecf14f2eeb8d..e892284fd87cd8 100644 --- a/x-pack/plugins/apm/server/lib/ui_filters/local_ui_filters/get_local_filter_query.ts +++ b/x-pack/plugins/apm/server/lib/ui_filters/local_ui_filters/get_local_filter_query.ts @@ -35,7 +35,7 @@ export const getLocalFilterQuery = ({ }, }, } - : {}; + : null; return mergeProjection(projection, { body: { diff --git a/x-pack/plugins/apm/server/lib/ui_filters/local_ui_filters/index.ts b/x-pack/plugins/apm/server/lib/ui_filters/local_ui_filters/index.ts index 588d5c7896db99..3833b93c8d1f73 100644 --- a/x-pack/plugins/apm/server/lib/ui_filters/local_ui_filters/index.ts +++ b/x-pack/plugins/apm/server/lib/ui_filters/local_ui_filters/index.ts @@ -43,6 +43,7 @@ export async function getLocalUIFilters({ const response = await client.search(query); const filter = localUIFilters[name]; + const buckets = response?.aggregations?.by_terms?.buckets ?? []; return { diff --git a/x-pack/plugins/apm/typings/elasticsearch/aggregations.ts b/x-pack/plugins/apm/typings/elasticsearch/aggregations.ts index ac7499c23e9268..d25ec8709e3bef 100644 --- a/x-pack/plugins/apm/typings/elasticsearch/aggregations.ts +++ b/x-pack/plugins/apm/typings/elasticsearch/aggregations.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { Unionize } from 'utility-types'; +import { Unionize, UnionToIntersection } from 'utility-types'; type SortOrder = 'asc' | 'desc'; type SortInstruction = Record; @@ -288,10 +288,13 @@ interface AggregationResponsePart< } | undefined; composite: { - after_key: Record, number>; + after_key: Record< + GetCompositeKeys, + string | number + >; buckets: Array< { - key: Record, number>; + key: Record, string | number>; doc_count: number; } & BucketSubAggregationResponse< TAggregationOptionsMap['aggs'], @@ -337,6 +340,15 @@ interface AggregationResponsePart< // keyof AggregationResponsePart<{}, unknown> // >; +// ensures aggregations work with requests where aggregation options are a union type, +// e.g. { transaction_groups: { composite: any } | { terms: any } }. +// Union keys are not included in keyof. The type will fall back to keyof T if +// UnionToIntersection fails, which happens when there are conflicts between the union +// types, e.g. { foo: string; bar?: undefined } | { foo?: undefined; bar: string }; +export type ValidAggregationKeysOf< + T extends Record +> = keyof (UnionToIntersection extends never ? T : UnionToIntersection); + export type AggregationResponseMap< TAggregationInputMap extends AggregationInputMap | undefined, TDocument @@ -345,6 +357,6 @@ export type AggregationResponseMap< [TName in keyof TAggregationInputMap]: AggregationResponsePart< TAggregationInputMap[TName], TDocument - >[AggregationType & keyof TAggregationInputMap[TName]]; + >[AggregationType & ValidAggregationKeysOf]; } : undefined; diff --git a/x-pack/test/apm_api_integration/basic/tests/traces/expectation/top_traces.expectation.json b/x-pack/test/apm_api_integration/basic/tests/traces/expectation/top_traces.expectation.json index bacb340292f931..4db040e92e7faf 100644 --- a/x-pack/test/apm_api_integration/basic/tests/traces/expectation/top_traces.expectation.json +++ b/x-pack/test/apm_api_integration/basic/tests/traces/expectation/top_traces.expectation.json @@ -1,20 +1,35 @@ [ { - "name": "Process payment", + "key": { + "service.name": "opbeans-node", + "transaction.name": "Process payment" + }, + "averageResponseTime": 1745009, + "transactionsPerMinute": 0.25, + "impact": 100, "sample": { "@timestamp": "2020-06-29T06:48:29.892Z", - "agent": { "name": "nodejs", "version": "3.6.1" }, + "agent": { + "name": "nodejs", + "version": "3.6.1" + }, "container": { "id": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" }, - "ecs": { "version": "1.5.0" }, - "event": { "ingested": "2020-06-29T06:48:39.379730Z" }, + "ecs": { + "version": "1.5.0" + }, + "event": { + "ingested": "2020-06-29T06:48:39.379730Z" + }, "host": { "architecture": "x64", "hostname": "41712ded148f", "ip": "172.18.0.7", "name": "41712ded148f", - "os": { "platform": "linux" } + "os": { + "platform": "linux" + } }, "observer": { "ephemeral_id": "99908b73-9813-4a73-baa6-993db405523a", @@ -34,59 +49,97 @@ "ppid": 1, "title": "node /app/server.js" }, - "processor": { "event": "transaction", "name": "transaction" }, + "processor": { + "event": "transaction", + "name": "transaction" + }, "service": { "environment": "production", - "framework": { "name": "express", "version": "4.17.1" }, - "language": { "name": "javascript" }, + "framework": { + "name": "express", + "version": "4.17.1" + }, + "language": { + "name": "javascript" + }, "name": "opbeans-node", "node": { "name": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" }, - "runtime": { "name": "node", "version": "12.18.1" }, + "runtime": { + "name": "node", + "version": "12.18.1" + }, "version": "1.0.0" }, - "timestamp": { "us": 1593413309892019 }, - "trace": { "id": "bc393b659bef63291b6fa08e6f1d3f14" }, + "timestamp": { + "us": 1593413309892019 + }, + "trace": { + "id": "bc393b659bef63291b6fa08e6f1d3f14" + }, "transaction": { - "duration": { "us": 1745009 }, + "duration": { + "us": 1745009 + }, "id": "a58333df6d851cf1", "name": "Process payment", "result": "success", "sampled": true, - "span_count": { "started": 2 }, + "span_count": { + "started": 2 + }, "type": "Worker" } - }, - "p95": 1744896, - "averageResponseTime": 1745009, - "transactionsPerMinute": 0.25, - "impact": 100 + } }, { - "name": "GET /api", + "key": { + "service.name": "opbeans-node", + "transaction.name": "GET /api" + }, + "averageResponseTime": 49816.15625, + "transactionsPerMinute": 8, + "impact": 91.32732325394932, "sample": { - "@timestamp": "2020-06-29T06:48:41.454Z", - "agent": { "name": "nodejs", "version": "3.6.1" }, - "client": { "ip": "172.18.0.7" }, + "@timestamp": "2020-06-29T06:48:06.969Z", + "agent": { + "name": "nodejs", + "version": "3.6.1" + }, + "client": { + "ip": "172.18.0.7" + }, "container": { "id": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" }, - "ecs": { "version": "1.5.0" }, - "event": { "ingested": "2020-06-29T06:48:43.992834Z" }, + "ecs": { + "version": "1.5.0" + }, + "event": { + "ingested": "2020-06-29T06:48:08.306961Z" + }, "host": { "architecture": "x64", "hostname": "41712ded148f", "ip": "172.18.0.7", "name": "41712ded148f", - "os": { "platform": "linux" } + "os": { + "platform": "linux" + } }, "http": { "request": { "headers": { - "Connection": ["close"], - "Host": ["opbeans-node:3000"], - "User-Agent": ["workload/2.4.3"] + "Connection": [ + "close" + ], + "Host": [ + "opbeans-node:3000" + ], + "User-Agent": [ + "workload/2.4.3" + ] }, "method": "get", "socket": { @@ -96,11 +149,18 @@ }, "response": { "headers": { - "Connection": ["close"], - "Content-Type": ["application/json;charset=UTF-8"], - "Date": ["Mon, 29 Jun 2020 06:48:41 GMT"], - "Transfer-Encoding": ["chunked"], - "X-Powered-By": ["Express"] + "Connection": [ + "close" + ], + "Content-Length": [ + "0" + ], + "Date": [ + "Mon, 29 Jun 2020 06:48:06 GMT" + ], + "X-Powered-By": [ + "Express" + ] }, "status_code": 200 }, @@ -130,61 +190,103 @@ "ppid": 1, "title": "node /app/server.js" }, - "processor": { "event": "transaction", "name": "transaction" }, + "processor": { + "event": "transaction", + "name": "transaction" + }, "service": { "environment": "production", - "framework": { "name": "express", "version": "4.17.1" }, - "language": { "name": "javascript" }, + "framework": { + "name": "express", + "version": "4.17.1" + }, + "language": { + "name": "javascript" + }, "name": "opbeans-node", "node": { "name": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" }, - "runtime": { "name": "node", "version": "12.18.1" }, + "runtime": { + "name": "node", + "version": "12.18.1" + }, "version": "1.0.0" }, - "source": { "ip": "172.18.0.7" }, - "timestamp": { "us": 1593413321454009 }, - "trace": { "id": "0507830eeff93f7bf1a354e4031097b3" }, + "source": { + "ip": "172.18.0.7" + }, + "timestamp": { + "us": 1593413286969018 + }, + "trace": { + "id": "87a828bcedd44d9e872d8f552fb04aa6" + }, "transaction": { - "custom": { "shoppingBasketCount": 42 }, - "duration": { "us": 8334 }, - "id": "878250a8b937445d", + "custom": { + "shoppingBasketCount": 42 + }, + "duration": { + "us": 25229 + }, + "id": "b1843afd04271423", "name": "GET /api", "result": "HTTP 2xx", "sampled": true, - "span_count": { "started": 1 }, + "span_count": { + "started": 1 + }, "type": "request" }, "url": { "domain": "opbeans-node", - "full": "http://opbeans-node:3000/api/products/6", - "original": "/api/products/6", - "path": "/api/products/6", + "full": "http://opbeans-node:3000/api/orders/474", + "original": "/api/orders/474", + "path": "/api/orders/474", "port": 3000, "scheme": "http" }, - "user": { "email": "kimchy@elastic.co", "id": "42", "name": "kimchy" }, + "user": { + "email": "kimchy@elastic.co", + "id": "42", + "name": "kimchy" + }, "user_agent": { - "device": { "name": "Other" }, + "device": { + "name": "Other" + }, "name": "Other", "original": "workload/2.4.3" } - }, - "p95": 81888, - "averageResponseTime": 49816.15625, - "transactionsPerMinute": 8, - "impact": 91.32732325394932 + } }, { - "name": "/dashboard", + "key": { + "service.name": "client", + "transaction.name": "/dashboard" + }, + "averageResponseTime": 208000, + "transactionsPerMinute": 0.75, + "impact": 35.56882613781033, "sample": { - "@timestamp": "2020-06-29T06:48:21.621Z", - "agent": { "name": "rum-js", "version": "5.2.0" }, - "client": { "ip": "172.18.0.8" }, - "ecs": { "version": "1.5.0" }, - "event": { "ingested": "2020-06-29T06:48:22.625275Z" }, + "@timestamp": "2020-06-29T06:48:07.275Z", + "agent": { + "name": "rum-js", + "version": "5.2.0" + }, + "client": { + "ip": "172.18.0.8" + }, + "ecs": { + "version": "1.5.0" + }, + "event": { + "ingested": "2020-06-29T06:48:08.291261Z" + }, "http": { - "request": { "referrer": "" }, + "request": { + "referrer": "" + }, "response": { "decoded_body_size": 813, "encoded_body_size": 813, @@ -199,52 +301,73 @@ "version": "8.0.0", "version_major": 8 }, - "processor": { "event": "transaction", "name": "transaction" }, + "processor": { + "event": "transaction", + "name": "transaction" + }, "service": { - "language": { "name": "javascript" }, + "language": { + "name": "javascript" + }, "name": "client", "version": "1.0.0" }, - "source": { "ip": "172.18.0.8" }, - "timestamp": { "us": 1593413301621808 }, - "trace": { "id": "ee0ce8b38b8d5945829fc1c9432538bf" }, + "source": { + "ip": "172.18.0.8" + }, + "timestamp": { + "us": 1593413287275113 + }, + "trace": { + "id": "ca86ffcac7753ec8733933bd8fd45d11" + }, "transaction": { "custom": { "userConfig": { - "featureFlags": ["double-trouble", "4423-hotfix"], + "featureFlags": [ + "double-trouble", + "4423-hotfix" + ], "showDashboard": true } }, - "duration": { "us": 109000 }, - "id": "c546a6716b681bf2", + "duration": { + "us": 342000 + }, + "id": "c40f735132c8e864", "marks": { "agent": { - "domComplete": 98, - "domInteractive": 87, - "timeToFirstByte": 3 + "domComplete": 335, + "domInteractive": 327, + "timeToFirstByte": 16 }, "navigationTiming": { - "connectEnd": 0, - "connectStart": 0, - "domComplete": 98, - "domContentLoadedEventEnd": 87, - "domContentLoadedEventStart": 87, - "domInteractive": 87, - "domLoading": 8, - "domainLookupEnd": 0, - "domainLookupStart": 0, + "connectEnd": 12, + "connectStart": 12, + "domComplete": 335, + "domContentLoadedEventEnd": 327, + "domContentLoadedEventStart": 327, + "domInteractive": 327, + "domLoading": 21, + "domainLookupEnd": 12, + "domainLookupStart": 10, "fetchStart": 0, - "loadEventEnd": 98, - "loadEventStart": 98, - "requestStart": 1, - "responseEnd": 8, - "responseStart": 3 + "loadEventEnd": 335, + "loadEventStart": 335, + "requestStart": 12, + "responseEnd": 17, + "responseStart": 16 } }, "name": "/dashboard", - "page": { "referer": "", "url": "http://opbeans-node:3000/dashboard" }, + "page": { + "referer": "", + "url": "http://opbeans-node:3000/dashboard" + }, "sampled": true, - "span_count": { "started": 8 }, + "span_count": { + "started": 9 + }, "type": "page-load" }, "url": { @@ -261,50 +384,75 @@ "name": "arthurdent" }, "user_agent": { - "device": { "name": "Other" }, + "device": { + "name": "Other" + }, "name": "HeadlessChrome", "original": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/79.0.3945.0 Safari/537.36", - "os": { "name": "Linux" }, + "os": { + "name": "Linux" + }, "version": "79.0.3945" } - }, - "p95": 341504, - "averageResponseTime": 208000, - "transactionsPerMinute": 0.75, - "impact": 35.56882613781033 + } }, { - "name": "DispatcherServlet#doGet", + "key": { + "service.name": "opbeans-java", + "transaction.name": "DispatcherServlet#doGet" + }, + "averageResponseTime": 36010.53846153846, + "transactionsPerMinute": 3.25, + "impact": 26.61043592713186, "sample": { - "@timestamp": "2020-06-29T06:48:40.104Z", + "@timestamp": "2020-06-29T06:48:10.529Z", "agent": { "ephemeral_id": "222af346-6dd9-45ef-ac85-d86b67edd2de", "name": "java", "version": "1.17.1-SNAPSHOT" }, - "client": { "ip": "172.18.0.9" }, + "client": { + "ip": "172.18.0.9" + }, "container": { "id": "918ebbd99b4f40003cf5713c080bb8120fa3bbe7ac4a96acb3aec558ced91ec0" }, - "ecs": { "version": "1.5.0" }, - "event": { "ingested": "2020-06-29T06:48:46.706956Z" }, + "ecs": { + "version": "1.5.0" + }, + "event": { + "ingested": "2020-06-29T06:48:15.757591Z" + }, "host": { "architecture": "amd64", "hostname": "918ebbd99b4f", "ip": "172.18.0.6", "name": "918ebbd99b4f", - "os": { "platform": "Linux" } + "os": { + "platform": "Linux" + } }, "http": { "request": { "headers": { - "Accept": ["*/*"], - "Accept-Encoding": ["gzip, deflate"], - "Host": ["172.18.0.6:3000"], - "User-Agent": ["Python/3.7 aiohttp/3.3.2"] + "Accept": [ + "*/*" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Host": [ + "172.18.0.6:3000" + ], + "User-Agent": [ + "Python/3.7 aiohttp/3.3.2" + ] }, "method": "get", - "socket": { "encrypted": false, "remote_address": "172.18.0.9" } + "socket": { + "encrypted": false, + "remote_address": "172.18.0.9" + } }, "response": { "finished": true, @@ -321,77 +469,132 @@ "version": "8.0.0", "version_major": 8 }, - "process": { "pid": 6, "ppid": 1, "title": "/opt/java/openjdk/bin/java" }, - "processor": { "event": "transaction", "name": "transaction" }, + "process": { + "pid": 6, + "ppid": 1, + "title": "/opt/java/openjdk/bin/java" + }, + "processor": { + "event": "transaction", + "name": "transaction" + }, "service": { "environment": "production", - "framework": { "name": "Servlet API" }, - "language": { "name": "Java", "version": "11.0.7" }, + "framework": { + "name": "Servlet API" + }, + "language": { + "name": "Java", + "version": "11.0.7" + }, "name": "opbeans-java", "node": { "name": "918ebbd99b4f40003cf5713c080bb8120fa3bbe7ac4a96acb3aec558ced91ec0" }, - "runtime": { "name": "Java", "version": "11.0.7" }, + "runtime": { + "name": "Java", + "version": "11.0.7" + }, "version": "None" }, - "source": { "ip": "172.18.0.9" }, - "timestamp": { "us": 1593413320104008 }, - "trace": { "id": "90bd7780b32cc51a7f4c200b1e0c170f" }, + "source": { + "ip": "172.18.0.9" + }, + "timestamp": { + "us": 1593413290529006 + }, + "trace": { + "id": "66e3db4cf016b138a43d319d15174891" + }, "transaction": { - "duration": { "us": 8896 }, - "id": "40b22b21e92bbb20", + "duration": { + "us": 34366 + }, + "id": "7ea720a0175e7ffa", "name": "DispatcherServlet#doGet", "result": "HTTP 2xx", "sampled": true, - "span_count": { "dropped": 0, "started": 1 }, + "span_count": { + "dropped": 0, + "started": 1 + }, "type": "request" }, "url": { "domain": "172.18.0.6", - "full": "http://172.18.0.6:3000/api/orders", - "path": "/api/orders", + "full": "http://172.18.0.6:3000/api/products", + "path": "/api/products", "port": 3000, "scheme": "http" }, "user_agent": { - "device": { "name": "Other" }, + "device": { + "name": "Other" + }, "name": "Other", "original": "Python/3.7 aiohttp/3.3.2" } - }, - "p95": 34528, - "averageResponseTime": 36010.53846153846, - "transactionsPerMinute": 3.25, - "impact": 26.61043592713186 + } }, { - "name": "POST /api/orders", + "key": { + "service.name": "opbeans-node", + "transaction.name": "POST /api/orders" + }, + "averageResponseTime": 270684, + "transactionsPerMinute": 0.25, + "impact": 15.261616628971955, "sample": { "@timestamp": "2020-06-29T06:48:39.953Z", - "agent": { "name": "nodejs", "version": "3.6.1" }, - "client": { "ip": "172.18.0.7" }, + "agent": { + "name": "nodejs", + "version": "3.6.1" + }, + "client": { + "ip": "172.18.0.7" + }, "container": { "id": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" }, - "ecs": { "version": "1.5.0" }, - "event": { "ingested": "2020-06-29T06:48:43.991549Z" }, + "ecs": { + "version": "1.5.0" + }, + "event": { + "ingested": "2020-06-29T06:48:43.991549Z" + }, "host": { "architecture": "x64", "hostname": "41712ded148f", "ip": "172.18.0.7", "name": "41712ded148f", - "os": { "platform": "linux" } + "os": { + "platform": "linux" + } }, "http": { "request": { - "body": { "original": "[REDACTED]" }, + "body": { + "original": "[REDACTED]" + }, "headers": { - "Accept": ["application/json"], - "Connection": ["close"], - "Content-Length": ["129"], - "Content-Type": ["application/json"], - "Host": ["opbeans-node:3000"], - "User-Agent": ["workload/2.4.3"] + "Accept": [ + "application/json" + ], + "Connection": [ + "close" + ], + "Content-Length": [ + "129" + ], + "Content-Type": [ + "application/json" + ], + "Host": [ + "opbeans-node:3000" + ], + "User-Agent": [ + "workload/2.4.3" + ] }, "method": "post", "socket": { @@ -401,12 +604,24 @@ }, "response": { "headers": { - "Connection": ["close"], - "Content-Length": ["13"], - "Content-Type": ["application/json; charset=utf-8"], - "Date": ["Mon, 29 Jun 2020 06:48:40 GMT"], - "Etag": ["W/\"d-eEOWU4Cnr5DZ23ErRUeYu9oOIks\""], - "X-Powered-By": ["Express"] + "Connection": [ + "close" + ], + "Content-Length": [ + "13" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Date": [ + "Mon, 29 Jun 2020 06:48:40 GMT" + ], + "Etag": [ + "W/\"d-eEOWU4Cnr5DZ23ErRUeYu9oOIks\"" + ], + "X-Powered-By": [ + "Express" + ] }, "status_code": 200 }, @@ -436,29 +651,52 @@ "ppid": 1, "title": "node /app/server.js" }, - "processor": { "event": "transaction", "name": "transaction" }, + "processor": { + "event": "transaction", + "name": "transaction" + }, "service": { "environment": "production", - "framework": { "name": "express", "version": "4.17.1" }, - "language": { "name": "javascript" }, + "framework": { + "name": "express", + "version": "4.17.1" + }, + "language": { + "name": "javascript" + }, "name": "opbeans-node", "node": { "name": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" }, - "runtime": { "name": "node", "version": "12.18.1" }, + "runtime": { + "name": "node", + "version": "12.18.1" + }, "version": "1.0.0" }, - "source": { "ip": "172.18.0.7" }, - "timestamp": { "us": 1593413319953033 }, - "trace": { "id": "52b8fda5f6df745b990740ba18378620" }, + "source": { + "ip": "172.18.0.7" + }, + "timestamp": { + "us": 1593413319953033 + }, + "trace": { + "id": "52b8fda5f6df745b990740ba18378620" + }, "transaction": { - "custom": { "shoppingBasketCount": 42 }, - "duration": { "us": 270684 }, + "custom": { + "shoppingBasketCount": 42 + }, + "duration": { + "us": 270684 + }, "id": "a3afc2a112e9c893", "name": "POST /api/orders", "result": "HTTP 2xx", "sampled": true, - "span_count": { "started": 16 }, + "span_count": { + "started": 16 + }, "type": "request" }, "url": { @@ -469,50 +707,77 @@ "port": 3000, "scheme": "http" }, - "user": { "email": "kimchy@elastic.co", "id": "42", "name": "kimchy" }, + "user": { + "email": "kimchy@elastic.co", + "id": "42", + "name": "kimchy" + }, "user_agent": { - "device": { "name": "Other" }, + "device": { + "name": "Other" + }, "name": "Other", "original": "workload/2.4.3" } - }, - "p95": 270336, - "averageResponseTime": 270684, - "transactionsPerMinute": 0.25, - "impact": 15.261616628971955 + } }, { - "name": "ResourceHttpRequestHandler", + "key": { + "service.name": "opbeans-java", + "transaction.name": "ResourceHttpRequestHandler" + }, + "averageResponseTime": 14419.42857142857, + "transactionsPerMinute": 3.5, + "impact": 11.30657439844125, "sample": { - "@timestamp": "2020-06-29T06:48:44.376Z", + "@timestamp": "2020-06-29T06:48:06.640Z", "agent": { "ephemeral_id": "222af346-6dd9-45ef-ac85-d86b67edd2de", "name": "java", "version": "1.17.1-SNAPSHOT" }, - "client": { "ip": "172.18.0.9" }, + "client": { + "ip": "172.18.0.9" + }, "container": { "id": "918ebbd99b4f40003cf5713c080bb8120fa3bbe7ac4a96acb3aec558ced91ec0" }, - "ecs": { "version": "1.5.0" }, - "event": { "ingested": "2020-06-29T06:48:46.720380Z" }, + "ecs": { + "version": "1.5.0" + }, + "event": { + "ingested": "2020-06-29T06:48:15.517678Z" + }, "host": { "architecture": "amd64", "hostname": "918ebbd99b4f", "ip": "172.18.0.6", "name": "918ebbd99b4f", - "os": { "platform": "Linux" } + "os": { + "platform": "Linux" + } }, "http": { "request": { "headers": { - "Accept": ["*/*"], - "Accept-Encoding": ["gzip, deflate"], - "Host": ["172.18.0.6:3000"], - "User-Agent": ["Python/3.7 aiohttp/3.3.2"] + "Accept": [ + "*/*" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Host": [ + "172.18.0.6:3000" + ], + "User-Agent": [ + "Python/3.7 aiohttp/3.3.2" + ] }, "method": "get", - "socket": { "encrypted": false, "remote_address": "172.18.0.9" } + "socket": { + "encrypted": false, + "remote_address": "172.18.0.9" + } }, "response": { "finished": true, @@ -529,63 +794,100 @@ "version": "8.0.0", "version_major": 8 }, - "process": { "pid": 6, "ppid": 1, "title": "/opt/java/openjdk/bin/java" }, - "processor": { "event": "transaction", "name": "transaction" }, + "process": { + "pid": 6, + "ppid": 1, + "title": "/opt/java/openjdk/bin/java" + }, + "processor": { + "event": "transaction", + "name": "transaction" + }, "service": { "environment": "production", - "framework": { "name": "Spring Web MVC", "version": "5.0.6.RELEASE" }, - "language": { "name": "Java", "version": "11.0.7" }, + "framework": { + "name": "Spring Web MVC", + "version": "5.0.6.RELEASE" + }, + "language": { + "name": "Java", + "version": "11.0.7" + }, "name": "opbeans-java", "node": { "name": "918ebbd99b4f40003cf5713c080bb8120fa3bbe7ac4a96acb3aec558ced91ec0" }, - "runtime": { "name": "Java", "version": "11.0.7" }, + "runtime": { + "name": "Java", + "version": "11.0.7" + }, "version": "None" }, - "source": { "ip": "172.18.0.9" }, - "timestamp": { "us": 1593413324376010 }, - "trace": { "id": "7e70dc471913473e7d3bffda9b27d720" }, + "source": { + "ip": "172.18.0.9" + }, + "timestamp": { + "us": 1593413286640008 + }, + "trace": { + "id": "81d8ffb0a39e755eed400f6486e15672" + }, "transaction": { - "duration": { "us": 1420 }, - "id": "5c4e9f4b0846c2f8", + "duration": { + "us": 2953 + }, + "id": "353d42a2f9046e99", "name": "ResourceHttpRequestHandler", "result": "HTTP 4xx", "sampled": true, - "span_count": { "dropped": 0, "started": 0 }, + "span_count": { + "dropped": 0, + "started": 0 + }, "type": "request" }, "url": { "domain": "172.18.0.6", - "full": "http://172.18.0.6:3000/api/types", - "path": "/api/types", + "full": "http://172.18.0.6:3000/api/types/3", + "path": "/api/types/3", "port": 3000, "scheme": "http" }, "user_agent": { - "device": { "name": "Other" }, + "device": { + "name": "Other" + }, "name": "Other", "original": "Python/3.7 aiohttp/3.3.2" } - }, - "p95": 4120, - "averageResponseTime": 14419.42857142857, - "transactionsPerMinute": 3.5, - "impact": 11.30657439844125 + } }, { - "name": "/orders", + "key": { + "service.name": "client", + "transaction.name": "/orders" + }, + "averageResponseTime": 81500, + "transactionsPerMinute": 0.5, + "impact": 9.072365225837785, "sample": { - "@timestamp": "2020-06-29T06:48:38.358Z", - "agent": { "name": "rum-js", "version": "5.2.0" }, - "client": { "ip": "172.18.0.8" }, - "ecs": { "version": "1.5.0" }, - "event": { "ingested": "2020-06-29T06:48:39.365914Z" }, + "@timestamp": "2020-06-29T06:48:29.296Z", + "agent": { + "name": "rum-js", + "version": "5.2.0" + }, + "client": { + "ip": "172.18.0.8" + }, + "ecs": { + "version": "1.5.0" + }, + "event": { + "ingested": "2020-06-29T06:48:29.986555Z" + }, "http": { - "request": { "referrer": "" }, - "response": { - "decoded_body_size": 813, - "encoded_body_size": 813, - "transfer_size": 962 + "request": { + "referrer": "" } }, "observer": { @@ -596,53 +898,50 @@ "version": "8.0.0", "version_major": 8 }, - "processor": { "event": "transaction", "name": "transaction" }, + "processor": { + "event": "transaction", + "name": "transaction" + }, "service": { - "language": { "name": "javascript" }, + "language": { + "name": "javascript" + }, "name": "client", "version": "1.0.0" }, - "source": { "ip": "172.18.0.8" }, - "timestamp": { "us": 1593413318358392 }, - "trace": { "id": "c1dea08a4128e776fd9965ccf8c8da99" }, + "source": { + "ip": "172.18.0.8" + }, + "timestamp": { + "us": 1593413309296660 + }, + "trace": { + "id": "978b56807e0b7a27cbc41a0dfb665f47" + }, "transaction": { "custom": { "userConfig": { - "featureFlags": ["double-trouble", "4423-hotfix"], + "featureFlags": [ + "double-trouble", + "4423-hotfix" + ], "showDashboard": true } }, - "duration": { "us": 140000 }, - "id": "4f2ea2796645d6e5", - "marks": { - "agent": { - "domComplete": 126, - "domInteractive": 116, - "timeToFirstByte": 3 - }, - "navigationTiming": { - "connectEnd": 0, - "connectStart": 0, - "domComplete": 126, - "domContentLoadedEventEnd": 116, - "domContentLoadedEventStart": 116, - "domInteractive": 116, - "domLoading": 20, - "domainLookupEnd": 0, - "domainLookupStart": 0, - "fetchStart": 0, - "loadEventEnd": 126, - "loadEventStart": 126, - "requestStart": 1, - "responseEnd": 3, - "responseStart": 3 - } + "duration": { + "us": 23000 }, + "id": "c3801eadbdef5c7c", "name": "/orders", - "page": { "referer": "", "url": "http://opbeans-node:3000/orders" }, + "page": { + "referer": "", + "url": "http://opbeans-node:3000/orders" + }, "sampled": true, - "span_count": { "started": 7 }, - "type": "page-load" + "span_count": { + "started": 1 + }, + "type": "route-change" }, "url": { "domain": "opbeans-node", @@ -652,59 +951,94 @@ "port": 3000, "scheme": "http" }, - "user": { "email": "adastra@example.com", "id": "3", "name": "trillian" }, + "user": { + "email": "arthur.dent@example.com", + "id": "1", + "name": "arthurdent" + }, "user_agent": { - "device": { "name": "Other" }, + "device": { + "name": "Other" + }, "name": "HeadlessChrome", "original": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/79.0.3945.0 Safari/537.36", - "os": { "name": "Linux" }, + "os": { + "name": "Linux" + }, "version": "79.0.3945" } - }, - "p95": 140160, - "averageResponseTime": 81500, - "transactionsPerMinute": 0.5, - "impact": 9.072365225837785 + } }, { - "name": "APIRestController#customer", + "key": { + "service.name": "opbeans-java", + "transaction.name": "APIRestController#customer" + }, + "averageResponseTime": 19370.6, + "transactionsPerMinute": 1.25, + "impact": 5.270496679320978, "sample": { - "@timestamp": "2020-06-29T06:48:38.893Z", + "@timestamp": "2020-06-29T06:48:08.631Z", "agent": { "ephemeral_id": "222af346-6dd9-45ef-ac85-d86b67edd2de", "name": "java", "version": "1.17.1-SNAPSHOT" }, - "client": { "ip": "172.18.0.9" }, + "client": { + "ip": "172.18.0.9" + }, "container": { "id": "918ebbd99b4f40003cf5713c080bb8120fa3bbe7ac4a96acb3aec558ced91ec0" }, - "ecs": { "version": "1.5.0" }, - "event": { "ingested": "2020-06-29T06:48:46.680126Z" }, + "ecs": { + "version": "1.5.0" + }, + "event": { + "ingested": "2020-06-29T06:48:15.536897Z" + }, "host": { "architecture": "amd64", "hostname": "918ebbd99b4f", "ip": "172.18.0.6", "name": "918ebbd99b4f", - "os": { "platform": "Linux" } + "os": { + "platform": "Linux" + } }, "http": { "request": { "headers": { - "Accept": ["*/*"], - "Accept-Encoding": ["gzip, deflate"], - "Host": ["172.18.0.6:3000"], - "User-Agent": ["Python/3.7 aiohttp/3.3.2"] + "Accept": [ + "*/*" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Host": [ + "172.18.0.6:3000" + ], + "User-Agent": [ + "Python/3.7 aiohttp/3.3.2" + ] }, "method": "get", - "socket": { "encrypted": false, "remote_address": "172.18.0.9" } + "socket": { + "encrypted": false, + "remote_address": "172.18.0.9" + } }, "response": { "finished": true, "headers": { - "Content-Type": ["application/json;charset=UTF-8"], - "Date": ["Mon, 29 Jun 2020 06:48:38 GMT"], - "Transfer-Encoding": ["chunked"] + "Content-Type": [ + "application/json;charset=UTF-8" + ], + "Date": [ + "Mon, 29 Jun 2020 06:48:08 GMT" + ], + "Transfer-Encoding": [ + "chunked" + ] }, "headers_sent": true, "status_code": 200 @@ -719,59 +1053,101 @@ "version": "8.0.0", "version_major": 8 }, - "process": { "pid": 6, "ppid": 1, "title": "/opt/java/openjdk/bin/java" }, - "processor": { "event": "transaction", "name": "transaction" }, + "process": { + "pid": 6, + "ppid": 1, + "title": "/opt/java/openjdk/bin/java" + }, + "processor": { + "event": "transaction", + "name": "transaction" + }, "service": { "environment": "production", - "framework": { "name": "Spring Web MVC", "version": "5.0.6.RELEASE" }, - "language": { "name": "Java", "version": "11.0.7" }, + "framework": { + "name": "Spring Web MVC", + "version": "5.0.6.RELEASE" + }, + "language": { + "name": "Java", + "version": "11.0.7" + }, "name": "opbeans-java", "node": { "name": "918ebbd99b4f40003cf5713c080bb8120fa3bbe7ac4a96acb3aec558ced91ec0" }, - "runtime": { "name": "Java", "version": "11.0.7" }, + "runtime": { + "name": "Java", + "version": "11.0.7" + }, "version": "None" }, - "source": { "ip": "172.18.0.9" }, - "timestamp": { "us": 1593413318893006 }, - "trace": { "id": "efcf3446b51d080dbde1339969cf79a0" }, + "source": { + "ip": "172.18.0.9" + }, + "timestamp": { + "us": 1593413288631008 + }, + "trace": { + "id": "c00da24c5c793cd679ce3df47cee8f37" + }, "transaction": { - "duration": { "us": 4594 }, - "id": "31ef64d71933e846", + "duration": { + "us": 76826 + }, + "id": "3c8403055ff75866", "name": "APIRestController#customer", "result": "HTTP 2xx", "sampled": true, - "span_count": { "dropped": 0, "started": 2 }, + "span_count": { + "dropped": 0, + "started": 2 + }, "type": "request" }, "url": { "domain": "172.18.0.6", - "full": "http://172.18.0.6:3000/api/customers/235", - "path": "/api/customers/235", + "full": "http://172.18.0.6:3000/api/customers/56", + "path": "/api/customers/56", "port": 3000, "scheme": "http" }, "user_agent": { - "device": { "name": "Other" }, + "device": { + "name": "Other" + }, "name": "Other", "original": "Python/3.7 aiohttp/3.3.2" } - }, - "p95": 77280, - "averageResponseTime": 19370.6, - "transactionsPerMinute": 1.25, - "impact": 5.270496679320978 + } }, { - "name": "/products", + "key": { + "service.name": "client", + "transaction.name": "/products" + }, + "averageResponseTime": 77000, + "transactionsPerMinute": 0.25, + "impact": 4.129424578484989, "sample": { "@timestamp": "2020-06-29T06:48:48.824Z", - "agent": { "name": "rum-js", "version": "5.2.0" }, - "client": { "ip": "172.18.0.8" }, - "ecs": { "version": "1.5.0" }, - "event": { "ingested": "2020-06-29T06:48:49.293664Z" }, + "agent": { + "name": "rum-js", + "version": "5.2.0" + }, + "client": { + "ip": "172.18.0.8" + }, + "ecs": { + "version": "1.5.0" + }, + "event": { + "ingested": "2020-06-29T06:48:49.293664Z" + }, "http": { - "request": { "referrer": "" }, + "request": { + "referrer": "" + }, "response": { "decoded_body_size": 813, "encoded_body_size": 813, @@ -786,23 +1162,39 @@ "version": "8.0.0", "version_major": 8 }, - "processor": { "event": "transaction", "name": "transaction" }, + "processor": { + "event": "transaction", + "name": "transaction" + }, "service": { - "language": { "name": "javascript" }, + "language": { + "name": "javascript" + }, "name": "client", "version": "1.0.0" }, - "source": { "ip": "172.18.0.8" }, - "timestamp": { "us": 1593413328824656 }, - "trace": { "id": "f6c4a9197bbd080bd45072970f251525" }, + "source": { + "ip": "172.18.0.8" + }, + "timestamp": { + "us": 1593413328824656 + }, + "trace": { + "id": "f6c4a9197bbd080bd45072970f251525" + }, "transaction": { "custom": { "userConfig": { - "featureFlags": ["double-trouble", "4423-hotfix"], + "featureFlags": [ + "double-trouble", + "4423-hotfix" + ], "showDashboard": true } }, - "duration": { "us": 77000 }, + "duration": { + "us": 77000 + }, "id": "a11ede1968973bc5", "marks": { "agent": { @@ -829,9 +1221,14 @@ } }, "name": "/products", - "page": { "referer": "", "url": "http://opbeans-node:3000/products" }, + "page": { + "referer": "", + "url": "http://opbeans-node:3000/products" + }, "sampled": true, - "span_count": { "started": 5 }, + "span_count": { + "started": 5 + }, "type": "page-load" }, "url": { @@ -842,29 +1239,52 @@ "port": 3000, "scheme": "http" }, - "user": { "email": "z@example.com", "id": "4", "name": "zaphod" }, + "user": { + "email": "z@example.com", + "id": "4", + "name": "zaphod" + }, "user_agent": { - "device": { "name": "Other" }, + "device": { + "name": "Other" + }, "name": "HeadlessChrome", "original": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/79.0.3945.0 Safari/537.36", - "os": { "name": "Linux" }, + "os": { + "name": "Linux" + }, "version": "79.0.3945" } - }, - "p95": 76800, - "averageResponseTime": 77000, - "transactionsPerMinute": 0.25, - "impact": 4.129424578484989 + } }, { - "name": "/customers", + "key": { + "service.name": "client", + "transaction.name": "/customers" + }, + "averageResponseTime": 33500, + "transactionsPerMinute": 0.5, + "impact": 3.5546640380951287, "sample": { - "@timestamp": "2020-06-29T06:48:48.287Z", - "agent": { "name": "rum-js", "version": "5.2.0" }, - "client": { "ip": "172.18.0.8" }, - "ecs": { "version": "1.5.0" }, - "event": { "ingested": "2020-06-29T06:48:49.292535Z" }, - "http": { "request": { "referrer": "" } }, + "@timestamp": "2020-06-29T06:48:35.071Z", + "agent": { + "name": "rum-js", + "version": "5.2.0" + }, + "client": { + "ip": "172.18.0.8" + }, + "ecs": { + "version": "1.5.0" + }, + "event": { + "ingested": "2020-06-29T06:48:36.077184Z" + }, + "http": { + "request": { + "referrer": "" + } + }, "observer": { "ephemeral_id": "99908b73-9813-4a73-baa6-993db405523a", "hostname": "aa0bd613aa4c", @@ -873,28 +1293,49 @@ "version": "8.0.0", "version_major": 8 }, - "processor": { "event": "transaction", "name": "transaction" }, + "processor": { + "event": "transaction", + "name": "transaction" + }, "service": { - "language": { "name": "javascript" }, + "language": { + "name": "javascript" + }, "name": "client", "version": "1.0.0" }, - "source": { "ip": "172.18.0.8" }, - "timestamp": { "us": 1593413328287946 }, - "trace": { "id": "48d130530a1fc0b2b99d138d3461bad4" }, + "source": { + "ip": "172.18.0.8" + }, + "timestamp": { + "us": 1593413315071116 + }, + "trace": { + "id": "547a92e82a25387321d1b967f2dd0f48" + }, "transaction": { "custom": { "userConfig": { - "featureFlags": ["double-trouble", "4423-hotfix"], + "featureFlags": [ + "double-trouble", + "4423-hotfix" + ], "showDashboard": true } }, - "duration": { "us": 39000 }, - "id": "2f3a2b0fd3016d3e", + "duration": { + "us": 28000 + }, + "id": "d24f9b9dacb83450", "name": "/customers", - "page": { "referer": "", "url": "http://opbeans-node:3000/customers" }, + "page": { + "referer": "", + "url": "http://opbeans-node:3000/customers" + }, "sampled": true, - "span_count": { "started": 1 }, + "span_count": { + "started": 1 + }, "type": "route-change" }, "url": { @@ -905,59 +1346,94 @@ "port": 3000, "scheme": "http" }, - "user": { "email": "adastra@example.com", "id": "3", "name": "trillian" }, + "user": { + "email": "arthur.dent@example.com", + "id": "1", + "name": "arthurdent" + }, "user_agent": { - "device": { "name": "Other" }, + "device": { + "name": "Other" + }, "name": "HeadlessChrome", "original": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/79.0.3945.0 Safari/537.36", - "os": { "name": "Linux" }, + "os": { + "name": "Linux" + }, "version": "79.0.3945" } - }, - "p95": 39040, - "averageResponseTime": 33500, - "transactionsPerMinute": 0.5, - "impact": 3.5546640380951287 + } }, { - "name": "APIRestController#customers", + "key": { + "service.name": "opbeans-java", + "transaction.name": "APIRestController#customers" + }, + "averageResponseTime": 16690.75, + "transactionsPerMinute": 1, + "impact": 3.541042213287889, "sample": { - "@timestamp": "2020-06-29T06:48:43.765Z", + "@timestamp": "2020-06-29T06:48:22.372Z", "agent": { "ephemeral_id": "222af346-6dd9-45ef-ac85-d86b67edd2de", "name": "java", "version": "1.17.1-SNAPSHOT" }, - "client": { "ip": "172.18.0.9" }, + "client": { + "ip": "172.18.0.9" + }, "container": { "id": "918ebbd99b4f40003cf5713c080bb8120fa3bbe7ac4a96acb3aec558ced91ec0" }, - "ecs": { "version": "1.5.0" }, - "event": { "ingested": "2020-06-29T06:48:46.716850Z" }, + "ecs": { + "version": "1.5.0" + }, + "event": { + "ingested": "2020-06-29T06:48:25.888154Z" + }, "host": { "architecture": "amd64", "hostname": "918ebbd99b4f", "ip": "172.18.0.6", "name": "918ebbd99b4f", - "os": { "platform": "Linux" } + "os": { + "platform": "Linux" + } }, "http": { "request": { "headers": { - "Accept": ["*/*"], - "Accept-Encoding": ["gzip, deflate"], - "Host": ["172.18.0.6:3000"], - "User-Agent": ["Python/3.7 aiohttp/3.3.2"] + "Accept": [ + "*/*" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Host": [ + "172.18.0.6:3000" + ], + "User-Agent": [ + "Python/3.7 aiohttp/3.3.2" + ] }, "method": "get", - "socket": { "encrypted": false, "remote_address": "172.18.0.9" } + "socket": { + "encrypted": false, + "remote_address": "172.18.0.9" + } }, "response": { "finished": true, "headers": { - "Content-Type": ["application/json;charset=UTF-8"], - "Date": ["Mon, 29 Jun 2020 06:48:43 GMT"], - "Transfer-Encoding": ["chunked"] + "Content-Type": [ + "application/json;charset=UTF-8" + ], + "Date": [ + "Mon, 29 Jun 2020 06:48:21 GMT" + ], + "Transfer-Encoding": [ + "chunked" + ] }, "headers_sent": true, "status_code": 500 @@ -972,29 +1448,56 @@ "version": "8.0.0", "version_major": 8 }, - "process": { "pid": 6, "ppid": 1, "title": "/opt/java/openjdk/bin/java" }, - "processor": { "event": "transaction", "name": "transaction" }, + "process": { + "pid": 6, + "ppid": 1, + "title": "/opt/java/openjdk/bin/java" + }, + "processor": { + "event": "transaction", + "name": "transaction" + }, "service": { "environment": "production", - "framework": { "name": "Spring Web MVC", "version": "5.0.6.RELEASE" }, - "language": { "name": "Java", "version": "11.0.7" }, + "framework": { + "name": "Spring Web MVC", + "version": "5.0.6.RELEASE" + }, + "language": { + "name": "Java", + "version": "11.0.7" + }, "name": "opbeans-java", "node": { "name": "918ebbd99b4f40003cf5713c080bb8120fa3bbe7ac4a96acb3aec558ced91ec0" }, - "runtime": { "name": "Java", "version": "11.0.7" }, + "runtime": { + "name": "Java", + "version": "11.0.7" + }, "version": "None" }, - "source": { "ip": "172.18.0.9" }, - "timestamp": { "us": 1593413323765008 }, - "trace": { "id": "affce4cea9b60bd5b635dc1bd2e4ce79" }, + "source": { + "ip": "172.18.0.9" + }, + "timestamp": { + "us": 1593413302372009 + }, + "trace": { + "id": "21dd795dc3a260b1bf7ebbbac1e86fb8" + }, "transaction": { - "duration": { "us": 10880 }, - "id": "cfe0a84b49b4a340", + "duration": { + "us": 14795 + }, + "id": "0157fc513282138f", "name": "APIRestController#customers", "result": "HTTP 5xx", "sampled": true, - "span_count": { "dropped": 0, "started": 2 }, + "span_count": { + "dropped": 0, + "started": 2 + }, "type": "request" }, "url": { @@ -1005,40 +1508,61 @@ "scheme": "http" }, "user_agent": { - "device": { "name": "Other" }, + "device": { + "name": "Other" + }, "name": "Other", "original": "Python/3.7 aiohttp/3.3.2" } - }, - "p95": 26432, - "averageResponseTime": 16690.75, - "transactionsPerMinute": 1, - "impact": 3.541042213287889 + } }, { - "name": "GET /log-message", + "key": { + "service.name": "opbeans-node", + "transaction.name": "GET /log-message" + }, + "averageResponseTime": 32667.5, + "transactionsPerMinute": 0.5, + "impact": 3.458966408120217, "sample": { - "@timestamp": "2020-06-29T06:48:28.944Z", - "agent": { "name": "nodejs", "version": "3.6.1" }, - "client": { "ip": "172.18.0.7" }, + "@timestamp": "2020-06-29T06:48:25.944Z", + "agent": { + "name": "nodejs", + "version": "3.6.1" + }, + "client": { + "ip": "172.18.0.7" + }, "container": { "id": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" }, - "ecs": { "version": "1.5.0" }, - "event": { "ingested": "2020-06-29T06:48:39.370695Z" }, + "ecs": { + "version": "1.5.0" + }, + "event": { + "ingested": "2020-06-29T06:48:29.976822Z" + }, "host": { "architecture": "x64", "hostname": "41712ded148f", "ip": "172.18.0.7", "name": "41712ded148f", - "os": { "platform": "linux" } + "os": { + "platform": "linux" + } }, "http": { "request": { "headers": { - "Connection": ["close"], - "Host": ["opbeans-node:3000"], - "User-Agent": ["workload/2.4.3"] + "Connection": [ + "close" + ], + "Host": [ + "opbeans-node:3000" + ], + "User-Agent": [ + "workload/2.4.3" + ] }, "method": "get", "socket": { @@ -1048,12 +1572,24 @@ }, "response": { "headers": { - "Connection": ["close"], - "Content-Length": ["24"], - "Content-Type": ["text/html; charset=utf-8"], - "Date": ["Mon, 29 Jun 2020 06:48:28 GMT"], - "Etag": ["W/\"18-MS3VbhH7auHMzO0fUuNF6v14N/M\""], - "X-Powered-By": ["Express"] + "Connection": [ + "close" + ], + "Content-Length": [ + "24" + ], + "Content-Type": [ + "text/html; charset=utf-8" + ], + "Date": [ + "Mon, 29 Jun 2020 06:48:25 GMT" + ], + "Etag": [ + "W/\"18-MS3VbhH7auHMzO0fUuNF6v14N/M\"" + ], + "X-Powered-By": [ + "Express" + ] }, "status_code": 500 }, @@ -1083,29 +1619,52 @@ "ppid": 1, "title": "node /app/server.js" }, - "processor": { "event": "transaction", "name": "transaction" }, + "processor": { + "event": "transaction", + "name": "transaction" + }, "service": { "environment": "production", - "framework": { "name": "express", "version": "4.17.1" }, - "language": { "name": "javascript" }, + "framework": { + "name": "express", + "version": "4.17.1" + }, + "language": { + "name": "javascript" + }, "name": "opbeans-node", "node": { "name": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" }, - "runtime": { "name": "node", "version": "12.18.1" }, + "runtime": { + "name": "node", + "version": "12.18.1" + }, "version": "1.0.0" }, - "source": { "ip": "172.18.0.7" }, - "timestamp": { "us": 1593413308944016 }, - "trace": { "id": "afabe4cb397616f5ec35a2f3da49ba62" }, + "source": { + "ip": "172.18.0.7" + }, + "timestamp": { + "us": 1593413305944023 + }, + "trace": { + "id": "cd2ad726ad164d701c5d3103cbab0c81" + }, "transaction": { - "custom": { "shoppingBasketCount": 42 }, - "duration": { "us": 26788 }, - "id": "cc8c4261387507cf", + "custom": { + "shoppingBasketCount": 42 + }, + "duration": { + "us": 38547 + }, + "id": "9e41667eb64dea55", "name": "GET /log-message", "result": "HTTP 5xx", "sampled": true, - "span_count": { "started": 0 }, + "span_count": { + "started": 0 + }, "type": "request" }, "url": { @@ -1116,60 +1675,82 @@ "port": 3000, "scheme": "http" }, - "user": { "email": "kimchy@elastic.co", "id": "42", "name": "kimchy" }, + "user": { + "email": "kimchy@elastic.co", + "id": "42", + "name": "kimchy" + }, "user_agent": { - "device": { "name": "Other" }, + "device": { + "name": "Other" + }, "name": "Other", "original": "workload/2.4.3" } - }, - "p95": 38528, - "averageResponseTime": 32667.5, - "transactionsPerMinute": 0.5, - "impact": 3.458966408120217 + } }, { - "name": "APIRestController#stats", + "key": { + "service.name": "opbeans-java", + "transaction.name": "APIRestController#stats" + }, + "averageResponseTime": 15535, + "transactionsPerMinute": 1, + "impact": 3.275330415465657, "sample": { - "@timestamp": "2020-06-29T06:48:42.549Z", + "@timestamp": "2020-06-29T06:48:09.912Z", "agent": { "ephemeral_id": "222af346-6dd9-45ef-ac85-d86b67edd2de", "name": "java", "version": "1.17.1-SNAPSHOT" }, - "client": { "ip": "172.18.0.9" }, + "client": { + "ip": "172.18.0.9" + }, "container": { "id": "918ebbd99b4f40003cf5713c080bb8120fa3bbe7ac4a96acb3aec558ced91ec0" }, - "ecs": { "version": "1.5.0" }, - "event": { "ingested": "2020-06-29T06:48:46.715898Z" }, + "ecs": { + "version": "1.5.0" + }, + "event": { + "ingested": "2020-06-29T06:48:15.543824Z" + }, "host": { "architecture": "amd64", "hostname": "918ebbd99b4f", "ip": "172.18.0.6", "name": "918ebbd99b4f", - "os": { "platform": "Linux" } + "os": { + "platform": "Linux" + } }, "http": { "request": { "headers": { - "Accept": ["*/*"], - "Accept-Encoding": ["gzip, deflate"], - "Host": ["172.18.0.6:3000"], - "User-Agent": ["Python/3.7 aiohttp/3.3.2"] + "Accept": [ + "*/*" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Host": [ + "172.18.0.6:3000" + ], + "User-Agent": [ + "Python/3.7 aiohttp/3.3.2" + ] }, "method": "get", - "socket": { "encrypted": false, "remote_address": "172.18.0.9" } + "socket": { + "encrypted": false, + "remote_address": "172.18.0.9" + } }, "response": { "finished": true, - "headers": { - "Content-Type": ["application/json;charset=UTF-8"], - "Date": ["Mon, 29 Jun 2020 06:48:42 GMT"], - "Transfer-Encoding": ["chunked"] - }, "headers_sent": true, - "status_code": 200 + "status_code": 500 }, "version": "1.1" }, @@ -1181,29 +1762,56 @@ "version": "8.0.0", "version_major": 8 }, - "process": { "pid": 6, "ppid": 1, "title": "/opt/java/openjdk/bin/java" }, - "processor": { "event": "transaction", "name": "transaction" }, + "process": { + "pid": 6, + "ppid": 1, + "title": "/opt/java/openjdk/bin/java" + }, + "processor": { + "event": "transaction", + "name": "transaction" + }, "service": { "environment": "production", - "framework": { "name": "Spring Web MVC", "version": "5.0.6.RELEASE" }, - "language": { "name": "Java", "version": "11.0.7" }, + "framework": { + "name": "Spring Web MVC", + "version": "5.0.6.RELEASE" + }, + "language": { + "name": "Java", + "version": "11.0.7" + }, "name": "opbeans-java", "node": { "name": "918ebbd99b4f40003cf5713c080bb8120fa3bbe7ac4a96acb3aec558ced91ec0" }, - "runtime": { "name": "Java", "version": "11.0.7" }, + "runtime": { + "name": "Java", + "version": "11.0.7" + }, "version": "None" }, - "source": { "ip": "172.18.0.9" }, - "timestamp": { "us": 1593413322549008 }, - "trace": { "id": "c3556e143784f94d4b4220dd40687fae" }, + "source": { + "ip": "172.18.0.9" + }, + "timestamp": { + "us": 1593413289912007 + }, + "trace": { + "id": "a17ceae4e18d50430ca15ecca5a3e69f" + }, "transaction": { - "duration": { "us": 9166 }, - "id": "ac40e567f63c3eef", + "duration": { + "us": 10930 + }, + "id": "9fb330060bb73271", "name": "APIRestController#stats", - "result": "HTTP 2xx", + "result": "HTTP 5xx", "sampled": true, - "span_count": { "dropped": 0, "started": 5 }, + "span_count": { + "dropped": 0, + "started": 5 + }, "type": "request" }, "url": { @@ -1214,40 +1822,61 @@ "scheme": "http" }, "user_agent": { - "device": { "name": "Other" }, + "device": { + "name": "Other" + }, "name": "Other", "original": "Python/3.7 aiohttp/3.3.2" } - }, - "p95": 32064, - "averageResponseTime": 15535, - "transactionsPerMinute": 1, - "impact": 3.275330415465657 + } }, { - "name": "GET /api/customers", + "key": { + "service.name": "opbeans-node", + "transaction.name": "GET /api/customers" + }, + "averageResponseTime": 20092, + "transactionsPerMinute": 0.75, + "impact": 3.168195050736987, "sample": { - "@timestamp": "2020-06-29T06:48:37.952Z", - "agent": { "name": "nodejs", "version": "3.6.1" }, - "client": { "ip": "172.18.0.7" }, + "@timestamp": "2020-06-29T06:48:28.444Z", + "agent": { + "name": "nodejs", + "version": "3.6.1" + }, + "client": { + "ip": "172.18.0.7" + }, "container": { "id": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" }, - "ecs": { "version": "1.5.0" }, - "event": { "ingested": "2020-06-29T06:48:39.492402Z" }, + "ecs": { + "version": "1.5.0" + }, + "event": { + "ingested": "2020-06-29T06:48:29.982737Z" + }, "host": { "architecture": "x64", "hostname": "41712ded148f", "ip": "172.18.0.7", "name": "41712ded148f", - "os": { "platform": "linux" } + "os": { + "platform": "linux" + } }, "http": { "request": { "headers": { - "Connection": ["close"], - "Host": ["opbeans-node:3000"], - "User-Agent": ["workload/2.4.3"] + "Connection": [ + "close" + ], + "Host": [ + "opbeans-node:3000" + ], + "User-Agent": [ + "workload/2.4.3" + ] }, "method": "get", "socket": { @@ -1257,12 +1886,24 @@ }, "response": { "headers": { - "Connection": ["close"], - "Content-Length": ["186769"], - "Content-Type": ["application/json; charset=utf-8"], - "Date": ["Mon, 29 Jun 2020 06:48:37 GMT"], - "Etag": ["W/\"2d991-yG3J8W/roH7fSxXTudZrO27Ax9s\""], - "X-Powered-By": ["Express"] + "Connection": [ + "close" + ], + "Content-Length": [ + "186769" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Date": [ + "Mon, 29 Jun 2020 06:48:28 GMT" + ], + "Etag": [ + "W/\"2d991-yG3J8W/roH7fSxXTudZrO27Ax9s\"" + ], + "X-Powered-By": [ + "Express" + ] }, "status_code": 200 }, @@ -1292,29 +1933,52 @@ "ppid": 1, "title": "node /app/server.js" }, - "processor": { "event": "transaction", "name": "transaction" }, + "processor": { + "event": "transaction", + "name": "transaction" + }, "service": { "environment": "production", - "framework": { "name": "express", "version": "4.17.1" }, - "language": { "name": "javascript" }, + "framework": { + "name": "express", + "version": "4.17.1" + }, + "language": { + "name": "javascript" + }, "name": "opbeans-node", "node": { "name": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" }, - "runtime": { "name": "node", "version": "12.18.1" }, + "runtime": { + "name": "node", + "version": "12.18.1" + }, "version": "1.0.0" }, - "source": { "ip": "172.18.0.7" }, - "timestamp": { "us": 1593413317952016 }, - "trace": { "id": "5d99327edae38ed735e8d7a6028cf719" }, + "source": { + "ip": "172.18.0.7" + }, + "timestamp": { + "us": 1593413308444015 + }, + "trace": { + "id": "792fb0b00256164e88b277ec40b65e14" + }, "transaction": { - "custom": { "shoppingBasketCount": 42 }, - "duration": { "us": 16824 }, - "id": "071808429ec9d00b", + "custom": { + "shoppingBasketCount": 42 + }, + "duration": { + "us": 26471 + }, + "id": "6c1f848752563d2b", "name": "GET /api/customers", "result": "HTTP 2xx", "sampled": true, - "span_count": { "started": 2 }, + "span_count": { + "started": 2 + }, "type": "request" }, "url": { @@ -1325,42 +1989,67 @@ "port": 3000, "scheme": "http" }, - "user": { "email": "kimchy@elastic.co", "id": "42", "name": "kimchy" }, + "user": { + "email": "kimchy@elastic.co", + "id": "42", + "name": "kimchy" + }, "user_agent": { - "device": { "name": "Other" }, + "device": { + "name": "Other" + }, "name": "Other", "original": "workload/2.4.3" } - }, - "p95": 26368, - "averageResponseTime": 20092, - "transactionsPerMinute": 0.75, - "impact": 3.168195050736987 + } }, { - "name": "GET /api/products/:id", + "key": { + "service.name": "opbeans-node", + "transaction.name": "GET /api/products/:id" + }, + "averageResponseTime": 13516.5, + "transactionsPerMinute": 1, + "impact": 2.8112687551548836, "sample": { - "@timestamp": "2020-06-29T06:48:24.977Z", - "agent": { "name": "nodejs", "version": "3.6.1" }, - "client": { "ip": "172.18.0.7" }, + "@timestamp": "2020-06-29T06:47:57.555Z", + "agent": { + "name": "nodejs", + "version": "3.6.1" + }, + "client": { + "ip": "172.18.0.7" + }, "container": { "id": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" }, - "ecs": { "version": "1.5.0" }, - "event": { "ingested": "2020-06-29T06:48:27.004717Z" }, + "ecs": { + "version": "1.5.0" + }, + "event": { + "ingested": "2020-06-29T06:47:59.085077Z" + }, "host": { "architecture": "x64", "hostname": "41712ded148f", "ip": "172.18.0.7", "name": "41712ded148f", - "os": { "platform": "linux" } + "os": { + "platform": "linux" + } }, "http": { "request": { "headers": { - "Connection": ["close"], - "Host": ["opbeans-node:3000"], - "User-Agent": ["workload/2.4.3"] + "Connection": [ + "close" + ], + "Host": [ + "opbeans-node:3000" + ], + "User-Agent": [ + "workload/2.4.3" + ] }, "method": "get", "socket": { @@ -1370,12 +2059,24 @@ }, "response": { "headers": { - "Connection": ["close"], - "Content-Length": ["231"], - "Content-Type": ["application/json; charset=utf-8"], - "Date": ["Mon, 29 Jun 2020 06:48:24 GMT"], - "Etag": ["W/\"e7-kkuzj37GZDzXDh0CWqh5Gan0VO4\""], - "X-Powered-By": ["Express"] + "Connection": [ + "close" + ], + "Content-Length": [ + "231" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Date": [ + "Mon, 29 Jun 2020 06:47:57 GMT" + ], + "Etag": [ + "W/\"e7-6JlJegaJ+ir0C8I8EmmOjms1dnc\"" + ], + "X-Powered-By": [ + "Express" + ] }, "status_code": 200 }, @@ -1401,79 +2102,127 @@ "/usr/local/lib/node_modules/pm2/lib/ProcessContainer.js", "ecosystem-workload.config.js" ], - "pid": 137, + "pid": 87, "ppid": 1, "title": "node /app/server.js" }, - "processor": { "event": "transaction", "name": "transaction" }, + "processor": { + "event": "transaction", + "name": "transaction" + }, "service": { "environment": "production", - "framework": { "name": "express", "version": "4.17.1" }, - "language": { "name": "javascript" }, + "framework": { + "name": "express", + "version": "4.17.1" + }, + "language": { + "name": "javascript" + }, "name": "opbeans-node", "node": { "name": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" }, - "runtime": { "name": "node", "version": "12.18.1" }, + "runtime": { + "name": "node", + "version": "12.18.1" + }, "version": "1.0.0" }, - "source": { "ip": "172.18.0.7" }, - "timestamp": { "us": 1593413304977014 }, - "trace": { "id": "b9b290bca14c99962fa9a1c509401630" }, + "source": { + "ip": "172.18.0.7" + }, + "timestamp": { + "us": 1593413277555176 + }, + "trace": { + "id": "8365e1763f19e4067b88521d4d9247a0" + }, "transaction": { - "custom": { "shoppingBasketCount": 42 }, - "duration": { "us": 4482 }, - "id": "b8d8284ff1fc25d6", + "custom": { + "shoppingBasketCount": 42 + }, + "duration": { + "us": 37709 + }, + "id": "be2722a418272f10", "name": "GET /api/products/:id", "result": "HTTP 2xx", "sampled": true, - "span_count": { "started": 1 }, + "span_count": { + "started": 1 + }, "type": "request" }, "url": { "domain": "opbeans-node", - "full": "http://opbeans-node:3000/api/products/3", - "original": "/api/products/3", - "path": "/api/products/3", + "full": "http://opbeans-node:3000/api/products/1", + "original": "/api/products/1", + "path": "/api/products/1", "port": 3000, "scheme": "http" }, - "user": { "email": "kimchy@elastic.co", "id": "42", "name": "kimchy" }, + "user": { + "email": "kimchy@elastic.co", + "id": "42", + "name": "kimchy" + }, "user_agent": { - "device": { "name": "Other" }, + "device": { + "name": "Other" + }, "name": "Other", "original": "workload/2.4.3" } - }, - "p95": 37856, - "averageResponseTime": 13516.5, - "transactionsPerMinute": 1, - "impact": 2.8112687551548836 + } }, { - "name": "GET /api/types", + "key": { + "service.name": "opbeans-node", + "transaction.name": "GET /api/types" + }, + "averageResponseTime": 26992.5, + "transactionsPerMinute": 0.5, + "impact": 2.8066131947777255, "sample": { - "@timestamp": "2020-06-29T06:48:26.443Z", - "agent": { "name": "nodejs", "version": "3.6.1" }, - "client": { "ip": "172.18.0.7" }, + "@timestamp": "2020-06-29T06:47:52.935Z", + "agent": { + "name": "nodejs", + "version": "3.6.1" + }, + "client": { + "ip": "172.18.0.7" + }, "container": { "id": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" }, - "ecs": { "version": "1.5.0" }, - "event": { "ingested": "2020-06-29T06:48:29.977518Z" }, + "ecs": { + "version": "1.5.0" + }, + "event": { + "ingested": "2020-06-29T06:47:55.471071Z" + }, "host": { "architecture": "x64", "hostname": "41712ded148f", "ip": "172.18.0.7", "name": "41712ded148f", - "os": { "platform": "linux" } + "os": { + "platform": "linux" + } }, "http": { "request": { "headers": { - "Connection": ["close"], - "Host": ["opbeans-node:3000"], - "User-Agent": ["workload/2.4.3"] + "Connection": [ + "close" + ], + "Host": [ + "opbeans-node:3000" + ], + "User-Agent": [ + "workload/2.4.3" + ] }, "method": "get", "socket": { @@ -1483,12 +2232,24 @@ }, "response": { "headers": { - "Connection": ["close"], - "Content-Length": ["112"], - "Content-Type": ["application/json; charset=utf-8"], - "Date": ["Mon, 29 Jun 2020 06:48:26 GMT"], - "Etag": ["W/\"70-1z6hT7P1WHgBgS/BeUEVeHhOCQU\""], - "X-Powered-By": ["Express"] + "Connection": [ + "close" + ], + "Content-Length": [ + "112" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Date": [ + "Mon, 29 Jun 2020 06:47:52 GMT" + ], + "Etag": [ + "W/\"70-1z6hT7P1WHgBgS/BeUEVeHhOCQU\"" + ], + "X-Powered-By": [ + "Express" + ] }, "status_code": 200 }, @@ -1514,33 +2275,56 @@ "/usr/local/lib/node_modules/pm2/lib/ProcessContainer.js", "ecosystem-workload.config.js" ], - "pid": 137, + "pid": 63, "ppid": 1, "title": "node /app/server.js" }, - "processor": { "event": "transaction", "name": "transaction" }, + "processor": { + "event": "transaction", + "name": "transaction" + }, "service": { "environment": "production", - "framework": { "name": "express", "version": "4.17.1" }, - "language": { "name": "javascript" }, + "framework": { + "name": "express", + "version": "4.17.1" + }, + "language": { + "name": "javascript" + }, "name": "opbeans-node", "node": { "name": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" }, - "runtime": { "name": "node", "version": "12.18.1" }, + "runtime": { + "name": "node", + "version": "12.18.1" + }, "version": "1.0.0" }, - "source": { "ip": "172.18.0.7" }, - "timestamp": { "us": 1593413306443014 }, - "trace": { "id": "be3f4eb50d253afc032c90eacaa85072" }, + "source": { + "ip": "172.18.0.7" + }, + "timestamp": { + "us": 1593413272935117 + }, + "trace": { + "id": "2946c536a33d163d0c984d00d1f3839a" + }, "transaction": { - "custom": { "shoppingBasketCount": 42 }, - "duration": { "us": 8892 }, - "id": "ccce129bb8c6b125", + "custom": { + "shoppingBasketCount": 42 + }, + "duration": { + "us": 45093 + }, + "id": "103482fda88b9400", "name": "GET /api/types", "result": "HTTP 2xx", "sampled": true, - "span_count": { "started": 2 }, + "span_count": { + "started": 2 + }, "type": "request" }, "url": { @@ -1551,42 +2335,67 @@ "port": 3000, "scheme": "http" }, - "user": { "email": "kimchy@elastic.co", "id": "42", "name": "kimchy" }, + "user": { + "email": "kimchy@elastic.co", + "id": "42", + "name": "kimchy" + }, "user_agent": { - "device": { "name": "Other" }, + "device": { + "name": "Other" + }, "name": "Other", "original": "workload/2.4.3" } - }, - "p95": 45248, - "averageResponseTime": 26992.5, - "transactionsPerMinute": 0.5, - "impact": 2.8066131947777255 + } }, { - "name": "GET static file", + "key": { + "service.name": "opbeans-node", + "transaction.name": "GET static file" + }, + "averageResponseTime": 3492.9285714285716, + "transactionsPerMinute": 3.5, + "impact": 2.5144049360435208, "sample": { - "@timestamp": "2020-06-29T06:48:40.953Z", - "agent": { "name": "nodejs", "version": "3.6.1" }, - "client": { "ip": "172.18.0.7" }, + "@timestamp": "2020-06-29T06:47:53.427Z", + "agent": { + "name": "nodejs", + "version": "3.6.1" + }, + "client": { + "ip": "172.18.0.7" + }, "container": { "id": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" }, - "ecs": { "version": "1.5.0" }, - "event": { "ingested": "2020-06-29T06:48:43.992454Z" }, + "ecs": { + "version": "1.5.0" + }, + "event": { + "ingested": "2020-06-29T06:47:55.472070Z" + }, "host": { "architecture": "x64", "hostname": "41712ded148f", "ip": "172.18.0.7", "name": "41712ded148f", - "os": { "platform": "linux" } + "os": { + "platform": "linux" + } }, "http": { "request": { "headers": { - "Connection": ["close"], - "Host": ["opbeans-node:3000"], - "User-Agent": ["workload/2.4.3"] + "Connection": [ + "close" + ], + "Host": [ + "opbeans-node:3000" + ], + "User-Agent": [ + "workload/2.4.3" + ] }, "method": "get", "socket": { @@ -1596,15 +2405,33 @@ }, "response": { "headers": { - "Accept-Ranges": ["bytes"], - "Cache-Control": ["public, max-age=0"], - "Connection": ["close"], - "Content-Length": ["15086"], - "Content-Type": ["image/x-icon"], - "Date": ["Mon, 29 Jun 2020 06:48:40 GMT"], - "Etag": ["W/\"3aee-1725aff14f0\""], - "Last-Modified": ["Thu, 28 May 2020 11:16:06 GMT"], - "X-Powered-By": ["Express"] + "Accept-Ranges": [ + "bytes" + ], + "Cache-Control": [ + "public, max-age=0" + ], + "Connection": [ + "close" + ], + "Content-Length": [ + "15086" + ], + "Content-Type": [ + "image/x-icon" + ], + "Date": [ + "Mon, 29 Jun 2020 06:47:53 GMT" + ], + "Etag": [ + "W/\"3aee-1725aff14f0\"" + ], + "Last-Modified": [ + "Thu, 28 May 2020 11:16:06 GMT" + ], + "X-Powered-By": [ + "Express" + ] }, "status_code": 200 }, @@ -1624,32 +2451,53 @@ "/usr/local/lib/node_modules/pm2/lib/ProcessContainer.js", "ecosystem-workload.config.js" ], - "pid": 137, + "pid": 63, "ppid": 1, "title": "node /app/server.js" }, - "processor": { "event": "transaction", "name": "transaction" }, + "processor": { + "event": "transaction", + "name": "transaction" + }, "service": { "environment": "production", - "framework": { "name": "express", "version": "4.17.1" }, - "language": { "name": "javascript" }, + "framework": { + "name": "express", + "version": "4.17.1" + }, + "language": { + "name": "javascript" + }, "name": "opbeans-node", "node": { "name": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" }, - "runtime": { "name": "node", "version": "12.18.1" }, + "runtime": { + "name": "node", + "version": "12.18.1" + }, "version": "1.0.0" }, - "source": { "ip": "172.18.0.7" }, - "timestamp": { "us": 1593413320953016 }, - "trace": { "id": "292393440bbe04385f3c2e3715ac35fe" }, + "source": { + "ip": "172.18.0.7" + }, + "timestamp": { + "us": 1593413273427016 + }, + "trace": { + "id": "ec8a804fedf28fcf81d5682d69a16970" + }, "transaction": { - "duration": { "us": 1671 }, - "id": "d1d964ca1865dce3", + "duration": { + "us": 4934 + }, + "id": "ab90a62901b770e6", "name": "GET static file", "result": "HTTP 2xx", "sampled": true, - "span_count": { "started": 0 }, + "span_count": { + "started": 0 + }, "type": "request" }, "url": { @@ -1661,55 +2509,84 @@ "scheme": "http" }, "user_agent": { - "device": { "name": "Other" }, + "device": { + "name": "Other" + }, "name": "Other", "original": "workload/2.4.3" } - }, - "p95": 11900, - "averageResponseTime": 3492.9285714285716, - "transactionsPerMinute": 3.5, - "impact": 2.5144049360435208 + } }, { - "name": "APIRestController#customerWhoBought", + "key": { + "service.name": "opbeans-java", + "transaction.name": "APIRestController#customerWhoBought" + }, + "averageResponseTime": 3742.153846153846, + "transactionsPerMinute": 3.25, + "impact": 2.4998634943716573, "sample": { - "@timestamp": "2020-06-29T06:48:44.982Z", + "@timestamp": "2020-06-29T06:48:11.166Z", "agent": { "ephemeral_id": "222af346-6dd9-45ef-ac85-d86b67edd2de", "name": "java", "version": "1.17.1-SNAPSHOT" }, - "client": { "ip": "172.18.0.9" }, + "client": { + "ip": "172.18.0.9" + }, "container": { "id": "918ebbd99b4f40003cf5713c080bb8120fa3bbe7ac4a96acb3aec558ced91ec0" }, - "ecs": { "version": "1.5.0" }, - "event": { "ingested": "2020-06-29T06:48:46.721114Z" }, + "ecs": { + "version": "1.5.0" + }, + "event": { + "ingested": "2020-06-29T06:48:15.763228Z" + }, "host": { "architecture": "amd64", "hostname": "918ebbd99b4f", "ip": "172.18.0.6", "name": "918ebbd99b4f", - "os": { "platform": "Linux" } + "os": { + "platform": "Linux" + } }, "http": { "request": { "headers": { - "Accept": ["*/*"], - "Accept-Encoding": ["gzip, deflate"], - "Host": ["172.18.0.6:3000"], - "User-Agent": ["Python/3.7 aiohttp/3.3.2"] + "Accept": [ + "*/*" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Host": [ + "172.18.0.6:3000" + ], + "User-Agent": [ + "Python/3.7 aiohttp/3.3.2" + ] }, "method": "get", - "socket": { "encrypted": false, "remote_address": "172.18.0.9" } + "socket": { + "encrypted": false, + "remote_address": "172.18.0.9" + } }, "response": { "finished": true, "headers": { - "Content-Type": ["application/json;charset=UTF-8"], - "Date": ["Mon, 29 Jun 2020 06:48:44 GMT"], - "Transfer-Encoding": ["chunked"] + "Content-Type": [ + "application/json;charset=UTF-8" + ], + "Date": [ + "Mon, 29 Jun 2020 06:48:10 GMT" + ], + "Transfer-Encoding": [ + "chunked" + ] }, "headers_sent": true, "status_code": 200 @@ -1724,73 +2601,121 @@ "version": "8.0.0", "version_major": 8 }, - "process": { "pid": 6, "ppid": 1, "title": "/opt/java/openjdk/bin/java" }, - "processor": { "event": "transaction", "name": "transaction" }, + "process": { + "pid": 6, + "ppid": 1, + "title": "/opt/java/openjdk/bin/java" + }, + "processor": { + "event": "transaction", + "name": "transaction" + }, "service": { "environment": "production", - "framework": { "name": "Spring Web MVC", "version": "5.0.6.RELEASE" }, - "language": { "name": "Java", "version": "11.0.7" }, + "framework": { + "name": "Spring Web MVC", + "version": "5.0.6.RELEASE" + }, + "language": { + "name": "Java", + "version": "11.0.7" + }, "name": "opbeans-java", "node": { "name": "918ebbd99b4f40003cf5713c080bb8120fa3bbe7ac4a96acb3aec558ced91ec0" }, - "runtime": { "name": "Java", "version": "11.0.7" }, + "runtime": { + "name": "Java", + "version": "11.0.7" + }, "version": "None" }, - "source": { "ip": "172.18.0.9" }, - "timestamp": { "us": 1593413324982008 }, - "trace": { "id": "e5ce8ba877f69510e7abc3f0d11c1e4f" }, + "source": { + "ip": "172.18.0.9" + }, + "timestamp": { + "us": 1593413291166005 + }, + "trace": { + "id": "fa0d353eb7967b344ed37674f40b2884" + }, "transaction": { - "duration": { "us": 2797 }, - "id": "b8c1bd3b31b197d3", + "duration": { + "us": 4453 + }, + "id": "bce4ce4b09ded6ca", "name": "APIRestController#customerWhoBought", "result": "HTTP 2xx", "sampled": true, - "span_count": { "dropped": 0, "started": 1 }, + "span_count": { + "dropped": 0, + "started": 2 + }, "type": "request" }, "url": { "domain": "172.18.0.6", - "full": "http://172.18.0.6:3000/api/products/5/customers", - "path": "/api/products/5/customers", + "full": "http://172.18.0.6:3000/api/products/3/customers", + "path": "/api/products/3/customers", "port": 3000, "scheme": "http" }, "user_agent": { - "device": { "name": "Other" }, + "device": { + "name": "Other" + }, "name": "Other", "original": "Python/3.7 aiohttp/3.3.2" } - }, - "p95": 4464, - "averageResponseTime": 3742.153846153846, - "transactionsPerMinute": 3.25, - "impact": 2.4998634943716573 + } }, { - "name": "GET /log-error", + "key": { + "service.name": "opbeans-node", + "transaction.name": "GET /log-error" + }, + "averageResponseTime": 35846, + "transactionsPerMinute": 0.25, + "impact": 1.7640550505645587, "sample": { "@timestamp": "2020-06-29T06:48:07.467Z", - "agent": { "name": "nodejs", "version": "3.6.1" }, - "client": { "ip": "172.18.0.7" }, + "agent": { + "name": "nodejs", + "version": "3.6.1" + }, + "client": { + "ip": "172.18.0.7" + }, "container": { "id": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" }, - "ecs": { "version": "1.5.0" }, - "event": { "ingested": "2020-06-29T06:48:18.533253Z" }, + "ecs": { + "version": "1.5.0" + }, + "event": { + "ingested": "2020-06-29T06:48:18.533253Z" + }, "host": { "architecture": "x64", "hostname": "41712ded148f", "ip": "172.18.0.7", "name": "41712ded148f", - "os": { "platform": "linux" } + "os": { + "platform": "linux" + } }, "http": { "request": { "headers": { - "Connection": ["close"], - "Host": ["opbeans-node:3000"], - "User-Agent": ["workload/2.4.3"] + "Connection": [ + "close" + ], + "Host": [ + "opbeans-node:3000" + ], + "User-Agent": [ + "workload/2.4.3" + ] }, "method": "get", "socket": { @@ -1800,12 +2725,24 @@ }, "response": { "headers": { - "Connection": ["close"], - "Content-Length": ["24"], - "Content-Type": ["text/html; charset=utf-8"], - "Date": ["Mon, 29 Jun 2020 06:48:07 GMT"], - "Etag": ["W/\"18-MS3VbhH7auHMzO0fUuNF6v14N/M\""], - "X-Powered-By": ["Express"] + "Connection": [ + "close" + ], + "Content-Length": [ + "24" + ], + "Content-Type": [ + "text/html; charset=utf-8" + ], + "Date": [ + "Mon, 29 Jun 2020 06:48:07 GMT" + ], + "Etag": [ + "W/\"18-MS3VbhH7auHMzO0fUuNF6v14N/M\"" + ], + "X-Powered-By": [ + "Express" + ] }, "status_code": 500 }, @@ -1835,29 +2772,52 @@ "ppid": 1, "title": "node /app/server.js" }, - "processor": { "event": "transaction", "name": "transaction" }, + "processor": { + "event": "transaction", + "name": "transaction" + }, "service": { "environment": "production", - "framework": { "name": "express", "version": "4.17.1" }, - "language": { "name": "javascript" }, + "framework": { + "name": "express", + "version": "4.17.1" + }, + "language": { + "name": "javascript" + }, "name": "opbeans-node", "node": { "name": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" }, - "runtime": { "name": "node", "version": "12.18.1" }, + "runtime": { + "name": "node", + "version": "12.18.1" + }, "version": "1.0.0" }, - "source": { "ip": "172.18.0.7" }, - "timestamp": { "us": 1593413287467017 }, - "trace": { "id": "d518b2c4d72cd2aaf1e39bad7ebcbdbb" }, + "source": { + "ip": "172.18.0.7" + }, + "timestamp": { + "us": 1593413287467017 + }, + "trace": { + "id": "d518b2c4d72cd2aaf1e39bad7ebcbdbb" + }, "transaction": { - "custom": { "shoppingBasketCount": 42 }, - "duration": { "us": 35846 }, + "custom": { + "shoppingBasketCount": 42 + }, + "duration": { + "us": 35846 + }, "id": "c7a30c1b076907ec", "name": "GET /log-error", "result": "HTTP 5xx", "sampled": true, - "span_count": { "started": 0 }, + "span_count": { + "started": 0 + }, "type": "request" }, "url": { @@ -1868,57 +2828,90 @@ "port": 3000, "scheme": "http" }, - "user": { "email": "kimchy@elastic.co", "id": "42", "name": "kimchy" }, + "user": { + "email": "kimchy@elastic.co", + "id": "42", + "name": "kimchy" + }, "user_agent": { - "device": { "name": "Other" }, + "device": { + "name": "Other" + }, "name": "Other", "original": "workload/2.4.3" } - }, - "p95": 35840, - "averageResponseTime": 35846, - "transactionsPerMinute": 0.25, - "impact": 1.7640550505645587 + } }, { - "name": "APIRestController#topProducts", + "key": { + "service.name": "opbeans-java", + "transaction.name": "APIRestController#topProducts" + }, + "averageResponseTime": 4825, + "transactionsPerMinute": 1.75, + "impact": 1.6450221426498186, "sample": { - "@timestamp": "2020-06-29T06:48:45.587Z", + "@timestamp": "2020-06-29T06:48:11.778Z", "agent": { "ephemeral_id": "222af346-6dd9-45ef-ac85-d86b67edd2de", "name": "java", "version": "1.17.1-SNAPSHOT" }, - "client": { "ip": "172.18.0.9" }, + "client": { + "ip": "172.18.0.9" + }, "container": { "id": "918ebbd99b4f40003cf5713c080bb8120fa3bbe7ac4a96acb3aec558ced91ec0" }, - "ecs": { "version": "1.5.0" }, - "event": { "ingested": "2020-06-29T06:48:46.770758Z" }, + "ecs": { + "version": "1.5.0" + }, + "event": { + "ingested": "2020-06-29T06:48:15.764351Z" + }, "host": { "architecture": "amd64", "hostname": "918ebbd99b4f", "ip": "172.18.0.6", "name": "918ebbd99b4f", - "os": { "platform": "Linux" } + "os": { + "platform": "Linux" + } }, "http": { "request": { "headers": { - "Accept": ["*/*"], - "Accept-Encoding": ["gzip, deflate"], - "Host": ["172.18.0.6:3000"], - "User-Agent": ["Python/3.7 aiohttp/3.3.2"] + "Accept": [ + "*/*" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Host": [ + "172.18.0.6:3000" + ], + "User-Agent": [ + "Python/3.7 aiohttp/3.3.2" + ] }, "method": "get", - "socket": { "encrypted": false, "remote_address": "172.18.0.9" } + "socket": { + "encrypted": false, + "remote_address": "172.18.0.9" + } }, "response": { "finished": true, "headers": { - "Content-Type": ["application/json;charset=UTF-8"], - "Date": ["Mon, 29 Jun 2020 06:48:44 GMT"], - "Transfer-Encoding": ["chunked"] + "Content-Type": [ + "application/json;charset=UTF-8" + ], + "Date": [ + "Mon, 29 Jun 2020 06:48:11 GMT" + ], + "Transfer-Encoding": [ + "chunked" + ] }, "headers_sent": true, "status_code": 200 @@ -1933,29 +2926,56 @@ "version": "8.0.0", "version_major": 8 }, - "process": { "pid": 6, "ppid": 1, "title": "/opt/java/openjdk/bin/java" }, - "processor": { "event": "transaction", "name": "transaction" }, + "process": { + "pid": 6, + "ppid": 1, + "title": "/opt/java/openjdk/bin/java" + }, + "processor": { + "event": "transaction", + "name": "transaction" + }, "service": { "environment": "production", - "framework": { "name": "Spring Web MVC", "version": "5.0.6.RELEASE" }, - "language": { "name": "Java", "version": "11.0.7" }, + "framework": { + "name": "Spring Web MVC", + "version": "5.0.6.RELEASE" + }, + "language": { + "name": "Java", + "version": "11.0.7" + }, "name": "opbeans-java", "node": { "name": "918ebbd99b4f40003cf5713c080bb8120fa3bbe7ac4a96acb3aec558ced91ec0" }, - "runtime": { "name": "Java", "version": "11.0.7" }, + "runtime": { + "name": "Java", + "version": "11.0.7" + }, "version": "None" }, - "source": { "ip": "172.18.0.9" }, - "timestamp": { "us": 1593413325587007 }, - "trace": { "id": "4470d0cc076e22018e2dd258a25c8812" }, + "source": { + "ip": "172.18.0.9" + }, + "timestamp": { + "us": 1593413291778008 + }, + "trace": { + "id": "d65e9816f1f6db3961867f7b6d1d4e6a" + }, "transaction": { - "duration": { "us": 4070 }, - "id": "cb860b712121d0d8", + "duration": { + "us": 4168 + }, + "id": "a72f4bb8149ecdc5", "name": "APIRestController#topProducts", "result": "HTTP 2xx", "sampled": true, - "span_count": { "dropped": 0, "started": 1 }, + "span_count": { + "dropped": 0, + "started": 2 + }, "type": "request" }, "url": { @@ -1966,40 +2986,61 @@ "scheme": "http" }, "user_agent": { - "device": { "name": "Other" }, + "device": { + "name": "Other" + }, "name": "Other", "original": "Python/3.7 aiohttp/3.3.2" } - }, - "p95": 7344, - "averageResponseTime": 4825, - "transactionsPerMinute": 1.75, - "impact": 1.6450221426498186 + } }, { - "name": "GET /api/products/top", + "key": { + "service.name": "opbeans-node", + "transaction.name": "GET /api/products/top" + }, + "averageResponseTime": 33097, + "transactionsPerMinute": 0.25, + "impact": 1.6060533780113861, "sample": { "@timestamp": "2020-06-29T06:48:01.200Z", - "agent": { "name": "nodejs", "version": "3.6.1" }, - "client": { "ip": "172.18.0.7" }, + "agent": { + "name": "nodejs", + "version": "3.6.1" + }, + "client": { + "ip": "172.18.0.7" + }, "container": { "id": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" }, - "ecs": { "version": "1.5.0" }, - "event": { "ingested": "2020-06-29T06:48:02.734903Z" }, + "ecs": { + "version": "1.5.0" + }, + "event": { + "ingested": "2020-06-29T06:48:02.734903Z" + }, "host": { "architecture": "x64", "hostname": "41712ded148f", "ip": "172.18.0.7", "name": "41712ded148f", - "os": { "platform": "linux" } + "os": { + "platform": "linux" + } }, "http": { "request": { "headers": { - "Connection": ["close"], - "Host": ["opbeans-node:3000"], - "User-Agent": ["workload/2.4.3"] + "Connection": [ + "close" + ], + "Host": [ + "opbeans-node:3000" + ], + "User-Agent": [ + "workload/2.4.3" + ] }, "method": "get", "socket": { @@ -2009,12 +3050,24 @@ }, "response": { "headers": { - "Connection": ["close"], - "Content-Length": ["2"], - "Content-Type": ["application/json; charset=utf-8"], - "Date": ["Mon, 29 Jun 2020 06:48:01 GMT"], - "Etag": ["W/\"2-l9Fw4VUO7kr8CvBlt4zaMCqXZ0w\""], - "X-Powered-By": ["Express"] + "Connection": [ + "close" + ], + "Content-Length": [ + "2" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Date": [ + "Mon, 29 Jun 2020 06:48:01 GMT" + ], + "Etag": [ + "W/\"2-l9Fw4VUO7kr8CvBlt4zaMCqXZ0w\"" + ], + "X-Powered-By": [ + "Express" + ] }, "status_code": 200 }, @@ -2044,29 +3097,52 @@ "ppid": 1, "title": "node /app/server.js" }, - "processor": { "event": "transaction", "name": "transaction" }, + "processor": { + "event": "transaction", + "name": "transaction" + }, "service": { "environment": "production", - "framework": { "name": "express", "version": "4.17.1" }, - "language": { "name": "javascript" }, + "framework": { + "name": "express", + "version": "4.17.1" + }, + "language": { + "name": "javascript" + }, "name": "opbeans-node", "node": { "name": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" }, - "runtime": { "name": "node", "version": "12.18.1" }, + "runtime": { + "name": "node", + "version": "12.18.1" + }, "version": "1.0.0" }, - "source": { "ip": "172.18.0.7" }, - "timestamp": { "us": 1593413281200133 }, - "trace": { "id": "195f32efeb6f91e2f71b6bc8bb74ae3a" }, + "source": { + "ip": "172.18.0.7" + }, + "timestamp": { + "us": 1593413281200133 + }, + "trace": { + "id": "195f32efeb6f91e2f71b6bc8bb74ae3a" + }, "transaction": { - "custom": { "shoppingBasketCount": 42 }, - "duration": { "us": 33097 }, + "custom": { + "shoppingBasketCount": 42 + }, + "duration": { + "us": 33097 + }, "id": "22e72956dfc8967a", "name": "GET /api/products/top", "result": "HTTP 2xx", "sampled": true, - "span_count": { "started": 1 }, + "span_count": { + "started": 1 + }, "type": "request" }, "url": { @@ -2077,42 +3153,67 @@ "port": 3000, "scheme": "http" }, - "user": { "email": "kimchy@elastic.co", "id": "42", "name": "kimchy" }, + "user": { + "email": "kimchy@elastic.co", + "id": "42", + "name": "kimchy" + }, "user_agent": { - "device": { "name": "Other" }, + "device": { + "name": "Other" + }, "name": "Other", "original": "workload/2.4.3" } - }, - "p95": 33024, - "averageResponseTime": 33097, - "transactionsPerMinute": 0.25, - "impact": 1.6060533780113861 + } }, { - "name": "GET /api/products", + "key": { + "service.name": "opbeans-node", + "transaction.name": "GET /api/products" + }, + "averageResponseTime": 6583, + "transactionsPerMinute": 1, + "impact": 1.2172278724376455, "sample": { - "@timestamp": "2020-06-29T06:48:23.477Z", - "agent": { "name": "nodejs", "version": "3.6.1" }, - "client": { "ip": "172.18.0.7" }, + "@timestamp": "2020-06-29T06:48:21.475Z", + "agent": { + "name": "nodejs", + "version": "3.6.1" + }, + "client": { + "ip": "172.18.0.7" + }, "container": { "id": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" }, - "ecs": { "version": "1.5.0" }, - "event": { "ingested": "2020-06-29T06:48:27.001228Z" }, + "ecs": { + "version": "1.5.0" + }, + "event": { + "ingested": "2020-06-29T06:48:26.996210Z" + }, "host": { "architecture": "x64", "hostname": "41712ded148f", "ip": "172.18.0.7", "name": "41712ded148f", - "os": { "platform": "linux" } + "os": { + "platform": "linux" + } }, "http": { "request": { "headers": { - "Connection": ["close"], - "Host": ["opbeans-node:3000"], - "User-Agent": ["workload/2.4.3"] + "Connection": [ + "close" + ], + "Host": [ + "opbeans-node:3000" + ], + "User-Agent": [ + "workload/2.4.3" + ] }, "method": "get", "socket": { @@ -2122,12 +3223,24 @@ }, "response": { "headers": { - "Connection": ["close"], - "Content-Length": ["1023"], - "Content-Type": ["application/json; charset=utf-8"], - "Date": ["Mon, 29 Jun 2020 06:48:23 GMT"], - "Etag": ["W/\"3ff-VyOxcDApb+a/lnjkm9FeTOGSDrs\""], - "X-Powered-By": ["Express"] + "Connection": [ + "close" + ], + "Content-Length": [ + "1023" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Date": [ + "Mon, 29 Jun 2020 06:48:21 GMT" + ], + "Etag": [ + "W/\"3ff-VyOxcDApb+a/lnjkm9FeTOGSDrs\"" + ], + "X-Powered-By": [ + "Express" + ] }, "status_code": 200 }, @@ -2157,29 +3270,52 @@ "ppid": 1, "title": "node /app/server.js" }, - "processor": { "event": "transaction", "name": "transaction" }, + "processor": { + "event": "transaction", + "name": "transaction" + }, "service": { "environment": "production", - "framework": { "name": "express", "version": "4.17.1" }, - "language": { "name": "javascript" }, + "framework": { + "name": "express", + "version": "4.17.1" + }, + "language": { + "name": "javascript" + }, "name": "opbeans-node", "node": { "name": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" }, - "runtime": { "name": "node", "version": "12.18.1" }, + "runtime": { + "name": "node", + "version": "12.18.1" + }, "version": "1.0.0" }, - "source": { "ip": "172.18.0.7" }, - "timestamp": { "us": 1593413303477028 }, - "trace": { "id": "9f26158b9a3915577b3cccc17636ea01" }, + "source": { + "ip": "172.18.0.7" + }, + "timestamp": { + "us": 1593413301475015 + }, + "trace": { + "id": "389b26b16949c7f783223de4f14b788c" + }, "transaction": { - "custom": { "shoppingBasketCount": 42 }, - "duration": { "us": 7150 }, - "id": "27ff4add22ac2e1b", + "custom": { + "shoppingBasketCount": 42 + }, + "duration": { + "us": 6775 + }, + "id": "d2d4088a0b104fb4", "name": "GET /api/products", "result": "HTTP 2xx", "sampled": true, - "span_count": { "started": 2 }, + "span_count": { + "started": 2 + }, "type": "request" }, "url": { @@ -2190,46 +3326,79 @@ "port": 3000, "scheme": "http" }, - "user": { "email": "kimchy@elastic.co", "id": "42", "name": "kimchy" }, + "user": { + "email": "kimchy@elastic.co", + "id": "42", + "name": "kimchy" + }, "user_agent": { - "device": { "name": "Other" }, + "device": { + "name": "Other" + }, "name": "Other", "original": "workload/2.4.3" } - }, - "p95": 8160, - "averageResponseTime": 6583, - "transactionsPerMinute": 1, - "impact": 1.2172278724376455 + } }, { - "name": "POST /api", + "key": { + "service.name": "opbeans-node", + "transaction.name": "POST /api" + }, + "averageResponseTime": 20011, + "transactionsPerMinute": 0.25, + "impact": 0.853921734857215, "sample": { "@timestamp": "2020-06-29T06:48:25.478Z", - "agent": { "name": "nodejs", "version": "3.6.1" }, - "client": { "ip": "172.18.0.7" }, + "agent": { + "name": "nodejs", + "version": "3.6.1" + }, + "client": { + "ip": "172.18.0.7" + }, "container": { "id": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" }, - "ecs": { "version": "1.5.0" }, - "event": { "ingested": "2020-06-29T06:48:27.005671Z" }, + "ecs": { + "version": "1.5.0" + }, + "event": { + "ingested": "2020-06-29T06:48:27.005671Z" + }, "host": { "architecture": "x64", "hostname": "41712ded148f", "ip": "172.18.0.7", "name": "41712ded148f", - "os": { "platform": "linux" } + "os": { + "platform": "linux" + } }, "http": { "request": { - "body": { "original": "[REDACTED]" }, + "body": { + "original": "[REDACTED]" + }, "headers": { - "Accept": ["application/json"], - "Connection": ["close"], - "Content-Length": ["129"], - "Content-Type": ["application/json"], - "Host": ["opbeans-node:3000"], - "User-Agent": ["workload/2.4.3"] + "Accept": [ + "application/json" + ], + "Connection": [ + "close" + ], + "Content-Length": [ + "129" + ], + "Content-Type": [ + "application/json" + ], + "Host": [ + "opbeans-node:3000" + ], + "User-Agent": [ + "workload/2.4.3" + ] }, "method": "post", "socket": { @@ -2239,12 +3408,24 @@ }, "response": { "headers": { - "Allow": ["GET"], - "Connection": ["close"], - "Content-Type": ["application/json;charset=UTF-8"], - "Date": ["Mon, 29 Jun 2020 06:48:25 GMT"], - "Transfer-Encoding": ["chunked"], - "X-Powered-By": ["Express"] + "Allow": [ + "GET" + ], + "Connection": [ + "close" + ], + "Content-Type": [ + "application/json;charset=UTF-8" + ], + "Date": [ + "Mon, 29 Jun 2020 06:48:25 GMT" + ], + "Transfer-Encoding": [ + "chunked" + ], + "X-Powered-By": [ + "Express" + ] }, "status_code": 405 }, @@ -2274,29 +3455,52 @@ "ppid": 1, "title": "node /app/server.js" }, - "processor": { "event": "transaction", "name": "transaction" }, + "processor": { + "event": "transaction", + "name": "transaction" + }, "service": { "environment": "production", - "framework": { "name": "express", "version": "4.17.1" }, - "language": { "name": "javascript" }, + "framework": { + "name": "express", + "version": "4.17.1" + }, + "language": { + "name": "javascript" + }, "name": "opbeans-node", "node": { "name": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" }, - "runtime": { "name": "node", "version": "12.18.1" }, + "runtime": { + "name": "node", + "version": "12.18.1" + }, "version": "1.0.0" }, - "source": { "ip": "172.18.0.7" }, - "timestamp": { "us": 1593413305478010 }, - "trace": { "id": "4bd9027dd1e355ec742970e2d6333124" }, + "source": { + "ip": "172.18.0.7" + }, + "timestamp": { + "us": 1593413305478010 + }, + "trace": { + "id": "4bd9027dd1e355ec742970e2d6333124" + }, "transaction": { - "custom": { "shoppingBasketCount": 42 }, - "duration": { "us": 20011 }, + "custom": { + "shoppingBasketCount": 42 + }, + "duration": { + "us": 20011 + }, "id": "94104435cf151478", "name": "POST /api", "result": "HTTP 4xx", "sampled": true, - "span_count": { "started": 1 }, + "span_count": { + "started": 1 + }, "type": "request" }, "url": { @@ -2307,42 +3511,67 @@ "port": 3000, "scheme": "http" }, - "user": { "email": "kimchy@elastic.co", "id": "42", "name": "kimchy" }, + "user": { + "email": "kimchy@elastic.co", + "id": "42", + "name": "kimchy" + }, "user_agent": { - "device": { "name": "Other" }, + "device": { + "name": "Other" + }, "name": "Other", "original": "workload/2.4.3" } - }, - "p95": 19968, - "averageResponseTime": 20011, - "transactionsPerMinute": 0.25, - "impact": 0.853921734857215 + } }, { - "name": "GET /api/types/:id", + "key": { + "service.name": "opbeans-node", + "transaction.name": "GET /api/types/:id" + }, + "averageResponseTime": 8181, + "transactionsPerMinute": 0.5, + "impact": 0.6441916136689552, "sample": { - "@timestamp": "2020-06-29T06:48:12.972Z", - "agent": { "name": "nodejs", "version": "3.6.1" }, - "client": { "ip": "172.18.0.7" }, + "@timestamp": "2020-06-29T06:47:53.928Z", + "agent": { + "name": "nodejs", + "version": "3.6.1" + }, + "client": { + "ip": "172.18.0.7" + }, "container": { "id": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" }, - "ecs": { "version": "1.5.0" }, - "event": { "ingested": "2020-06-29T06:48:18.543436Z" }, + "ecs": { + "version": "1.5.0" + }, + "event": { + "ingested": "2020-06-29T06:47:55.472718Z" + }, "host": { "architecture": "x64", "hostname": "41712ded148f", "ip": "172.18.0.7", "name": "41712ded148f", - "os": { "platform": "linux" } + "os": { + "platform": "linux" + } }, "http": { "request": { "headers": { - "Connection": ["close"], - "Host": ["opbeans-node:3000"], - "User-Agent": ["workload/2.4.3"] + "Connection": [ + "close" + ], + "Host": [ + "opbeans-node:3000" + ], + "User-Agent": [ + "workload/2.4.3" + ] }, "method": "get", "socket": { @@ -2352,12 +3581,24 @@ }, "response": { "headers": { - "Connection": ["close"], - "Content-Length": ["205"], - "Content-Type": ["application/json; charset=utf-8"], - "Date": ["Mon, 29 Jun 2020 06:48:12 GMT"], - "Etag": ["W/\"cd-pFMi1QOVY6YqWe+nwcbZVviCths\""], - "X-Powered-By": ["Express"] + "Connection": [ + "close" + ], + "Content-Length": [ + "205" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Date": [ + "Mon, 29 Jun 2020 06:47:53 GMT" + ], + "Etag": [ + "W/\"cd-pFMi1QOVY6YqWe+nwcbZVviCths\"" + ], + "X-Powered-By": [ + "Express" + ] }, "status_code": 200 }, @@ -2383,33 +3624,56 @@ "/usr/local/lib/node_modules/pm2/lib/ProcessContainer.js", "ecosystem-workload.config.js" ], - "pid": 137, + "pid": 63, "ppid": 1, "title": "node /app/server.js" }, - "processor": { "event": "transaction", "name": "transaction" }, + "processor": { + "event": "transaction", + "name": "transaction" + }, "service": { "environment": "production", - "framework": { "name": "express", "version": "4.17.1" }, - "language": { "name": "javascript" }, + "framework": { + "name": "express", + "version": "4.17.1" + }, + "language": { + "name": "javascript" + }, "name": "opbeans-node", "node": { "name": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" }, - "runtime": { "name": "node", "version": "12.18.1" }, + "runtime": { + "name": "node", + "version": "12.18.1" + }, "version": "1.0.0" }, - "source": { "ip": "172.18.0.7" }, - "timestamp": { "us": 1593413292972011 }, - "trace": { "id": "aea65cef5f902dda5d8e38f9fb38864d" }, + "source": { + "ip": "172.18.0.7" + }, + "timestamp": { + "us": 1593413273928016 + }, + "trace": { + "id": "0becaafb422bfeb69e047bf7153aa469" + }, "transaction": { - "custom": { "shoppingBasketCount": 42 }, - "duration": { "us": 6300 }, - "id": "a5bdbe43ac05fae2", + "custom": { + "shoppingBasketCount": 42 + }, + "duration": { + "us": 10062 + }, + "id": "0cee4574091bda3b", "name": "GET /api/types/:id", "result": "HTTP 2xx", "sampled": true, - "span_count": { "started": 2 }, + "span_count": { + "started": 2 + }, "type": "request" }, "url": { @@ -2420,42 +3684,67 @@ "port": 3000, "scheme": "http" }, - "user": { "email": "kimchy@elastic.co", "id": "42", "name": "kimchy" }, + "user": { + "email": "kimchy@elastic.co", + "id": "42", + "name": "kimchy" + }, "user_agent": { - "device": { "name": "Other" }, + "device": { + "name": "Other" + }, "name": "Other", "original": "workload/2.4.3" } - }, - "p95": 10080, - "averageResponseTime": 8181, - "transactionsPerMinute": 0.5, - "impact": 0.6441916136689552 + } }, { - "name": "GET /api/stats", + "key": { + "service.name": "opbeans-node", + "transaction.name": "GET /api/stats" + }, + "averageResponseTime": 5098, + "transactionsPerMinute": 0.75, + "impact": 0.582807187955318, "sample": { - "@timestamp": "2020-06-29T06:48:39.451Z", - "agent": { "name": "nodejs", "version": "3.6.1" }, - "client": { "ip": "172.18.0.7" }, + "@timestamp": "2020-06-29T06:48:34.949Z", + "agent": { + "name": "nodejs", + "version": "3.6.1" + }, + "client": { + "ip": "172.18.0.7" + }, "container": { "id": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" }, - "ecs": { "version": "1.5.0" }, - "event": { "ingested": "2020-06-29T06:48:43.984824Z" }, + "ecs": { + "version": "1.5.0" + }, + "event": { + "ingested": "2020-06-29T06:48:39.479316Z" + }, "host": { "architecture": "x64", "hostname": "41712ded148f", "ip": "172.18.0.7", "name": "41712ded148f", - "os": { "platform": "linux" } + "os": { + "platform": "linux" + } }, "http": { "request": { "headers": { - "Connection": ["close"], - "Host": ["opbeans-node:3000"], - "User-Agent": ["workload/2.4.3"] + "Connection": [ + "close" + ], + "Host": [ + "opbeans-node:3000" + ], + "User-Agent": [ + "workload/2.4.3" + ] }, "method": "get", "socket": { @@ -2465,12 +3754,24 @@ }, "response": { "headers": { - "Connection": ["close"], - "Content-Length": ["92"], - "Content-Type": ["application/json; charset=utf-8"], - "Date": ["Mon, 29 Jun 2020 06:48:39 GMT"], - "Etag": ["W/\"5c-6I+bqIiLxvkWuwBUnTxhBoK4lBk\""], - "X-Powered-By": ["Express"] + "Connection": [ + "close" + ], + "Content-Length": [ + "92" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Date": [ + "Mon, 29 Jun 2020 06:48:34 GMT" + ], + "Etag": [ + "W/\"5c-6I+bqIiLxvkWuwBUnTxhBoK4lBk\"" + ], + "X-Powered-By": [ + "Express" + ] }, "status_code": 200 }, @@ -2500,29 +3801,52 @@ "ppid": 1, "title": "node /app/server.js" }, - "processor": { "event": "transaction", "name": "transaction" }, + "processor": { + "event": "transaction", + "name": "transaction" + }, "service": { "environment": "production", - "framework": { "name": "express", "version": "4.17.1" }, - "language": { "name": "javascript" }, + "framework": { + "name": "express", + "version": "4.17.1" + }, + "language": { + "name": "javascript" + }, "name": "opbeans-node", "node": { "name": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" }, - "runtime": { "name": "node", "version": "12.18.1" }, + "runtime": { + "name": "node", + "version": "12.18.1" + }, "version": "1.0.0" }, - "source": { "ip": "172.18.0.7" }, - "timestamp": { "us": 1593413319451016 }, - "trace": { "id": "a05787cb03a0af0863fab5e05de942f1" }, + "source": { + "ip": "172.18.0.7" + }, + "timestamp": { + "us": 1593413314949017 + }, + "trace": { + "id": "616b3b77abd5534c61d6c0438469aee2" + }, "transaction": { - "custom": { "shoppingBasketCount": 42 }, - "duration": { "us": 5050 }, - "id": "a7e004eba8f021ce", + "custom": { + "shoppingBasketCount": 42 + }, + "duration": { + "us": 5459 + }, + "id": "5b4971de59d2099d", "name": "GET /api/stats", "result": "HTTP 2xx", "sampled": true, - "span_count": { "started": 4 }, + "span_count": { + "started": 4 + }, "type": "request" }, "url": { @@ -2533,42 +3857,67 @@ "port": 3000, "scheme": "http" }, - "user": { "email": "kimchy@elastic.co", "id": "42", "name": "kimchy" }, + "user": { + "email": "kimchy@elastic.co", + "id": "42", + "name": "kimchy" + }, "user_agent": { - "device": { "name": "Other" }, + "device": { + "name": "Other" + }, "name": "Other", "original": "workload/2.4.3" } - }, - "p95": 5440, - "averageResponseTime": 5098, - "transactionsPerMinute": 0.75, - "impact": 0.582807187955318 + } }, { - "name": "GET /api/orders", + "key": { + "service.name": "opbeans-node", + "transaction.name": "GET /api/orders" + }, + "averageResponseTime": 7624.5, + "transactionsPerMinute": 0.5, + "impact": 0.5802207655235637, "sample": { "@timestamp": "2020-06-29T06:48:35.450Z", - "agent": { "name": "nodejs", "version": "3.6.1" }, - "client": { "ip": "172.18.0.7" }, + "agent": { + "name": "nodejs", + "version": "3.6.1" + }, + "client": { + "ip": "172.18.0.7" + }, "container": { "id": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" }, - "ecs": { "version": "1.5.0" }, - "event": { "ingested": "2020-06-29T06:48:39.483715Z" }, + "ecs": { + "version": "1.5.0" + }, + "event": { + "ingested": "2020-06-29T06:48:39.483715Z" + }, "host": { "architecture": "x64", "hostname": "41712ded148f", "ip": "172.18.0.7", "name": "41712ded148f", - "os": { "platform": "linux" } + "os": { + "platform": "linux" + } }, "http": { "request": { "headers": { - "Connection": ["close"], - "Host": ["opbeans-node:3000"], - "User-Agent": ["workload/2.4.3"] + "Connection": [ + "close" + ], + "Host": [ + "opbeans-node:3000" + ], + "User-Agent": [ + "workload/2.4.3" + ] }, "method": "get", "socket": { @@ -2578,12 +3927,24 @@ }, "response": { "headers": { - "Connection": ["close"], - "Content-Length": ["2"], - "Content-Type": ["application/json; charset=utf-8"], - "Date": ["Mon, 29 Jun 2020 06:48:35 GMT"], - "Etag": ["W/\"2-l9Fw4VUO7kr8CvBlt4zaMCqXZ0w\""], - "X-Powered-By": ["Express"] + "Connection": [ + "close" + ], + "Content-Length": [ + "2" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Date": [ + "Mon, 29 Jun 2020 06:48:35 GMT" + ], + "Etag": [ + "W/\"2-l9Fw4VUO7kr8CvBlt4zaMCqXZ0w\"" + ], + "X-Powered-By": [ + "Express" + ] }, "status_code": 200 }, @@ -2613,29 +3974,52 @@ "ppid": 1, "title": "node /app/server.js" }, - "processor": { "event": "transaction", "name": "transaction" }, + "processor": { + "event": "transaction", + "name": "transaction" + }, "service": { "environment": "production", - "framework": { "name": "express", "version": "4.17.1" }, - "language": { "name": "javascript" }, + "framework": { + "name": "express", + "version": "4.17.1" + }, + "language": { + "name": "javascript" + }, "name": "opbeans-node", "node": { "name": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" }, - "runtime": { "name": "node", "version": "12.18.1" }, + "runtime": { + "name": "node", + "version": "12.18.1" + }, "version": "1.0.0" }, - "source": { "ip": "172.18.0.7" }, - "timestamp": { "us": 1593413315450014 }, - "trace": { "id": "2da70ccf10599b271f65273d169cde9f" }, + "source": { + "ip": "172.18.0.7" + }, + "timestamp": { + "us": 1593413315450014 + }, + "trace": { + "id": "2da70ccf10599b271f65273d169cde9f" + }, "transaction": { - "custom": { "shoppingBasketCount": 42 }, - "duration": { "us": 8784 }, + "custom": { + "shoppingBasketCount": 42 + }, + "duration": { + "us": 8784 + }, "id": "a3f4a4f339758440", "name": "GET /api/orders", "result": "HTTP 2xx", "sampled": true, - "span_count": { "started": 2 }, + "span_count": { + "started": 2 + }, "type": "request" }, "url": { @@ -2646,42 +4030,67 @@ "port": 3000, "scheme": "http" }, - "user": { "email": "kimchy@elastic.co", "id": "42", "name": "kimchy" }, + "user": { + "email": "kimchy@elastic.co", + "id": "42", + "name": "kimchy" + }, "user_agent": { - "device": { "name": "Other" }, + "device": { + "name": "Other" + }, "name": "Other", "original": "workload/2.4.3" } - }, - "p95": 8800, - "averageResponseTime": 7624.5, - "transactionsPerMinute": 0.5, - "impact": 0.5802207655235637 + } }, { - "name": "GET /api/orders/:id", + "key": { + "service.name": "opbeans-node", + "transaction.name": "GET /api/orders/:id" + }, + "averageResponseTime": 4749.666666666667, + "transactionsPerMinute": 0.75, + "impact": 0.5227447114845778, "sample": { "@timestamp": "2020-06-29T06:48:35.951Z", - "agent": { "name": "nodejs", "version": "3.6.1" }, - "client": { "ip": "172.18.0.7" }, + "agent": { + "name": "nodejs", + "version": "3.6.1" + }, + "client": { + "ip": "172.18.0.7" + }, "container": { "id": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" }, - "ecs": { "version": "1.5.0" }, - "event": { "ingested": "2020-06-29T06:48:39.484133Z" }, + "ecs": { + "version": "1.5.0" + }, + "event": { + "ingested": "2020-06-29T06:48:39.484133Z" + }, "host": { "architecture": "x64", "hostname": "41712ded148f", "ip": "172.18.0.7", "name": "41712ded148f", - "os": { "platform": "linux" } + "os": { + "platform": "linux" + } }, "http": { "request": { "headers": { - "Connection": ["close"], - "Host": ["opbeans-node:3000"], - "User-Agent": ["workload/2.4.3"] + "Connection": [ + "close" + ], + "Host": [ + "opbeans-node:3000" + ], + "User-Agent": [ + "workload/2.4.3" + ] }, "method": "get", "socket": { @@ -2691,10 +4100,18 @@ }, "response": { "headers": { - "Connection": ["close"], - "Content-Length": ["0"], - "Date": ["Mon, 29 Jun 2020 06:48:35 GMT"], - "X-Powered-By": ["Express"] + "Connection": [ + "close" + ], + "Content-Length": [ + "0" + ], + "Date": [ + "Mon, 29 Jun 2020 06:48:35 GMT" + ], + "X-Powered-By": [ + "Express" + ] }, "status_code": 404 }, @@ -2724,29 +4141,52 @@ "ppid": 1, "title": "node /app/server.js" }, - "processor": { "event": "transaction", "name": "transaction" }, + "processor": { + "event": "transaction", + "name": "transaction" + }, "service": { "environment": "production", - "framework": { "name": "express", "version": "4.17.1" }, - "language": { "name": "javascript" }, + "framework": { + "name": "express", + "version": "4.17.1" + }, + "language": { + "name": "javascript" + }, "name": "opbeans-node", "node": { "name": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" }, - "runtime": { "name": "node", "version": "12.18.1" }, + "runtime": { + "name": "node", + "version": "12.18.1" + }, "version": "1.0.0" }, - "source": { "ip": "172.18.0.7" }, - "timestamp": { "us": 1593413315951017 }, - "trace": { "id": "95979caa80e6622cbbb2d308800c3016" }, + "source": { + "ip": "172.18.0.7" + }, + "timestamp": { + "us": 1593413315951017 + }, + "trace": { + "id": "95979caa80e6622cbbb2d308800c3016" + }, "transaction": { - "custom": { "shoppingBasketCount": 42 }, - "duration": { "us": 3210 }, + "custom": { + "shoppingBasketCount": 42 + }, + "duration": { + "us": 3210 + }, "id": "30344988dace0b43", "name": "GET /api/orders/:id", "result": "HTTP 4xx", "sampled": true, - "span_count": { "started": 1 }, + "span_count": { + "started": 1 + }, "type": "request" }, "url": { @@ -2757,57 +4197,90 @@ "port": 3000, "scheme": "http" }, - "user": { "email": "kimchy@elastic.co", "id": "42", "name": "kimchy" }, + "user": { + "email": "kimchy@elastic.co", + "id": "42", + "name": "kimchy" + }, "user_agent": { - "device": { "name": "Other" }, + "device": { + "name": "Other" + }, "name": "Other", "original": "workload/2.4.3" } - }, - "p95": 7184, - "averageResponseTime": 4749.666666666667, - "transactionsPerMinute": 0.75, - "impact": 0.5227447114845778 + } }, { - "name": "APIRestController#products", + "key": { + "service.name": "opbeans-java", + "transaction.name": "APIRestController#products" + }, + "averageResponseTime": 6787, + "transactionsPerMinute": 0.5, + "impact": 0.4839483750082622, "sample": { - "@timestamp": "2020-06-29T06:48:27.824Z", + "@timestamp": "2020-06-29T06:48:13.595Z", "agent": { "ephemeral_id": "222af346-6dd9-45ef-ac85-d86b67edd2de", "name": "java", "version": "1.17.1-SNAPSHOT" }, - "client": { "ip": "172.18.0.9" }, + "client": { + "ip": "172.18.0.9" + }, "container": { "id": "918ebbd99b4f40003cf5713c080bb8120fa3bbe7ac4a96acb3aec558ced91ec0" }, - "ecs": { "version": "1.5.0" }, - "event": { "ingested": "2020-06-29T06:48:36.087688Z" }, + "ecs": { + "version": "1.5.0" + }, + "event": { + "ingested": "2020-06-29T06:48:15.755614Z" + }, "host": { "architecture": "amd64", "hostname": "918ebbd99b4f", "ip": "172.18.0.6", "name": "918ebbd99b4f", - "os": { "platform": "Linux" } + "os": { + "platform": "Linux" + } }, "http": { "request": { "headers": { - "Accept": ["*/*"], - "Accept-Encoding": ["gzip, deflate"], - "Host": ["172.18.0.6:3000"], - "User-Agent": ["Python/3.7 aiohttp/3.3.2"] + "Accept": [ + "*/*" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Host": [ + "172.18.0.6:3000" + ], + "User-Agent": [ + "Python/3.7 aiohttp/3.3.2" + ] }, "method": "get", - "socket": { "encrypted": false, "remote_address": "172.18.0.9" } + "socket": { + "encrypted": false, + "remote_address": "172.18.0.9" + } }, "response": { "finished": true, "headers": { - "Content-Type": ["application/json;charset=UTF-8"], - "Date": ["Mon, 29 Jun 2020 06:48:27 GMT"], - "Transfer-Encoding": ["chunked"] + "Content-Type": [ + "application/json;charset=UTF-8" + ], + "Date": [ + "Mon, 29 Jun 2020 06:48:12 GMT" + ], + "Transfer-Encoding": [ + "chunked" + ] }, "headers_sent": true, "status_code": 200 @@ -2822,29 +4295,56 @@ "version": "8.0.0", "version_major": 8 }, - "process": { "pid": 6, "ppid": 1, "title": "/opt/java/openjdk/bin/java" }, - "processor": { "event": "transaction", "name": "transaction" }, + "process": { + "pid": 6, + "ppid": 1, + "title": "/opt/java/openjdk/bin/java" + }, + "processor": { + "event": "transaction", + "name": "transaction" + }, "service": { "environment": "production", - "framework": { "name": "Spring Web MVC", "version": "5.0.6.RELEASE" }, - "language": { "name": "Java", "version": "11.0.7" }, + "framework": { + "name": "Spring Web MVC", + "version": "5.0.6.RELEASE" + }, + "language": { + "name": "Java", + "version": "11.0.7" + }, "name": "opbeans-java", "node": { "name": "918ebbd99b4f40003cf5713c080bb8120fa3bbe7ac4a96acb3aec558ced91ec0" }, - "runtime": { "name": "Java", "version": "11.0.7" }, + "runtime": { + "name": "Java", + "version": "11.0.7" + }, "version": "None" }, - "source": { "ip": "172.18.0.9" }, - "timestamp": { "us": 1593413307824008 }, - "trace": { "id": "a6adb17bd5a5d1c0eabb9f36cb626dd5" }, + "source": { + "ip": "172.18.0.9" + }, + "timestamp": { + "us": 1593413293595007 + }, + "trace": { + "id": "8519b6c3dbc32a0582228506526e1d74" + }, "transaction": { - "duration": { "us": 5645 }, - "id": "df3e726eaa003d96", + "duration": { + "us": 7929 + }, + "id": "b0354de660cd3698", "name": "APIRestController#products", "result": "HTTP 2xx", "sampled": true, - "span_count": { "dropped": 0, "started": 3 }, + "span_count": { + "dropped": 0, + "started": 3 + }, "type": "request" }, "url": { @@ -2855,40 +4355,61 @@ "scheme": "http" }, "user_agent": { - "device": { "name": "Other" }, + "device": { + "name": "Other" + }, "name": "Other", "original": "Python/3.7 aiohttp/3.3.2" } - }, - "p95": 7904, - "averageResponseTime": 6787, - "transactionsPerMinute": 0.5, - "impact": 0.4839483750082622 + } }, { - "name": "GET /api/products/:id/customers", + "key": { + "service.name": "opbeans-node", + "transaction.name": "GET /api/products/:id/customers" + }, + "averageResponseTime": 4757, + "transactionsPerMinute": 0.5, + "impact": 0.25059559560997896, "sample": { - "@timestamp": "2020-06-29T06:48:41.956Z", - "agent": { "name": "nodejs", "version": "3.6.1" }, - "client": { "ip": "172.18.0.7" }, + "@timestamp": "2020-06-29T06:48:22.977Z", + "agent": { + "name": "nodejs", + "version": "3.6.1" + }, + "client": { + "ip": "172.18.0.7" + }, "container": { "id": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" }, - "ecs": { "version": "1.5.0" }, - "event": { "ingested": "2020-06-29T06:48:43.994692Z" }, + "ecs": { + "version": "1.5.0" + }, + "event": { + "ingested": "2020-06-29T06:48:27.000765Z" + }, "host": { "architecture": "x64", "hostname": "41712ded148f", "ip": "172.18.0.7", "name": "41712ded148f", - "os": { "platform": "linux" } + "os": { + "platform": "linux" + } }, "http": { "request": { "headers": { - "Connection": ["close"], - "Host": ["opbeans-node:3000"], - "User-Agent": ["workload/2.4.3"] + "Connection": [ + "close" + ], + "Host": [ + "opbeans-node:3000" + ], + "User-Agent": [ + "workload/2.4.3" + ] }, "method": "get", "socket": { @@ -2898,12 +4419,24 @@ }, "response": { "headers": { - "Connection": ["close"], - "Content-Length": ["2"], - "Content-Type": ["application/json; charset=utf-8"], - "Date": ["Mon, 29 Jun 2020 06:48:41 GMT"], - "Etag": ["W/\"2-l9Fw4VUO7kr8CvBlt4zaMCqXZ0w\""], - "X-Powered-By": ["Express"] + "Connection": [ + "close" + ], + "Content-Length": [ + "2" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Date": [ + "Mon, 29 Jun 2020 06:48:22 GMT" + ], + "Etag": [ + "W/\"2-l9Fw4VUO7kr8CvBlt4zaMCqXZ0w\"" + ], + "X-Powered-By": [ + "Express" + ] }, "status_code": 200 }, @@ -2933,90 +4466,146 @@ "ppid": 1, "title": "node /app/server.js" }, - "processor": { "event": "transaction", "name": "transaction" }, + "processor": { + "event": "transaction", + "name": "transaction" + }, "service": { "environment": "production", - "framework": { "name": "express", "version": "4.17.1" }, - "language": { "name": "javascript" }, + "framework": { + "name": "express", + "version": "4.17.1" + }, + "language": { + "name": "javascript" + }, "name": "opbeans-node", "node": { "name": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" }, - "runtime": { "name": "node", "version": "12.18.1" }, + "runtime": { + "name": "node", + "version": "12.18.1" + }, "version": "1.0.0" }, - "source": { "ip": "172.18.0.7" }, - "timestamp": { "us": 1593413321956016 }, - "trace": { "id": "f735ac5fca8f83eebc748f4a2e009e61" }, + "source": { + "ip": "172.18.0.7" + }, + "timestamp": { + "us": 1593413302977008 + }, + "trace": { + "id": "da8f22fe652ccb6680b3029ab6efd284" + }, "transaction": { - "custom": { "shoppingBasketCount": 42 }, - "duration": { "us": 3896 }, - "id": "b24ce95c855f83a4", + "custom": { + "shoppingBasketCount": 42 + }, + "duration": { + "us": 5618 + }, + "id": "bc51c1523afaf57a", "name": "GET /api/products/:id/customers", "result": "HTTP 2xx", "sampled": true, - "span_count": { "started": 1 }, + "span_count": { + "started": 1 + }, "type": "request" }, "url": { "domain": "opbeans-node", - "full": "http://opbeans-node:3000/api/products/5/customers", - "original": "/api/products/5/customers", - "path": "/api/products/5/customers", + "full": "http://opbeans-node:3000/api/products/3/customers", + "original": "/api/products/3/customers", + "path": "/api/products/3/customers", "port": 3000, "scheme": "http" }, - "user": { "email": "kimchy@elastic.co", "id": "42", "name": "kimchy" }, + "user": { + "email": "kimchy@elastic.co", + "id": "42", + "name": "kimchy" + }, "user_agent": { - "device": { "name": "Other" }, + "device": { + "name": "Other" + }, "name": "Other", "original": "workload/2.4.3" } - }, - "p95": 5616, - "averageResponseTime": 4757, - "transactionsPerMinute": 0.5, - "impact": 0.25059559560997896 + } }, { - "name": "APIRestController#product", + "key": { + "service.name": "opbeans-java", + "transaction.name": "APIRestController#product" + }, + "averageResponseTime": 4713.5, + "transactionsPerMinute": 0.5, + "impact": 0.24559517890858723, "sample": { - "@timestamp": "2020-06-29T06:48:41.941Z", + "@timestamp": "2020-06-29T06:48:36.383Z", "agent": { "ephemeral_id": "222af346-6dd9-45ef-ac85-d86b67edd2de", "name": "java", "version": "1.17.1-SNAPSHOT" }, - "client": { "ip": "172.18.0.9" }, + "client": { + "ip": "172.18.0.9" + }, "container": { "id": "918ebbd99b4f40003cf5713c080bb8120fa3bbe7ac4a96acb3aec558ced91ec0" }, - "ecs": { "version": "1.5.0" }, - "event": { "ingested": "2020-06-29T06:48:46.709268Z" }, + "ecs": { + "version": "1.5.0" + }, + "event": { + "ingested": "2020-06-29T06:48:46.666467Z" + }, "host": { "architecture": "amd64", "hostname": "918ebbd99b4f", "ip": "172.18.0.6", "name": "918ebbd99b4f", - "os": { "platform": "Linux" } + "os": { + "platform": "Linux" + } }, "http": { "request": { "headers": { - "Accept": ["*/*"], - "Accept-Encoding": ["gzip, deflate"], - "Host": ["172.18.0.6:3000"], - "User-Agent": ["Python/3.7 aiohttp/3.3.2"] + "Accept": [ + "*/*" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Host": [ + "172.18.0.6:3000" + ], + "User-Agent": [ + "Python/3.7 aiohttp/3.3.2" + ] }, "method": "get", - "socket": { "encrypted": false, "remote_address": "172.18.0.9" } + "socket": { + "encrypted": false, + "remote_address": "172.18.0.9" + } }, "response": { "finished": true, "headers": { - "Content-Type": ["application/json;charset=UTF-8"], - "Date": ["Mon, 29 Jun 2020 06:48:41 GMT"], - "Transfer-Encoding": ["chunked"] + "Content-Type": [ + "application/json;charset=UTF-8" + ], + "Date": [ + "Mon, 29 Jun 2020 06:48:36 GMT" + ], + "Transfer-Encoding": [ + "chunked" + ] }, "headers_sent": true, "status_code": 200 @@ -3031,81 +4620,131 @@ "version": "8.0.0", "version_major": 8 }, - "process": { "pid": 6, "ppid": 1, "title": "/opt/java/openjdk/bin/java" }, - "processor": { "event": "transaction", "name": "transaction" }, + "process": { + "pid": 6, + "ppid": 1, + "title": "/opt/java/openjdk/bin/java" + }, + "processor": { + "event": "transaction", + "name": "transaction" + }, "service": { "environment": "production", - "framework": { "name": "Spring Web MVC", "version": "5.0.6.RELEASE" }, - "language": { "name": "Java", "version": "11.0.7" }, + "framework": { + "name": "Spring Web MVC", + "version": "5.0.6.RELEASE" + }, + "language": { + "name": "Java", + "version": "11.0.7" + }, "name": "opbeans-java", "node": { "name": "918ebbd99b4f40003cf5713c080bb8120fa3bbe7ac4a96acb3aec558ced91ec0" }, - "runtime": { "name": "Java", "version": "11.0.7" }, + "runtime": { + "name": "Java", + "version": "11.0.7" + }, "version": "None" }, - "source": { "ip": "172.18.0.9" }, - "timestamp": { "us": 1593413321941007 }, - "trace": { "id": "88a2b9ca970cdd38dfa1b5646d26b897" }, + "source": { + "ip": "172.18.0.9" + }, + "timestamp": { + "us": 1593413316383008 + }, + "trace": { + "id": "386b450aef87fc079b20136eda542af1" + }, "transaction": { - "duration": { "us": 4539 }, - "id": "24ee0e4812cfed62", + "duration": { + "us": 4888 + }, + "id": "5a4aa02158b5658c", "name": "APIRestController#product", "result": "HTTP 2xx", "sampled": true, - "span_count": { "dropped": 0, "started": 2 }, + "span_count": { + "dropped": 0, + "started": 3 + }, "type": "request" }, "url": { "domain": "172.18.0.6", - "full": "http://172.18.0.6:3000/api/products/4", - "path": "/api/products/4", + "full": "http://172.18.0.6:3000/api/products/1", + "path": "/api/products/1", "port": 3000, "scheme": "http" }, "user_agent": { - "device": { "name": "Other" }, + "device": { + "name": "Other" + }, "name": "Other", "original": "Python/3.7 aiohttp/3.3.2" } - }, - "p95": 4864, - "averageResponseTime": 4713.5, - "transactionsPerMinute": 0.5, - "impact": 0.24559517890858723 + } }, { - "name": "APIRestController#order", + "key": { + "service.name": "opbeans-java", + "transaction.name": "APIRestController#order" + }, + "averageResponseTime": 3392.5, + "transactionsPerMinute": 0.5, + "impact": 0.09374344413758617, "sample": { - "@timestamp": "2020-06-29T06:48:33.314Z", + "@timestamp": "2020-06-29T06:48:07.416Z", "agent": { "ephemeral_id": "222af346-6dd9-45ef-ac85-d86b67edd2de", "name": "java", "version": "1.17.1-SNAPSHOT" }, - "client": { "ip": "172.18.0.9" }, + "client": { + "ip": "172.18.0.9" + }, "container": { "id": "918ebbd99b4f40003cf5713c080bb8120fa3bbe7ac4a96acb3aec558ced91ec0" }, - "ecs": { "version": "1.5.0" }, - "event": { "ingested": "2020-06-29T06:48:36.137777Z" }, + "ecs": { + "version": "1.5.0" + }, + "event": { + "ingested": "2020-06-29T06:48:15.534378Z" + }, "host": { "architecture": "amd64", "hostname": "918ebbd99b4f", "ip": "172.18.0.6", "name": "918ebbd99b4f", - "os": { "platform": "Linux" } + "os": { + "platform": "Linux" + } }, "http": { "request": { "headers": { - "Accept": ["*/*"], - "Accept-Encoding": ["gzip, deflate"], - "Host": ["172.18.0.6:3000"], - "User-Agent": ["Python/3.7 aiohttp/3.3.2"] + "Accept": [ + "*/*" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Host": [ + "172.18.0.6:3000" + ], + "User-Agent": [ + "Python/3.7 aiohttp/3.3.2" + ] }, "method": "get", - "socket": { "encrypted": false, "remote_address": "172.18.0.9" } + "socket": { + "encrypted": false, + "remote_address": "172.18.0.9" + } }, "response": { "finished": true, @@ -3122,88 +4761,144 @@ "version": "8.0.0", "version_major": 8 }, - "process": { "pid": 6, "ppid": 1, "title": "/opt/java/openjdk/bin/java" }, - "processor": { "event": "transaction", "name": "transaction" }, + "process": { + "pid": 6, + "ppid": 1, + "title": "/opt/java/openjdk/bin/java" + }, + "processor": { + "event": "transaction", + "name": "transaction" + }, "service": { "environment": "production", - "framework": { "name": "Spring Web MVC", "version": "5.0.6.RELEASE" }, - "language": { "name": "Java", "version": "11.0.7" }, + "framework": { + "name": "Spring Web MVC", + "version": "5.0.6.RELEASE" + }, + "language": { + "name": "Java", + "version": "11.0.7" + }, "name": "opbeans-java", "node": { "name": "918ebbd99b4f40003cf5713c080bb8120fa3bbe7ac4a96acb3aec558ced91ec0" }, - "runtime": { "name": "Java", "version": "11.0.7" }, + "runtime": { + "name": "Java", + "version": "11.0.7" + }, "version": "None" }, - "source": { "ip": "172.18.0.9" }, - "timestamp": { "us": 1593413313314007 }, - "trace": { "id": "aaf67f944393124080d1e4de804dc6eb" }, + "source": { + "ip": "172.18.0.9" + }, + "timestamp": { + "us": 1593413287416007 + }, + "trace": { + "id": "25c46380df3d44a192ed07279a08b329" + }, "transaction": { - "duration": { "us": 2503 }, - "id": "f7f9f5e0f8a3a0d4", + "duration": { + "us": 4282 + }, + "id": "d4d5b23c685d2ee5", "name": "APIRestController#order", "result": "HTTP 2xx", "sampled": true, - "span_count": { "dropped": 0, "started": 1 }, + "span_count": { + "dropped": 0, + "started": 1 + }, "type": "request" }, "url": { "domain": "172.18.0.6", - "full": "http://172.18.0.6:3000/api/orders/906", - "path": "/api/orders/906", + "full": "http://172.18.0.6:3000/api/orders/391", + "path": "/api/orders/391", "port": 3000, "scheme": "http" }, "user_agent": { - "device": { "name": "Other" }, + "device": { + "name": "Other" + }, "name": "Other", "original": "Python/3.7 aiohttp/3.3.2" } - }, - "p95": 4272, - "averageResponseTime": 3392.5, - "transactionsPerMinute": 0.5, - "impact": 0.09374344413758617 + } }, { - "name": "APIRestController#orders", + "key": { + "service.name": "opbeans-java", + "transaction.name": "APIRestController#orders" + }, + "averageResponseTime": 3147, + "transactionsPerMinute": 0.5, + "impact": 0.06552270160444405, "sample": { - "@timestamp": "2020-06-29T06:48:39.500Z", + "@timestamp": "2020-06-29T06:48:16.028Z", "agent": { "ephemeral_id": "222af346-6dd9-45ef-ac85-d86b67edd2de", "name": "java", "version": "1.17.1-SNAPSHOT" }, - "client": { "ip": "172.18.0.9" }, + "client": { + "ip": "172.18.0.9" + }, "container": { "id": "918ebbd99b4f40003cf5713c080bb8120fa3bbe7ac4a96acb3aec558ced91ec0" }, - "ecs": { "version": "1.5.0" }, - "event": { "ingested": "2020-06-29T06:48:46.706280Z" }, + "ecs": { + "version": "1.5.0" + }, + "event": { + "ingested": "2020-06-29T06:48:25.800962Z" + }, "host": { "architecture": "amd64", "hostname": "918ebbd99b4f", "ip": "172.18.0.6", "name": "918ebbd99b4f", - "os": { "platform": "Linux" } + "os": { + "platform": "Linux" + } }, "http": { "request": { "headers": { - "Accept": ["*/*"], - "Accept-Encoding": ["gzip, deflate"], - "Host": ["172.18.0.6:3000"], - "User-Agent": ["Python/3.7 aiohttp/3.3.2"] + "Accept": [ + "*/*" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Host": [ + "172.18.0.6:3000" + ], + "User-Agent": [ + "Python/3.7 aiohttp/3.3.2" + ] }, "method": "get", - "socket": { "encrypted": false, "remote_address": "172.18.0.9" } + "socket": { + "encrypted": false, + "remote_address": "172.18.0.9" + } }, "response": { "finished": true, "headers": { - "Content-Type": ["application/json;charset=UTF-8"], - "Date": ["Mon, 29 Jun 2020 06:48:38 GMT"], - "Transfer-Encoding": ["chunked"] + "Content-Type": [ + "application/json;charset=UTF-8" + ], + "Date": [ + "Mon, 29 Jun 2020 06:48:15 GMT" + ], + "Transfer-Encoding": [ + "chunked" + ] }, "headers_sent": true, "status_code": 200 @@ -3218,29 +4913,56 @@ "version": "8.0.0", "version_major": 8 }, - "process": { "pid": 6, "ppid": 1, "title": "/opt/java/openjdk/bin/java" }, - "processor": { "event": "transaction", "name": "transaction" }, + "process": { + "pid": 6, + "ppid": 1, + "title": "/opt/java/openjdk/bin/java" + }, + "processor": { + "event": "transaction", + "name": "transaction" + }, "service": { "environment": "production", - "framework": { "name": "Spring Web MVC", "version": "5.0.6.RELEASE" }, - "language": { "name": "Java", "version": "11.0.7" }, + "framework": { + "name": "Spring Web MVC", + "version": "5.0.6.RELEASE" + }, + "language": { + "name": "Java", + "version": "11.0.7" + }, "name": "opbeans-java", "node": { "name": "918ebbd99b4f40003cf5713c080bb8120fa3bbe7ac4a96acb3aec558ced91ec0" }, - "runtime": { "name": "Java", "version": "11.0.7" }, + "runtime": { + "name": "Java", + "version": "11.0.7" + }, "version": "None" }, - "source": { "ip": "172.18.0.9" }, - "timestamp": { "us": 1593413319500008 }, - "trace": { "id": "f89b02f09a2e7a7f2cc3478f53d4a495" }, + "source": { + "ip": "172.18.0.9" + }, + "timestamp": { + "us": 1593413296028008 + }, + "trace": { + "id": "4110227ecacbccf79894165ae5df932d" + }, "transaction": { - "duration": { "us": 3391 }, - "id": "41c8c4300ee2ccda", + "duration": { + "us": 2903 + }, + "id": "8e3732f0f0da942b", "name": "APIRestController#orders", "result": "HTTP 2xx", "sampled": true, - "span_count": { "dropped": 0, "started": 2 }, + "span_count": { + "dropped": 0, + "started": 1 + }, "type": "request" }, "url": { @@ -3251,40 +4973,61 @@ "scheme": "http" }, "user_agent": { - "device": { "name": "Other" }, + "device": { + "name": "Other" + }, "name": "Other", "original": "Python/3.7 aiohttp/3.3.2" } - }, - "p95": 3376, - "averageResponseTime": 3147, - "transactionsPerMinute": 0.5, - "impact": 0.06552270160444405 + } }, { - "name": "GET /throw-error", + "key": { + "service.name": "opbeans-node", + "transaction.name": "GET /throw-error" + }, + "averageResponseTime": 2577, + "transactionsPerMinute": 0.5, + "impact": 0, "sample": { - "@timestamp": "2020-06-29T06:48:42.954Z", - "agent": { "name": "nodejs", "version": "3.6.1" }, - "client": { "ip": "172.18.0.7" }, + "@timestamp": "2020-06-29T06:48:19.975Z", + "agent": { + "name": "nodejs", + "version": "3.6.1" + }, + "client": { + "ip": "172.18.0.7" + }, "container": { "id": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" }, - "ecs": { "version": "1.5.0" }, - "event": { "ingested": "2020-06-29T06:48:43.996435Z" }, + "ecs": { + "version": "1.5.0" + }, + "event": { + "ingested": "2020-06-29T06:48:21.012520Z" + }, "host": { "architecture": "x64", "hostname": "41712ded148f", "ip": "172.18.0.7", "name": "41712ded148f", - "os": { "platform": "linux" } + "os": { + "platform": "linux" + } }, "http": { "request": { "headers": { - "Connection": ["close"], - "Host": ["opbeans-node:3000"], - "User-Agent": ["workload/2.4.3"] + "Connection": [ + "close" + ], + "Host": [ + "opbeans-node:3000" + ], + "User-Agent": [ + "workload/2.4.3" + ] }, "method": "get", "socket": { @@ -3294,13 +5037,27 @@ }, "response": { "headers": { - "Connection": ["close"], - "Content-Length": ["148"], - "Content-Security-Policy": ["default-src 'none'"], - "Content-Type": ["text/html; charset=utf-8"], - "Date": ["Mon, 29 Jun 2020 06:48:42 GMT"], - "X-Content-Type-Options": ["nosniff"], - "X-Powered-By": ["Express"] + "Connection": [ + "close" + ], + "Content-Length": [ + "148" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "Content-Type": [ + "text/html; charset=utf-8" + ], + "Date": [ + "Mon, 29 Jun 2020 06:48:19 GMT" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Powered-By": [ + "Express" + ] }, "status_code": 500 }, @@ -3330,29 +5087,52 @@ "ppid": 1, "title": "node /app/server.js" }, - "processor": { "event": "transaction", "name": "transaction" }, + "processor": { + "event": "transaction", + "name": "transaction" + }, "service": { "environment": "production", - "framework": { "name": "express", "version": "4.17.1" }, - "language": { "name": "javascript" }, + "framework": { + "name": "express", + "version": "4.17.1" + }, + "language": { + "name": "javascript" + }, "name": "opbeans-node", "node": { "name": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" }, - "runtime": { "name": "node", "version": "12.18.1" }, + "runtime": { + "name": "node", + "version": "12.18.1" + }, "version": "1.0.0" }, - "source": { "ip": "172.18.0.7" }, - "timestamp": { "us": 1593413322954016 }, - "trace": { "id": "9d5aee7443a43db9820f622a10dfac6e" }, + "source": { + "ip": "172.18.0.7" + }, + "timestamp": { + "us": 1593413299975019 + }, + "trace": { + "id": "106f3a55b0b0ea327d1bbe4be66c3bcc" + }, "transaction": { - "custom": { "shoppingBasketCount": 42 }, - "duration": { "us": 1928 }, - "id": "8e6fc8c3f99e8fc9", + "custom": { + "shoppingBasketCount": 42 + }, + "duration": { + "us": 3226 + }, + "id": "247b9141552a9e73", "name": "GET /throw-error", "result": "HTTP 5xx", "sampled": true, - "span_count": { "started": 0 }, + "span_count": { + "started": 0 + }, "type": "request" }, "url": { @@ -3363,16 +5143,18 @@ "port": 3000, "scheme": "http" }, - "user": { "email": "kimchy@elastic.co", "id": "42", "name": "kimchy" }, + "user": { + "email": "kimchy@elastic.co", + "id": "42", + "name": "kimchy" + }, "user_agent": { - "device": { "name": "Other" }, + "device": { + "name": "Other" + }, "name": "Other", "original": "workload/2.4.3" } - }, - "p95": 3224, - "averageResponseTime": 2577, - "transactionsPerMinute": 0.5, - "impact": 0 + } } ] diff --git a/x-pack/test/apm_api_integration/basic/tests/traces/top_traces.ts b/x-pack/test/apm_api_integration/basic/tests/traces/top_traces.ts index e96cb20a68fda6..b4a037436adb8a 100644 --- a/x-pack/test/apm_api_integration/basic/tests/traces/top_traces.ts +++ b/x-pack/test/apm_api_integration/basic/tests/traces/top_traces.ts @@ -4,6 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ import expect from '@kbn/expect'; +import { sortBy, omit } from 'lodash'; import { FtrProviderContext } from '../../../../common/ftr_provider_context'; import expectTopTraces from './expectation/top_traces.expectation.json'; @@ -46,8 +47,28 @@ export default function ApiTest({ getService }: FtrProviderContext) { expect(response.body.items.length).to.be(33); }); - it('returns the correct buckets and samples', async () => { - expect(response.body.items).to.eql(expectTopTraces); + it('returns the correct buckets', async () => { + const responseWithoutSamples = sortBy( + response.body.items.map((item: any) => omit(item, 'sample')), + 'impact' + ); + + const expectedTracesWithoutSamples = sortBy( + expectTopTraces.map((item: any) => omit(item, 'sample')), + 'impact' + ); + + expect(responseWithoutSamples).to.eql(expectedTracesWithoutSamples); + }); + + it('returns a sample', async () => { + // sample should provide enough information to deeplink to a transaction detail page + response.body.items.forEach((item: any) => { + expect(item.sample.trace.id).to.be.an('string'); + expect(item.sample.transaction.id).to.be.an('string'); + expect(item.sample.service.name).to.be(item.key['service.name']); + expect(item.sample.transaction.name).to.be(item.key['transaction.name']); + }); }); }); }); diff --git a/x-pack/test/apm_api_integration/basic/tests/transaction_groups/expectation/top_transaction_groups.json b/x-pack/test/apm_api_integration/basic/tests/transaction_groups/expectation/top_transaction_groups.json index 7d314e75e4d1de..29c55d4ef1b5c3 100644 --- a/x-pack/test/apm_api_integration/basic/tests/transaction_groups/expectation/top_transaction_groups.json +++ b/x-pack/test/apm_api_integration/basic/tests/transaction_groups/expectation/top_transaction_groups.json @@ -1,38 +1,86 @@ { "items": [ { - "name": "GET /api", + "key": "GET /api", + "averageResponseTime": 51175.73170731707, + "transactionsPerMinute": 10.25, + "impact": 100, + "p95": 259040, "sample": { - "@timestamp": "2020-06-29T06:48:41.454Z", - "agent": { "name": "nodejs", "version": "3.6.1" }, - "client": { "ip": "172.18.0.7" }, - "container": { "id": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" }, - "ecs": { "version": "1.5.0" }, - "event": { "ingested": "2020-06-29T06:48:43.992834Z" }, + "@timestamp": "2020-06-29T06:48:06.862Z", + "agent": { + "name": "nodejs", + "version": "3.6.1" + }, + "client": { + "ip": "172.18.0.8" + }, + "container": { + "id": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" + }, + "ecs": { + "version": "1.5.0" + }, + "event": { + "ingested": "2020-06-29T06:48:08.305742Z" + }, "host": { "architecture": "x64", "hostname": "41712ded148f", "ip": "172.18.0.7", "name": "41712ded148f", - "os": { "platform": "linux" } + "os": { + "platform": "linux" + } }, "http": { "request": { "headers": { - "Connection": ["close"], - "Host": ["opbeans-node:3000"], - "User-Agent": ["workload/2.4.3"] + "Accept": [ + "*/*" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Connection": [ + "keep-alive" + ], + "Host": [ + "opbeans-node:3000" + ], + "Referer": [ + "http://opbeans-node:3000/dashboard" + ], + "Traceparent": [ + "00-ca86ffcac7753ec8733933bd8fd45d11-5dcb98c9c9021cfc-01" + ], + "User-Agent": [ + "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/79.0.3945.0 Safari/537.36" + ] }, "method": "get", - "socket": { "encrypted": false, "remote_address": "::ffff:172.18.0.7" } + "socket": { + "encrypted": false, + "remote_address": "::ffff:172.18.0.8" + } }, "response": { "headers": { - "Connection": ["close"], - "Content-Type": ["application/json;charset=UTF-8"], - "Date": ["Mon, 29 Jun 2020 06:48:41 GMT"], - "Transfer-Encoding": ["chunked"], - "X-Powered-By": ["Express"] + "Connection": [ + "close" + ], + "Content-Type": [ + "application/json;charset=UTF-8" + ], + "Date": [ + "Mon, 29 Jun 2020 06:48:06 GMT" + ], + "Transfer-Encoding": [ + "chunked" + ], + "X-Powered-By": [ + "Express" + ] }, "status_code": 200 }, @@ -52,6 +100,9 @@ "version": "8.0.0", "version_major": 8 }, + "parent": { + "id": "5dcb98c9c9021cfc" + }, "process": { "args": [ "/usr/local/bin/node", @@ -62,87 +113,164 @@ "ppid": 1, "title": "node /app/server.js" }, - "processor": { "event": "transaction", "name": "transaction" }, + "processor": { + "event": "transaction", + "name": "transaction" + }, "service": { "environment": "production", - "framework": { "name": "express", "version": "4.17.1" }, - "language": { "name": "javascript" }, + "framework": { + "name": "express", + "version": "4.17.1" + }, + "language": { + "name": "javascript" + }, "name": "opbeans-node", - "node": { "name": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" }, - "runtime": { "name": "node", "version": "12.18.1" }, + "node": { + "name": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" + }, + "runtime": { + "name": "node", + "version": "12.18.1" + }, "version": "1.0.0" }, - "source": { "ip": "172.18.0.7" }, - "timestamp": { "us": 1593413321454009 }, - "trace": { "id": "0507830eeff93f7bf1a354e4031097b3" }, + "source": { + "ip": "172.18.0.8" + }, + "timestamp": { + "us": 1593413286862021 + }, + "trace": { + "id": "ca86ffcac7753ec8733933bd8fd45d11" + }, "transaction": { - "custom": { "shoppingBasketCount": 42 }, - "duration": { "us": 8334 }, - "id": "878250a8b937445d", + "custom": { + "shoppingBasketCount": 42 + }, + "duration": { + "us": 15738 + }, + "id": "c95371db21c6f407", "name": "GET /api", "result": "HTTP 2xx", "sampled": true, - "span_count": { "started": 1 }, + "span_count": { + "started": 1 + }, "type": "request" }, "url": { "domain": "opbeans-node", - "full": "http://opbeans-node:3000/api/products/6", - "original": "/api/products/6", - "path": "/api/products/6", + "full": "http://opbeans-node:3000/api/products/top", + "original": "/api/products/top", + "path": "/api/products/top", "port": 3000, "scheme": "http" }, - "user": { "email": "kimchy@elastic.co", "id": "42", "name": "kimchy" }, + "user": { + "email": "kimchy@elastic.co", + "id": "42", + "name": "kimchy" + }, "user_agent": { - "device": { "name": "Other" }, - "name": "Other", - "original": "workload/2.4.3" + "device": { + "name": "Other" + }, + "name": "HeadlessChrome", + "original": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/79.0.3945.0 Safari/537.36", + "os": { + "name": "Linux" + }, + "version": "79.0.3945" } - }, - "p95": 259040, - "averageResponseTime": 51175.73170731707, - "transactionsPerMinute": 10.25, - "impact": 100 + } }, { - "name": "POST /api/orders", + "key": "POST /api/orders", + "averageResponseTime": 270684, + "transactionsPerMinute": 0.25, + "impact": 12.686265169840583, + "p95": 270336, "sample": { "@timestamp": "2020-06-29T06:48:39.953Z", - "agent": { "name": "nodejs", "version": "3.6.1" }, - "client": { "ip": "172.18.0.7" }, - "container": { "id": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" }, - "ecs": { "version": "1.5.0" }, - "event": { "ingested": "2020-06-29T06:48:43.991549Z" }, + "agent": { + "name": "nodejs", + "version": "3.6.1" + }, + "client": { + "ip": "172.18.0.7" + }, + "container": { + "id": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" + }, + "ecs": { + "version": "1.5.0" + }, + "event": { + "ingested": "2020-06-29T06:48:43.991549Z" + }, "host": { "architecture": "x64", "hostname": "41712ded148f", "ip": "172.18.0.7", "name": "41712ded148f", - "os": { "platform": "linux" } + "os": { + "platform": "linux" + } }, "http": { "request": { - "body": { "original": "[REDACTED]" }, + "body": { + "original": "[REDACTED]" + }, "headers": { - "Accept": ["application/json"], - "Connection": ["close"], - "Content-Length": ["129"], - "Content-Type": ["application/json"], - "Host": ["opbeans-node:3000"], - "User-Agent": ["workload/2.4.3"] + "Accept": [ + "application/json" + ], + "Connection": [ + "close" + ], + "Content-Length": [ + "129" + ], + "Content-Type": [ + "application/json" + ], + "Host": [ + "opbeans-node:3000" + ], + "User-Agent": [ + "workload/2.4.3" + ] }, "method": "post", - "socket": { "encrypted": false, "remote_address": "::ffff:172.18.0.7" } + "socket": { + "encrypted": false, + "remote_address": "::ffff:172.18.0.7" + } }, "response": { "headers": { - "Connection": ["close"], - "Content-Length": ["13"], - "Content-Type": ["application/json; charset=utf-8"], - "Date": ["Mon, 29 Jun 2020 06:48:40 GMT"], - "Etag": ["W/\"d-eEOWU4Cnr5DZ23ErRUeYu9oOIks\""], - "X-Powered-By": ["Express"] + "Connection": [ + "close" + ], + "Content-Length": [ + "13" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Date": [ + "Mon, 29 Jun 2020 06:48:40 GMT" + ], + "Etag": [ + "W/\"d-eEOWU4Cnr5DZ23ErRUeYu9oOIks\"" + ], + "X-Powered-By": [ + "Express" + ] }, "status_code": 200 }, @@ -172,27 +300,52 @@ "ppid": 1, "title": "node /app/server.js" }, - "processor": { "event": "transaction", "name": "transaction" }, + "processor": { + "event": "transaction", + "name": "transaction" + }, "service": { "environment": "production", - "framework": { "name": "express", "version": "4.17.1" }, - "language": { "name": "javascript" }, + "framework": { + "name": "express", + "version": "4.17.1" + }, + "language": { + "name": "javascript" + }, "name": "opbeans-node", - "node": { "name": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" }, - "runtime": { "name": "node", "version": "12.18.1" }, + "node": { + "name": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" + }, + "runtime": { + "name": "node", + "version": "12.18.1" + }, "version": "1.0.0" }, - "source": { "ip": "172.18.0.7" }, - "timestamp": { "us": 1593413319953033 }, - "trace": { "id": "52b8fda5f6df745b990740ba18378620" }, + "source": { + "ip": "172.18.0.7" + }, + "timestamp": { + "us": 1593413319953033 + }, + "trace": { + "id": "52b8fda5f6df745b990740ba18378620" + }, "transaction": { - "custom": { "shoppingBasketCount": 42 }, - "duration": { "us": 270684 }, + "custom": { + "shoppingBasketCount": 42 + }, + "duration": { + "us": 270684 + }, "id": "a3afc2a112e9c893", "name": "POST /api/orders", "result": "HTTP 2xx", "sampled": true, - "span_count": { "started": 16 }, + "span_count": { + "started": 16 + }, "type": "request" }, "url": { @@ -203,52 +356,92 @@ "port": 3000, "scheme": "http" }, - "user": { "email": "kimchy@elastic.co", "id": "42", "name": "kimchy" }, + "user": { + "email": "kimchy@elastic.co", + "id": "42", + "name": "kimchy" + }, "user_agent": { - "device": { "name": "Other" }, + "device": { + "name": "Other" + }, "name": "Other", "original": "workload/2.4.3" } - }, - "p95": 270336, - "averageResponseTime": 270684, - "transactionsPerMinute": 0.25, - "impact": 12.686265169840583 + } }, { - "name": "GET /api/customers", + "key": "GET /api/customers", + "averageResponseTime": 16896.8, + "transactionsPerMinute": 1.25, + "impact": 3.790160870423129, + "p95": 26432, "sample": { - "@timestamp": "2020-06-29T06:48:37.952Z", - "agent": { "name": "nodejs", "version": "3.6.1" }, - "client": { "ip": "172.18.0.7" }, - "container": { "id": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" }, - "ecs": { "version": "1.5.0" }, - "event": { "ingested": "2020-06-29T06:48:39.492402Z" }, + "@timestamp": "2020-06-29T06:48:28.444Z", + "agent": { + "name": "nodejs", + "version": "3.6.1" + }, + "client": { + "ip": "172.18.0.7" + }, + "container": { + "id": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" + }, + "ecs": { + "version": "1.5.0" + }, + "event": { + "ingested": "2020-06-29T06:48:29.982737Z" + }, "host": { "architecture": "x64", "hostname": "41712ded148f", "ip": "172.18.0.7", "name": "41712ded148f", - "os": { "platform": "linux" } + "os": { + "platform": "linux" + } }, "http": { "request": { "headers": { - "Connection": ["close"], - "Host": ["opbeans-node:3000"], - "User-Agent": ["workload/2.4.3"] + "Connection": [ + "close" + ], + "Host": [ + "opbeans-node:3000" + ], + "User-Agent": [ + "workload/2.4.3" + ] }, "method": "get", - "socket": { "encrypted": false, "remote_address": "::ffff:172.18.0.7" } + "socket": { + "encrypted": false, + "remote_address": "::ffff:172.18.0.7" + } }, "response": { "headers": { - "Connection": ["close"], - "Content-Length": ["186769"], - "Content-Type": ["application/json; charset=utf-8"], - "Date": ["Mon, 29 Jun 2020 06:48:37 GMT"], - "Etag": ["W/\"2d991-yG3J8W/roH7fSxXTudZrO27Ax9s\""], - "X-Powered-By": ["Express"] + "Connection": [ + "close" + ], + "Content-Length": [ + "186769" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Date": [ + "Mon, 29 Jun 2020 06:48:28 GMT" + ], + "Etag": [ + "W/\"2d991-yG3J8W/roH7fSxXTudZrO27Ax9s\"" + ], + "X-Powered-By": [ + "Express" + ] }, "status_code": 200 }, @@ -278,27 +471,52 @@ "ppid": 1, "title": "node /app/server.js" }, - "processor": { "event": "transaction", "name": "transaction" }, + "processor": { + "event": "transaction", + "name": "transaction" + }, "service": { "environment": "production", - "framework": { "name": "express", "version": "4.17.1" }, - "language": { "name": "javascript" }, + "framework": { + "name": "express", + "version": "4.17.1" + }, + "language": { + "name": "javascript" + }, "name": "opbeans-node", - "node": { "name": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" }, - "runtime": { "name": "node", "version": "12.18.1" }, + "node": { + "name": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" + }, + "runtime": { + "name": "node", + "version": "12.18.1" + }, "version": "1.0.0" }, - "source": { "ip": "172.18.0.7" }, - "timestamp": { "us": 1593413317952016 }, - "trace": { "id": "5d99327edae38ed735e8d7a6028cf719" }, + "source": { + "ip": "172.18.0.7" + }, + "timestamp": { + "us": 1593413308444015 + }, + "trace": { + "id": "792fb0b00256164e88b277ec40b65e14" + }, "transaction": { - "custom": { "shoppingBasketCount": 42 }, - "duration": { "us": 16824 }, - "id": "071808429ec9d00b", + "custom": { + "shoppingBasketCount": 42 + }, + "duration": { + "us": 26471 + }, + "id": "6c1f848752563d2b", "name": "GET /api/customers", "result": "HTTP 2xx", "sampled": true, - "span_count": { "started": 2 }, + "span_count": { + "started": 2 + }, "type": "request" }, "url": { @@ -309,52 +527,92 @@ "port": 3000, "scheme": "http" }, - "user": { "email": "kimchy@elastic.co", "id": "42", "name": "kimchy" }, + "user": { + "email": "kimchy@elastic.co", + "id": "42", + "name": "kimchy" + }, "user_agent": { - "device": { "name": "Other" }, + "device": { + "name": "Other" + }, "name": "Other", "original": "workload/2.4.3" } - }, - "p95": 26432, - "averageResponseTime": 16896.8, - "transactionsPerMinute": 1.25, - "impact": 3.790160870423129 + } }, { - "name": "GET /log-message", + "key": "GET /log-message", + "averageResponseTime": 32667.5, + "transactionsPerMinute": 0.5, + "impact": 2.875276331059301, + "p95": 38528, "sample": { - "@timestamp": "2020-06-29T06:48:28.944Z", - "agent": { "name": "nodejs", "version": "3.6.1" }, - "client": { "ip": "172.18.0.7" }, - "container": { "id": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" }, - "ecs": { "version": "1.5.0" }, - "event": { "ingested": "2020-06-29T06:48:39.370695Z" }, + "@timestamp": "2020-06-29T06:48:25.944Z", + "agent": { + "name": "nodejs", + "version": "3.6.1" + }, + "client": { + "ip": "172.18.0.7" + }, + "container": { + "id": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" + }, + "ecs": { + "version": "1.5.0" + }, + "event": { + "ingested": "2020-06-29T06:48:29.976822Z" + }, "host": { "architecture": "x64", "hostname": "41712ded148f", "ip": "172.18.0.7", "name": "41712ded148f", - "os": { "platform": "linux" } + "os": { + "platform": "linux" + } }, "http": { "request": { "headers": { - "Connection": ["close"], - "Host": ["opbeans-node:3000"], - "User-Agent": ["workload/2.4.3"] + "Connection": [ + "close" + ], + "Host": [ + "opbeans-node:3000" + ], + "User-Agent": [ + "workload/2.4.3" + ] }, "method": "get", - "socket": { "encrypted": false, "remote_address": "::ffff:172.18.0.7" } + "socket": { + "encrypted": false, + "remote_address": "::ffff:172.18.0.7" + } }, "response": { "headers": { - "Connection": ["close"], - "Content-Length": ["24"], - "Content-Type": ["text/html; charset=utf-8"], - "Date": ["Mon, 29 Jun 2020 06:48:28 GMT"], - "Etag": ["W/\"18-MS3VbhH7auHMzO0fUuNF6v14N/M\""], - "X-Powered-By": ["Express"] + "Connection": [ + "close" + ], + "Content-Length": [ + "24" + ], + "Content-Type": [ + "text/html; charset=utf-8" + ], + "Date": [ + "Mon, 29 Jun 2020 06:48:25 GMT" + ], + "Etag": [ + "W/\"18-MS3VbhH7auHMzO0fUuNF6v14N/M\"" + ], + "X-Powered-By": [ + "Express" + ] }, "status_code": 500 }, @@ -384,27 +642,52 @@ "ppid": 1, "title": "node /app/server.js" }, - "processor": { "event": "transaction", "name": "transaction" }, + "processor": { + "event": "transaction", + "name": "transaction" + }, "service": { "environment": "production", - "framework": { "name": "express", "version": "4.17.1" }, - "language": { "name": "javascript" }, + "framework": { + "name": "express", + "version": "4.17.1" + }, + "language": { + "name": "javascript" + }, "name": "opbeans-node", - "node": { "name": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" }, - "runtime": { "name": "node", "version": "12.18.1" }, + "node": { + "name": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" + }, + "runtime": { + "name": "node", + "version": "12.18.1" + }, "version": "1.0.0" }, - "source": { "ip": "172.18.0.7" }, - "timestamp": { "us": 1593413308944016 }, - "trace": { "id": "afabe4cb397616f5ec35a2f3da49ba62" }, + "source": { + "ip": "172.18.0.7" + }, + "timestamp": { + "us": 1593413305944023 + }, + "trace": { + "id": "cd2ad726ad164d701c5d3103cbab0c81" + }, "transaction": { - "custom": { "shoppingBasketCount": 42 }, - "duration": { "us": 26788 }, - "id": "cc8c4261387507cf", + "custom": { + "shoppingBasketCount": 42 + }, + "duration": { + "us": 38547 + }, + "id": "9e41667eb64dea55", "name": "GET /log-message", "result": "HTTP 5xx", "sampled": true, - "span_count": { "started": 0 }, + "span_count": { + "started": 0 + }, "type": "request" }, "url": { @@ -415,51 +698,89 @@ "port": 3000, "scheme": "http" }, - "user": { "email": "kimchy@elastic.co", "id": "42", "name": "kimchy" }, + "user": { + "email": "kimchy@elastic.co", + "id": "42", + "name": "kimchy" + }, "user_agent": { - "device": { "name": "Other" }, + "device": { + "name": "Other" + }, "name": "Other", "original": "workload/2.4.3" } - }, - "p95": 38528, - "averageResponseTime": 32667.5, - "transactionsPerMinute": 0.5, - "impact": 2.875276331059301 + } }, { - "name": "GET /*", + "key": "GET /*", + "averageResponseTime": 3262.95, + "transactionsPerMinute": 5, + "impact": 2.8716452680799467, + "p95": 4472, "sample": { - "@timestamp": "2020-06-29T06:48:42.454Z", - "agent": { "name": "nodejs", "version": "3.6.1" }, - "client": { "ip": "172.18.0.7" }, - "container": { "id": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" }, - "ecs": { "version": "1.5.0" }, - "event": { "ingested": "2020-06-29T06:48:43.995202Z" }, + "@timestamp": "2020-06-29T06:48:25.064Z", + "agent": { + "name": "nodejs", + "version": "3.6.1" + }, + "client": { + "ip": "172.18.0.7" + }, + "container": { + "id": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" + }, + "ecs": { + "version": "1.5.0" + }, + "event": { + "ingested": "2020-06-29T06:48:27.005197Z" + }, "host": { "architecture": "x64", "hostname": "41712ded148f", "ip": "172.18.0.7", "name": "41712ded148f", - "os": { "platform": "linux" } + "os": { + "platform": "linux" + } }, "http": { "request": { "headers": { - "Connection": ["close"], - "Host": ["opbeans-node:3000"], - "User-Agent": ["workload/2.4.3"] + "Connection": [ + "close" + ], + "Host": [ + "opbeans-node:3000" + ], + "User-Agent": [ + "Wget" + ] }, "method": "get", - "socket": { "encrypted": false, "remote_address": "::ffff:172.18.0.7" } + "socket": { + "encrypted": false, + "remote_address": "::ffff:172.18.0.7" + } }, "response": { "headers": { - "Connection": ["close"], - "Content-Length": ["813"], - "Content-Type": ["text/html"], - "Date": ["Mon, 29 Jun 2020 06:48:42 GMT"], - "X-Powered-By": ["Express"] + "Connection": [ + "close" + ], + "Content-Length": [ + "813" + ], + "Content-Type": [ + "text/html" + ], + "Date": [ + "Mon, 29 Jun 2020 06:48:25 GMT" + ], + "X-Powered-By": [ + "Express" + ] }, "status_code": 200 }, @@ -479,7 +800,9 @@ "version": "8.0.0", "version_major": 8 }, - "parent": { "id": "5baa6c3bedc93f9d" }, + "parent": { + "id": "f673ceaf4583f0f2" + }, "process": { "args": [ "/usr/local/bin/node", @@ -490,27 +813,52 @@ "ppid": 1, "title": "node /app/server.js" }, - "processor": { "event": "transaction", "name": "transaction" }, + "processor": { + "event": "transaction", + "name": "transaction" + }, "service": { "environment": "production", - "framework": { "name": "express", "version": "4.17.1" }, - "language": { "name": "javascript" }, + "framework": { + "name": "express", + "version": "4.17.1" + }, + "language": { + "name": "javascript" + }, "name": "opbeans-node", - "node": { "name": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" }, - "runtime": { "name": "node", "version": "12.18.1" }, + "node": { + "name": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" + }, + "runtime": { + "name": "node", + "version": "12.18.1" + }, "version": "1.0.0" }, - "source": { "ip": "172.18.0.7" }, - "timestamp": { "us": 1593413322454015 }, - "trace": { "id": "022b01256b291a4c417199d91ec8755f" }, + "source": { + "ip": "172.18.0.7" + }, + "timestamp": { + "us": 1593413305064023 + }, + "trace": { + "id": "30c12f4d8ef77a5be1b4464e5d2235bc" + }, "transaction": { - "custom": { "shoppingBasketCount": 42 }, - "duration": { "us": 1737 }, - "id": "eff3e45e0d9529d9", + "custom": { + "shoppingBasketCount": 42 + }, + "duration": { + "us": 3004 + }, + "id": "18a00dfdb919a978", "name": "GET /*", "result": "HTTP 2xx", "sampled": true, - "span_count": { "started": 0 }, + "span_count": { + "started": 0 + }, "type": "request" }, "url": { @@ -521,59 +869,104 @@ "port": 3000, "scheme": "http" }, - "user": { "email": "kimchy@elastic.co", "id": "42", "name": "kimchy" }, + "user": { + "email": "kimchy@elastic.co", + "id": "42", + "name": "kimchy" + }, "user_agent": { - "device": { "name": "Other" }, - "name": "Other", - "original": "workload/2.4.3" + "device": { + "name": "Other" + }, + "name": "Wget", + "original": "Wget" } - }, - "p95": 4472, - "averageResponseTime": 3262.95, - "transactionsPerMinute": 5, - "impact": 2.8716452680799467 + } }, { - "name": "GET /api/orders", + "key": "GET /api/orders", + "averageResponseTime": 7615.625, + "transactionsPerMinute": 2, + "impact": 2.6645791239678345, + "p95": 11616, "sample": { - "@timestamp": "2020-06-29T06:48:40.106Z", - "agent": { "name": "nodejs", "version": "3.6.1" }, - "client": { "ip": "172.18.0.6" }, - "container": { "id": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" }, - "ecs": { "version": "1.5.0" }, - "event": { "ingested": "2020-06-29T06:48:43.988104Z" }, + "@timestamp": "2020-06-29T06:48:28.782Z", + "agent": { + "name": "nodejs", + "version": "3.6.1" + }, + "client": { + "ip": "172.18.0.8" + }, + "container": { + "id": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" + }, + "ecs": { + "version": "1.5.0" + }, + "event": { + "ingested": "2020-06-29T06:48:29.983252Z" + }, "host": { "architecture": "x64", "hostname": "41712ded148f", "ip": "172.18.0.7", "name": "41712ded148f", - "os": { "platform": "linux" } + "os": { + "platform": "linux" + } }, "http": { "request": { "headers": { "Accept": [ - "text/plain, application/json, application/x-jackson-smile, application/cbor, application/*+json, */*" + "*/*" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Connection": [ + "keep-alive" ], - "Connection": ["keep-alive"], - "Elastic-Apm-Traceparent": [ - "00-90bd7780b32cc51a7f4c200b1e0c170f-5ff346d602ce27b0-01" + "Host": [ + "opbeans-node:3000" ], - "Host": ["opbeans-node:3000"], - "Traceparent": ["00-90bd7780b32cc51a7f4c200b1e0c170f-5ff346d602ce27b0-01"], - "User-Agent": ["Java/11.0.7"] + "Referer": [ + "http://opbeans-node:3000/orders" + ], + "Traceparent": [ + "00-978b56807e0b7a27cbc41a0dfb665f47-3358a24e09e23561-01" + ], + "User-Agent": [ + "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/79.0.3945.0 Safari/537.36" + ] }, "method": "get", - "socket": { "encrypted": false, "remote_address": "::ffff:172.18.0.6" } + "socket": { + "encrypted": false, + "remote_address": "::ffff:172.18.0.8" + } }, "response": { "headers": { - "Connection": ["keep-alive"], - "Content-Length": ["2"], - "Content-Type": ["application/json; charset=utf-8"], - "Date": ["Mon, 29 Jun 2020 06:48:40 GMT"], - "Etag": ["W/\"2-l9Fw4VUO7kr8CvBlt4zaMCqXZ0w\""], - "X-Powered-By": ["Express"] + "Connection": [ + "keep-alive" + ], + "Content-Length": [ + "2" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Date": [ + "Mon, 29 Jun 2020 06:48:28 GMT" + ], + "Etag": [ + "W/\"2-l9Fw4VUO7kr8CvBlt4zaMCqXZ0w\"" + ], + "X-Powered-By": [ + "Express" + ] }, "status_code": 200 }, @@ -593,7 +986,9 @@ "version": "8.0.0", "version_major": 8 }, - "parent": { "id": "5ff346d602ce27b0" }, + "parent": { + "id": "3358a24e09e23561" + }, "process": { "args": [ "/usr/local/bin/node", @@ -604,27 +999,52 @@ "ppid": 1, "title": "node /app/server.js" }, - "processor": { "event": "transaction", "name": "transaction" }, + "processor": { + "event": "transaction", + "name": "transaction" + }, "service": { "environment": "production", - "framework": { "name": "express", "version": "4.17.1" }, - "language": { "name": "javascript" }, + "framework": { + "name": "express", + "version": "4.17.1" + }, + "language": { + "name": "javascript" + }, "name": "opbeans-node", - "node": { "name": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" }, - "runtime": { "name": "node", "version": "12.18.1" }, + "node": { + "name": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" + }, + "runtime": { + "name": "node", + "version": "12.18.1" + }, "version": "1.0.0" }, - "source": { "ip": "172.18.0.6" }, - "timestamp": { "us": 1593413320106015 }, - "trace": { "id": "90bd7780b32cc51a7f4c200b1e0c170f" }, + "source": { + "ip": "172.18.0.8" + }, + "timestamp": { + "us": 1593413308782015 + }, + "trace": { + "id": "978b56807e0b7a27cbc41a0dfb665f47" + }, "transaction": { - "custom": { "shoppingBasketCount": 42 }, - "duration": { "us": 7424 }, - "id": "f3dd00d12c594cba", + "custom": { + "shoppingBasketCount": 42 + }, + "duration": { + "us": 7134 + }, + "id": "a6d8f3c5c98903e1", "name": "GET /api/orders", "result": "HTTP 2xx", "sampled": true, - "span_count": { "started": 2 }, + "span_count": { + "started": 2 + }, "type": "request" }, "url": { @@ -635,60 +1055,96 @@ "port": 3000, "scheme": "http" }, - "user": { "email": "kimchy@elastic.co", "id": "42", "name": "kimchy" }, + "user": { + "email": "kimchy@elastic.co", + "id": "42", + "name": "kimchy" + }, "user_agent": { - "device": { "name": "Spider" }, - "name": "Java", - "original": "Java/11.0.7", - "version": "0.7." + "device": { + "name": "Other" + }, + "name": "HeadlessChrome", + "original": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/79.0.3945.0 Safari/537.36", + "os": { + "name": "Linux" + }, + "version": "79.0.3945" } - }, - "p95": 11616, - "averageResponseTime": 7615.625, - "transactionsPerMinute": 2, - "impact": 2.6645791239678345 + } }, { - "name": "GET /api/products", + "key": "GET /api/products", + "averageResponseTime": 8585, + "transactionsPerMinute": 1.75, + "impact": 2.624924094061731, + "p95": 22112, "sample": { - "@timestamp": "2020-06-29T06:48:27.452Z", - "agent": { "name": "nodejs", "version": "3.6.1" }, - "client": { "ip": "172.18.0.6" }, - "container": { "id": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" }, - "ecs": { "version": "1.5.0" }, - "event": { "ingested": "2020-06-29T06:48:29.978463Z" }, + "@timestamp": "2020-06-29T06:48:21.475Z", + "agent": { + "name": "nodejs", + "version": "3.6.1" + }, + "client": { + "ip": "172.18.0.7" + }, + "container": { + "id": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" + }, + "ecs": { + "version": "1.5.0" + }, + "event": { + "ingested": "2020-06-29T06:48:26.996210Z" + }, "host": { "architecture": "x64", "hostname": "41712ded148f", "ip": "172.18.0.7", "name": "41712ded148f", - "os": { "platform": "linux" } + "os": { + "platform": "linux" + } }, "http": { "request": { "headers": { - "Accept": [ - "text/plain, application/json, application/x-jackson-smile, application/cbor, application/*+json, */*" + "Connection": [ + "close" ], - "Connection": ["keep-alive"], - "Elastic-Apm-Traceparent": [ - "00-27b168a328e0fd442377de8eaa0bf582-2c86873dedb66c2c-01" + "Host": [ + "opbeans-node:3000" ], - "Host": ["opbeans-node:3000"], - "Traceparent": ["00-27b168a328e0fd442377de8eaa0bf582-2c86873dedb66c2c-01"], - "User-Agent": ["Java/11.0.7"] + "User-Agent": [ + "workload/2.4.3" + ] }, "method": "get", - "socket": { "encrypted": false, "remote_address": "::ffff:172.18.0.6" } + "socket": { + "encrypted": false, + "remote_address": "::ffff:172.18.0.7" + } }, "response": { "headers": { - "Connection": ["keep-alive"], - "Content-Length": ["1023"], - "Content-Type": ["application/json; charset=utf-8"], - "Date": ["Mon, 29 Jun 2020 06:48:27 GMT"], - "Etag": ["W/\"3ff-VyOxcDApb+a/lnjkm9FeTOGSDrs\""], - "X-Powered-By": ["Express"] + "Connection": [ + "close" + ], + "Content-Length": [ + "1023" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Date": [ + "Mon, 29 Jun 2020 06:48:21 GMT" + ], + "Etag": [ + "W/\"3ff-VyOxcDApb+a/lnjkm9FeTOGSDrs\"" + ], + "X-Powered-By": [ + "Express" + ] }, "status_code": 200 }, @@ -708,7 +1164,6 @@ "version": "8.0.0", "version_major": 8 }, - "parent": { "id": "2c86873dedb66c2c" }, "process": { "args": [ "/usr/local/bin/node", @@ -719,27 +1174,52 @@ "ppid": 1, "title": "node /app/server.js" }, - "processor": { "event": "transaction", "name": "transaction" }, + "processor": { + "event": "transaction", + "name": "transaction" + }, "service": { "environment": "production", - "framework": { "name": "express", "version": "4.17.1" }, - "language": { "name": "javascript" }, + "framework": { + "name": "express", + "version": "4.17.1" + }, + "language": { + "name": "javascript" + }, "name": "opbeans-node", - "node": { "name": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" }, - "runtime": { "name": "node", "version": "12.18.1" }, + "node": { + "name": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" + }, + "runtime": { + "name": "node", + "version": "12.18.1" + }, "version": "1.0.0" }, - "source": { "ip": "172.18.0.6" }, - "timestamp": { "us": 1593413307452013 }, - "trace": { "id": "27b168a328e0fd442377de8eaa0bf582" }, + "source": { + "ip": "172.18.0.7" + }, + "timestamp": { + "us": 1593413301475015 + }, + "trace": { + "id": "389b26b16949c7f783223de4f14b788c" + }, "transaction": { - "custom": { "shoppingBasketCount": 42 }, - "duration": { "us": 4292 }, - "id": "141ecc2dfd55eeea", + "custom": { + "shoppingBasketCount": 42 + }, + "duration": { + "us": 6775 + }, + "id": "d2d4088a0b104fb4", "name": "GET /api/products", "result": "HTTP 2xx", "sampled": true, - "span_count": { "started": 2 }, + "span_count": { + "started": 2 + }, "type": "request" }, "url": { @@ -750,53 +1230,92 @@ "port": 3000, "scheme": "http" }, - "user": { "email": "kimchy@elastic.co", "id": "42", "name": "kimchy" }, + "user": { + "email": "kimchy@elastic.co", + "id": "42", + "name": "kimchy" + }, "user_agent": { - "device": { "name": "Spider" }, - "name": "Java", - "original": "Java/11.0.7", - "version": "0.7." + "device": { + "name": "Other" + }, + "name": "Other", + "original": "workload/2.4.3" } - }, - "p95": 22112, - "averageResponseTime": 8585, - "transactionsPerMinute": 1.75, - "impact": 2.624924094061731 + } }, { - "name": "GET /api/products/:id", + "key": "GET /api/products/:id", + "averageResponseTime": 13516.5, + "transactionsPerMinute": 1, + "impact": 2.3368756900811305, + "p95": 37856, "sample": { - "@timestamp": "2020-06-29T06:48:24.977Z", - "agent": { "name": "nodejs", "version": "3.6.1" }, - "client": { "ip": "172.18.0.7" }, - "container": { "id": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" }, - "ecs": { "version": "1.5.0" }, - "event": { "ingested": "2020-06-29T06:48:27.004717Z" }, + "@timestamp": "2020-06-29T06:47:57.555Z", + "agent": { + "name": "nodejs", + "version": "3.6.1" + }, + "client": { + "ip": "172.18.0.7" + }, + "container": { + "id": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" + }, + "ecs": { + "version": "1.5.0" + }, + "event": { + "ingested": "2020-06-29T06:47:59.085077Z" + }, "host": { "architecture": "x64", "hostname": "41712ded148f", "ip": "172.18.0.7", "name": "41712ded148f", - "os": { "platform": "linux" } + "os": { + "platform": "linux" + } }, "http": { "request": { "headers": { - "Connection": ["close"], - "Host": ["opbeans-node:3000"], - "User-Agent": ["workload/2.4.3"] + "Connection": [ + "close" + ], + "Host": [ + "opbeans-node:3000" + ], + "User-Agent": [ + "workload/2.4.3" + ] }, "method": "get", - "socket": { "encrypted": false, "remote_address": "::ffff:172.18.0.7" } + "socket": { + "encrypted": false, + "remote_address": "::ffff:172.18.0.7" + } }, "response": { "headers": { - "Connection": ["close"], - "Content-Length": ["231"], - "Content-Type": ["application/json; charset=utf-8"], - "Date": ["Mon, 29 Jun 2020 06:48:24 GMT"], - "Etag": ["W/\"e7-kkuzj37GZDzXDh0CWqh5Gan0VO4\""], - "X-Powered-By": ["Express"] + "Connection": [ + "close" + ], + "Content-Length": [ + "231" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Date": [ + "Mon, 29 Jun 2020 06:47:57 GMT" + ], + "Etag": [ + "W/\"e7-6JlJegaJ+ir0C8I8EmmOjms1dnc\"" + ], + "X-Powered-By": [ + "Express" + ] }, "status_code": 200 }, @@ -822,87 +1341,152 @@ "/usr/local/lib/node_modules/pm2/lib/ProcessContainer.js", "ecosystem-workload.config.js" ], - "pid": 137, + "pid": 87, "ppid": 1, "title": "node /app/server.js" }, - "processor": { "event": "transaction", "name": "transaction" }, + "processor": { + "event": "transaction", + "name": "transaction" + }, "service": { "environment": "production", - "framework": { "name": "express", "version": "4.17.1" }, - "language": { "name": "javascript" }, + "framework": { + "name": "express", + "version": "4.17.1" + }, + "language": { + "name": "javascript" + }, "name": "opbeans-node", - "node": { "name": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" }, - "runtime": { "name": "node", "version": "12.18.1" }, + "node": { + "name": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" + }, + "runtime": { + "name": "node", + "version": "12.18.1" + }, "version": "1.0.0" }, - "source": { "ip": "172.18.0.7" }, - "timestamp": { "us": 1593413304977014 }, - "trace": { "id": "b9b290bca14c99962fa9a1c509401630" }, + "source": { + "ip": "172.18.0.7" + }, + "timestamp": { + "us": 1593413277555176 + }, + "trace": { + "id": "8365e1763f19e4067b88521d4d9247a0" + }, "transaction": { - "custom": { "shoppingBasketCount": 42 }, - "duration": { "us": 4482 }, - "id": "b8d8284ff1fc25d6", + "custom": { + "shoppingBasketCount": 42 + }, + "duration": { + "us": 37709 + }, + "id": "be2722a418272f10", "name": "GET /api/products/:id", "result": "HTTP 2xx", "sampled": true, - "span_count": { "started": 1 }, + "span_count": { + "started": 1 + }, "type": "request" }, "url": { "domain": "opbeans-node", - "full": "http://opbeans-node:3000/api/products/3", - "original": "/api/products/3", - "path": "/api/products/3", + "full": "http://opbeans-node:3000/api/products/1", + "original": "/api/products/1", + "path": "/api/products/1", "port": 3000, "scheme": "http" }, - "user": { "email": "kimchy@elastic.co", "id": "42", "name": "kimchy" }, + "user": { + "email": "kimchy@elastic.co", + "id": "42", + "name": "kimchy" + }, "user_agent": { - "device": { "name": "Other" }, + "device": { + "name": "Other" + }, "name": "Other", "original": "workload/2.4.3" } - }, - "p95": 37856, - "averageResponseTime": 13516.5, - "transactionsPerMinute": 1, - "impact": 2.3368756900811305 + } }, { - "name": "GET /api/types", + "key": "GET /api/types", + "averageResponseTime": 26992.5, + "transactionsPerMinute": 0.5, + "impact": 2.3330057413794503, + "p95": 45248, "sample": { - "@timestamp": "2020-06-29T06:48:26.443Z", - "agent": { "name": "nodejs", "version": "3.6.1" }, - "client": { "ip": "172.18.0.7" }, - "container": { "id": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" }, - "ecs": { "version": "1.5.0" }, - "event": { "ingested": "2020-06-29T06:48:29.977518Z" }, + "@timestamp": "2020-06-29T06:47:52.935Z", + "agent": { + "name": "nodejs", + "version": "3.6.1" + }, + "client": { + "ip": "172.18.0.7" + }, + "container": { + "id": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" + }, + "ecs": { + "version": "1.5.0" + }, + "event": { + "ingested": "2020-06-29T06:47:55.471071Z" + }, "host": { "architecture": "x64", "hostname": "41712ded148f", "ip": "172.18.0.7", "name": "41712ded148f", - "os": { "platform": "linux" } + "os": { + "platform": "linux" + } }, "http": { "request": { "headers": { - "Connection": ["close"], - "Host": ["opbeans-node:3000"], - "User-Agent": ["workload/2.4.3"] + "Connection": [ + "close" + ], + "Host": [ + "opbeans-node:3000" + ], + "User-Agent": [ + "workload/2.4.3" + ] }, "method": "get", - "socket": { "encrypted": false, "remote_address": "::ffff:172.18.0.7" } + "socket": { + "encrypted": false, + "remote_address": "::ffff:172.18.0.7" + } }, "response": { "headers": { - "Connection": ["close"], - "Content-Length": ["112"], - "Content-Type": ["application/json; charset=utf-8"], - "Date": ["Mon, 29 Jun 2020 06:48:26 GMT"], - "Etag": ["W/\"70-1z6hT7P1WHgBgS/BeUEVeHhOCQU\""], - "X-Powered-By": ["Express"] + "Connection": [ + "close" + ], + "Content-Length": [ + "112" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Date": [ + "Mon, 29 Jun 2020 06:47:52 GMT" + ], + "Etag": [ + "W/\"70-1z6hT7P1WHgBgS/BeUEVeHhOCQU\"" + ], + "X-Powered-By": [ + "Express" + ] }, "status_code": 200 }, @@ -928,31 +1512,56 @@ "/usr/local/lib/node_modules/pm2/lib/ProcessContainer.js", "ecosystem-workload.config.js" ], - "pid": 137, + "pid": 63, "ppid": 1, "title": "node /app/server.js" }, - "processor": { "event": "transaction", "name": "transaction" }, + "processor": { + "event": "transaction", + "name": "transaction" + }, "service": { "environment": "production", - "framework": { "name": "express", "version": "4.17.1" }, - "language": { "name": "javascript" }, + "framework": { + "name": "express", + "version": "4.17.1" + }, + "language": { + "name": "javascript" + }, "name": "opbeans-node", - "node": { "name": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" }, - "runtime": { "name": "node", "version": "12.18.1" }, + "node": { + "name": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" + }, + "runtime": { + "name": "node", + "version": "12.18.1" + }, "version": "1.0.0" }, - "source": { "ip": "172.18.0.7" }, - "timestamp": { "us": 1593413306443014 }, - "trace": { "id": "be3f4eb50d253afc032c90eacaa85072" }, + "source": { + "ip": "172.18.0.7" + }, + "timestamp": { + "us": 1593413272935117 + }, + "trace": { + "id": "2946c536a33d163d0c984d00d1f3839a" + }, "transaction": { - "custom": { "shoppingBasketCount": 42 }, - "duration": { "us": 8892 }, - "id": "ccce129bb8c6b125", + "custom": { + "shoppingBasketCount": 42 + }, + "duration": { + "us": 45093 + }, + "id": "103482fda88b9400", "name": "GET /api/types", "result": "HTTP 2xx", "sampled": true, - "span_count": { "started": 2 }, + "span_count": { + "started": 2 + }, "type": "request" }, "url": { @@ -963,55 +1572,101 @@ "port": 3000, "scheme": "http" }, - "user": { "email": "kimchy@elastic.co", "id": "42", "name": "kimchy" }, + "user": { + "email": "kimchy@elastic.co", + "id": "42", + "name": "kimchy" + }, "user_agent": { - "device": { "name": "Other" }, + "device": { + "name": "Other" + }, "name": "Other", "original": "workload/2.4.3" } - }, - "p95": 45248, - "averageResponseTime": 26992.5, - "transactionsPerMinute": 0.5, - "impact": 2.3330057413794503 + } }, { - "name": "GET static file", + "key": "GET static file", + "averageResponseTime": 3492.9285714285716, + "transactionsPerMinute": 3.5, + "impact": 2.0901067389184496, + "p95": 11900, "sample": { - "@timestamp": "2020-06-29T06:48:40.953Z", - "agent": { "name": "nodejs", "version": "3.6.1" }, - "client": { "ip": "172.18.0.7" }, - "container": { "id": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" }, - "ecs": { "version": "1.5.0" }, - "event": { "ingested": "2020-06-29T06:48:43.992454Z" }, + "@timestamp": "2020-06-29T06:47:53.427Z", + "agent": { + "name": "nodejs", + "version": "3.6.1" + }, + "client": { + "ip": "172.18.0.7" + }, + "container": { + "id": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" + }, + "ecs": { + "version": "1.5.0" + }, + "event": { + "ingested": "2020-06-29T06:47:55.472070Z" + }, "host": { "architecture": "x64", "hostname": "41712ded148f", "ip": "172.18.0.7", "name": "41712ded148f", - "os": { "platform": "linux" } + "os": { + "platform": "linux" + } }, "http": { "request": { "headers": { - "Connection": ["close"], - "Host": ["opbeans-node:3000"], - "User-Agent": ["workload/2.4.3"] + "Connection": [ + "close" + ], + "Host": [ + "opbeans-node:3000" + ], + "User-Agent": [ + "workload/2.4.3" + ] }, "method": "get", - "socket": { "encrypted": false, "remote_address": "::ffff:172.18.0.7" } + "socket": { + "encrypted": false, + "remote_address": "::ffff:172.18.0.7" + } }, "response": { "headers": { - "Accept-Ranges": ["bytes"], - "Cache-Control": ["public, max-age=0"], - "Connection": ["close"], - "Content-Length": ["15086"], - "Content-Type": ["image/x-icon"], - "Date": ["Mon, 29 Jun 2020 06:48:40 GMT"], - "Etag": ["W/\"3aee-1725aff14f0\""], - "Last-Modified": ["Thu, 28 May 2020 11:16:06 GMT"], - "X-Powered-By": ["Express"] + "Accept-Ranges": [ + "bytes" + ], + "Cache-Control": [ + "public, max-age=0" + ], + "Connection": [ + "close" + ], + "Content-Length": [ + "15086" + ], + "Content-Type": [ + "image/x-icon" + ], + "Date": [ + "Mon, 29 Jun 2020 06:47:53 GMT" + ], + "Etag": [ + "W/\"3aee-1725aff14f0\"" + ], + "Last-Modified": [ + "Thu, 28 May 2020 11:16:06 GMT" + ], + "X-Powered-By": [ + "Express" + ] }, "status_code": 200 }, @@ -1031,30 +1686,53 @@ "/usr/local/lib/node_modules/pm2/lib/ProcessContainer.js", "ecosystem-workload.config.js" ], - "pid": 137, + "pid": 63, "ppid": 1, "title": "node /app/server.js" }, - "processor": { "event": "transaction", "name": "transaction" }, + "processor": { + "event": "transaction", + "name": "transaction" + }, "service": { "environment": "production", - "framework": { "name": "express", "version": "4.17.1" }, - "language": { "name": "javascript" }, + "framework": { + "name": "express", + "version": "4.17.1" + }, + "language": { + "name": "javascript" + }, "name": "opbeans-node", - "node": { "name": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" }, - "runtime": { "name": "node", "version": "12.18.1" }, + "node": { + "name": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" + }, + "runtime": { + "name": "node", + "version": "12.18.1" + }, "version": "1.0.0" }, - "source": { "ip": "172.18.0.7" }, - "timestamp": { "us": 1593413320953016 }, - "trace": { "id": "292393440bbe04385f3c2e3715ac35fe" }, + "source": { + "ip": "172.18.0.7" + }, + "timestamp": { + "us": 1593413273427016 + }, + "trace": { + "id": "ec8a804fedf28fcf81d5682d69a16970" + }, "transaction": { - "duration": { "us": 1671 }, - "id": "d1d964ca1865dce3", + "duration": { + "us": 4934 + }, + "id": "ab90a62901b770e6", "name": "GET static file", "result": "HTTP 2xx", "sampled": true, - "span_count": { "started": 0 }, + "span_count": { + "started": 0 + }, "type": "request" }, "url": { @@ -1066,56 +1744,86 @@ "scheme": "http" }, "user_agent": { - "device": { "name": "Other" }, + "device": { + "name": "Other" + }, "name": "Other", "original": "workload/2.4.3" } - }, - "p95": 11900, - "averageResponseTime": 3492.9285714285716, - "transactionsPerMinute": 3.5, - "impact": 2.0901067389184496 + } }, { - "name": "GET /api/products/top", + "key": "GET /api/products/top", + "averageResponseTime": 22958.5, + "transactionsPerMinute": 0.5, + "impact": 1.9475397398343375, + "p95": 33216, "sample": { - "@timestamp": "2020-06-29T06:48:18.211Z", - "agent": { "name": "nodejs", "version": "3.6.1" }, - "client": { "ip": "172.18.0.8" }, - "container": { "id": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" }, - "ecs": { "version": "1.5.0" }, - "event": { "ingested": "2020-06-29T06:48:21.007197Z" }, + "@timestamp": "2020-06-29T06:48:01.200Z", + "agent": { + "name": "nodejs", + "version": "3.6.1" + }, + "client": { + "ip": "172.18.0.7" + }, + "container": { + "id": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" + }, + "ecs": { + "version": "1.5.0" + }, + "event": { + "ingested": "2020-06-29T06:48:02.734903Z" + }, "host": { "architecture": "x64", "hostname": "41712ded148f", "ip": "172.18.0.7", "name": "41712ded148f", - "os": { "platform": "linux" } + "os": { + "platform": "linux" + } }, "http": { "request": { "headers": { - "Accept": ["*/*"], - "Accept-Encoding": ["gzip, deflate"], - "Connection": ["keep-alive"], - "Host": ["opbeans-node:3000"], - "Referer": ["http://opbeans-node:3000/dashboard"], - "Traceparent": ["00-4879105b2de793ca54ce7299aff0f5ce-0d67fab9c9dec84d-01"], + "Connection": [ + "close" + ], + "Host": [ + "opbeans-node:3000" + ], "User-Agent": [ - "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/79.0.3945.0 Safari/537.36" + "workload/2.4.3" ] }, "method": "get", - "socket": { "encrypted": false, "remote_address": "::ffff:172.18.0.8" } + "socket": { + "encrypted": false, + "remote_address": "::ffff:172.18.0.7" + } }, "response": { "headers": { - "Connection": ["keep-alive"], - "Content-Length": ["2"], - "Content-Type": ["application/json; charset=utf-8"], - "Date": ["Mon, 29 Jun 2020 06:48:18 GMT"], - "Etag": ["W/\"2-l9Fw4VUO7kr8CvBlt4zaMCqXZ0w\""], - "X-Powered-By": ["Express"] + "Connection": [ + "close" + ], + "Content-Length": [ + "2" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Date": [ + "Mon, 29 Jun 2020 06:48:01 GMT" + ], + "Etag": [ + "W/\"2-l9Fw4VUO7kr8CvBlt4zaMCqXZ0w\"" + ], + "X-Powered-By": [ + "Express" + ] }, "status_code": 200 }, @@ -1135,38 +1843,62 @@ "version": "8.0.0", "version_major": 8 }, - "parent": { "id": "0d67fab9c9dec84d" }, "process": { "args": [ "/usr/local/bin/node", "/usr/local/lib/node_modules/pm2/lib/ProcessContainer.js", "ecosystem-workload.config.js" ], - "pid": 137, + "pid": 115, "ppid": 1, "title": "node /app/server.js" }, - "processor": { "event": "transaction", "name": "transaction" }, + "processor": { + "event": "transaction", + "name": "transaction" + }, "service": { "environment": "production", - "framework": { "name": "express", "version": "4.17.1" }, - "language": { "name": "javascript" }, + "framework": { + "name": "express", + "version": "4.17.1" + }, + "language": { + "name": "javascript" + }, "name": "opbeans-node", - "node": { "name": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" }, - "runtime": { "name": "node", "version": "12.18.1" }, + "node": { + "name": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" + }, + "runtime": { + "name": "node", + "version": "12.18.1" + }, "version": "1.0.0" }, - "source": { "ip": "172.18.0.8" }, - "timestamp": { "us": 1593413298211013 }, - "trace": { "id": "4879105b2de793ca54ce7299aff0f5ce" }, + "source": { + "ip": "172.18.0.7" + }, + "timestamp": { + "us": 1593413281200133 + }, + "trace": { + "id": "195f32efeb6f91e2f71b6bc8bb74ae3a" + }, "transaction": { - "custom": { "shoppingBasketCount": 42 }, - "duration": { "us": 12820 }, - "id": "b15b12c837ab8b89", + "custom": { + "shoppingBasketCount": 42 + }, + "duration": { + "us": 33097 + }, + "id": "22e72956dfc8967a", "name": "GET /api/products/top", "result": "HTTP 2xx", "sampled": true, - "span_count": { "started": 1 }, + "span_count": { + "started": 1 + }, "type": "request" }, "url": { @@ -1177,56 +1909,103 @@ "port": 3000, "scheme": "http" }, - "user": { "email": "kimchy@elastic.co", "id": "42", "name": "kimchy" }, + "user": { + "email": "kimchy@elastic.co", + "id": "42", + "name": "kimchy" + }, "user_agent": { - "device": { "name": "Other" }, - "name": "HeadlessChrome", - "original": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/79.0.3945.0 Safari/537.36", - "os": { "name": "Linux" }, - "version": "79.0.3945" + "device": { + "name": "Other" + }, + "name": "Other", + "original": "workload/2.4.3" } - }, - "p95": 33216, - "averageResponseTime": 22958.5, - "transactionsPerMinute": 0.5, - "impact": 1.9475397398343375 + } }, { - "name": "GET /api/stats", + "key": "GET /api/stats", + "averageResponseTime": 7105.333333333333, + "transactionsPerMinute": 1.5, + "impact": 1.7905918202662048, + "p95": 15136, "sample": { - "@timestamp": "2020-06-29T06:48:39.451Z", - "agent": { "name": "nodejs", "version": "3.6.1" }, - "client": { "ip": "172.18.0.7" }, - "container": { "id": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" }, - "ecs": { "version": "1.5.0" }, - "event": { "ingested": "2020-06-29T06:48:43.984824Z" }, + "@timestamp": "2020-06-29T06:48:21.150Z", + "agent": { + "name": "nodejs", + "version": "3.6.1" + }, + "client": { + "ip": "172.18.0.8" + }, + "container": { + "id": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" + }, + "ecs": { + "version": "1.5.0" + }, + "event": { + "ingested": "2020-06-29T06:48:26.993832Z" + }, "host": { "architecture": "x64", "hostname": "41712ded148f", "ip": "172.18.0.7", "name": "41712ded148f", - "os": { "platform": "linux" } + "os": { + "platform": "linux" + } }, "http": { "request": { "headers": { - "Connection": ["close"], - "Host": ["opbeans-node:3000"], - "User-Agent": ["workload/2.4.3"] + "Accept": [ + "*/*" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Connection": [ + "keep-alive" + ], + "Host": [ + "opbeans-node:3000" + ], + "If-None-Match": [ + "W/\"5c-6I+bqIiLxvkWuwBUnTxhBoK4lBk\"" + ], + "Referer": [ + "http://opbeans-node:3000/dashboard" + ], + "Traceparent": [ + "00-ee0ce8b38b8d5945829fc1c9432538bf-39d52cd5f528d363-01" + ], + "User-Agent": [ + "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/79.0.3945.0 Safari/537.36" + ] }, "method": "get", - "socket": { "encrypted": false, "remote_address": "::ffff:172.18.0.7" } + "socket": { + "encrypted": false, + "remote_address": "::ffff:172.18.0.8" + } }, "response": { "headers": { - "Connection": ["close"], - "Content-Length": ["92"], - "Content-Type": ["application/json; charset=utf-8"], - "Date": ["Mon, 29 Jun 2020 06:48:39 GMT"], - "Etag": ["W/\"5c-6I+bqIiLxvkWuwBUnTxhBoK4lBk\""], - "X-Powered-By": ["Express"] + "Connection": [ + "keep-alive" + ], + "Date": [ + "Mon, 29 Jun 2020 06:48:21 GMT" + ], + "Etag": [ + "W/\"5c-6I+bqIiLxvkWuwBUnTxhBoK4lBk\"" + ], + "X-Powered-By": [ + "Express" + ] }, - "status_code": 200 + "status_code": 304 }, "version": "1.1" }, @@ -1244,6 +2023,9 @@ "version": "8.0.0", "version_major": 8 }, + "parent": { + "id": "39d52cd5f528d363" + }, "process": { "args": [ "/usr/local/bin/node", @@ -1254,27 +2036,52 @@ "ppid": 1, "title": "node /app/server.js" }, - "processor": { "event": "transaction", "name": "transaction" }, + "processor": { + "event": "transaction", + "name": "transaction" + }, "service": { "environment": "production", - "framework": { "name": "express", "version": "4.17.1" }, - "language": { "name": "javascript" }, + "framework": { + "name": "express", + "version": "4.17.1" + }, + "language": { + "name": "javascript" + }, "name": "opbeans-node", - "node": { "name": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" }, - "runtime": { "name": "node", "version": "12.18.1" }, + "node": { + "name": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" + }, + "runtime": { + "name": "node", + "version": "12.18.1" + }, "version": "1.0.0" }, - "source": { "ip": "172.18.0.7" }, - "timestamp": { "us": 1593413319451016 }, - "trace": { "id": "a05787cb03a0af0863fab5e05de942f1" }, + "source": { + "ip": "172.18.0.8" + }, + "timestamp": { + "us": 1593413301150014 + }, + "trace": { + "id": "ee0ce8b38b8d5945829fc1c9432538bf" + }, "transaction": { - "custom": { "shoppingBasketCount": 42 }, - "duration": { "us": 5050 }, - "id": "a7e004eba8f021ce", + "custom": { + "shoppingBasketCount": 42 + }, + "duration": { + "us": 7273 + }, + "id": "05d5b62182c59a54", "name": "GET /api/stats", - "result": "HTTP 2xx", + "result": "HTTP 3xx", "sampled": true, - "span_count": { "started": 4 }, + "span_count": { + "started": 4 + }, "type": "request" }, "url": { @@ -1285,52 +2092,96 @@ "port": 3000, "scheme": "http" }, - "user": { "email": "kimchy@elastic.co", "id": "42", "name": "kimchy" }, + "user": { + "email": "kimchy@elastic.co", + "id": "42", + "name": "kimchy" + }, "user_agent": { - "device": { "name": "Other" }, - "name": "Other", - "original": "workload/2.4.3" + "device": { + "name": "Other" + }, + "name": "HeadlessChrome", + "original": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/79.0.3945.0 Safari/537.36", + "os": { + "name": "Linux" + }, + "version": "79.0.3945" } - }, - "p95": 15136, - "averageResponseTime": 7105.333333333333, - "transactionsPerMinute": 1.5, - "impact": 1.7905918202662048 + } }, { - "name": "GET /log-error", + "key": "GET /log-error", + "averageResponseTime": 35846, + "transactionsPerMinute": 0.25, + "impact": 1.466376117925459, + "p95": 35840, "sample": { "@timestamp": "2020-06-29T06:48:07.467Z", - "agent": { "name": "nodejs", "version": "3.6.1" }, - "client": { "ip": "172.18.0.7" }, - "container": { "id": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" }, - "ecs": { "version": "1.5.0" }, - "event": { "ingested": "2020-06-29T06:48:18.533253Z" }, + "agent": { + "name": "nodejs", + "version": "3.6.1" + }, + "client": { + "ip": "172.18.0.7" + }, + "container": { + "id": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" + }, + "ecs": { + "version": "1.5.0" + }, + "event": { + "ingested": "2020-06-29T06:48:18.533253Z" + }, "host": { "architecture": "x64", "hostname": "41712ded148f", "ip": "172.18.0.7", "name": "41712ded148f", - "os": { "platform": "linux" } + "os": { + "platform": "linux" + } }, "http": { "request": { "headers": { - "Connection": ["close"], - "Host": ["opbeans-node:3000"], - "User-Agent": ["workload/2.4.3"] + "Connection": [ + "close" + ], + "Host": [ + "opbeans-node:3000" + ], + "User-Agent": [ + "workload/2.4.3" + ] }, "method": "get", - "socket": { "encrypted": false, "remote_address": "::ffff:172.18.0.7" } + "socket": { + "encrypted": false, + "remote_address": "::ffff:172.18.0.7" + } }, "response": { "headers": { - "Connection": ["close"], - "Content-Length": ["24"], - "Content-Type": ["text/html; charset=utf-8"], - "Date": ["Mon, 29 Jun 2020 06:48:07 GMT"], - "Etag": ["W/\"18-MS3VbhH7auHMzO0fUuNF6v14N/M\""], - "X-Powered-By": ["Express"] + "Connection": [ + "close" + ], + "Content-Length": [ + "24" + ], + "Content-Type": [ + "text/html; charset=utf-8" + ], + "Date": [ + "Mon, 29 Jun 2020 06:48:07 GMT" + ], + "Etag": [ + "W/\"18-MS3VbhH7auHMzO0fUuNF6v14N/M\"" + ], + "X-Powered-By": [ + "Express" + ] }, "status_code": 500 }, @@ -1360,27 +2211,52 @@ "ppid": 1, "title": "node /app/server.js" }, - "processor": { "event": "transaction", "name": "transaction" }, + "processor": { + "event": "transaction", + "name": "transaction" + }, "service": { "environment": "production", - "framework": { "name": "express", "version": "4.17.1" }, - "language": { "name": "javascript" }, + "framework": { + "name": "express", + "version": "4.17.1" + }, + "language": { + "name": "javascript" + }, "name": "opbeans-node", - "node": { "name": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" }, - "runtime": { "name": "node", "version": "12.18.1" }, + "node": { + "name": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" + }, + "runtime": { + "name": "node", + "version": "12.18.1" + }, "version": "1.0.0" }, - "source": { "ip": "172.18.0.7" }, - "timestamp": { "us": 1593413287467017 }, - "trace": { "id": "d518b2c4d72cd2aaf1e39bad7ebcbdbb" }, + "source": { + "ip": "172.18.0.7" + }, + "timestamp": { + "us": 1593413287467017 + }, + "trace": { + "id": "d518b2c4d72cd2aaf1e39bad7ebcbdbb" + }, "transaction": { - "custom": { "shoppingBasketCount": 42 }, - "duration": { "us": 35846 }, + "custom": { + "shoppingBasketCount": 42 + }, + "duration": { + "us": 35846 + }, "id": "c7a30c1b076907ec", "name": "GET /log-error", "result": "HTTP 5xx", "sampled": true, - "span_count": { "started": 0 }, + "span_count": { + "started": 0 + }, "type": "request" }, "url": { @@ -1391,56 +2267,104 @@ "port": 3000, "scheme": "http" }, - "user": { "email": "kimchy@elastic.co", "id": "42", "name": "kimchy" }, + "user": { + "email": "kimchy@elastic.co", + "id": "42", + "name": "kimchy" + }, "user_agent": { - "device": { "name": "Other" }, + "device": { + "name": "Other" + }, "name": "Other", "original": "workload/2.4.3" } - }, - "p95": 35840, - "averageResponseTime": 35846, - "transactionsPerMinute": 0.25, - "impact": 1.466376117925459 + } }, { - "name": "POST /api", + "key": "POST /api", + "averageResponseTime": 20011, + "transactionsPerMinute": 0.25, + "impact": 0.7098250353192541, + "p95": 19968, "sample": { "@timestamp": "2020-06-29T06:48:25.478Z", - "agent": { "name": "nodejs", "version": "3.6.1" }, - "client": { "ip": "172.18.0.7" }, - "container": { "id": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" }, - "ecs": { "version": "1.5.0" }, - "event": { "ingested": "2020-06-29T06:48:27.005671Z" }, + "agent": { + "name": "nodejs", + "version": "3.6.1" + }, + "client": { + "ip": "172.18.0.7" + }, + "container": { + "id": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" + }, + "ecs": { + "version": "1.5.0" + }, + "event": { + "ingested": "2020-06-29T06:48:27.005671Z" + }, "host": { "architecture": "x64", "hostname": "41712ded148f", "ip": "172.18.0.7", "name": "41712ded148f", - "os": { "platform": "linux" } + "os": { + "platform": "linux" + } }, "http": { "request": { - "body": { "original": "[REDACTED]" }, + "body": { + "original": "[REDACTED]" + }, "headers": { - "Accept": ["application/json"], - "Connection": ["close"], - "Content-Length": ["129"], - "Content-Type": ["application/json"], - "Host": ["opbeans-node:3000"], - "User-Agent": ["workload/2.4.3"] + "Accept": [ + "application/json" + ], + "Connection": [ + "close" + ], + "Content-Length": [ + "129" + ], + "Content-Type": [ + "application/json" + ], + "Host": [ + "opbeans-node:3000" + ], + "User-Agent": [ + "workload/2.4.3" + ] }, "method": "post", - "socket": { "encrypted": false, "remote_address": "::ffff:172.18.0.7" } + "socket": { + "encrypted": false, + "remote_address": "::ffff:172.18.0.7" + } }, "response": { "headers": { - "Allow": ["GET"], - "Connection": ["close"], - "Content-Type": ["application/json;charset=UTF-8"], - "Date": ["Mon, 29 Jun 2020 06:48:25 GMT"], - "Transfer-Encoding": ["chunked"], - "X-Powered-By": ["Express"] + "Allow": [ + "GET" + ], + "Connection": [ + "close" + ], + "Content-Type": [ + "application/json;charset=UTF-8" + ], + "Date": [ + "Mon, 29 Jun 2020 06:48:25 GMT" + ], + "Transfer-Encoding": [ + "chunked" + ], + "X-Powered-By": [ + "Express" + ] }, "status_code": 405 }, @@ -1470,27 +2394,52 @@ "ppid": 1, "title": "node /app/server.js" }, - "processor": { "event": "transaction", "name": "transaction" }, + "processor": { + "event": "transaction", + "name": "transaction" + }, "service": { "environment": "production", - "framework": { "name": "express", "version": "4.17.1" }, - "language": { "name": "javascript" }, + "framework": { + "name": "express", + "version": "4.17.1" + }, + "language": { + "name": "javascript" + }, "name": "opbeans-node", - "node": { "name": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" }, - "runtime": { "name": "node", "version": "12.18.1" }, + "node": { + "name": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" + }, + "runtime": { + "name": "node", + "version": "12.18.1" + }, "version": "1.0.0" }, - "source": { "ip": "172.18.0.7" }, - "timestamp": { "us": 1593413305478010 }, - "trace": { "id": "4bd9027dd1e355ec742970e2d6333124" }, + "source": { + "ip": "172.18.0.7" + }, + "timestamp": { + "us": 1593413305478010 + }, + "trace": { + "id": "4bd9027dd1e355ec742970e2d6333124" + }, "transaction": { - "custom": { "shoppingBasketCount": 42 }, - "duration": { "us": 20011 }, + "custom": { + "shoppingBasketCount": 42 + }, + "duration": { + "us": 20011 + }, "id": "94104435cf151478", "name": "POST /api", "result": "HTTP 4xx", "sampled": true, - "span_count": { "started": 1 }, + "span_count": { + "started": 1 + }, "type": "request" }, "url": { @@ -1501,52 +2450,92 @@ "port": 3000, "scheme": "http" }, - "user": { "email": "kimchy@elastic.co", "id": "42", "name": "kimchy" }, + "user": { + "email": "kimchy@elastic.co", + "id": "42", + "name": "kimchy" + }, "user_agent": { - "device": { "name": "Other" }, + "device": { + "name": "Other" + }, "name": "Other", "original": "workload/2.4.3" } - }, - "p95": 19968, - "averageResponseTime": 20011, - "transactionsPerMinute": 0.25, - "impact": 0.7098250353192541 + } }, { - "name": "GET /api/types/:id", + "key": "GET /api/types/:id", + "averageResponseTime": 8181, + "transactionsPerMinute": 0.5, + "impact": 0.5354862351657939, + "p95": 10080, "sample": { - "@timestamp": "2020-06-29T06:48:12.972Z", - "agent": { "name": "nodejs", "version": "3.6.1" }, - "client": { "ip": "172.18.0.7" }, - "container": { "id": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" }, - "ecs": { "version": "1.5.0" }, - "event": { "ingested": "2020-06-29T06:48:18.543436Z" }, + "@timestamp": "2020-06-29T06:47:53.928Z", + "agent": { + "name": "nodejs", + "version": "3.6.1" + }, + "client": { + "ip": "172.18.0.7" + }, + "container": { + "id": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" + }, + "ecs": { + "version": "1.5.0" + }, + "event": { + "ingested": "2020-06-29T06:47:55.472718Z" + }, "host": { "architecture": "x64", "hostname": "41712ded148f", "ip": "172.18.0.7", "name": "41712ded148f", - "os": { "platform": "linux" } + "os": { + "platform": "linux" + } }, "http": { "request": { "headers": { - "Connection": ["close"], - "Host": ["opbeans-node:3000"], - "User-Agent": ["workload/2.4.3"] + "Connection": [ + "close" + ], + "Host": [ + "opbeans-node:3000" + ], + "User-Agent": [ + "workload/2.4.3" + ] }, "method": "get", - "socket": { "encrypted": false, "remote_address": "::ffff:172.18.0.7" } + "socket": { + "encrypted": false, + "remote_address": "::ffff:172.18.0.7" + } }, "response": { "headers": { - "Connection": ["close"], - "Content-Length": ["205"], - "Content-Type": ["application/json; charset=utf-8"], - "Date": ["Mon, 29 Jun 2020 06:48:12 GMT"], - "Etag": ["W/\"cd-pFMi1QOVY6YqWe+nwcbZVviCths\""], - "X-Powered-By": ["Express"] + "Connection": [ + "close" + ], + "Content-Length": [ + "205" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Date": [ + "Mon, 29 Jun 2020 06:47:53 GMT" + ], + "Etag": [ + "W/\"cd-pFMi1QOVY6YqWe+nwcbZVviCths\"" + ], + "X-Powered-By": [ + "Express" + ] }, "status_code": 200 }, @@ -1572,31 +2561,56 @@ "/usr/local/lib/node_modules/pm2/lib/ProcessContainer.js", "ecosystem-workload.config.js" ], - "pid": 137, + "pid": 63, "ppid": 1, "title": "node /app/server.js" }, - "processor": { "event": "transaction", "name": "transaction" }, + "processor": { + "event": "transaction", + "name": "transaction" + }, "service": { "environment": "production", - "framework": { "name": "express", "version": "4.17.1" }, - "language": { "name": "javascript" }, + "framework": { + "name": "express", + "version": "4.17.1" + }, + "language": { + "name": "javascript" + }, "name": "opbeans-node", - "node": { "name": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" }, - "runtime": { "name": "node", "version": "12.18.1" }, + "node": { + "name": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" + }, + "runtime": { + "name": "node", + "version": "12.18.1" + }, "version": "1.0.0" }, - "source": { "ip": "172.18.0.7" }, - "timestamp": { "us": 1593413292972011 }, - "trace": { "id": "aea65cef5f902dda5d8e38f9fb38864d" }, + "source": { + "ip": "172.18.0.7" + }, + "timestamp": { + "us": 1593413273928016 + }, + "trace": { + "id": "0becaafb422bfeb69e047bf7153aa469" + }, "transaction": { - "custom": { "shoppingBasketCount": 42 }, - "duration": { "us": 6300 }, - "id": "a5bdbe43ac05fae2", + "custom": { + "shoppingBasketCount": 42 + }, + "duration": { + "us": 10062 + }, + "id": "0cee4574091bda3b", "name": "GET /api/types/:id", "result": "HTTP 2xx", "sampled": true, - "span_count": { "started": 2 }, + "span_count": { + "started": 2 + }, "type": "request" }, "url": { @@ -1607,50 +2621,86 @@ "port": 3000, "scheme": "http" }, - "user": { "email": "kimchy@elastic.co", "id": "42", "name": "kimchy" }, + "user": { + "email": "kimchy@elastic.co", + "id": "42", + "name": "kimchy" + }, "user_agent": { - "device": { "name": "Other" }, + "device": { + "name": "Other" + }, "name": "Other", "original": "workload/2.4.3" } - }, - "p95": 10080, - "averageResponseTime": 8181, - "transactionsPerMinute": 0.5, - "impact": 0.5354862351657939 + } }, { - "name": "GET /api/orders/:id", + "key": "GET /api/orders/:id", + "averageResponseTime": 4749.666666666667, + "transactionsPerMinute": 0.75, + "impact": 0.43453312891085794, + "p95": 7184, "sample": { "@timestamp": "2020-06-29T06:48:35.951Z", - "agent": { "name": "nodejs", "version": "3.6.1" }, - "client": { "ip": "172.18.0.7" }, - "container": { "id": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" }, - "ecs": { "version": "1.5.0" }, - "event": { "ingested": "2020-06-29T06:48:39.484133Z" }, + "agent": { + "name": "nodejs", + "version": "3.6.1" + }, + "client": { + "ip": "172.18.0.7" + }, + "container": { + "id": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" + }, + "ecs": { + "version": "1.5.0" + }, + "event": { + "ingested": "2020-06-29T06:48:39.484133Z" + }, "host": { "architecture": "x64", "hostname": "41712ded148f", "ip": "172.18.0.7", "name": "41712ded148f", - "os": { "platform": "linux" } + "os": { + "platform": "linux" + } }, "http": { "request": { "headers": { - "Connection": ["close"], - "Host": ["opbeans-node:3000"], - "User-Agent": ["workload/2.4.3"] + "Connection": [ + "close" + ], + "Host": [ + "opbeans-node:3000" + ], + "User-Agent": [ + "workload/2.4.3" + ] }, "method": "get", - "socket": { "encrypted": false, "remote_address": "::ffff:172.18.0.7" } + "socket": { + "encrypted": false, + "remote_address": "::ffff:172.18.0.7" + } }, "response": { "headers": { - "Connection": ["close"], - "Content-Length": ["0"], - "Date": ["Mon, 29 Jun 2020 06:48:35 GMT"], - "X-Powered-By": ["Express"] + "Connection": [ + "close" + ], + "Content-Length": [ + "0" + ], + "Date": [ + "Mon, 29 Jun 2020 06:48:35 GMT" + ], + "X-Powered-By": [ + "Express" + ] }, "status_code": 404 }, @@ -1680,27 +2730,52 @@ "ppid": 1, "title": "node /app/server.js" }, - "processor": { "event": "transaction", "name": "transaction" }, + "processor": { + "event": "transaction", + "name": "transaction" + }, "service": { "environment": "production", - "framework": { "name": "express", "version": "4.17.1" }, - "language": { "name": "javascript" }, + "framework": { + "name": "express", + "version": "4.17.1" + }, + "language": { + "name": "javascript" + }, "name": "opbeans-node", - "node": { "name": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" }, - "runtime": { "name": "node", "version": "12.18.1" }, + "node": { + "name": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" + }, + "runtime": { + "name": "node", + "version": "12.18.1" + }, "version": "1.0.0" }, - "source": { "ip": "172.18.0.7" }, - "timestamp": { "us": 1593413315951017 }, - "trace": { "id": "95979caa80e6622cbbb2d308800c3016" }, + "source": { + "ip": "172.18.0.7" + }, + "timestamp": { + "us": 1593413315951017 + }, + "trace": { + "id": "95979caa80e6622cbbb2d308800c3016" + }, "transaction": { - "custom": { "shoppingBasketCount": 42 }, - "duration": { "us": 3210 }, + "custom": { + "shoppingBasketCount": 42 + }, + "duration": { + "us": 3210 + }, "id": "30344988dace0b43", "name": "GET /api/orders/:id", "result": "HTTP 4xx", "sampled": true, - "span_count": { "started": 1 }, + "span_count": { + "started": 1 + }, "type": "request" }, "url": { @@ -1711,52 +2786,92 @@ "port": 3000, "scheme": "http" }, - "user": { "email": "kimchy@elastic.co", "id": "42", "name": "kimchy" }, + "user": { + "email": "kimchy@elastic.co", + "id": "42", + "name": "kimchy" + }, "user_agent": { - "device": { "name": "Other" }, + "device": { + "name": "Other" + }, "name": "Other", "original": "workload/2.4.3" } - }, - "p95": 7184, - "averageResponseTime": 4749.666666666667, - "transactionsPerMinute": 0.75, - "impact": 0.43453312891085794 + } }, { - "name": "GET /api/products/:id/customers", + "key": "GET /api/products/:id/customers", + "averageResponseTime": 4757, + "transactionsPerMinute": 0.5, + "impact": 0.20830834986820673, + "p95": 5616, "sample": { - "@timestamp": "2020-06-29T06:48:41.956Z", - "agent": { "name": "nodejs", "version": "3.6.1" }, - "client": { "ip": "172.18.0.7" }, - "container": { "id": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" }, - "ecs": { "version": "1.5.0" }, - "event": { "ingested": "2020-06-29T06:48:43.994692Z" }, + "@timestamp": "2020-06-29T06:48:22.977Z", + "agent": { + "name": "nodejs", + "version": "3.6.1" + }, + "client": { + "ip": "172.18.0.7" + }, + "container": { + "id": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" + }, + "ecs": { + "version": "1.5.0" + }, + "event": { + "ingested": "2020-06-29T06:48:27.000765Z" + }, "host": { "architecture": "x64", "hostname": "41712ded148f", "ip": "172.18.0.7", "name": "41712ded148f", - "os": { "platform": "linux" } + "os": { + "platform": "linux" + } }, "http": { "request": { "headers": { - "Connection": ["close"], - "Host": ["opbeans-node:3000"], - "User-Agent": ["workload/2.4.3"] + "Connection": [ + "close" + ], + "Host": [ + "opbeans-node:3000" + ], + "User-Agent": [ + "workload/2.4.3" + ] }, "method": "get", - "socket": { "encrypted": false, "remote_address": "::ffff:172.18.0.7" } + "socket": { + "encrypted": false, + "remote_address": "::ffff:172.18.0.7" + } }, "response": { "headers": { - "Connection": ["close"], - "Content-Length": ["2"], - "Content-Type": ["application/json; charset=utf-8"], - "Date": ["Mon, 29 Jun 2020 06:48:41 GMT"], - "Etag": ["W/\"2-l9Fw4VUO7kr8CvBlt4zaMCqXZ0w\""], - "X-Powered-By": ["Express"] + "Connection": [ + "close" + ], + "Content-Length": [ + "2" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Date": [ + "Mon, 29 Jun 2020 06:48:22 GMT" + ], + "Etag": [ + "W/\"2-l9Fw4VUO7kr8CvBlt4zaMCqXZ0w\"" + ], + "X-Powered-By": [ + "Express" + ] }, "status_code": 200 }, @@ -1786,84 +2901,151 @@ "ppid": 1, "title": "node /app/server.js" }, - "processor": { "event": "transaction", "name": "transaction" }, + "processor": { + "event": "transaction", + "name": "transaction" + }, "service": { "environment": "production", - "framework": { "name": "express", "version": "4.17.1" }, - "language": { "name": "javascript" }, + "framework": { + "name": "express", + "version": "4.17.1" + }, + "language": { + "name": "javascript" + }, "name": "opbeans-node", - "node": { "name": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" }, - "runtime": { "name": "node", "version": "12.18.1" }, + "node": { + "name": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" + }, + "runtime": { + "name": "node", + "version": "12.18.1" + }, "version": "1.0.0" }, - "source": { "ip": "172.18.0.7" }, - "timestamp": { "us": 1593413321956016 }, - "trace": { "id": "f735ac5fca8f83eebc748f4a2e009e61" }, + "source": { + "ip": "172.18.0.7" + }, + "timestamp": { + "us": 1593413302977008 + }, + "trace": { + "id": "da8f22fe652ccb6680b3029ab6efd284" + }, "transaction": { - "custom": { "shoppingBasketCount": 42 }, - "duration": { "us": 3896 }, - "id": "b24ce95c855f83a4", + "custom": { + "shoppingBasketCount": 42 + }, + "duration": { + "us": 5618 + }, + "id": "bc51c1523afaf57a", "name": "GET /api/products/:id/customers", "result": "HTTP 2xx", "sampled": true, - "span_count": { "started": 1 }, + "span_count": { + "started": 1 + }, "type": "request" }, "url": { "domain": "opbeans-node", - "full": "http://opbeans-node:3000/api/products/5/customers", - "original": "/api/products/5/customers", - "path": "/api/products/5/customers", + "full": "http://opbeans-node:3000/api/products/3/customers", + "original": "/api/products/3/customers", + "path": "/api/products/3/customers", "port": 3000, "scheme": "http" }, - "user": { "email": "kimchy@elastic.co", "id": "42", "name": "kimchy" }, + "user": { + "email": "kimchy@elastic.co", + "id": "42", + "name": "kimchy" + }, "user_agent": { - "device": { "name": "Other" }, + "device": { + "name": "Other" + }, "name": "Other", "original": "workload/2.4.3" } - }, - "p95": 5616, - "averageResponseTime": 4757, - "transactionsPerMinute": 0.5, - "impact": 0.20830834986820673 + } }, { - "name": "GET /throw-error", + "key": "GET /throw-error", + "averageResponseTime": 2577, + "transactionsPerMinute": 0.5, + "impact": 0, + "p95": 3224, "sample": { - "@timestamp": "2020-06-29T06:48:42.954Z", - "agent": { "name": "nodejs", "version": "3.6.1" }, - "client": { "ip": "172.18.0.7" }, - "container": { "id": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" }, - "ecs": { "version": "1.5.0" }, - "event": { "ingested": "2020-06-29T06:48:43.996435Z" }, + "@timestamp": "2020-06-29T06:48:19.975Z", + "agent": { + "name": "nodejs", + "version": "3.6.1" + }, + "client": { + "ip": "172.18.0.7" + }, + "container": { + "id": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" + }, + "ecs": { + "version": "1.5.0" + }, + "event": { + "ingested": "2020-06-29T06:48:21.012520Z" + }, "host": { "architecture": "x64", "hostname": "41712ded148f", "ip": "172.18.0.7", "name": "41712ded148f", - "os": { "platform": "linux" } + "os": { + "platform": "linux" + } }, "http": { "request": { "headers": { - "Connection": ["close"], - "Host": ["opbeans-node:3000"], - "User-Agent": ["workload/2.4.3"] + "Connection": [ + "close" + ], + "Host": [ + "opbeans-node:3000" + ], + "User-Agent": [ + "workload/2.4.3" + ] }, "method": "get", - "socket": { "encrypted": false, "remote_address": "::ffff:172.18.0.7" } + "socket": { + "encrypted": false, + "remote_address": "::ffff:172.18.0.7" + } }, "response": { "headers": { - "Connection": ["close"], - "Content-Length": ["148"], - "Content-Security-Policy": ["default-src 'none'"], - "Content-Type": ["text/html; charset=utf-8"], - "Date": ["Mon, 29 Jun 2020 06:48:42 GMT"], - "X-Content-Type-Options": ["nosniff"], - "X-Powered-By": ["Express"] + "Connection": [ + "close" + ], + "Content-Length": [ + "148" + ], + "Content-Security-Policy": [ + "default-src 'none'" + ], + "Content-Type": [ + "text/html; charset=utf-8" + ], + "Date": [ + "Mon, 29 Jun 2020 06:48:19 GMT" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Powered-By": [ + "Express" + ] }, "status_code": 500 }, @@ -1893,27 +3075,52 @@ "ppid": 1, "title": "node /app/server.js" }, - "processor": { "event": "transaction", "name": "transaction" }, + "processor": { + "event": "transaction", + "name": "transaction" + }, "service": { "environment": "production", - "framework": { "name": "express", "version": "4.17.1" }, - "language": { "name": "javascript" }, + "framework": { + "name": "express", + "version": "4.17.1" + }, + "language": { + "name": "javascript" + }, "name": "opbeans-node", - "node": { "name": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" }, - "runtime": { "name": "node", "version": "12.18.1" }, + "node": { + "name": "41712ded148f30ee09a13421780eec4304bf5049b82a0d8dbc877893be6799e4" + }, + "runtime": { + "name": "node", + "version": "12.18.1" + }, "version": "1.0.0" }, - "source": { "ip": "172.18.0.7" }, - "timestamp": { "us": 1593413322954016 }, - "trace": { "id": "9d5aee7443a43db9820f622a10dfac6e" }, + "source": { + "ip": "172.18.0.7" + }, + "timestamp": { + "us": 1593413299975019 + }, + "trace": { + "id": "106f3a55b0b0ea327d1bbe4be66c3bcc" + }, "transaction": { - "custom": { "shoppingBasketCount": 42 }, - "duration": { "us": 1928 }, - "id": "8e6fc8c3f99e8fc9", + "custom": { + "shoppingBasketCount": 42 + }, + "duration": { + "us": 3226 + }, + "id": "247b9141552a9e73", "name": "GET /throw-error", "result": "HTTP 5xx", "sampled": true, - "span_count": { "started": 0 }, + "span_count": { + "started": 0 + }, "type": "request" }, "url": { @@ -1924,19 +3131,21 @@ "port": 3000, "scheme": "http" }, - "user": { "email": "kimchy@elastic.co", "id": "42", "name": "kimchy" }, + "user": { + "email": "kimchy@elastic.co", + "id": "42", + "name": "kimchy" + }, "user_agent": { - "device": { "name": "Other" }, + "device": { + "name": "Other" + }, "name": "Other", "original": "workload/2.4.3" } - }, - "p95": 3224, - "averageResponseTime": 2577, - "transactionsPerMinute": 0.5, - "impact": 0 + } } ], "isAggregationAccurate": true, - "bucketSize": 100 -} + "bucketSize": 1000 +} \ No newline at end of file diff --git a/x-pack/test/apm_api_integration/basic/tests/transaction_groups/top_transaction_groups.ts b/x-pack/test/apm_api_integration/basic/tests/transaction_groups/top_transaction_groups.ts index 43b2ad5414c7a6..94559a3e4aa541 100644 --- a/x-pack/test/apm_api_integration/basic/tests/transaction_groups/top_transaction_groups.ts +++ b/x-pack/test/apm_api_integration/basic/tests/transaction_groups/top_transaction_groups.ts @@ -4,9 +4,18 @@ * you may not use this file except in compliance with the Elastic License. */ import expect from '@kbn/expect'; +import { sortBy } from 'lodash'; import { FtrProviderContext } from '../../../../common/ftr_provider_context'; import expectedTransactionGroups from './expectation/top_transaction_groups.json'; +function sortTransactionGroups(items: any[]) { + return sortBy(items, 'impact'); +} + +function omitSampleFromTransactionGroups(items: any[]) { + return sortTransactionGroups(items).map(({ sample, ...item }) => ({ ...item })); +} + export default function ApiTest({ getService }: FtrProviderContext) { const supertest = getService('supertest'); const esArchiver = getService('esArchiver'); @@ -48,15 +57,19 @@ export default function ApiTest({ getService }: FtrProviderContext) { }); it('returns the correct buckets (when ignoring samples)', async () => { - function omitSample(items: any[]) { - return items.map(({ sample, ...item }) => ({ ...item })); - } - - expect(omitSample(response.body.items)).to.eql(omitSample(expectedTransactionGroups.items)); + expect(omitSampleFromTransactionGroups(response.body.items)).to.eql( + omitSampleFromTransactionGroups(expectedTransactionGroups.items) + ); }); it('returns the correct buckets and samples', async () => { - expect(response.body.items).to.eql(expectedTransactionGroups.items); + // sample should provide enough information to deeplink to a transaction detail page + response.body.items.forEach((item: any) => { + expect(item.sample.trace.id).to.be.an('string'); + expect(item.sample.transaction.id).to.be.an('string'); + expect(item.sample.service.name).to.be('opbeans-node'); + expect(item.sample.transaction.name).to.be(item.key); + }); }); }); });