Skip to content

Conversation

@surbhigarg92
Copy link
Contributor

This PR changes the logic to check if RPC has used DirectPath or not. Noe Alts Information will be used to check if DP is used instead of relying on IP address range

@product-auto-label product-auto-label bot added size: s Pull request size is small. api: spanner Issues related to the googleapis/java-spanner API. labels Nov 14, 2025
@surbhigarg92 surbhigarg92 marked this pull request as ready for review November 14, 2025 10:39
@surbhigarg92 surbhigarg92 requested review from a team as code owners November 14, 2025 10:39
@surbhigarg92 surbhigarg92 added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Nov 14, 2025
Boolean isDirectPathUsed =
isDirectPathUsed(getAttributes().get(Grpc.TRANSPORT_ATTR_REMOTE_ADDR));
// Check if the call uses DirectPath by inspecting the ALTS context.
boolean isDirectPathUsed = AltsContextUtil.check(call);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can call AltsContextUtil.check(getAttributes()). This will avoid storing clientcall object

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: spanner Issues related to the googleapis/java-spanner API. do not merge Indicates a pull request not ready for merge, due to either quality or timing. size: s Pull request size is small.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants