Skip to content

Commit

Permalink
fix:fix caller disposable metadata handle when using tracing. (#1483)
Browse files Browse the repository at this point in the history
  • Loading branch information
SkyeBeFreeman authored Dec 10, 2024
1 parent 6992011 commit f59e820
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,4 @@
- [feat:support auth.](https://github.com/Tencent/spring-cloud-tencent/pull/1479)
- [feat:upgrade trace plugin.](https://github.com/Tencent/spring-cloud-tencent/pull/1480)
- [feat:support smooth upgrade from tsf.](https://github.com/Tencent/spring-cloud-tencent/pull/1482)
- [fix:fix caller disposable metadata handle when using tracing.](https://github.com/Tencent/spring-cloud-tencent/pull/1483)
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,11 @@ public static void init(Map<String, String> dynamicTransitiveMetadata, Map<Strin
}
// 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
Expand Down

0 comments on commit f59e820

Please sign in to comment.