obelix74 commented on code in PR #3414:
URL: https://github.com/apache/polaris/pull/3414#discussion_r2683064078
##########
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:
Hi @snazy , the properties should be stored and accessible, that is the goal
so they can be correlated. The key is they are not used for caching.
```
Attributes annotated with @Value.Auxiliary will be stored and will be
accessible, but are excluded from equals, hashCode and toString method
implementations."
```
https://github.com/immutables/immutables/blob/master/value-annotations/src/org/immutables/value/Value.java
The trace ID is still stored and accessible for propagation to AWS STS
session tags, but that is the goal of this PR.
--
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]