From 46be5c4d97ba37a36b4543426f50cfc508dfef06 Mon Sep 17 00:00:00 2001 From: cauemarcondes Date: Mon, 28 Sep 2020 11:19:36 +0200 Subject: [PATCH] addressing PR comment --- ...et_service_map_from_trace_ids.test.ts.snap | 922 +----------------- .../get_service_map_from_trace_ids.test.ts | 39 +- ...e_ids_script_response_env_not_defined.json | 891 +++++++++++++++++ 3 files changed, 915 insertions(+), 937 deletions(-) create mode 100644 x-pack/plugins/apm/server/lib/service_map/mock_responses/get_service_map_from_trace_ids_script_response_env_not_defined.json diff --git a/x-pack/plugins/apm/server/lib/service_map/__snapshots__/get_service_map_from_trace_ids.test.ts.snap b/x-pack/plugins/apm/server/lib/service_map/__snapshots__/get_service_map_from_trace_ids.test.ts.snap index d5053cedbf91..b3cd91fd05a3 100644 --- a/x-pack/plugins/apm/server/lib/service_map/__snapshots__/get_service_map_from_trace_ids.test.ts.snap +++ b/x-pack/plugins/apm/server/lib/service_map/__snapshots__/get_service_map_from_trace_ids.test.ts.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`getConnections if environment is "all" (missing) includes both connections with and without source environment set 1`] = ` +exports[`getConnections if neither service name or environment is given includes all connections 1`] = ` Array [ Object { "destination": Object { @@ -268,923 +268,3 @@ Array [ }, ] `; - -exports[`getConnections if environment is "not defined" excludes connections with source environment set 1`] = ` -Array [ - Object { - "destination": Object { - "agent.name": "nodejs", - "service.environment": null, - "service.name": "opbeans-node", - }, - "source": Object { - "agent.name": "python", - "service.environment": null, - "service.name": "opbeans-python", - }, - }, - Object { - "destination": Object { - "span.destination.service.resource": "172.18.0.6:3000", - "span.subtype": "http", - "span.type": "external", - }, - "source": Object { - "agent.name": "nodejs", - "service.environment": null, - "service.name": "opbeans-node", - }, - }, - Object { - "destination": Object { - "agent.name": "python", - "service.environment": "production", - "service.name": "opbeans-python", - }, - "source": Object { - "agent.name": "nodejs", - "service.environment": "production", - "service.name": "opbeans-node", - }, - }, - Object { - "destination": Object { - "agent.name": "ruby", - "service.environment": "production", - "service.name": "opbeans-ruby", - }, - "source": Object { - "agent.name": "python", - "service.environment": "production", - "service.name": "opbeans-python", - }, - }, - Object { - "destination": Object { - "span.destination.service.resource": "postgresql", - "span.subtype": "postgresql", - "span.type": "db", - }, - "source": Object { - "agent.name": "ruby", - "service.environment": "production", - "service.name": "opbeans-ruby", - }, - }, - Object { - "destination": Object { - "agent.name": "ruby", - "service.environment": "production", - "service.name": "opbeans-ruby", - }, - "source": Object { - "agent.name": "nodejs", - "service.environment": "production", - "service.name": "opbeans-node", - }, - }, - Object { - "destination": Object { - "span.destination.service.resource": "opbeans-python:3000", - "span.subtype": "http_rb", - "span.type": "ext", - }, - "source": Object { - "agent.name": "ruby", - "service.environment": "production", - "service.name": "opbeans-ruby", - }, - }, - Object { - "destination": Object { - "agent.name": "nodejs", - "service.environment": "production", - "service.name": "opbeans-node", - }, - "source": Object { - "agent.name": "python", - "service.environment": "production", - "service.name": "opbeans-python", - }, - }, - Object { - "destination": Object { - "span.destination.service.resource": "postgresql", - "span.subtype": "postgresql", - "span.type": "db", - }, - "source": Object { - "agent.name": "python", - "service.environment": "production", - "service.name": "opbeans-python", - }, - }, - Object { - "destination": Object { - "span.destination.service.resource": "opbeans-node:3000", - "span.subtype": "http_rb", - "span.type": "ext", - }, - "source": Object { - "agent.name": "ruby", - "service.environment": "production", - "service.name": "opbeans-ruby", - }, - }, - Object { - "destination": Object { - "agent.name": "nodejs", - "service.environment": "production", - "service.name": "opbeans-node", - }, - "source": Object { - "agent.name": "ruby", - "service.environment": "production", - "service.name": "opbeans-ruby", - }, - }, - Object { - "destination": Object { - "span.destination.service.resource": "postgresql", - "span.subtype": "postgresql", - "span.type": "db", - }, - "source": Object { - "agent.name": "nodejs", - "service.environment": "production", - "service.name": "opbeans-node", - }, - }, - Object { - "destination": Object { - "span.destination.service.resource": "opbeans-ruby:3000", - "span.subtype": "http_rb", - "span.type": "ext", - }, - "source": Object { - "agent.name": "ruby", - "service.environment": "production", - "service.name": "opbeans-ruby", - }, - }, - Object { - "destination": Object { - "agent.name": "python", - "service.environment": "production", - "service.name": "opbeans-python", - }, - "source": Object { - "agent.name": "ruby", - "service.environment": "production", - "service.name": "opbeans-ruby", - }, - }, - Object { - "destination": Object { - "span.destination.service.resource": "redis", - "span.subtype": "redis", - "span.type": "cache", - }, - "source": Object { - "agent.name": "nodejs", - "service.environment": "production", - "service.name": "opbeans-node", - }, - }, -] -`; - -exports[`getConnections if no filter is given includes all connections 1`] = ` -Array [ - Object { - "destination": Object { - "agent.name": "java", - "service.environment": "testing", - "service.name": "opbeans-java", - }, - "source": Object { - "agent.name": "go", - "service.environment": "testing", - "service.name": "opbeans-go", - }, - }, - Object { - "destination": Object { - "span.destination.service.resource": "172.18.0.6:3000", - "span.subtype": "http", - "span.type": "external", - }, - "source": Object { - "agent.name": "java", - "service.environment": "testing", - "service.name": "opbeans-java", - }, - }, - Object { - "destination": Object { - "agent.name": "nodejs", - "service.environment": null, - "service.name": "opbeans-node", - }, - "source": Object { - "agent.name": "python", - "service.environment": null, - "service.name": "opbeans-python", - }, - }, - Object { - "destination": Object { - "span.destination.service.resource": "172.18.0.6:3000", - "span.subtype": "http", - "span.type": "external", - }, - "source": Object { - "agent.name": "nodejs", - "service.environment": null, - "service.name": "opbeans-node", - }, - }, - Object { - "destination": Object { - "agent.name": "nodejs", - "service.environment": "production", - "service.name": "opbeans-node", - }, - "source": Object { - "agent.name": "python", - "service.environment": "production", - "service.name": "opbeans-python", - }, - }, - Object { - "destination": Object { - "span.destination.service.resource": "172.18.0.6:3000", - "span.subtype": "http", - "span.type": "external", - }, - "source": Object { - "agent.name": "nodejs", - "service.environment": "production", - "service.name": "opbeans-node", - }, - }, - Object { - "destination": Object { - "agent.name": "python", - "service.environment": "production", - "service.name": "opbeans-python", - }, - "source": Object { - "agent.name": "nodejs", - "service.environment": "production", - "service.name": "opbeans-node", - }, - }, - Object { - "destination": Object { - "agent.name": "ruby", - "service.environment": "production", - "service.name": "opbeans-ruby", - }, - "source": Object { - "agent.name": "python", - "service.environment": "production", - "service.name": "opbeans-python", - }, - }, - Object { - "destination": Object { - "span.destination.service.resource": "postgresql", - "span.subtype": "postgresql", - "span.type": "db", - }, - "source": Object { - "agent.name": "ruby", - "service.environment": "production", - "service.name": "opbeans-ruby", - }, - }, - Object { - "destination": Object { - "agent.name": "ruby", - "service.environment": "production", - "service.name": "opbeans-ruby", - }, - "source": Object { - "agent.name": "nodejs", - "service.environment": "production", - "service.name": "opbeans-node", - }, - }, - Object { - "destination": Object { - "span.destination.service.resource": "opbeans-python:3000", - "span.subtype": "http_rb", - "span.type": "ext", - }, - "source": Object { - "agent.name": "ruby", - "service.environment": "production", - "service.name": "opbeans-ruby", - }, - }, - Object { - "destination": Object { - "agent.name": "nodejs", - "service.environment": "production", - "service.name": "opbeans-node", - }, - "source": Object { - "agent.name": "ruby", - "service.environment": "production", - "service.name": "opbeans-ruby", - }, - }, - Object { - "destination": Object { - "span.destination.service.resource": "opbeans-node:3000", - "span.subtype": "http", - "span.type": "external", - }, - "source": Object { - "agent.name": "python", - "service.environment": "production", - "service.name": "opbeans-python", - }, - }, - Object { - "destination": Object { - "span.destination.service.resource": "172.18.0.7:3000", - "span.subtype": "http", - "span.type": "external", - }, - "source": Object { - "agent.name": "nodejs", - "service.environment": "production", - "service.name": "opbeans-node", - }, - }, - Object { - "destination": Object { - "agent.name": "python", - "service.environment": "production", - "service.name": "opbeans-python", - }, - "source": Object { - "agent.name": "ruby", - "service.environment": "production", - "service.name": "opbeans-ruby", - }, - }, - Object { - "destination": Object { - "span.destination.service.resource": "opbeans-ruby:3000", - "span.subtype": "http", - "span.type": "external", - }, - "source": Object { - "agent.name": "python", - "service.environment": "production", - "service.name": "opbeans-python", - }, - }, - Object { - "destination": Object { - "span.destination.service.resource": "postgresql", - "span.subtype": "postgresql", - "span.type": "db", - }, - "source": Object { - "agent.name": "python", - "service.environment": "production", - "service.name": "opbeans-python", - }, - }, - Object { - "destination": Object { - "span.destination.service.resource": "opbeans-node:3000", - "span.subtype": "http_rb", - "span.type": "ext", - }, - "source": Object { - "agent.name": "ruby", - "service.environment": "production", - "service.name": "opbeans-ruby", - }, - }, - Object { - "destination": Object { - "span.destination.service.resource": "postgresql", - "span.subtype": "postgresql", - "span.type": "db", - }, - "source": Object { - "agent.name": "nodejs", - "service.environment": "production", - "service.name": "opbeans-node", - }, - }, - Object { - "destination": Object { - "span.destination.service.resource": "93.184.216.34:80", - "span.subtype": "http", - "span.type": "external", - }, - "source": Object { - "agent.name": "nodejs", - "service.environment": "production", - "service.name": "opbeans-node", - }, - }, - Object { - "destination": Object { - "span.destination.service.resource": "opbeans-ruby:3000", - "span.subtype": "http_rb", - "span.type": "ext", - }, - "source": Object { - "agent.name": "ruby", - "service.environment": "production", - "service.name": "opbeans-ruby", - }, - }, - Object { - "destination": Object { - "span.destination.service.resource": "redis", - "span.subtype": "redis", - "span.type": "cache", - }, - "source": Object { - "agent.name": "nodejs", - "service.environment": "production", - "service.name": "opbeans-node", - }, - }, -] -`; - -exports[`getConnections if service name and environment are given excludes connections with different service name and environment 1`] = ` -Array [ - Object { - "destination": Object { - "agent.name": "nodejs", - "service.environment": "production", - "service.name": "opbeans-node", - }, - "source": Object { - "agent.name": "python", - "service.environment": "production", - "service.name": "opbeans-python", - }, - }, - Object { - "destination": Object { - "span.destination.service.resource": "172.18.0.6:3000", - "span.subtype": "http", - "span.type": "external", - }, - "source": Object { - "agent.name": "nodejs", - "service.environment": "production", - "service.name": "opbeans-node", - }, - }, - Object { - "destination": Object { - "agent.name": "python", - "service.environment": "production", - "service.name": "opbeans-python", - }, - "source": Object { - "agent.name": "nodejs", - "service.environment": "production", - "service.name": "opbeans-node", - }, - }, - Object { - "destination": Object { - "agent.name": "ruby", - "service.environment": "production", - "service.name": "opbeans-ruby", - }, - "source": Object { - "agent.name": "python", - "service.environment": "production", - "service.name": "opbeans-python", - }, - }, - Object { - "destination": Object { - "span.destination.service.resource": "postgresql", - "span.subtype": "postgresql", - "span.type": "db", - }, - "source": Object { - "agent.name": "ruby", - "service.environment": "production", - "service.name": "opbeans-ruby", - }, - }, - Object { - "destination": Object { - "agent.name": "ruby", - "service.environment": "production", - "service.name": "opbeans-ruby", - }, - "source": Object { - "agent.name": "nodejs", - "service.environment": "production", - "service.name": "opbeans-node", - }, - }, - Object { - "destination": Object { - "span.destination.service.resource": "opbeans-python:3000", - "span.subtype": "http_rb", - "span.type": "ext", - }, - "source": Object { - "agent.name": "ruby", - "service.environment": "production", - "service.name": "opbeans-ruby", - }, - }, - Object { - "destination": Object { - "agent.name": "nodejs", - "service.environment": "production", - "service.name": "opbeans-node", - }, - "source": Object { - "agent.name": "ruby", - "service.environment": "production", - "service.name": "opbeans-ruby", - }, - }, - Object { - "destination": Object { - "span.destination.service.resource": "opbeans-node:3000", - "span.subtype": "http", - "span.type": "external", - }, - "source": Object { - "agent.name": "python", - "service.environment": "production", - "service.name": "opbeans-python", - }, - }, - Object { - "destination": Object { - "span.destination.service.resource": "172.18.0.7:3000", - "span.subtype": "http", - "span.type": "external", - }, - "source": Object { - "agent.name": "nodejs", - "service.environment": "production", - "service.name": "opbeans-node", - }, - }, - Object { - "destination": Object { - "span.destination.service.resource": "postgresql", - "span.subtype": "postgresql", - "span.type": "db", - }, - "source": Object { - "agent.name": "python", - "service.environment": "production", - "service.name": "opbeans-python", - }, - }, - Object { - "destination": Object { - "agent.name": "python", - "service.environment": "production", - "service.name": "opbeans-python", - }, - "source": Object { - "agent.name": "ruby", - "service.environment": "production", - "service.name": "opbeans-ruby", - }, - }, - Object { - "destination": Object { - "span.destination.service.resource": "postgresql", - "span.subtype": "postgresql", - "span.type": "db", - }, - "source": Object { - "agent.name": "nodejs", - "service.environment": "production", - "service.name": "opbeans-node", - }, - }, - Object { - "destination": Object { - "span.destination.service.resource": "93.184.216.34:80", - "span.subtype": "http", - "span.type": "external", - }, - "source": Object { - "agent.name": "nodejs", - "service.environment": "production", - "service.name": "opbeans-node", - }, - }, - Object { - "destination": Object { - "span.destination.service.resource": "opbeans-ruby:3000", - "span.subtype": "http_rb", - "span.type": "ext", - }, - "source": Object { - "agent.name": "ruby", - "service.environment": "production", - "service.name": "opbeans-ruby", - }, - }, - Object { - "destination": Object { - "span.destination.service.resource": "redis", - "span.subtype": "redis", - "span.type": "cache", - }, - "source": Object { - "agent.name": "nodejs", - "service.environment": "production", - "service.name": "opbeans-node", - }, - }, - Object { - "destination": Object { - "span.destination.service.resource": "opbeans-node:3000", - "span.subtype": "http_rb", - "span.type": "ext", - }, - "source": Object { - "agent.name": "ruby", - "service.environment": "production", - "service.name": "opbeans-ruby", - }, - }, - Object { - "destination": Object { - "span.destination.service.resource": "opbeans-ruby:3000", - "span.subtype": "http", - "span.type": "external", - }, - "source": Object { - "agent.name": "python", - "service.environment": "production", - "service.name": "opbeans-python", - }, - }, -] -`; - -exports[`getConnections if service name is given excludes connections with different service name 1`] = ` -Array [ - Object { - "destination": Object { - "agent.name": "nodejs", - "service.environment": null, - "service.name": "opbeans-node", - }, - "source": Object { - "agent.name": "python", - "service.environment": null, - "service.name": "opbeans-python", - }, - }, - Object { - "destination": Object { - "span.destination.service.resource": "172.18.0.6:3000", - "span.subtype": "http", - "span.type": "external", - }, - "source": Object { - "agent.name": "nodejs", - "service.environment": null, - "service.name": "opbeans-node", - }, - }, - Object { - "destination": Object { - "agent.name": "nodejs", - "service.environment": "production", - "service.name": "opbeans-node", - }, - "source": Object { - "agent.name": "python", - "service.environment": "production", - "service.name": "opbeans-python", - }, - }, - Object { - "destination": Object { - "span.destination.service.resource": "172.18.0.6:3000", - "span.subtype": "http", - "span.type": "external", - }, - "source": Object { - "agent.name": "nodejs", - "service.environment": "production", - "service.name": "opbeans-node", - }, - }, - Object { - "destination": Object { - "agent.name": "python", - "service.environment": "production", - "service.name": "opbeans-python", - }, - "source": Object { - "agent.name": "nodejs", - "service.environment": "production", - "service.name": "opbeans-node", - }, - }, - Object { - "destination": Object { - "agent.name": "ruby", - "service.environment": "production", - "service.name": "opbeans-ruby", - }, - "source": Object { - "agent.name": "python", - "service.environment": "production", - "service.name": "opbeans-python", - }, - }, - Object { - "destination": Object { - "span.destination.service.resource": "postgresql", - "span.subtype": "postgresql", - "span.type": "db", - }, - "source": Object { - "agent.name": "ruby", - "service.environment": "production", - "service.name": "opbeans-ruby", - }, - }, - Object { - "destination": Object { - "agent.name": "ruby", - "service.environment": "production", - "service.name": "opbeans-ruby", - }, - "source": Object { - "agent.name": "nodejs", - "service.environment": "production", - "service.name": "opbeans-node", - }, - }, - Object { - "destination": Object { - "span.destination.service.resource": "opbeans-python:3000", - "span.subtype": "http_rb", - "span.type": "ext", - }, - "source": Object { - "agent.name": "ruby", - "service.environment": "production", - "service.name": "opbeans-ruby", - }, - }, - Object { - "destination": Object { - "agent.name": "nodejs", - "service.environment": "production", - "service.name": "opbeans-node", - }, - "source": Object { - "agent.name": "ruby", - "service.environment": "production", - "service.name": "opbeans-ruby", - }, - }, - Object { - "destination": Object { - "span.destination.service.resource": "opbeans-node:3000", - "span.subtype": "http", - "span.type": "external", - }, - "source": Object { - "agent.name": "python", - "service.environment": "production", - "service.name": "opbeans-python", - }, - }, - Object { - "destination": Object { - "span.destination.service.resource": "172.18.0.7:3000", - "span.subtype": "http", - "span.type": "external", - }, - "source": Object { - "agent.name": "nodejs", - "service.environment": "production", - "service.name": "opbeans-node", - }, - }, - Object { - "destination": Object { - "span.destination.service.resource": "postgresql", - "span.subtype": "postgresql", - "span.type": "db", - }, - "source": Object { - "agent.name": "python", - "service.environment": "production", - "service.name": "opbeans-python", - }, - }, - Object { - "destination": Object { - "agent.name": "python", - "service.environment": "production", - "service.name": "opbeans-python", - }, - "source": Object { - "agent.name": "ruby", - "service.environment": "production", - "service.name": "opbeans-ruby", - }, - }, - Object { - "destination": Object { - "span.destination.service.resource": "postgresql", - "span.subtype": "postgresql", - "span.type": "db", - }, - "source": Object { - "agent.name": "nodejs", - "service.environment": "production", - "service.name": "opbeans-node", - }, - }, - Object { - "destination": Object { - "span.destination.service.resource": "93.184.216.34:80", - "span.subtype": "http", - "span.type": "external", - }, - "source": Object { - "agent.name": "nodejs", - "service.environment": "production", - "service.name": "opbeans-node", - }, - }, - Object { - "destination": Object { - "span.destination.service.resource": "opbeans-ruby:3000", - "span.subtype": "http_rb", - "span.type": "ext", - }, - "source": Object { - "agent.name": "ruby", - "service.environment": "production", - "service.name": "opbeans-ruby", - }, - }, - Object { - "destination": Object { - "span.destination.service.resource": "redis", - "span.subtype": "redis", - "span.type": "cache", - }, - "source": Object { - "agent.name": "nodejs", - "service.environment": "production", - "service.name": "opbeans-node", - }, - }, - Object { - "destination": Object { - "span.destination.service.resource": "opbeans-node:3000", - "span.subtype": "http_rb", - "span.type": "ext", - }, - "source": Object { - "agent.name": "ruby", - "service.environment": "production", - "service.name": "opbeans-ruby", - }, - }, - Object { - "destination": Object { - "span.destination.service.resource": "opbeans-ruby:3000", - "span.subtype": "http", - "span.type": "external", - }, - "source": Object { - "agent.name": "python", - "service.environment": "production", - "service.name": "opbeans-python", - }, - }, -] -`; diff --git a/x-pack/plugins/apm/server/lib/service_map/get_service_map_from_trace_ids.test.ts b/x-pack/plugins/apm/server/lib/service_map/get_service_map_from_trace_ids.test.ts index 2c8015a3938f..1661aa6e8978 100644 --- a/x-pack/plugins/apm/server/lib/service_map/get_service_map_from_trace_ids.test.ts +++ b/x-pack/plugins/apm/server/lib/service_map/get_service_map_from_trace_ids.test.ts @@ -6,11 +6,12 @@ import { getConnections } from './get_service_map_from_trace_ids'; import serviceMapFromTraceIdsScriptResponse from './mock_responses/get_service_map_from_trace_ids_script_response.json'; +import serviceMapFromTraceIdsScriptResponseEnvNotDefined from './mock_responses/get_service_map_from_trace_ids_script_response_env_not_defined.json'; import { PromiseReturnType } from '../../../typings/common'; import { fetchServicePathsFromTraceIds } from './fetch_service_paths_from_trace_ids'; describe('getConnections', () => { - describe('if no filter is given', () => { + describe('if neither service name or environment is given', () => { it('includes all connections', () => { const response = serviceMapFromTraceIdsScriptResponse as PromiseReturnType< typeof fetchServicePathsFromTraceIds @@ -42,7 +43,13 @@ describe('getConnections', () => { (conn) => conn.source['service.environment'] === environment ) ).toBeTruthy(); - expect(connections).toMatchSnapshot(); + const serviceNames = new Set(); + connections.forEach((conn) => + serviceNames.add(conn.source['service.name']) + ); + ['opbeans-python', 'opbeans-node', 'opbeans-ruby'].forEach((name) => + expect(serviceNames.has(name)).toBeTruthy() + ); }); }); @@ -58,7 +65,13 @@ describe('getConnections', () => { serviceName ); - expect(connections).toMatchSnapshot(); + const serviceNames = new Set(); + connections.forEach((conn) => + serviceNames.add(conn.source['service.name']) + ); + ['opbeans-python', 'opbeans-node', 'opbeans-ruby'].forEach((name) => + expect(serviceNames.has(name)).toBeTruthy() + ); }); }); @@ -85,7 +98,7 @@ describe('getConnections', () => { describe('if environment is "not defined"', () => { it('excludes connections with source environment set', () => { - const response = serviceMapFromTraceIdsScriptResponse as PromiseReturnType< + const response = serviceMapFromTraceIdsScriptResponseEnvNotDefined as PromiseReturnType< typeof fetchServicePathsFromTraceIds >; const environment = 'ENVIRONMENT_NOT_DEFINED'; @@ -96,20 +109,14 @@ describe('getConnections', () => { environment ); - expect(connections).toMatchSnapshot(); - }); - }); + const environments = new Set(); - describe('if environment is "all" (missing)', () => { - it('includes both connections with and without source environment set', () => { - const response = serviceMapFromTraceIdsScriptResponse as PromiseReturnType< - typeof fetchServicePathsFromTraceIds - >; - const connections = getConnections( - response.aggregations?.service_map.value.paths + connections.forEach((conn) => + environments.add(conn.source['service.environment']) ); - - expect(connections).toMatchSnapshot(); + expect( + connections.some((conn) => conn.source['service.environment'] !== null) + ).toBeFalsy(); }); }); }); diff --git a/x-pack/plugins/apm/server/lib/service_map/mock_responses/get_service_map_from_trace_ids_script_response_env_not_defined.json b/x-pack/plugins/apm/server/lib/service_map/mock_responses/get_service_map_from_trace_ids_script_response_env_not_defined.json new file mode 100644 index 000000000000..9f830c5ca6f7 --- /dev/null +++ b/x-pack/plugins/apm/server/lib/service_map/mock_responses/get_service_map_from_trace_ids_script_response_env_not_defined.json @@ -0,0 +1,891 @@ +{ + "took": 135, + "timed_out": false, + "_shards": { + "total": 71, + "successful": 70, + "skipped": 0, + "failed": 0 + }, + "hits": { + "total": { + "value": 2324, + "relation": "eq" + }, + "max_score": null, + "hits": [] + }, + "aggregations": { + "service_map": { + "value": { + "paths": [ + [ + { + "service.environment": null, + "service.name": "elastic-co-frontend", + "agent.name": "rum-js" + }, + { + "span.subtype": "img", + "span.destination.service.resource": "info.elastic.co:443", + "span.type": "resource" + } + ], + [ + { + "service.environment": null, + "service.name": "elastic-co-frontend", + "agent.name": "rum-js" + }, + { + "span.subtype": "img", + "span.destination.service.resource": "www.google.no:443", + "span.type": "resource" + } + ], + [ + { + "service.environment": null, + "service.name": "elastic-co-frontend", + "agent.name": "rum-js" + }, + { + "span.subtype": "img", + "span.destination.service.resource": "www.facebook.com:443", + "span.type": "resource" + } + ], + [ + { + "service.environment": null, + "service.name": "elastic-co-frontend", + "agent.name": "rum-js" + }, + { + "span.subtype": "img", + "span.destination.service.resource": "www.google.com:443", + "span.type": "resource" + } + ], + [ + { + "service.environment": null, + "service.name": "elastic-co-frontend", + "agent.name": "rum-js" + }, + { + "span.subtype": "script", + "span.destination.service.resource": "googleads.g.doubleclick.net:443", + "span.type": "resource" + } + ], + [ + { + "service.environment": null, + "service.name": "elastic-co-frontend", + "agent.name": "rum-js" + }, + { + "span.subtype": "link", + "span.destination.service.resource": "use.typekit.net:443", + "span.type": "resource" + } + ], + [ + { + "service.environment": null, + "service.name": "elastic-co-frontend", + "agent.name": "rum-js" + }, + { + "span.subtype": "http", + "span.destination.service.resource": "813-mam-392.mktoresp.com:443", + "span.type": "external" + } + ], + [ + { + "service.environment": null, + "service.name": "elastic-co-frontend", + "agent.name": "rum-js" + }, + { + "span.subtype": "script", + "span.destination.service.resource": "px.airpr.com:443", + "span.type": "resource" + } + ], + [ + { + "service.environment": null, + "service.name": "elastic-co-frontend", + "agent.name": "rum-js" + }, + { + "span.subtype": "link", + "span.destination.service.resource": "fonts.googleapis.com:443", + "span.type": "resource" + } + ], + [ + { + "service.environment": null, + "service.name": "elastic-co-frontend", + "agent.name": "rum-js" + }, + { + "span.subtype": "css", + "span.destination.service.resource": "images.contentstack.io:443", + "span.type": "resource" + } + ], + [ + { + "service.environment": null, + "service.name": "elastic-co-frontend", + "agent.name": "rum-js" + }, + { + "span.subtype": "script", + "span.destination.service.resource": "platform.twitter.com:443", + "span.type": "resource" + } + ], + [ + { + "service.environment": null, + "service.name": "elastic-co-frontend", + "agent.name": "rum-js" + }, + { + "span.subtype": "browser-timing", + "span.destination.service.resource": "www.elastic.co:443", + "span.type": "hard-navigation" + } + ], + [ + { + "service.environment": null, + "service.name": "elastic-co-frontend", + "agent.name": "rum-js" + }, + { + "span.subtype": "beacon", + "span.destination.service.resource": "www.google.com:443", + "span.type": "resource" + } + ], + [ + { + "service.environment": null, + "service.name": "elastic-co-frontend", + "agent.name": "rum-js" + }, + { + "span.subtype": "script", + "span.destination.service.resource": "www.google-analytics.com:443", + "span.type": "resource" + } + ], + [ + { + "service.environment": null, + "service.name": "elastic-co-frontend", + "agent.name": "rum-js" + }, + { + "span.subtype": "script", + "span.destination.service.resource": "play.vidyard.com:443", + "span.type": "resource" + } + ], + [ + { + "service.environment": null, + "service.name": "elastic-co-frontend", + "agent.name": "rum-js" + }, + { + "span.subtype": "iframe", + "span.destination.service.resource": "a18132920325.cdn.optimizely.com:443", + "span.type": "resource" + } + ], + [ + { + "service.environment": null, + "service.name": "elastic-co-frontend", + "agent.name": "rum-js" + }, + { + "span.subtype": "script", + "span.destination.service.resource": "rtp-static.marketo.com:443", + "span.type": "resource" + } + ], + [ + { + "service.environment": null, + "service.name": "elastic-co-frontend", + "agent.name": "rum-js" + }, + { + "span.subtype": "img", + "span.destination.service.resource": "www.googletagmanager.com:443", + "span.type": "resource" + } + ], + [ + { + "service.environment": null, + "service.name": "elastic-co-frontend", + "agent.name": "rum-js" + }, + { + "span.subtype": "css", + "span.destination.service.resource": "p.typekit.net:443", + "span.type": "resource" + } + ], + [ + { + "service.environment": null, + "service.name": "elastic-co-frontend", + "agent.name": "rum-js" + }, + { + "span.subtype": "http", + "span.destination.service.resource": "www.elastic.co:443", + "span.type": "external" + } + ], + [ + { + "service.environment": null, + "service.name": "elastic-co-frontend", + "agent.name": "rum-js" + }, + { + "span.subtype": "script", + "span.destination.service.resource": "sjrtp2.marketo.com:443", + "span.type": "resource" + } + ], + [ + { + "service.environment": null, + "service.name": "elastic-co-frontend", + "agent.name": "rum-js" + }, + { + "span.subtype": "img", + "span.destination.service.resource": "www.google.rs:443", + "span.type": "resource" + } + ], + [ + { + "service.environment": null, + "service.name": "elastic-co-frontend", + "agent.name": "rum-js" + }, + { + "span.subtype": "link", + "span.destination.service.resource": "rtp-static.marketo.com:443", + "span.type": "resource" + } + ], + [ + { + "service.environment": null, + "service.name": "elastic-co-frontend", + "agent.name": "rum-js" + }, + { + "span.subtype": "script", + "span.destination.service.resource": "www.googleadservices.com:443", + "span.type": "resource" + } + ], + [ + { + "service.environment": null, + "service.name": "elastic-co-frontend", + "agent.name": "rum-js" + }, + { + "span.subtype": "script", + "span.destination.service.resource": "cdn.iubenda.com:443", + "span.type": "resource" + } + ], + [ + { + "service.environment": null, + "service.name": "elastic-co-frontend", + "agent.name": "rum-js" + }, + { + "span.subtype": "img", + "span.destination.service.resource": "static-www.elastic.co:443", + "span.type": "resource" + } + ], + [ + { + "service.environment": null, + "service.name": "elastic-co-frontend", + "agent.name": "rum-js" + }, + { + "span.subtype": "iframe", + "span.destination.service.resource": "platform.twitter.com:443", + "span.type": "resource" + } + ], + [ + { + "service.environment": null, + "service.name": "elastic-co-frontend", + "agent.name": "rum-js" + }, + { + "span.subtype": "http", + "span.destination.service.resource": "logx.optimizely.com:443", + "span.type": "external" + } + ], + [ + { + "service.environment": null, + "service.name": "elastic-co-frontend", + "agent.name": "rum-js" + }, + { + "span.subtype": "css", + "span.destination.service.resource": "www.elastic.co:443", + "span.type": "resource" + } + ], + [ + { + "service.environment": null, + "service.name": "elastic-co-frontend", + "agent.name": "rum-js" + }, + { + "span.subtype": "img", + "span.destination.service.resource": "www.google.com.au:443", + "span.type": "resource" + } + ], + [ + { + "service.environment": null, + "service.name": "elastic-co-frontend", + "agent.name": "rum-js" + }, + { + "span.subtype": "http", + "span.destination.service.resource": "hits-i.iubenda.com:443", + "span.type": "external" + } + ], + [ + { + "service.environment": null, + "service.name": "elastic-co-frontend", + "agent.name": "rum-js" + }, + { + "span.subtype": "script", + "span.destination.service.resource": "813-mam-392.mktoutil.com:443", + "span.type": "resource" + } + ], + [ + { + "service.environment": null, + "service.name": "elastic-co-frontend", + "agent.name": "rum-js" + }, + { + "span.subtype": "img", + "span.destination.service.resource": "api.contentstack.io:443", + "span.type": "resource" + } + ], + [ + { + "service.environment": null, + "service.name": "elastic-co-frontend", + "agent.name": "rum-js" + }, + { + "span.subtype": "img", + "span.destination.service.resource": "www.google.it:443", + "span.type": "resource" + } + ], + [ + { + "service.environment": null, + "service.name": "elastic-co-frontend", + "agent.name": "rum-js" + }, + { + "span.subtype": "iframe", + "span.destination.service.resource": "info.elastic.co:443", + "span.type": "resource" + } + ], + [ + { + "service.environment": null, + "service.name": "elastic-co-frontend", + "agent.name": "rum-js" + }, + { + "span.subtype": "link", + "span.destination.service.resource": "info.elastic.co:443", + "span.type": "resource" + } + ], + [ + { + "service.environment": null, + "service.name": "elastic-co-frontend", + "agent.name": "rum-js" + }, + { + "span.subtype": "script", + "span.destination.service.resource": "www.googletagmanager.com:443", + "span.type": "resource" + } + ], + [ + { + "service.environment": null, + "service.name": "elastic-co-frontend", + "agent.name": "rum-js" + }, + { + "span.subtype": "script", + "span.destination.service.resource": "cdn.optimizely.com:443", + "span.type": "resource" + } + ], + [ + { + "service.environment": null, + "service.name": "elastic-co-frontend", + "agent.name": "rum-js" + }, + { + "span.subtype": "script", + "span.destination.service.resource": "www.elastic.co:443", + "span.type": "resource" + } + ], + [ + { + "service.environment": null, + "service.name": "elastic-co-frontend", + "agent.name": "rum-js" + }, + { + "span.subtype": "xmlhttprequest", + "span.destination.service.resource": "logx.optimizely.com:443", + "span.type": "resource" + } + ], + [ + { + "service.environment": null, + "service.name": "elastic-co-frontend", + "agent.name": "rum-js" + }, + { + "span.subtype": "http", + "span.destination.service.resource": "x.clearbit.com:443", + "span.type": "external" + } + ], + [ + { + "service.environment": null, + "service.name": "elastic-co-frontend", + "agent.name": "rum-js" + }, + { + "span.subtype": "xmlhttprequest", + "span.destination.service.resource": "www.elastic.co:443", + "span.type": "resource" + } + ], + [ + { + "service.environment": null, + "service.name": "elastic-co-frontend", + "agent.name": "rum-js" + }, + { + "span.subtype": "script", + "span.destination.service.resource": "bat.bing.com:443", + "span.type": "resource" + } + ], + [ + { + "service.environment": null, + "service.name": "elastic-co-frontend", + "agent.name": "rum-js" + }, + { + "span.subtype": "script", + "span.destination.service.resource": "munchkin.marketo.net:443", + "span.type": "resource" + } + ], + [ + { + "service.environment": null, + "service.name": "elastic-co-frontend", + "agent.name": "rum-js" + }, + { + "span.subtype": "http", + "span.destination.service.resource": "errors.client.optimizely.com:443", + "span.type": "external" + } + ], + [ + { + "service.environment": null, + "service.name": "elastic-co-frontend", + "agent.name": "rum-js" + }, + { + "span.subtype": "iframe", + "span.destination.service.resource": "cdn.iubenda.com:443", + "span.type": "resource" + } + ], + [ + { + "service.environment": null, + "service.name": "elastic-co-frontend", + "agent.name": "rum-js" + }, + { + "span.subtype": "img", + "span.destination.service.resource": "images.contentstack.io:443", + "span.type": "resource" + } + ], + [ + { + "service.environment": null, + "service.name": "elastic-co-frontend", + "agent.name": "rum-js" + }, + { + "span.subtype": "http", + "span.destination.service.resource": "stats.g.doubleclick.net:443", + "span.type": "external" + } + ], + [ + { + "service.environment": null, + "service.name": "elastic-co-frontend", + "agent.name": "rum-js" + }, + { + "span.subtype": "http", + "span.destination.service.resource": "www.google-analytics.com:443", + "span.type": "external" + } + ], + [ + { + "service.environment": null, + "service.name": "elastic-co-frontend", + "agent.name": "rum-js" + }, + { + "span.subtype": "img", + "span.destination.service.resource": "www.google.fr:443", + "span.type": "resource" + } + ], + [ + { + "service.environment": null, + "service.name": "elastic-co-frontend", + "agent.name": "rum-js" + }, + { + "span.subtype": "script", + "span.destination.service.resource": "ga.clearbit.com:443", + "span.type": "resource" + } + ], + [ + { + "service.environment": null, + "service.name": "elastic-co-frontend", + "agent.name": "rum-js" + }, + { + "span.subtype": "http", + "span.destination.service.resource": "813-mam-392.mktoutil.com:443", + "span.type": "external" + } + ], + [ + { + "service.environment": null, + "service.name": "elastic-co-frontend", + "agent.name": "rum-js" + }, + { + "span.subtype": "script", + "span.destination.service.resource": "connect.facebook.net:443", + "span.type": "resource" + } + ], + [ + { + "service.environment": null, + "service.name": "elastic-co-frontend", + "agent.name": "rum-js" + }, + { + "span.subtype": "img", + "span.destination.service.resource": "www.google-analytics.com:443", + "span.type": "resource" + } + ], + [ + { + "service.environment": null, + "service.name": "elastic-co-frontend", + "agent.name": "rum-js" + }, + { + "span.subtype": "img", + "span.destination.service.resource": "dpx.airpr.com:443", + "span.type": "resource" + } + ], + [ + { + "service.environment": null, + "service.name": "elastic-co-frontend", + "agent.name": "rum-js" + }, + { + "span.subtype": "script", + "span.destination.service.resource": "sjrtp2-cdn.marketo.com:443", + "span.type": "resource" + } + ], + [ + { + "service.environment": null, + "service.name": "elastic-co-frontend", + "agent.name": "rum-js" + }, + { + "span.subtype": "css", + "span.destination.service.resource": "static-www.elastic.co:443", + "span.type": "resource" + } + ], + [ + { + "service.environment": null, + "service.name": "elastic-co-frontend", + "agent.name": "rum-js" + }, + { + "span.subtype": "img", + "span.destination.service.resource": "bat.bing.com:443", + "span.type": "resource" + } + ], + [ + { + "service.environment": null, + "service.name": "elastic-co-frontend", + "agent.name": "rum-js" + }, + { + "span.subtype": "http", + "span.destination.service.resource": "risk.clearbit.com:443", + "span.type": "external" + } + ], + [ + { + "service.environment": null, + "service.name": "elastic-co-frontend", + "agent.name": "rum-js" + }, + { + "span.subtype": "script", + "span.destination.service.resource": "js.clearbit.com:443", + "span.type": "resource" + } + ], + [ + { + "service.environment": null, + "service.name": "elastic-co-frontend", + "agent.name": "rum-js" + }, + { + "span.subtype": "img", + "span.destination.service.resource": "www.elastic.co:443", + "span.type": "resource" + } + ], + [ + { + "service.environment": null, + "service.name": "elastic-co-frontend", + "agent.name": "rum-js" + }, + { + "span.subtype": "img", + "span.destination.service.resource": "px.ads.linkedin.com:443", + "span.type": "resource" + } + ], + [ + { + "service.environment": null, + "service.name": "elastic-co-frontend", + "agent.name": "rum-js" + }, + { + "span.subtype": "iframe", + "span.destination.service.resource": "www.facebook.com:443", + "span.type": "resource" + } + ], + [ + { + "service.environment": null, + "service.name": "elastic-co-frontend", + "agent.name": "rum-js" + }, + { + "span.subtype": "http", + "span.destination.service.resource": "sjrtp2.marketo.com:443", + "span.type": "external" + } + ], + [ + { + "service.environment": null, + "service.name": "elastic-co-frontend", + "agent.name": "rum-js" + }, + { + "span.subtype": "script", + "span.destination.service.resource": "www.iubenda.com:443", + "span.type": "resource" + } + ], + [ + { + "service.environment": null, + "service.name": "elastic-co-frontend", + "agent.name": "rum-js" + }, + { + "span.subtype": "script", + "span.destination.service.resource": "info.elastic.co:443", + "span.type": "resource" + } + ], + [ + { + "service.environment": null, + "service.name": "elastic-co-frontend", + "agent.name": "rum-js" + }, + { + "span.subtype": "script", + "span.destination.service.resource": "risk.clearbit.com:443", + "span.type": "resource" + } + ], + [ + { + "service.environment": null, + "service.name": "elastic-co-frontend", + "agent.name": "rum-js" + }, + { + "span.subtype": "http", + "span.destination.service.resource": "rtp-static.marketo.com:443", + "span.type": "external" + } + ], + [ + { + "service.environment": null, + "service.name": "elastic-co-frontend", + "agent.name": "rum-js" + }, + { + "span.subtype": "img", + "span.destination.service.resource": "q.quora.com:443", + "span.type": "resource" + } + ], + [ + { + "service.environment": null, + "service.name": "elastic-co-frontend", + "agent.name": "rum-js" + }, + { + "span.subtype": "script", + "span.destination.service.resource": "snap.licdn.com:443", + "span.type": "resource" + } + ], + [ + { + "service.environment": null, + "service.name": "elastic-co-frontend", + "agent.name": "rum-js" + }, + { + "span.subtype": "xmlhttprequest", + "span.destination.service.resource": "errors.client.optimizely.com:443", + "span.type": "resource" + } + ], + [ + { + "service.environment": null, + "service.name": "elastic-co-frontend", + "agent.name": "rum-js" + }, + { + "span.subtype": "link", + "span.destination.service.resource": "www.elastic.co:443", + "span.type": "resource" + } + ] + ], + "discoveredServices": [] + } + } + } +}