fix:fix caller disposable metadata handle when using tracing.

pull/1476/head
Haotian Zhang 10 months ago
parent fe8b9272ff
commit 715d6de6b0

@ -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)

@ -166,9 +166,11 @@ public final class MetadataContextHolder {
}
// caller disposable metadata to caller custom disposable metadata
MetadataContainer metadataContainerDownstream = metadataManager.getMetadataContainer(MetadataType.CUSTOM, false);
MetadataContainer callerCustomMetadataContainer = metadataManager.getMetadataContainer(MetadataType.CUSTOM, true);
if (!CollectionUtils.isEmpty(dynamicDisposableMetadata)) {
for (Map.Entry<String, String> 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

Loading…
Cancel
Save