diff --git a/x-pack/solutions/observability/plugins/apm/server/lib/connections/get_connection_stats/index.ts b/x-pack/solutions/observability/plugins/apm/server/lib/connections/get_connection_stats/index.ts index ad0eb8b9ab95c..82e8dd5d1d950 100644 --- a/x-pack/solutions/observability/plugins/apm/server/lib/connections/get_connection_stats/index.ts +++ b/x-pack/solutions/observability/plugins/apm/server/lib/connections/get_connection_stats/index.ts @@ -72,7 +72,7 @@ export function getConnectionStats({ const { stats: statsA, ...itemA } = a; const { stats: statsB, ...itemB } = b; - return merge({}, itemA, itemB, { stats: statsA.concat(statsB) }); + return { ...merge({}, itemA, itemB), stats: statsA.concat(statsB) }; }); const statsItems = statsJoinedById.map((item) => {