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

pull/1485/head
Haotian Zhang 4 weeks ago committed by GitHub
parent 2a03c7b0a2
commit 971ed19e49
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -40,3 +40,4 @@
- [feat:support auth.](https://github.com/Tencent/spring-cloud-tencent/pull/1459)
- [feat:upgrade trace plugin.](https://github.com/Tencent/spring-cloud-tencent/pull/1470)
- [feat:support smooth upgrade from tsf.](https://github.com/Tencent/spring-cloud-tencent/pull/1474)
- [fix:fix caller disposable metadata handle when using tracing.](https://github.com/Tencent/spring-cloud-tencent/pull/1478)

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