Skip to content

feat(docs): add o11y sample - #9456

Open
shivanee-p wants to merge 4 commits into
mainfrom
shivaneep-o11y-sample
Open

shivanee-p wants to merge 4 commits into
mainfrom
shivaneep-o11y-sample

Conversation

@shivanee-p

Copy link
Copy Markdown
Contributor

Adds a standalone code sample demonstrating how customers can configure OpenTelemetry tracing for Google Cloud Node.js client libraries using google-gax.

The sample demonstrates enabling:

  • T4 Tracing (Wire / Transport Spans): Using @opentelemetry/instrumentation-http and @opentelemetry/instrumentation-grpc to capture low-level network calls.
  • T3 Tracing (Client / RPC Spans): Using the GOOGLE_SDK_NODE_ENABLE_TRACING=true environment variable to capture google-gax RPC attempt spans.

@product-auto-label product-auto-label Bot added the samples Issues that are directly related to samples. label Sep 26, 2026

@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 a new observability sample demonstrating how to configure OpenTelemetry tracing for Google Cloud client libraries, and updates the README to document it. The review feedback suggests moving the OpenTelemetry initialization, instrumentation registration, and environment variable configuration to the top level of the file rather than inside the main() function, ensuring that network modules are properly patched before any client libraries are imported.

Comment thread core/packages/gax/samples/observability.js Outdated
@shivanee-p
shivanee-p marked this pull request as ready for review September 26, 2026 00:22
@shivanee-p
shivanee-p requested a review from a team as a code owner September 26, 2026 00:22
@shivanee-p
shivanee-p enabled auto-merge (squash) September 26, 2026 00:22
@shivanee-p shivanee-p changed the title feat(gax): add o11y sample feat(docs): add o11y sample Sep 26, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

samples Issues that are directly related to samples.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant