From 715d6de6b0ac28b9bc9dbe02b54bc15aa10c71a4 Mon Sep 17 00:00:00 2001 From: Haotian Zhang <928016560@qq.com> Date: Mon, 9 Dec 2024 20:18:59 +0800 Subject: [PATCH] fix:fix caller disposable metadata handle when using tracing. --- CHANGELOG.md | 1 + .../tencent/cloud/common/metadata/MetadataContextHolder.java | 2 ++ 2 files changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c4bef12c..42939268a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,3 +39,4 @@ - [feat:support auth.](https://github.com/Tencent/spring-cloud-tencent/pull/1460) - [feat:upgrade trace plugin.](https://github.com/Tencent/spring-cloud-tencent/pull/1468) - [feat:support smooth upgrade from tsf.](https://github.com/Tencent/spring-cloud-tencent/pull/1472) +- [fix:fix caller disposable metadata handle when using tracing.](https://github.com/Tencent/spring-cloud-tencent/pull/1476) diff --git a/spring-cloud-tencent-commons/src/main/java/com/tencent/cloud/common/metadata/MetadataContextHolder.java b/spring-cloud-tencent-commons/src/main/java/com/tencent/cloud/common/metadata/MetadataContextHolder.java index d3a27fcea..f09a12685 100644 --- a/spring-cloud-tencent-commons/src/main/java/com/tencent/cloud/common/metadata/MetadataContextHolder.java +++ b/spring-cloud-tencent-commons/src/main/java/com/tencent/cloud/common/metadata/MetadataContextHolder.java @@ -166,9 +166,11 @@ public static void init(Map dynamicTransitiveMetadata, Map entry : dynamicDisposableMetadata.entrySet()) { metadataContainerDownstream.putMetadataStringValue(entry.getKey(), entry.getValue(), TransitiveType.NONE); + callerCustomMetadataContainer.putMetadataStringValue(entry.getKey(), entry.getValue(), TransitiveType.DISPOSABLE); } } // caller application metadata to caller application disposable metadata