fix:fix caller disposable metadata handle when using tracing. (#1476)

pull/1486/head
Haotian Zhang 9 months ago committed by GitHub
parent fe8b9272ff
commit c99dc08715
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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