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

pull/1487/head
Haotian Zhang 9 months ago committed by GitHub
parent c3af5b994f
commit 052f6cdc10
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -37,3 +37,4 @@
- [fix:fix auth not effected bug.](https://github.com/Tencent/spring-cloud-tencent/pull/1465)
- [feat:upgrade trace plugin.](https://github.com/Tencent/spring-cloud-tencent/pull/1469)
- [feat:support smooth upgrade from tsf.](https://github.com/Tencent/spring-cloud-tencent/pull/1473)
- [fix:fix caller disposable metadata handle when using tracing.](https://github.com/Tencent/spring-cloud-tencent/pull/1477)

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