From 8341bfb24b9c29bd3adf3b9a58a74743a6ff4cb7 Mon Sep 17 00:00:00 2001 From: Yuri Shkuro Date: Thu, 12 May 2016 19:52:50 -0400 Subject: [PATCH] Display service name for endpoint in Binary Annotations --- zipkin-ui/js/component_ui/traceToMustache.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/zipkin-ui/js/component_ui/traceToMustache.js b/zipkin-ui/js/component_ui/traceToMustache.js index f9aeb038d24..a5a3f13cb2f 100644 --- a/zipkin-ui/js/component_ui/traceToMustache.js +++ b/zipkin-ui/js/component_ui/traceToMustache.js @@ -79,7 +79,10 @@ function toSpanDepths(spans) { return treeDepths(entry, 1); } -export function formatEndpoint({ipv4, port = 0}) { +export function formatEndpoint({ipv4, port = 0, serviceName = ''}) { + if (serviceName) { + return `${ipv4}:${port} (${serviceName})`; + } return `${ipv4}:${port}`; }