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 954086ee53084..2ea8605789acc 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 @@ -13,6 +13,7 @@ import { AGENT_NAME, AGENT_VERSION, AT_TIMESTAMP, + ERROR_CULPRIT, ERROR_EXCEPTION, ERROR_GROUP_ID, ERROR_ID, @@ -82,6 +83,7 @@ export async function getErrorSampleDetails({ SPAN_ID, AGENT_VERSION, PROCESSOR_NAME, + ERROR_CULPRIT, ERROR_STACK_TRACE, ERROR_EXC_MESSAGE, ERROR_EXC_HANDLED, 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 c1ae372335824..1db1e4388a197 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 @@ -59,7 +59,11 @@ export async function generateData({ .transaction({ transactionName: transaction.name }) .errors( serviceGoProdInstance - .error({ message: `Error ${index}`, type: transaction.name }) + .error({ + message: `Error ${index}`, + type: transaction.name, + culprit: `Error culprit ${index}`, + }) .timestamp(timestamp) ) .duration(1000) 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 6e5a19327c24f..f50f762c5c075 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 @@ -134,6 +134,10 @@ export default function ApiTest({ getService }: DeploymentAgnosticFtrProviderCon 'Error 1' ); }); + + it('displays correct error culprit info', () => { + expect(errorSampleDetailsResponse.error.error.culprit).to.equal('Error culprit 1'); + }); }); });