Skip to content
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

feat: add logging to the supported transports #585

Merged
merged 61 commits into from
Dec 11, 2024
Merged

feat: add logging to the supported transports #585

merged 61 commits into from
Dec 11, 2024

Conversation

Hectorhammett
Copy link
Contributor

related: googleapis/google-auth-library-php#578

Adds logging capabilities to the Gapic Clients by adding logging into the supported transports (Http, Grpc and GrpcFallback).

@Hectorhammett Hectorhammett requested review from a team as code owners September 11, 2024 21:40
@bshaffer bshaffer changed the title Feat: Add logging to the supported transports feat: add logging to the supported transports Sep 11, 2024
@Hectorhammett Hectorhammett added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Sep 12, 2024
composer.json Outdated Show resolved Hide resolved
Copy link
Contributor

@bshaffer bshaffer left a comment

Choose a reason for hiding this comment

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

A few things I've observed when debugging this:

  1. As we are logging the response code separately, it should go before the rest of the response log
  2. We do NOT want to log all the client confiugration we are currently logging (see this example). We should only log the configuration supplied by the developer
  3. The order of the logs ideally would match the order of the requests being made. Right now, the request to the services is logged first, followed by the auth request. In reality, the auth request is made first. If this is really hard to implement, the way we have it is okay, but it's worth considering.

src/BidiStream.php Outdated Show resolved Hide resolved
src/ClientOptionsTrait.php Outdated Show resolved Hide resolved
composer.json Outdated Show resolved Hide resolved
src/BidiStream.php Outdated Show resolved Hide resolved
src/BidiStream.php Outdated Show resolved Hide resolved
src/ClientOptionsTrait.php Outdated Show resolved Hide resolved
src/Transport/RestTransport.php Outdated Show resolved Hide resolved
src/Transport/HttpUnaryTransportTrait.php Outdated Show resolved Hide resolved
tests/Unit/Middleware/RetryMiddlewareTest.php Outdated Show resolved Hide resolved
tests/Unit/Middleware/RetryMiddlewareTest.php Outdated Show resolved Hide resolved
tests/Unit/Transport/GrpcTransportTest.php Outdated Show resolved Hide resolved
@Hectorhammett Hectorhammett removed the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Dec 11, 2024
@bshaffer bshaffer merged commit 819a677 into main Dec 11, 2024
14 checks passed
@bshaffer bshaffer deleted the logging branch December 11, 2024 02:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants