dimas-b commented on code in PR #3414:
URL: https://github.com/apache/polaris/pull/3414#discussion_r2683262014
##########
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:
> [...] does this not make sure traceId is omitted from the cache?
Any parameters that affect the vended credential must be part of the cache
key for the sake of correctness.
Please also consider @snazy 's comment.
--
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]