diff --git a/x-pack/legacy/plugins/apm/common/__snapshots__/elasticsearch_fieldnames.test.ts.snap b/x-pack/legacy/plugins/apm/common/__snapshots__/elasticsearch_fieldnames.test.ts.snap index 9d82cd6b5455c..e345ca3552e5a 100644 --- a/x-pack/legacy/plugins/apm/common/__snapshots__/elasticsearch_fieldnames.test.ts.snap +++ b/x-pack/legacy/plugins/apm/common/__snapshots__/elasticsearch_fieldnames.test.ts.snap @@ -68,6 +68,8 @@ exports[`Error SERVICE_NAME 1`] = `"service name"`; exports[`Error SERVICE_NODE_NAME 1`] = `undefined`; +exports[`Error SERVICE_VERSION 1`] = `undefined`; + exports[`Error SPAN_ACTION 1`] = `undefined`; exports[`Error SPAN_DURATION 1`] = `undefined`; @@ -174,6 +176,8 @@ exports[`Span SERVICE_NAME 1`] = `"service name"`; exports[`Span SERVICE_NODE_NAME 1`] = `undefined`; +exports[`Span SERVICE_VERSION 1`] = `undefined`; + exports[`Span SPAN_ACTION 1`] = `"my action"`; exports[`Span SPAN_DURATION 1`] = `1337`; @@ -280,6 +284,8 @@ exports[`Transaction SERVICE_NAME 1`] = `"service name"`; exports[`Transaction SERVICE_NODE_NAME 1`] = `undefined`; +exports[`Transaction SERVICE_VERSION 1`] = `undefined`; + exports[`Transaction SPAN_ACTION 1`] = `undefined`; exports[`Transaction SPAN_DURATION 1`] = `undefined`; diff --git a/x-pack/legacy/plugins/apm/common/elasticsearch_fieldnames.ts b/x-pack/legacy/plugins/apm/common/elasticsearch_fieldnames.ts index b8b35e79a9908..0d7ff3114e73f 100644 --- a/x-pack/legacy/plugins/apm/common/elasticsearch_fieldnames.ts +++ b/x-pack/legacy/plugins/apm/common/elasticsearch_fieldnames.ts @@ -8,6 +8,7 @@ export const SERVICE_NAME = 'service.name'; export const SERVICE_ENVIRONMENT = 'service.environment'; export const SERVICE_AGENT_NAME = 'agent.name'; export const SERVICE_NODE_NAME = 'service.node.name'; +export const SERVICE_VERSION = 'service.version'; export const URL_FULL = 'url.full'; export const HTTP_REQUEST_METHOD = 'http.request.method'; export const USER_ID = 'user.id'; diff --git a/x-pack/legacy/plugins/apm/public/components/app/ErrorGroupOverview/index.tsx b/x-pack/legacy/plugins/apm/public/components/app/ErrorGroupOverview/index.tsx index f2d2f28fc975a..2e1efabf47b2c 100644 --- a/x-pack/legacy/plugins/apm/public/components/app/ErrorGroupOverview/index.tsx +++ b/x-pack/legacy/plugins/apm/public/components/app/ErrorGroupOverview/index.tsx @@ -80,7 +80,7 @@ const ErrorGroupOverview: React.FC = () => { const localUIFiltersConfig = useMemo(() => { const config: React.ComponentProps = { - filterNames: ['host', 'containerId', 'podName'], + filterNames: ['host', 'containerId', 'podName', 'serviceVersion'], params: { serviceName }, diff --git a/x-pack/legacy/plugins/apm/public/components/app/ServiceMetrics/index.tsx b/x-pack/legacy/plugins/apm/public/components/app/ServiceMetrics/index.tsx index 8005fc17f2a20..d01093be801a2 100644 --- a/x-pack/legacy/plugins/apm/public/components/app/ServiceMetrics/index.tsx +++ b/x-pack/legacy/plugins/apm/public/components/app/ServiceMetrics/index.tsx @@ -31,7 +31,7 @@ export function ServiceMetrics({ agentName }: ServiceMetricsProps) { const localFiltersConfig: React.ComponentProps = useMemo( () => ({ - filterNames: ['host', 'containerId', 'podName'], + filterNames: ['host', 'containerId', 'podName', 'serviceVersion'], params: { serviceName, serviceNodeName diff --git a/x-pack/legacy/plugins/apm/public/components/app/TransactionDetails/index.tsx b/x-pack/legacy/plugins/apm/public/components/app/TransactionDetails/index.tsx index dbd0e9d3b9d22..9d6639b000762 100644 --- a/x-pack/legacy/plugins/apm/public/components/app/TransactionDetails/index.tsx +++ b/x-pack/legacy/plugins/apm/public/components/app/TransactionDetails/index.tsx @@ -50,7 +50,7 @@ export function TransactionDetails() { const localUIFiltersConfig = useMemo(() => { const config: React.ComponentProps = { - filterNames: ['transactionResult'], + filterNames: ['transactionResult', 'serviceVersion'], projection: PROJECTION.TRANSACTIONS, params: { transactionName, diff --git a/x-pack/legacy/plugins/apm/public/components/app/TransactionOverview/index.tsx b/x-pack/legacy/plugins/apm/public/components/app/TransactionOverview/index.tsx index de356b5812e9a..439e3d80eef4f 100644 --- a/x-pack/legacy/plugins/apm/public/components/app/TransactionOverview/index.tsx +++ b/x-pack/legacy/plugins/apm/public/components/app/TransactionOverview/index.tsx @@ -96,7 +96,13 @@ export function TransactionOverview() { const localFiltersConfig: React.ComponentProps = useMemo( () => ({ - filterNames: ['transactionResult', 'host', 'containerId', 'podName'], + filterNames: [ + 'transactionResult', + 'host', + 'containerId', + 'podName', + 'serviceVersion' + ], params: { serviceName, transactionType diff --git a/x-pack/legacy/plugins/apm/public/components/shared/Links/apm/ErrorOverviewLink.tsx b/x-pack/legacy/plugins/apm/public/components/shared/Links/apm/ErrorOverviewLink.tsx index c99c7f12062e2..fcc0dc7d26695 100644 --- a/x-pack/legacy/plugins/apm/public/components/shared/Links/apm/ErrorOverviewLink.tsx +++ b/x-pack/legacy/plugins/apm/public/components/shared/Links/apm/ErrorOverviewLink.tsx @@ -21,7 +21,8 @@ const ErrorOverviewLink = ({ serviceName, query, ...rest }: Props) => { urlParams, 'host', 'containerId', - 'podName' + 'podName', + 'serviceVersion' ); return ( diff --git a/x-pack/legacy/plugins/apm/public/components/shared/Links/apm/MetricOverviewLink.tsx b/x-pack/legacy/plugins/apm/public/components/shared/Links/apm/MetricOverviewLink.tsx index dd988f3e3720d..7d21e1efa44f2 100644 --- a/x-pack/legacy/plugins/apm/public/components/shared/Links/apm/MetricOverviewLink.tsx +++ b/x-pack/legacy/plugins/apm/public/components/shared/Links/apm/MetricOverviewLink.tsx @@ -19,7 +19,8 @@ const MetricOverviewLink = ({ serviceName, ...rest }: Props) => { urlParams, 'host', 'containerId', - 'podName' + 'podName', + 'serviceVersion' ); return ( diff --git a/x-pack/legacy/plugins/apm/public/components/shared/Links/apm/ServiceNodeMetricOverviewLink.tsx b/x-pack/legacy/plugins/apm/public/components/shared/Links/apm/ServiceNodeMetricOverviewLink.tsx index 925d85fa0663e..527c3da9e7e1c 100644 --- a/x-pack/legacy/plugins/apm/public/components/shared/Links/apm/ServiceNodeMetricOverviewLink.tsx +++ b/x-pack/legacy/plugins/apm/public/components/shared/Links/apm/ServiceNodeMetricOverviewLink.tsx @@ -24,7 +24,8 @@ const ServiceNodeMetricOverviewLink = ({ urlParams, 'host', 'containerId', - 'podName' + 'podName', + 'serviceVersion' ); return ( diff --git a/x-pack/legacy/plugins/apm/public/components/shared/Links/apm/ServiceNodeOverviewLink.tsx b/x-pack/legacy/plugins/apm/public/components/shared/Links/apm/ServiceNodeOverviewLink.tsx index 10e55d3382448..db1b6ec117bf4 100644 --- a/x-pack/legacy/plugins/apm/public/components/shared/Links/apm/ServiceNodeOverviewLink.tsx +++ b/x-pack/legacy/plugins/apm/public/components/shared/Links/apm/ServiceNodeOverviewLink.tsx @@ -19,7 +19,8 @@ const ServiceNodeOverviewLink = ({ serviceName, ...rest }: Props) => { urlParams, 'host', 'containerId', - 'podName' + 'podName', + 'serviceVersion' ); return ( diff --git a/x-pack/legacy/plugins/apm/public/components/shared/Links/apm/TransactionDetailLink.tsx b/x-pack/legacy/plugins/apm/public/components/shared/Links/apm/TransactionDetailLink.tsx index a4ac05379615a..784f9b36ff621 100644 --- a/x-pack/legacy/plugins/apm/public/components/shared/Links/apm/TransactionDetailLink.tsx +++ b/x-pack/legacy/plugins/apm/public/components/shared/Links/apm/TransactionDetailLink.tsx @@ -27,7 +27,11 @@ export const TransactionDetailLink = ({ }: Props) => { const { urlParams } = useUrlParams(); - const persistedFilters = pickKeys(urlParams, 'transactionResult'); + const persistedFilters = pickKeys( + urlParams, + 'transactionResult', + 'serviceVersion' + ); return ( { 'transactionResult', 'host', 'containerId', - 'podName' + 'podName', + 'serviceVersion' ); return ( diff --git a/x-pack/legacy/plugins/apm/server/lib/ui_filters/local_ui_filters/config.ts b/x-pack/legacy/plugins/apm/server/lib/ui_filters/local_ui_filters/config.ts index a0149bec728c5..6363b996ce5bb 100644 --- a/x-pack/legacy/plugins/apm/server/lib/ui_filters/local_ui_filters/config.ts +++ b/x-pack/legacy/plugins/apm/server/lib/ui_filters/local_ui_filters/config.ts @@ -9,7 +9,8 @@ import { POD_NAME, SERVICE_AGENT_NAME, HOST_NAME, - TRANSACTION_RESULT + TRANSACTION_RESULT, + SERVICE_VERSION } from '../../../../common/elasticsearch_fieldnames'; const filtersByName = { @@ -42,6 +43,12 @@ const filtersByName = { defaultMessage: 'Transaction result' }), fieldName: TRANSACTION_RESULT + }, + serviceVersion: { + title: i18n.translate('xpack.apm.localFilters.titles.serviceVersion', { + defaultMessage: 'Service version' + }), + fieldName: SERVICE_VERSION } };