From 78d4e3d727f8ca4a2df09b53fa2e8d08157b171b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=93=D0=B0=D0=BD=D0=B5=D0=B5=D0=B2=20=D0=A0=D0=B0=D1=84?= =?UTF-8?q?=D0=B8=D1=81?= Date: Mon, 23 Jan 2023 15:58:17 +0300 Subject: [PATCH] Do not overwrite client if incoming request has "uber-trace-id" header --- .../spring/cloud/gateway/TraceRequestHttpHeadersFilter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instrument-starters/opentracing-spring-cloud-gateway-starter/src/main/java/io/opentracing/contrib/spring/cloud/gateway/TraceRequestHttpHeadersFilter.java b/instrument-starters/opentracing-spring-cloud-gateway-starter/src/main/java/io/opentracing/contrib/spring/cloud/gateway/TraceRequestHttpHeadersFilter.java index 19e0ebe5..23e2d71f 100644 --- a/instrument-starters/opentracing-spring-cloud-gateway-starter/src/main/java/io/opentracing/contrib/spring/cloud/gateway/TraceRequestHttpHeadersFilter.java +++ b/instrument-starters/opentracing-spring-cloud-gateway-starter/src/main/java/io/opentracing/contrib/spring/cloud/gateway/TraceRequestHttpHeadersFilter.java @@ -86,7 +86,7 @@ private void addHeadersWithInput(ServerHttpRequest.Builder builder, .entrySet()) { String key = entry.getKey(); List value = entry.getValue(); - headersWithInput.put(key, value); + headersWithInput.putIfAbsent(key, value); } }