WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Conversation

@Hectorhammett
Copy link
Collaborator

This PR aims to add the logging feature to the Big Query handwritten library.

@product-auto-label product-auto-label bot added the api: bigquery Issues related to the BigQuery API. label Dec 8, 2025
@Hectorhammett Hectorhammett marked this pull request as ready for review December 16, 2025 18:39
@Hectorhammett Hectorhammett requested review from a team as code owners December 16, 2025 18:39
return new RequestWrapper($config);
}

private function getRetryListener(): callable
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we add a php doc explaining what this function does? e.g. "The retry listener will get called in {@see ClassName} on retry. We need to supply a custom listener so that the "retryAttempt" is (whatever happens to it) by (whatever does that thing)"

This would help me as well because I am confused by the retryAttempt option - it doesn't appear to be a header, and it doesn't seem to show up anywhere else. Is it just a "call option" that is only for logging purposes?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

You are correct, I think using the header terminology was the incorrect one. let me fix that.

It is literally just a call option for logging purposes that the retryMiddleware sets for the logging logic to have this value.

$logger->debug(
Argument::that(function (string $jsonString) use (&$retryHeaderAppeared) {
$jsonParsed = json_decode($jsonString, true);
if (isset($jsonParsed['jsonPayload']['retryAttempt'])) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I am confused because retryAttempt does not appear to be a header here, it's part of the JSON payload.

I assume that's ok, I am just confused by the wording of "header"

@bshaffer
Copy link
Contributor

Note: BigQuery/composer.json will need to have google/cloud-core updated to 1.70.0

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

Labels

api: bigquery Issues related to the BigQuery API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants