feat(o11y): let callers enable tracing with env var - #9377
Open
shivanee-p wants to merge 1 commit into
Open
shivanee-p wants to merge 1 commit into
shivanee-p wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces support for the GOOGLE_SDK_NODE_ENABLE_TRACING environment variable, allowing users to globally enable or disable telemetry tracing. This environment variable overrides the enableTelemetryTracing client option. The changes include updates to the generator templates, client interface documentation, utility functions, and unit tests. Feedback suggests checking if process is defined before accessing process.env to prevent potential ReferenceError exceptions in non-Node environments like browsers or edge runtimes.
shivanee-p
force-pushed
the
shivaneep-o11y-client-enabling
branch
2 times, most recently
from
September 18, 2026 18:27
1241b27 to
a7dace8
Compare
…ACING Tracing could only be switched on from code, by passing enableTelemetryTracing in clientOptions, so collecting traces meant editing and redeploying the application. Read GOOGLE_SDK_NODE_ENABLE_TRACING in checkTelemetryEnabled and let it win over the client option whenever it is set, so tracing can be turned on or off per process. An absent or empty value leaves the client option in charge, and GOOGLE_SDK_NODE_EXPERIMENTAL_O11Y_ENABLED is still required while the feature is experimental.
shivanee-p
force-pushed
the
shivaneep-o11y-client-enabling
branch
from
September 18, 2026 20:51
a7dace8 to
7eae8b8
Compare
shivanee-p
marked this pull request as ready for review
September 18, 2026 20:51
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tracing could only be switched on from code, by passing enableTelemetryTracing in clientOptions, so collecting traces meant editing and redeploying the application.
Read GOOGLE_SDK_NODE_ENABLE_TRACING in checkTelemetryEnabled and let it win over the client option whenever it is set, so tracing can be turned on or off per process. An absent or empty value leaves the client option in charge, and GOOGLE_SDK_NODE_EXPERIMENTAL_O11Y_ENABLED is still required while the feature is experimental.