Skip to content

feat(gax): accept clientOptions in createApiCall for telemetry tracing - #9176

Open
shivanee-p wants to merge 1 commit into
mainfrom
shivaneep-o11y-client-options
Open

feat(gax): accept clientOptions in createApiCall for telemetry tracing#9176
shivanee-p wants to merge 1 commit into
mainfrom
shivaneep-o11y-client-options

Conversation

@shivanee-p

@shivanee-p shivanee-p commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Adds clientOptions support and telemetry gating logic to createApiCall in google-gax to support OpenTelemetry tracing.

  • Defined StaticTraceContext and added enableTelemetryTracing?: boolean and internalTelemetryInfo?: StaticTraceContext to ClientOptions.
  • Accepted clientOptions in createApiCall and added conditional gating checking enableTelemetryTracing, internalTelemetryInfo, and GOOGLE_SDK_NODE_EXPERIMENTAL_O11Y_ENABLED.
  • Updated test helpers to forward clientOptions and added unit tests for tracing enablement.

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request introduces telemetry tracing options to ClientOptions and integrates them into createApiCall to determine if tracing is enabled. Key feedback includes explicitly checking if the GOOGLE_SDK_NODE_EXPERIMENTAL_O11Y_ENABLED environment variable equals 'true' to avoid false positives with other string values. Additionally, the console.log statements used for debugging tracing status should be removed to prevent polluting the standard output of consuming applications, and the corresponding unit tests that spy on these logs should be cleaned up.

Comment thread core/packages/gax/src/createApiCall.ts Outdated
Comment thread core/packages/gax/src/createApiCall.ts Outdated
Comment thread core/packages/gax/test/unit/apiCallable.ts
@shivanee-p
shivanee-p force-pushed the shivaneep-o11y-client-options branch 2 times, most recently from f45d91d to ae7b3a3 Compare August 19, 2026 23:56
@shivanee-p
shivanee-p marked this pull request as ready for review August 19, 2026 23:57
@shivanee-p
shivanee-p requested a review from a team as a code owner August 19, 2026 23:57

@westarle westarle 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.

I think we should consider CallSettings carefully. I would take the change to

Comment thread core/packages/gax/src/clientInterface.ts
Comment thread core/packages/gax/src/clientInterface.ts
Comment thread core/packages/gax/src/createApiCall.ts Outdated
Comment thread core/packages/gax/src/createApiCall.ts Outdated
Comment thread core/packages/gax/src/createApiCall.ts Outdated
Comment thread core/packages/gax/src/clientInterface.ts
@shivanee-p
shivanee-p force-pushed the shivaneep-o11y-client-options branch 2 times, most recently from cef268a to 39ae92a Compare August 20, 2026 22:46
@shivanee-p
shivanee-p requested a review from westarle August 20, 2026 22:49
@shivanee-p
shivanee-p force-pushed the shivaneep-o11y-client-options branch 2 times, most recently from db0e16d to 1858ae8 Compare August 21, 2026 18:46
@shivanee-p
shivanee-p force-pushed the shivaneep-o11y-client-options branch from a6454bc to 8baf444 Compare August 21, 2026 21:34
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.

2 participants