diff --git a/x-pack/plugins/searchprofiler/public/application/components/profile_tree/init_data.ts b/x-pack/plugins/searchprofiler/public/application/components/profile_tree/init_data.ts index af24a8936c915..1a29e77f74e89 100644 --- a/x-pack/plugins/searchprofiler/public/application/components/profile_tree/init_data.ts +++ b/x-pack/plugins/searchprofiler/public/application/components/profile_tree/init_data.ts @@ -24,6 +24,9 @@ export function mutateAggsTimesTree(shard: Shard) { } for (const agg of shard.aggregations!) { initTree([agg], shardTime); + // To make this data structure consistent with that of search we + // mark each aggregation as it's own tree root. + agg.treeRoot = agg; } shard.time = shardTime; }