obelix74 commented on code in PR #3414:
URL: https://github.com/apache/polaris/pull/3414#discussion_r2683331927
##########
polaris-core/src/main/java/org/apache/polaris/core/storage/CredentialVendingContext.java:
##########
@@ -67,6 +70,19 @@ public interface CredentialVendingContext {
*/
Optional<String> activatedRoles();
+ /**
+ * The OpenTelemetry trace ID for end-to-end correlation. This enables
correlation between
+ * credential vending (CloudTrail), catalog operations (Polaris events), and
metrics reports from
+ * compute engines.
+ *
+ * <p>This field is marked as {@link Value.Auxiliary} to exclude it from
{@code equals()} and
+ * {@code hashCode()} methods. This is critical for cache key comparison -
including trace ID
+ * would prevent cache hits since every request has a unique trace ID. The
trace ID is for
+ * correlation/audit purposes only and should not affect credential caching
behavior.
+ */
+ @Value.Auxiliary
+ Optional<String> traceId();
Review Comment:
I added the feature flag. I have updated the code for cache correctness vs.
efficiency trade-off by including trace IDs in cache keys only when they affect
the vended credentials. I hope that addresses your questions. @snazy @dimas-b
please let me know if I am on the right track.
--
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]