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 9f7a911bf21c7..ccd5f143440da 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 @@ -505,600 +505,6 @@ exports[`APM telemetry helpers getApmTelemetry generates a JSON object with the } } } - }, - "otlp": { - "properties": { - "agent": { - "properties": { - "version": { - "type": "keyword" - } - } - }, - "service": { - "properties": { - "framework": { - "properties": { - "name": { - "type": "keyword" - }, - "version": { - "type": "keyword" - }, - "composite": { - "type": "keyword" - } - } - }, - "language": { - "properties": { - "name": { - "type": "keyword" - }, - "version": { - "type": "keyword" - }, - "composite": { - "type": "keyword" - } - } - }, - "runtime": { - "properties": { - "name": { - "type": "keyword" - }, - "version": { - "type": "keyword" - }, - "composite": { - "type": "keyword" - } - } - } - } - } - } - }, - "opentelemetry/cpp": { - "properties": { - "agent": { - "properties": { - "version": { - "type": "keyword" - } - } - }, - "service": { - "properties": { - "framework": { - "properties": { - "name": { - "type": "keyword" - }, - "version": { - "type": "keyword" - }, - "composite": { - "type": "keyword" - } - } - }, - "language": { - "properties": { - "name": { - "type": "keyword" - }, - "version": { - "type": "keyword" - }, - "composite": { - "type": "keyword" - } - } - }, - "runtime": { - "properties": { - "name": { - "type": "keyword" - }, - "version": { - "type": "keyword" - }, - "composite": { - "type": "keyword" - } - } - } - } - } - } - }, - "opentelemetry/dotnet": { - "properties": { - "agent": { - "properties": { - "version": { - "type": "keyword" - } - } - }, - "service": { - "properties": { - "framework": { - "properties": { - "name": { - "type": "keyword" - }, - "version": { - "type": "keyword" - }, - "composite": { - "type": "keyword" - } - } - }, - "language": { - "properties": { - "name": { - "type": "keyword" - }, - "version": { - "type": "keyword" - }, - "composite": { - "type": "keyword" - } - } - }, - "runtime": { - "properties": { - "name": { - "type": "keyword" - }, - "version": { - "type": "keyword" - }, - "composite": { - "type": "keyword" - } - } - } - } - } - } - }, - "opentelemetry/erlang": { - "properties": { - "agent": { - "properties": { - "version": { - "type": "keyword" - } - } - }, - "service": { - "properties": { - "framework": { - "properties": { - "name": { - "type": "keyword" - }, - "version": { - "type": "keyword" - }, - "composite": { - "type": "keyword" - } - } - }, - "language": { - "properties": { - "name": { - "type": "keyword" - }, - "version": { - "type": "keyword" - }, - "composite": { - "type": "keyword" - } - } - }, - "runtime": { - "properties": { - "name": { - "type": "keyword" - }, - "version": { - "type": "keyword" - }, - "composite": { - "type": "keyword" - } - } - } - } - } - } - }, - "opentelemetry/go": { - "properties": { - "agent": { - "properties": { - "version": { - "type": "keyword" - } - } - }, - "service": { - "properties": { - "framework": { - "properties": { - "name": { - "type": "keyword" - }, - "version": { - "type": "keyword" - }, - "composite": { - "type": "keyword" - } - } - }, - "language": { - "properties": { - "name": { - "type": "keyword" - }, - "version": { - "type": "keyword" - }, - "composite": { - "type": "keyword" - } - } - }, - "runtime": { - "properties": { - "name": { - "type": "keyword" - }, - "version": { - "type": "keyword" - }, - "composite": { - "type": "keyword" - } - } - } - } - } - } - }, - "opentelemetry/java": { - "properties": { - "agent": { - "properties": { - "version": { - "type": "keyword" - } - } - }, - "service": { - "properties": { - "framework": { - "properties": { - "name": { - "type": "keyword" - }, - "version": { - "type": "keyword" - }, - "composite": { - "type": "keyword" - } - } - }, - "language": { - "properties": { - "name": { - "type": "keyword" - }, - "version": { - "type": "keyword" - }, - "composite": { - "type": "keyword" - } - } - }, - "runtime": { - "properties": { - "name": { - "type": "keyword" - }, - "version": { - "type": "keyword" - }, - "composite": { - "type": "keyword" - } - } - } - } - } - } - }, - "opentelemetry/nodejs": { - "properties": { - "agent": { - "properties": { - "version": { - "type": "keyword" - } - } - }, - "service": { - "properties": { - "framework": { - "properties": { - "name": { - "type": "keyword" - }, - "version": { - "type": "keyword" - }, - "composite": { - "type": "keyword" - } - } - }, - "language": { - "properties": { - "name": { - "type": "keyword" - }, - "version": { - "type": "keyword" - }, - "composite": { - "type": "keyword" - } - } - }, - "runtime": { - "properties": { - "name": { - "type": "keyword" - }, - "version": { - "type": "keyword" - }, - "composite": { - "type": "keyword" - } - } - } - } - } - } - }, - "opentelemetry/php": { - "properties": { - "agent": { - "properties": { - "version": { - "type": "keyword" - } - } - }, - "service": { - "properties": { - "framework": { - "properties": { - "name": { - "type": "keyword" - }, - "version": { - "type": "keyword" - }, - "composite": { - "type": "keyword" - } - } - }, - "language": { - "properties": { - "name": { - "type": "keyword" - }, - "version": { - "type": "keyword" - }, - "composite": { - "type": "keyword" - } - } - }, - "runtime": { - "properties": { - "name": { - "type": "keyword" - }, - "version": { - "type": "keyword" - }, - "composite": { - "type": "keyword" - } - } - } - } - } - } - }, - "opentelemetry/python": { - "properties": { - "agent": { - "properties": { - "version": { - "type": "keyword" - } - } - }, - "service": { - "properties": { - "framework": { - "properties": { - "name": { - "type": "keyword" - }, - "version": { - "type": "keyword" - }, - "composite": { - "type": "keyword" - } - } - }, - "language": { - "properties": { - "name": { - "type": "keyword" - }, - "version": { - "type": "keyword" - }, - "composite": { - "type": "keyword" - } - } - }, - "runtime": { - "properties": { - "name": { - "type": "keyword" - }, - "version": { - "type": "keyword" - }, - "composite": { - "type": "keyword" - } - } - } - } - } - } - }, - "opentelemetry/ruby": { - "properties": { - "agent": { - "properties": { - "version": { - "type": "keyword" - } - } - }, - "service": { - "properties": { - "framework": { - "properties": { - "name": { - "type": "keyword" - }, - "version": { - "type": "keyword" - }, - "composite": { - "type": "keyword" - } - } - }, - "language": { - "properties": { - "name": { - "type": "keyword" - }, - "version": { - "type": "keyword" - }, - "composite": { - "type": "keyword" - } - } - }, - "runtime": { - "properties": { - "name": { - "type": "keyword" - }, - "version": { - "type": "keyword" - }, - "composite": { - "type": "keyword" - } - } - } - } - } - } - }, - "opentelemetry/webjs": { - "properties": { - "agent": { - "properties": { - "version": { - "type": "keyword" - } - } - }, - "service": { - "properties": { - "framework": { - "properties": { - "name": { - "type": "keyword" - }, - "version": { - "type": "keyword" - }, - "composite": { - "type": "keyword" - } - } - }, - "language": { - "properties": { - "name": { - "type": "keyword" - }, - "version": { - "type": "keyword" - }, - "composite": { - "type": "keyword" - } - } - }, - "runtime": { - "properties": { - "name": { - "type": "keyword" - }, - "version": { - "type": "keyword" - }, - "composite": { - "type": "keyword" - } - } - } - } - } - } } } }, 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 4bbda9add0fdb..ba2f7617c5108 100644 --- a/x-pack/plugins/apm/server/lib/apm_telemetry/schema.ts +++ b/x-pack/plugins/apm/server/lib/apm_telemetry/schema.ts @@ -12,7 +12,7 @@ import { TimeframeMap1d, TimeframeMapAll, } from './types'; -import { AgentName } from '../../../typings/es_schemas/ui/fields/agent'; +import { ElasticAgentName } from '../../../typings/es_schemas/ui/fields/agent'; const long: { type: 'long' } = { type: 'long' }; @@ -34,7 +34,7 @@ const timeframeMapSchema: MakeSchemaFrom = { ...timeframeMapAllSchema, }; -const agentSchema: MakeSchemaFrom['agents'][AgentName] = { +const agentSchema: MakeSchemaFrom['agents'][ElasticAgentName] = { agent: { version: { type: 'array', items: { type: 'keyword' } }, }, @@ -101,17 +101,6 @@ const apmPerAgentSchema: Pick< python: agentSchema, ruby: agentSchema, 'rum-js': agentSchema, - otlp: agentSchema, - 'opentelemetry/cpp': agentSchema, - 'opentelemetry/dotnet': agentSchema, - 'opentelemetry/erlang': agentSchema, - 'opentelemetry/go': agentSchema, - 'opentelemetry/java': agentSchema, - 'opentelemetry/nodejs': agentSchema, - 'opentelemetry/php': agentSchema, - 'opentelemetry/python': agentSchema, - 'opentelemetry/ruby': agentSchema, - 'opentelemetry/webjs': agentSchema, }, }; diff --git a/x-pack/plugins/apm/server/lib/apm_telemetry/types.ts b/x-pack/plugins/apm/server/lib/apm_telemetry/types.ts index 7ed79752b43c4..5d0f3172a4806 100644 --- a/x-pack/plugins/apm/server/lib/apm_telemetry/types.ts +++ b/x-pack/plugins/apm/server/lib/apm_telemetry/types.ts @@ -5,7 +5,10 @@ */ import { DeepPartial } from 'utility-types'; -import { AgentName } from '../../../typings/es_schemas/ui/fields/agent'; +import { + AgentName, + ElasticAgentName, +} from '../../../typings/es_schemas/ui/fields/agent'; export interface TimeframeMap { '1d': number; @@ -86,7 +89,7 @@ export interface APMUsage { }; }; agents: Record< - AgentName, + ElasticAgentName, { agent: { version: string[]; diff --git a/x-pack/plugins/apm/typings/es_schemas/ui/fields/agent.ts b/x-pack/plugins/apm/typings/es_schemas/ui/fields/agent.ts index b5f3ae834d5e2..608f8ff49ce5a 100644 --- a/x-pack/plugins/apm/typings/es_schemas/ui/fields/agent.ts +++ b/x-pack/plugins/apm/typings/es_schemas/ui/fields/agent.ts @@ -4,11 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -/* - * Support additional agent types by appending definitions in mappings.json - * (for telemetry) and the AgentName type. - */ -export type AgentName = +export type ElasticAgentName = | 'go' | 'java' | 'js-base' @@ -16,7 +12,9 @@ export type AgentName = | 'nodejs' | 'python' | 'dotnet' - | 'ruby' + | 'ruby'; + +export type OpenTelemetryAgentName = | 'otlp' | 'opentelemetry/cpp' | 'opentelemetry/dotnet' @@ -29,6 +27,12 @@ export type AgentName = | 'opentelemetry/ruby' | 'opentelemetry/webjs'; +/* + * Support additional agent types by appending definitions in mappings.json + * (for telemetry) and the AgentName type. + */ +export type AgentName = ElasticAgentName | OpenTelemetryAgentName; + export interface Agent { ephemeral_id?: string; name: AgentName; 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 478c7e42a0c16..396a06205eaa9 100644 --- a/x-pack/plugins/telemetry_collection_xpack/schema/xpack_plugins.json +++ b/x-pack/plugins/telemetry_collection_xpack/schema/xpack_plugins.json @@ -1006,930 +1006,6 @@ } } } - }, - "otlp": { - "properties": { - "agent": { - "properties": { - "version": { - "type": "array", - "items": { - "type": "keyword" - } - } - } - }, - "service": { - "properties": { - "framework": { - "properties": { - "name": { - "type": "array", - "items": { - "type": "keyword" - } - }, - "version": { - "type": "array", - "items": { - "type": "keyword" - } - }, - "composite": { - "type": "array", - "items": { - "type": "keyword" - } - } - } - }, - "language": { - "properties": { - "name": { - "type": "array", - "items": { - "type": "keyword" - } - }, - "version": { - "type": "array", - "items": { - "type": "keyword" - } - }, - "composite": { - "type": "array", - "items": { - "type": "keyword" - } - } - } - }, - "runtime": { - "properties": { - "name": { - "type": "array", - "items": { - "type": "keyword" - } - }, - "version": { - "type": "array", - "items": { - "type": "keyword" - } - }, - "composite": { - "type": "array", - "items": { - "type": "keyword" - } - } - } - } - } - } - } - }, - "opentelemetry/cpp": { - "properties": { - "agent": { - "properties": { - "version": { - "type": "array", - "items": { - "type": "keyword" - } - } - } - }, - "service": { - "properties": { - "framework": { - "properties": { - "name": { - "type": "array", - "items": { - "type": "keyword" - } - }, - "version": { - "type": "array", - "items": { - "type": "keyword" - } - }, - "composite": { - "type": "array", - "items": { - "type": "keyword" - } - } - } - }, - "language": { - "properties": { - "name": { - "type": "array", - "items": { - "type": "keyword" - } - }, - "version": { - "type": "array", - "items": { - "type": "keyword" - } - }, - "composite": { - "type": "array", - "items": { - "type": "keyword" - } - } - } - }, - "runtime": { - "properties": { - "name": { - "type": "array", - "items": { - "type": "keyword" - } - }, - "version": { - "type": "array", - "items": { - "type": "keyword" - } - }, - "composite": { - "type": "array", - "items": { - "type": "keyword" - } - } - } - } - } - } - } - }, - "opentelemetry/dotnet": { - "properties": { - "agent": { - "properties": { - "version": { - "type": "array", - "items": { - "type": "keyword" - } - } - } - }, - "service": { - "properties": { - "framework": { - "properties": { - "name": { - "type": "array", - "items": { - "type": "keyword" - } - }, - "version": { - "type": "array", - "items": { - "type": "keyword" - } - }, - "composite": { - "type": "array", - "items": { - "type": "keyword" - } - } - } - }, - "language": { - "properties": { - "name": { - "type": "array", - "items": { - "type": "keyword" - } - }, - "version": { - "type": "array", - "items": { - "type": "keyword" - } - }, - "composite": { - "type": "array", - "items": { - "type": "keyword" - } - } - } - }, - "runtime": { - "properties": { - "name": { - "type": "array", - "items": { - "type": "keyword" - } - }, - "version": { - "type": "array", - "items": { - "type": "keyword" - } - }, - "composite": { - "type": "array", - "items": { - "type": "keyword" - } - } - } - } - } - } - } - }, - "opentelemetry/erlang": { - "properties": { - "agent": { - "properties": { - "version": { - "type": "array", - "items": { - "type": "keyword" - } - } - } - }, - "service": { - "properties": { - "framework": { - "properties": { - "name": { - "type": "array", - "items": { - "type": "keyword" - } - }, - "version": { - "type": "array", - "items": { - "type": "keyword" - } - }, - "composite": { - "type": "array", - "items": { - "type": "keyword" - } - } - } - }, - "language": { - "properties": { - "name": { - "type": "array", - "items": { - "type": "keyword" - } - }, - "version": { - "type": "array", - "items": { - "type": "keyword" - } - }, - "composite": { - "type": "array", - "items": { - "type": "keyword" - } - } - } - }, - "runtime": { - "properties": { - "name": { - "type": "array", - "items": { - "type": "keyword" - } - }, - "version": { - "type": "array", - "items": { - "type": "keyword" - } - }, - "composite": { - "type": "array", - "items": { - "type": "keyword" - } - } - } - } - } - } - } - }, - "opentelemetry/go": { - "properties": { - "agent": { - "properties": { - "version": { - "type": "array", - "items": { - "type": "keyword" - } - } - } - }, - "service": { - "properties": { - "framework": { - "properties": { - "name": { - "type": "array", - "items": { - "type": "keyword" - } - }, - "version": { - "type": "array", - "items": { - "type": "keyword" - } - }, - "composite": { - "type": "array", - "items": { - "type": "keyword" - } - } - } - }, - "language": { - "properties": { - "name": { - "type": "array", - "items": { - "type": "keyword" - } - }, - "version": { - "type": "array", - "items": { - "type": "keyword" - } - }, - "composite": { - "type": "array", - "items": { - "type": "keyword" - } - } - } - }, - "runtime": { - "properties": { - "name": { - "type": "array", - "items": { - "type": "keyword" - } - }, - "version": { - "type": "array", - "items": { - "type": "keyword" - } - }, - "composite": { - "type": "array", - "items": { - "type": "keyword" - } - } - } - } - } - } - } - }, - "opentelemetry/java": { - "properties": { - "agent": { - "properties": { - "version": { - "type": "array", - "items": { - "type": "keyword" - } - } - } - }, - "service": { - "properties": { - "framework": { - "properties": { - "name": { - "type": "array", - "items": { - "type": "keyword" - } - }, - "version": { - "type": "array", - "items": { - "type": "keyword" - } - }, - "composite": { - "type": "array", - "items": { - "type": "keyword" - } - } - } - }, - "language": { - "properties": { - "name": { - "type": "array", - "items": { - "type": "keyword" - } - }, - "version": { - "type": "array", - "items": { - "type": "keyword" - } - }, - "composite": { - "type": "array", - "items": { - "type": "keyword" - } - } - } - }, - "runtime": { - "properties": { - "name": { - "type": "array", - "items": { - "type": "keyword" - } - }, - "version": { - "type": "array", - "items": { - "type": "keyword" - } - }, - "composite": { - "type": "array", - "items": { - "type": "keyword" - } - } - } - } - } - } - } - }, - "opentelemetry/nodejs": { - "properties": { - "agent": { - "properties": { - "version": { - "type": "array", - "items": { - "type": "keyword" - } - } - } - }, - "service": { - "properties": { - "framework": { - "properties": { - "name": { - "type": "array", - "items": { - "type": "keyword" - } - }, - "version": { - "type": "array", - "items": { - "type": "keyword" - } - }, - "composite": { - "type": "array", - "items": { - "type": "keyword" - } - } - } - }, - "language": { - "properties": { - "name": { - "type": "array", - "items": { - "type": "keyword" - } - }, - "version": { - "type": "array", - "items": { - "type": "keyword" - } - }, - "composite": { - "type": "array", - "items": { - "type": "keyword" - } - } - } - }, - "runtime": { - "properties": { - "name": { - "type": "array", - "items": { - "type": "keyword" - } - }, - "version": { - "type": "array", - "items": { - "type": "keyword" - } - }, - "composite": { - "type": "array", - "items": { - "type": "keyword" - } - } - } - } - } - } - } - }, - "opentelemetry/php": { - "properties": { - "agent": { - "properties": { - "version": { - "type": "array", - "items": { - "type": "keyword" - } - } - } - }, - "service": { - "properties": { - "framework": { - "properties": { - "name": { - "type": "array", - "items": { - "type": "keyword" - } - }, - "version": { - "type": "array", - "items": { - "type": "keyword" - } - }, - "composite": { - "type": "array", - "items": { - "type": "keyword" - } - } - } - }, - "language": { - "properties": { - "name": { - "type": "array", - "items": { - "type": "keyword" - } - }, - "version": { - "type": "array", - "items": { - "type": "keyword" - } - }, - "composite": { - "type": "array", - "items": { - "type": "keyword" - } - } - } - }, - "runtime": { - "properties": { - "name": { - "type": "array", - "items": { - "type": "keyword" - } - }, - "version": { - "type": "array", - "items": { - "type": "keyword" - } - }, - "composite": { - "type": "array", - "items": { - "type": "keyword" - } - } - } - } - } - } - } - }, - "opentelemetry/python": { - "properties": { - "agent": { - "properties": { - "version": { - "type": "array", - "items": { - "type": "keyword" - } - } - } - }, - "service": { - "properties": { - "framework": { - "properties": { - "name": { - "type": "array", - "items": { - "type": "keyword" - } - }, - "version": { - "type": "array", - "items": { - "type": "keyword" - } - }, - "composite": { - "type": "array", - "items": { - "type": "keyword" - } - } - } - }, - "language": { - "properties": { - "name": { - "type": "array", - "items": { - "type": "keyword" - } - }, - "version": { - "type": "array", - "items": { - "type": "keyword" - } - }, - "composite": { - "type": "array", - "items": { - "type": "keyword" - } - } - } - }, - "runtime": { - "properties": { - "name": { - "type": "array", - "items": { - "type": "keyword" - } - }, - "version": { - "type": "array", - "items": { - "type": "keyword" - } - }, - "composite": { - "type": "array", - "items": { - "type": "keyword" - } - } - } - } - } - } - } - }, - "opentelemetry/ruby": { - "properties": { - "agent": { - "properties": { - "version": { - "type": "array", - "items": { - "type": "keyword" - } - } - } - }, - "service": { - "properties": { - "framework": { - "properties": { - "name": { - "type": "array", - "items": { - "type": "keyword" - } - }, - "version": { - "type": "array", - "items": { - "type": "keyword" - } - }, - "composite": { - "type": "array", - "items": { - "type": "keyword" - } - } - } - }, - "language": { - "properties": { - "name": { - "type": "array", - "items": { - "type": "keyword" - } - }, - "version": { - "type": "array", - "items": { - "type": "keyword" - } - }, - "composite": { - "type": "array", - "items": { - "type": "keyword" - } - } - } - }, - "runtime": { - "properties": { - "name": { - "type": "array", - "items": { - "type": "keyword" - } - }, - "version": { - "type": "array", - "items": { - "type": "keyword" - } - }, - "composite": { - "type": "array", - "items": { - "type": "keyword" - } - } - } - } - } - } - } - }, - "opentelemetry/webjs": { - "properties": { - "agent": { - "properties": { - "version": { - "type": "array", - "items": { - "type": "keyword" - } - } - } - }, - "service": { - "properties": { - "framework": { - "properties": { - "name": { - "type": "array", - "items": { - "type": "keyword" - } - }, - "version": { - "type": "array", - "items": { - "type": "keyword" - } - }, - "composite": { - "type": "array", - "items": { - "type": "keyword" - } - } - } - }, - "language": { - "properties": { - "name": { - "type": "array", - "items": { - "type": "keyword" - } - }, - "version": { - "type": "array", - "items": { - "type": "keyword" - } - }, - "composite": { - "type": "array", - "items": { - "type": "keyword" - } - } - } - }, - "runtime": { - "properties": { - "name": { - "type": "array", - "items": { - "type": "keyword" - } - }, - "version": { - "type": "array", - "items": { - "type": "keyword" - } - }, - "composite": { - "type": "array", - "items": { - "type": "keyword" - } - } - } - } - } - } - } } } },