From ac3e1f1e8efbe6b6cb68f8281ad282a9cb3d7612 Mon Sep 17 00:00:00 2001 From: Colton Myers Date: Mon, 11 Dec 2023 12:02:08 -0700 Subject: [PATCH] [Telemetry] Add opentelemetry/android as a valid APM agent name (#172898) ## Summary The `opentelemetry/android` agent was released in September. This PR adds it to our telemetry collection. ### For maintainers - [ ] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) --- .../kbn-apm-synthtrace-client/src/types/agent_names.ts | 1 + packages/kbn-elastic-agent-utils/src/agent_names.ts | 2 ++ .../apm/common/__snapshots__/apm_telemetry.test.ts.snap | 6 ++++++ x-pack/plugins/apm/server/lib/apm_telemetry/schema.ts | 7 +++++++ .../telemetry_collection_xpack/schema/xpack_plugins.json | 6 ++++++ 5 files changed, 22 insertions(+) diff --git a/packages/kbn-apm-synthtrace-client/src/types/agent_names.ts b/packages/kbn-apm-synthtrace-client/src/types/agent_names.ts index d9e3a371e0e87..c57b15e3dace0 100644 --- a/packages/kbn-apm-synthtrace-client/src/types/agent_names.ts +++ b/packages/kbn-apm-synthtrace-client/src/types/agent_names.ts @@ -31,6 +31,7 @@ type OpenTelemetryAgentName = | 'opentelemetry/python' | 'opentelemetry/ruby' | 'opentelemetry/swift' + | 'opentelemetry/android' | 'opentelemetry/webjs'; // Unable to reference AgentName from '@kbn/apm-plugin/typings/es_schemas/ui/fields/agent' due to circular reference diff --git a/packages/kbn-elastic-agent-utils/src/agent_names.ts b/packages/kbn-elastic-agent-utils/src/agent_names.ts index f29160699a241..ca98b64024f8a 100644 --- a/packages/kbn-elastic-agent-utils/src/agent_names.ts +++ b/packages/kbn-elastic-agent-utils/src/agent_names.ts @@ -49,6 +49,7 @@ export type OpenTelemetryAgentName = | 'opentelemetry/ruby' | 'opentelemetry/rust' | 'opentelemetry/swift' + | 'opentelemetry/android' | 'opentelemetry/webjs'; export const OPEN_TELEMETRY_AGENT_NAMES: OpenTelemetryAgentName[] = [ 'otlp', @@ -63,6 +64,7 @@ export const OPEN_TELEMETRY_AGENT_NAMES: OpenTelemetryAgentName[] = [ 'opentelemetry/ruby', 'opentelemetry/rust', 'opentelemetry/swift', + 'opentelemetry/android', 'opentelemetry/webjs', ]; diff --git a/x-pack/plugins/apm/common/__snapshots__/apm_telemetry.test.ts.snap b/x-pack/plugins/apm/common/__snapshots__/apm_telemetry.test.ts.snap index 79ecdc077ea6f..a372355d1db7c 100644 --- a/x-pack/plugins/apm/common/__snapshots__/apm_telemetry.test.ts.snap +++ b/x-pack/plugins/apm/common/__snapshots__/apm_telemetry.test.ts.snap @@ -151,6 +151,12 @@ exports[`APM telemetry helpers getApmTelemetry generates a JSON object with the "description": "Total number of services utilizing the opentelemetry/swift agent within the last day" } }, + "opentelemetry/android": { + "type": "long", + "_meta": { + "description": "Total number of services utilizing the opentelemetry/android agent within the last day" + } + }, "opentelemetry/webjs": { "type": "long", "_meta": { diff --git a/x-pack/plugins/apm/server/lib/apm_telemetry/schema.ts b/x-pack/plugins/apm/server/lib/apm_telemetry/schema.ts index e52be12ca5c36..33a95f246f86b 100644 --- a/x-pack/plugins/apm/server/lib/apm_telemetry/schema.ts +++ b/x-pack/plugins/apm/server/lib/apm_telemetry/schema.ts @@ -373,6 +373,13 @@ const apmPerAgentSchema: Pick< 'Total number of services utilizing the opentelemetry/swift agent within the last day', }, }, + 'opentelemetry/android': { + type: 'long', + _meta: { + description: + 'Total number of services utilizing the opentelemetry/android agent within the last day', + }, + }, 'opentelemetry/webjs': { type: 'long', _meta: { diff --git a/x-pack/plugins/telemetry_collection_xpack/schema/xpack_plugins.json b/x-pack/plugins/telemetry_collection_xpack/schema/xpack_plugins.json index 777d78acb192f..a7098dae6a150 100644 --- a/x-pack/plugins/telemetry_collection_xpack/schema/xpack_plugins.json +++ b/x-pack/plugins/telemetry_collection_xpack/schema/xpack_plugins.json @@ -2865,6 +2865,12 @@ "description": "Total number of services utilizing the opentelemetry/swift agent within the last day" } }, + "opentelemetry/android": { + "type": "long", + "_meta": { + "description": "Total number of services utilizing the opentelemetry/android agent within the last day" + } + }, "opentelemetry/webjs": { "type": "long", "_meta": {