Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

GAX: Debug Logging improvements

Open
#9,255 0 comments 0 reactions 1 assignee View on GitHub

@Hectorhammett is already working on this.

Since Dec 11, 2024.

Assessment

This issue has not been assessed yet.

Description

A few things to keep track of for improving Debug Logging for next year:

  • Remove logging of client configuration when OperationsClient is created by GAPIC clients (this is a tricky issue that will require some consideration)
  • Create a standalone logging library (e.g. StructuredLoggingEvent or something similar) based on https://cloud.google.com/logging/docs/structured-logging
  • Test the logging in GrpcFallbackTransport
  • Consider logging Response Status Code ONLY when logger level is set to INFO
  • Add back readonly to RpcLogEvent::$timestamp and RpcLogEvent::$milliseconds once we drop support for PHP 8.0
  • Add a static method to get the requestId instead of repeating "crc32((string) spl_object_id($request) . getmypid())" every time.
    • NOTE: There are some places which use the requestID, like RestTransport, which do not implement LoggingTrait, and so if we wanted one place for it to be generated, we would need a static method somewhere instead. Could be a private method like LoggingTrait::getRequestId, or a public static method such as RpcLogEvent::getRequestId($request).
  • Verify what types of requests/responses ClientStream/BidiStream can accept and potentially tighten the typing and/or log them (right now it only logs requests of type Message)
  • Look into why REST JSON responses contain newlines (might be in Guzzle), and if we can strip them.
Dominant language
PHP
Stars
1.2k
Forks
464
Avg merge
2d 2h
Merged PRs (30d)
103

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from googleapis/google-cloud-php

All issues in googleapis/google-cloud-php

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.