Repository navigation
feat(gax): add observability logging flag - #9656
Conversation
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces telemetry logging capabilities to the Google API Extensions (gax) library, controlled by the GOOGLE_SDK_NODE_EXPERIMENTAL_LOGGING and GOOGLE_SDK_NODE_ENABLE_LOGGING environment variables or the enableTelemetryLogging client option. It also renames existing tracing-related telemetry functions to distinguish them from the new logging features. Feedback on the changes highlights a critical issue in gax.ts where the parameter-shifting logic in constructSettings was not updated to handle the new enableTelemetryLogging and _legacyTelemetryInfo parameters when status is omitted, which will cause incorrect parameter mapping and test failures.
There was a problem hiding this comment.
Code Review
This pull request introduces telemetry logging capabilities to the GAX client, adding enableTelemetryLogging configuration options across client options, call settings, and environment variables. However, critical parameter mismatches were identified in both fallback.ts and grpc.ts when calling the imported constructSettings function. Because the apiName parameter was omitted, subsequent arguments like enableTelemetryTracing and enableTelemetryLogging are misaligned and mapped incorrectly.
36a8e1d to
5ee484f
Compare
|
Note: the error from the |
5ee484f to
1c09131
Compare
…d checkLoggingEnabled
…nd constructSettings
…therArgs in constructSettings
1c09131 to
144d435
Compare
🤖 I have created a release *beep* *boop* --- <details><summary>gapic-generator: 5.7.3</summary> ## [5.7.3](gapic-generator-v5.7.2...gapic-generator-v5.7.3) (2026-10-28) ### Bug Fixes * **core:** Log request/response payloads at DEBUG severity ([#9754](#9754)) ([bf46818](bf46818)) </details> <details><summary>google-gax: 6.14.0</summary> ## [6.14.0](google-gax-v6.13.0...google-gax-v6.14.0) (2026-10-28) ### Features * **gax:** Add observability logging flag ([#9656](#9656)) ([c0ab589](c0ab589)) ### Bug Fixes * **gax:** Suppress cancel destroy error in StreamArrayParser and add Bun certification matrix ([#9652](#9652)) ([a802909](a802909)) </details> <details><summary>gcp-metadata: 9.2.3</summary> ## [9.2.3](gcp-metadata-v9.2.2...gcp-metadata-v9.2.3) (2026-10-28) ### Bug Fixes * **core:** Log request/response payloads at DEBUG severity ([#9754](#9754)) ([bf46818](bf46818)) </details> <details><summary>google-auth-library: 11.3.2</summary> ## [11.3.2](google-auth-library-v11.3.1...google-auth-library-v11.3.2) (2026-10-28) ### Bug Fixes * **core:** Log request/response payloads at DEBUG severity ([#9754](#9754)) ([bf46818](bf46818)) * **google-auth-library:** Add credential deprecation and validation warnings ([#9720](#9720)) ([569678a](569678a)) </details> <details><summary>google-logging-utils: 2.1.1</summary> ## [2.1.1](google-logging-utils-v2.1.0...google-logging-utils-v2.1.1) (2026-10-28) ### Bug Fixes * **core:** Log request/response payloads at DEBUG severity ([#9754](#9754)) ([bf46818](bf46818)) * **logging-utils:** Export LogSeverity as value and treat 'true' as '*' alias ([#9718](#9718)) ([e8da4f0](e8da4f0)) </details> <details><summary>gapic-tools: 2.2.1</summary> ## [2.2.1](gapic-tools-v2.2.0...gapic-tools-v2.2.1) (2026-10-28) ### Bug Fixes * **gapic-tools:** Strip JS method bodies before pbts and parallelize minification ([#9737](#9737)) ([c7884b8](c7884b8)) </details> <details><summary>test-utils: 0.4.0</summary> ## [0.4.0](test-utils-v0.3.1...test-utils-v0.4.0) (2026-10-28) ### Features * **test-utils:** Add createProxyquire and proxyquire helper ([#9759](#9759)) ([763d1bd](763d1bd)) </details> <details><summary>bigtable: 7.5.1</summary> ## [7.5.1](bigtable-v7.5.0...bigtable-v7.5.1) (2026-10-28) ### Bug Fixes * **bigtable:** Use ReadonlyMap for EncodedKeyMap implements clause ([#9709](#9709)) ([f803bff](f803bff)) </details> <details><summary>pubsub: 6.3.2</summary> ## [6.3.2](pubsub-v6.3.1...pubsub-v6.3.2) (2026-10-28) ### Bug Fixes * **pubsub:** Reuse GoogleAuth instance and deprecate credential options ([#9721](#9721)) ([4c4ba34](4c4ba34)) </details> <details><summary>datamanager: 1.5.0</summary> ## [1.5.0](datamanager-v1.4.0...datamanager-v1.5.0) (2026-10-28) ### Features * **datamanager:** Update release_level to stable in .repo-metadata.json ([#9725](#9725)) ([6eb9340](6eb9340)), refs [#9685](#9685) </details> <details><summary>observability: 0.1.0</summary> ## 0.1.0 (2026-10-28) ### Features * **google/cloud/observability/v1:** Onboard a new library ([#9689](#9689)) ([5e53e2e](5e53e2e)) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
This adds an
enableTelemetryLoggingclient option to gax, alongside the existingenableTelemetryTracing. Logging is gated behind an existing node logging experimental env var, and the resolved tracing and logging flags are passed to each call throughCallSettings.otherArgsKey Changes
checkLoggingEnabled(settings?). Logging is enabled only when:GOOGLE_SDK_NODE_EXPERIMENTAL_LOGGINGis true/1, andGOOGLE_SDK_NODE_LOGGINGis true/1, or, if that env var is unset,enableTelemetryLogging: trueis set on the settings or on otherArgs.GOOGLE_SDK_NODE_LOGGINGalways overrides the client option when it is set.internalMethodName,enableTelemetryTracingandenableTelemetryLogging