obelix74 commented on code in PR #3414:
URL: https://github.com/apache/polaris/pull/3414#discussion_r2683507533


##########
polaris-core/src/main/java/org/apache/polaris/core/storage/aws/AwsSessionTagsBuilder.java:
##########
@@ -78,6 +99,17 @@ public static List<Tag> buildSessionTags(String 
principalName, CredentialVending
             
.value(truncateTagValue(context.tableName().orElse(TAG_VALUE_UNKNOWN)))
             .build());
 
+    // Only include trace ID if explicitly enabled
+    // When disabled, this allows credential caching to work effectively since 
trace IDs
+    // are unique per request and would otherwise prevent any cache hits
+    if (includeTraceId) {
+      tags.add(
+          Tag.builder()
+              .key(CredentialVendingContext.TAG_KEY_TRACE_ID)
+              
.value(truncateTagValue(context.traceId().orElse(TAG_VALUE_UNKNOWN)))

Review Comment:
   Good point — I refactored this so we don’t thread a boolean down into 
AwsSessionTagsBuilder anymore. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to