From 7ecb58a5f7f1f85d4af5ddca522931748f616a10 Mon Sep 17 00:00:00 2001 From: Carlos Crespo Date: Sat, 19 Oct 2024 01:16:36 +0200 Subject: [PATCH] [APM][Otel]Fix get_error_group_main_statistics making trace.id optional field (#196822) fixes [196821](https://github.com/elastic/kibana/issues/196821) ## Summary `trace.id` should've been sent as an optional field to the `get_error_group_main_statistics` query. This PR fixes that image ## How to test - Run the opentelemetry demo: https://github.com/elastic/opentelemetry-demo/tree/rca_ingress_obs - Navigate to Application > Services - Open the service details for loadgenerator (cherry picked from commit a36fa1151b4af7ecd1565bf2b67fad20835b8209) --- .../get_error_groups/get_error_group_main_statistics.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/x-pack/plugins/observability_solution/apm/server/routes/errors/get_error_groups/get_error_group_main_statistics.ts b/x-pack/plugins/observability_solution/apm/server/routes/errors/get_error_groups/get_error_group_main_statistics.ts index 3d6fa0f5a5ef6..8f201efbe6549 100644 --- a/x-pack/plugins/observability_solution/apm/server/routes/errors/get_error_groups/get_error_group_main_statistics.ts +++ b/x-pack/plugins/observability_solution/apm/server/routes/errors/get_error_groups/get_error_group_main_statistics.ts @@ -97,14 +97,10 @@ export async function getErrorGroupMainStatistics({ ] : []; - const requiredFields = asMutableArray([ - TRACE_ID, - AT_TIMESTAMP, - ERROR_GROUP_ID, - ERROR_ID, - ] as const); + const requiredFields = asMutableArray([AT_TIMESTAMP, ERROR_GROUP_ID, ERROR_ID] as const); const optionalFields = asMutableArray([ + TRACE_ID, ERROR_CULPRIT, ERROR_LOG_MESSAGE, ERROR_EXC_MESSAGE,