diff --git a/public/components/trace_analytics/components/common/helper_functions.tsx b/public/components/trace_analytics/components/common/helper_functions.tsx index 9ff79dcb0..f74864ce5 100644 --- a/public/components/trace_analytics/components/common/helper_functions.tsx +++ b/public/components/trace_analytics/components/common/helper_functions.tsx @@ -214,8 +214,11 @@ export function getServiceMapGraph( idSelected: 'latency' | 'error_rate' | 'throughput', ticks: number[], currService?: string, + relatedServices?: string[], filterByCurrService?: boolean ) { + if (!relatedServices) relatedServices = Object.keys(map); + const nodes = Object.keys(map).map((service) => { const value = map[service][idSelected]; let styleOptions; diff --git a/public/components/trace_analytics/components/common/plots/service_map.tsx b/public/components/trace_analytics/components/common/plots/service_map.tsx index 087ad38ae..f75f1e840 100644 --- a/public/components/trace_analytics/components/common/plots/service_map.tsx +++ b/public/components/trace_analytics/components/common/plots/service_map.tsx @@ -301,6 +301,7 @@ export function ServiceMap({ idSelected, ticks, undefined, + undefined, false // Show the entire graph without filtering ) ); @@ -314,6 +315,7 @@ export function ServiceMap({ idSelected, ticks, service, + serviceMap[service]?.relatedServices, true // Enable filtering to focus on connected nodes ); setItems(filteredGraph);