Repository navigation
feat(gax): add observability logging flag - #9656
shivanee-p wants to merge 4 commits into
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.
…d checkLoggingEnabled
…nd constructSettings
…therArgs in constructSettings
36a8e1d to
5ee484f
Compare
|
Note: the error from the |
This adds an
enableTelemetryLoggingclient option to gax, alongside the existingenableTelemetryTracing. Logging is gated behind an 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_ENABLE_LOGGINGis true/1, or, if that env var is unset,enableTelemetryLogging: trueis set on the settings or on otherArgs.GOOGLE_SDK_NODE_ENABLE_LOGGINGalways overrides the client option when it is set.internalMethodName,enableTelemetryTracingandenableTelemetryLogging