Skip to content

chore(x-goog-spanner-request-id): commit foundation #3643

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Feb 18, 2025

Conversation

odeke-em
Copy link
Contributor

This change adds in the bases to bring in the functionality for the "x-goog-spanner-request-id" that'll be used for debugging without the limits of trace continuity and sampling.

Updates #3537

@odeke-em odeke-em requested review from a team as code owners February 12, 2025 15:59
@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: spanner Issues related to the googleapis/java-spanner API. labels Feb 12, 2025
@odeke-em odeke-em force-pushed the x-goog-request-id-bases branch from 5183b3c to 5f27364 Compare February 12, 2025 16:09
@odeke-em
Copy link
Contributor Author

@sakthivelmanii thanks for the first round of comments! I've addressed them, please take a look and also kindly help me run the bots.

@odeke-em odeke-em force-pushed the x-goog-request-id-bases branch from 643f345 to bb9fdcf Compare February 12, 2025 16:39
@sakthivelmanii
Copy link
Collaborator

@odeke-em mark this PR as chore. feat creates a new minor version. This change really does nothing. In upcoming PRs where you are using this class, you can define it as feat.

@odeke-em
Copy link
Contributor Author

thank you @sakthivelmanii I didn't know that about automatically creating releases: today I learnt!

@odeke-em odeke-em changed the title feat(x-goog-spanner-request-id): commit foundation chore(x-goog-spanner-request-id): commit foundation Feb 13, 2025
@odeke-em odeke-em force-pushed the x-goog-request-id-bases branch 2 times, most recently from 85ab665 to 8bd366d Compare February 14, 2025 15:59
@odeke-em odeke-em requested a review from olavloite February 14, 2025 16:01
@odeke-em
Copy link
Contributor Author

@sakthivelmanii @olavloite thanks for the reviews, please take another round.

@odeke-em odeke-em force-pushed the x-goog-request-id-bases branch from ccda785 to c084579 Compare February 15, 2025 23:35
@rahul2393 rahul2393 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Feb 16, 2025
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Feb 16, 2025
@RunWith(JUnit4.class)
public class XGoogSpannerRequestIdTest {
private static final Pattern REGEX_RAND_PROCESS_ID =
Pattern.compile("1.([0-9a-z]{16})(\\.\\d+){3}\\.(\\d+)$");
Copy link
Collaborator

Choose a reason for hiding this comment

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

The process ID should be a 32-bit unsigned number, so length 8 in hex format:

Suggested change
Pattern.compile("1.([0-9a-z]{16})(\\.\\d+){3}\\.(\\d+)$");
Pattern.compile("1.([0-9a-z]{8})(\\.\\d+){3}\\.(\\d+)$");

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@olavloite we had a long discussion with Simil and team in the same group that you are, about why it should be 64-bits due to higher collisions if it were 32-bits per https://orijtech.notion.site/x-goog-spanner-request-id-always-on-gRPC-header-to-aid-in-quick-debugging-of-errors-14aba6bc91348091a58fca7a505c9827#14aba6bc9134807f9f17d3ef58e26128

@odeke-em odeke-em requested a review from olavloite February 16, 2025 14:11
@olavloite olavloite added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Feb 16, 2025
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Feb 16, 2025
This change adds in the bases to bring in the functionality
for the "x-goog-spanner-request-id" that'll be used for debugging
without the limits of trace continuity and sampling.

Updates googleapis#3537

Address code review comments
@odeke-em odeke-em force-pushed the x-goog-request-id-bases branch from 0a14334 to 331e06e Compare February 17, 2025 14:45
@olavloite olavloite added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Feb 17, 2025
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Feb 17, 2025
@olavloite olavloite merged commit d0f7850 into googleapis:main Feb 18, 2025
31 of 33 checks passed
@suztomo suztomo mentioned this pull request Mar 20, 2025
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. size: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants