diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/errors/get_error_groups/get_error_sample_details.ts b/x-pack/solutions/observability/plugins/apm/server/routes/errors/get_error_groups/get_error_sample_details.ts index 2ea8605789acc..074a4115d875b 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/errors/get_error_groups/get_error_sample_details.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/errors/get_error_groups/get_error_sample_details.ts @@ -28,6 +28,7 @@ import { TRANSACTION_ID, ERROR_STACK_TRACE, SPAN_ID, + SERVICE_LANGUAGE_NAME, } from '../../../../common/es_fields/apm'; import { environmentQuery } from '../../../../common/utils/environment_query'; import { ApmDocumentType } from '../../../../common/document_type'; @@ -83,6 +84,7 @@ export async function getErrorSampleDetails({ SPAN_ID, AGENT_VERSION, PROCESSOR_NAME, + SERVICE_LANGUAGE_NAME, ERROR_CULPRIT, ERROR_STACK_TRACE, ERROR_EXC_MESSAGE, diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/mobile/errors/generate_data.ts b/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/mobile/errors/generate_data.ts index 1db1e4388a197..8f31c9d1e3f5a 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/mobile/errors/generate_data.ts +++ b/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/mobile/errors/generate_data.ts @@ -33,6 +33,9 @@ export async function generateData({ }) { const serviceGoProdInstance = apm .service({ name: serviceName, environment: 'production', agentName: 'swift' }) + .defaults({ + 'service.language.name': 'swift', + }) .instance('instance-a'); const interval = '1m'; diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/mobile/errors/group_id_samples.spec.ts b/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/mobile/errors/group_id_samples.spec.ts index f50f762c5c075..d569b3380a8c5 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/mobile/errors/group_id_samples.spec.ts +++ b/x-pack/test/api_integration/deployment_agnostic/apis/observability/apm/mobile/errors/group_id_samples.spec.ts @@ -138,6 +138,10 @@ export default function ApiTest({ getService }: DeploymentAgnosticFtrProviderCon it('displays correct error culprit info', () => { expect(errorSampleDetailsResponse.error.error.culprit).to.equal('Error culprit 1'); }); + + it('displays correct language name', () => { + expect(errorSampleDetailsResponse.error.service.language?.name).to.equal('swift'); + }); }); });