From 480f3c6bd781becfd876f09afdc0b88c1c1a2d90 Mon Sep 17 00:00:00 2001 From: Lev Popov Date: Thu, 28 Nov 2019 12:20:03 +0100 Subject: [PATCH] sort span tags in alphabetical order Signed-off-by: Lev Popov --- packages/jaeger-ui/src/model/transform-trace-data.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/jaeger-ui/src/model/transform-trace-data.tsx b/packages/jaeger-ui/src/model/transform-trace-data.tsx index 46eeb83c3d..9078860464 100644 --- a/packages/jaeger-ui/src/model/transform-trace-data.tsx +++ b/packages/jaeger-ui/src/model/transform-trace-data.tsx @@ -109,6 +109,7 @@ export default function transformTraceData(data: TraceData & { spans: SpanData[] span.tags = span.tags || []; span.references = span.references || []; const tagsInfo = deduplicateTags(span.tags); + tagsInfo.tags.sort(function(a, b){return a.key.localeCompare(b.key)}) span.tags = tagsInfo.tags; span.warnings = span.warnings.concat(tagsInfo.warnings); span.references.forEach(ref => {