Skip to content

fix: Add the rpc uri to the logs#679

Closed
Hectorhammett wants to merge 491 commits into
mainfrom
add-rpc-uri
Closed

fix: Add the rpc uri to the logs#679
Hectorhammett wants to merge 491 commits into
mainfrom
add-rpc-uri

Conversation

@Hectorhammett

Copy link
Copy Markdown
Contributor

bshaffer and others added 30 commits August 20, 2021 23:02
**TODO** 
- [x] Merge and tag googleapis/google-auth-library-php#341
- [x] Update minimum `google/auth` version in `composer.json` to the new tag ([v1.16.0](https://github.com/googleapis/google-auth-library-php/releases/tag/v1.16.0))
- [x] Add `'useJwtAccessWithScopes' => false` to `gapic-generator-php` for DIREGAPIC APIs (done in googleapis/gapic-generator-php#309)
- [x] Generate a new [Gapic Compute client](https://github.com/googleapis/google-cloud-php/tree/master/Compute) with the changes in googleapis/gapic-generator-php#309

_Note_: These steps are now optional because Compute does not need the exclusion for Self-Signed JWTs with Scopes

- [ ] Merge googleapis/google-cloud-php#4199
- [ ] Tag a new version of `google/cloud-compute`
- [ ] Merge _this PR_
- [ ] Tag a new version of _this library_ (`google/gax`)
- [ ] Update [Gapic Compute client](https://github.com/googleapis/google-cloud-php/tree/master/Compute) requires [the latest tag of google/gax](https://github.com/googleapis/google-cloud-php/blob/master/Compute/composer.json#L8)
 - Adds client option `clientCertSource` 
 - Adds support for client certs to all three transports
 - Verified calls to mTLS endpoint works locally

**Usage**

```php
use Google\Cloud\PubSub\V1\PublisherClient;

$projectId = 'YOUR_PROJECT_ID';
$pubsub = new PublisherClient([
    'apiEndpoint' => 'pubsub.mtls.googleapis.com',
    'clientCertSource' => function () { 
         return file_get_contents(__DIR__ . '/cert.pem');
    },
]);

$topics = $pubsub->listTopics('projects/' . $projectId);
```

**TODO**
 - [x] Add support for checking the existence and loading the default client cert (from `~/.secureConnect/context_aware_metadata.json`) (done in googleapis/google-auth-library-php#353)
 - [x] Add support for `GOOGLE_API_USE_MTLS_ENDPOINT` and `GOOGLE_API_USE_CLIENT_CERTIFICATE`
 - [x] Add support to automatically use mTLS endpoint for `apiEndpoint`
 - [x] Tests
* Removed references to GuzzleHttp/Psr7 deprecated methods and used the alternatives instead

* Bumped version for google/auth and guzzlehttp/psr7 to support 2.x branch for psr7
* feat: add REST server streaming support

* refactor & fix premature closing/cancelation

* refactor to Status

* set all fields of MockStatus in MockServerStreamingCall

* support streaming request exceptions

* check if index 0 exists in exception body

* skip newlines that break up items

* add more tests for weird streams

Co-authored-by: Lucas Michot <lmichot@gmail.com>
Co-authored-by: Brent Shaffer <betterbrent@google.com>
…essage (#354)

* feat: testing purposes

* updating ApiException

* updating REST transport

* update RPC status and tests

* update for RpcStatus and to return null instead of empty string

* refactor methods

* fix formatting

* changing null coalesce

* fix interceptor test

* interceptor test

* Revert "interceptor test"

This reverts commit e735996.

* Revert "fix interceptor test"

This reverts commit 4ac0c50.

* fix: convert RepeatedField metadata into array (#365)

* update tests and decodeMetadataErrorInfo fn

* update decodeMetadataErrorInfo

* update containsErrorInfo

* update php docs and tests

* refactor

* refactor methods

* add newline

Co-authored-by: Noah Dietz <noahdietz@users.noreply.github.com>
bshaffer and others added 26 commits January 22, 2026 10:55
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
@Hectorhammett
Hectorhammett requested a review from a team as a code owner June 9, 2026 22:56

@bshaffer bshaffer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is great! But it needs to be resubmitted to https://github.com/googleapis/google-cloud-php:

cd /path/to/google-cloud-php
SHA=472829f3d15ab78f7e1dfacfd128485e1ac5f48e
git -C /path/to/gax-php format-patch -1 $SHA --stdout | git apply --directory=Gax

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.

GAX: log gRPC endpoint and RPC being called in debug logging