Visitar URL original
fix(gax): resolve low level network attributes by shivanee-p · Pull Request #9564 · googleapis/google-cloud-node · GitHub
Skip to content

fix(gax): resolve low level network attributes - #9564

Merged
shivanee-p merged 5 commits into
mainfrom
shivaneep-resolve-t3-attributes
Oct 8, 2026
Merged

shivanee-p merged 5 commits into
mainfrom
shivaneep-resolve-t3-attributes

Conversation

@shivanee-p

@shivanee-p shivanee-p commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Updates OpenTelemetry tracing in google-gax to propagate url.template from the first HTTP attempt span onto its parent client request span, and omits exception.message and exception.stacktrace from span exception events on tracing spans

Fixes:

  • Track the first T4 attempt span per T3 client request span via clientRequestFirstAttempt in TracerHelper.ts.
  • Propagate url.template onto the parent T3 client request span from its first T4 HTTP attempt span in both traceAttempt and setAttemptHttpMethod.
  • Update recordExceptionEvent in TracerHelper.ts to only record exception.type on the exception span event while preserving existing exception detail helper functions.
  • Removed redundant unit tests
  • Updated code comments to reflect parameters and code logic

@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 propagates the url.template attribute from the first HTTP attempt span to its parent client request span. It also modifies recordExceptionEvent to only record exception.type, omitting exception.message and exception.stacktrace from exception events, and updates the unit tests accordingly. Feedback on this PR highlights a high-severity concern that removing exception.message and exception.stacktrace degrades observability and violates OpenTelemetry semantic conventions, and suggests restoring these attributes.

Comment thread core/packages/gax/src/observability/TracerHelper.ts
@shivanee-p
shivanee-p marked this pull request as ready for review October 7, 2026 23:10
@shivanee-p
shivanee-p requested a review from a team as a code owner October 7, 2026 23:10
@github-actions
github-actions Bot requested a review from danieljbruce October 7, 2026 23:10

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

LGTM overall—verified against unit tests and Cloud Trace exports. Left two comments on non-blocking edge cases (clientRequestFirstAttempt locking before url.template is resolved, and a dead Buffer unit test on traceCall) along with a few minor nits.

Comment thread core/packages/gax/src/observability/TracerHelper.ts Outdated
Comment thread core/packages/gax/test/unit/tracerHelper.ts Outdated
Comment thread core/packages/gax/src/observability/TracerHelper.ts Outdated
Comment thread core/packages/gax/src/observability/TracerHelper.ts
Comment thread core/packages/gax/test/unit/otelHarness.ts Outdated
@shivanee-p
shivanee-p merged commit 4bab312 into main Oct 8, 2026
46 checks passed
@shivanee-p
shivanee-p deleted the shivaneep-resolve-t3-attributes branch October 8, 2026 19:18
@release-please release-please Bot mentioned this pull request Oct 8, 2026
shivanee-p added a commit that referenced this pull request Oct 8, 2026
🤖 I have created a release *beep* *boop*
---


<details><summary>google-gax: 6.12.1</summary>

##
[6.12.1](google-gax-v6.12.0...google-gax-v6.12.1)
(2026-10-08)


### Bug Fixes

* **gax:** Resolve low level network attributes
([#9564](#9564))
([4bab312](4bab312))
</details>

<details><summary>admanager: 0.15.0</summary>

##
[0.15.0](admanager-v0.14.1...admanager-v0.15.0)
(2026-10-08)


### Features

* Update API sources and regenerate
([#9554](#9554))
([8b6837a](8b6837a))
</details>

<details><summary>apphub: 0.9.0</summary>

##
[0.9.0](apphub-v0.8.1...apphub-v0.9.0)
(2026-10-08)


### Features

* Update API sources and regenerate
([#9554](#9554))
([8b6837a](8b6837a))
</details>

<details><summary>apptopology: 0.4.0</summary>

##
[0.4.0](apptopology-v0.3.0...apptopology-v0.4.0)
(2026-10-08)


### Features

* Update API sources and regenerate
([#9554](#9554))
([8b6837a](8b6837a))
</details>

<details><summary>appconnections: 3.2.0</summary>

##
[3.2.0](appconnections-v3.1.1...appconnections-v3.2.0)
(2026-10-08)


### Features

* Update API sources and regenerate
([#9554](#9554))
([8b6837a](8b6837a))
</details>

<details><summary>appconnectors: 3.2.0</summary>

##
[3.2.0](appconnectors-v3.1.1...appconnectors-v3.2.0)
(2026-10-08)


### Features

* Update API sources and regenerate
([#9554](#9554))
([8b6837a](8b6837a))
</details>

<details><summary>appgateways: 3.2.0</summary>

##
[3.2.0](appgateways-v3.1.1...appgateways-v3.2.0)
(2026-10-08)


### Features

* Update API sources and regenerate
([#9554](#9554))
([8b6837a](8b6837a))
</details>

<details><summary>bigtable-api: 0.11.0</summary>

##
[0.11.0](bigtable-api-v0.10.0...bigtable-api-v0.11.0)
(2026-10-08)


### Features

* Update API sources and regenerate
([#9554](#9554))
([8b6837a](8b6837a))
</details>

<details><summary>compute: 7.8.0</summary>

##
[7.8.0](compute-v7.7.0...compute-v7.8.0)
(2026-10-08)


### Features

* Update API sources and regenerate
([#9554](#9554))
([8b6837a](8b6837a))
</details>

<details><summary>dataform: 3.5.0</summary>

##
[3.5.0](dataform-v3.4.0...dataform-v3.5.0)
(2026-10-08)


### Features

* Update API sources and regenerate
([#9554](#9554))
([8b6837a](8b6837a))
</details>

<details><summary>dialogflow: 8.3.0</summary>

##
[8.3.0](dialogflow-v8.2.0...dialogflow-v8.3.0)
(2026-10-08)


### Features

* Update API sources and regenerate
([#9554](#9554))
([8b6837a](8b6837a))
</details>

<details><summary>dialogflow-cx: 6.3.0</summary>

##
[6.3.0](dialogflow-cx-v6.2.1...dialogflow-cx-v6.3.0)
(2026-10-08)


### Features

* Update API sources and regenerate
([#9554](#9554))
([8b6837a](8b6837a))
</details>

<details><summary>netapp: 0.21.0</summary>

##
[0.21.0](netapp-v0.20.1...netapp-v0.21.0)
(2026-10-08)


### Features

* Update API sources and regenerate
([#9554](#9554))
([8b6837a](8b6837a))
</details>

<details><summary>redis-cluster: 0.16.0</summary>

##
[0.16.0](redis-cluster-v0.15.1...redis-cluster-v0.16.0)
(2026-10-08)


### Features

* Update API sources and regenerate
([#9554](#9554))
([8b6837a](8b6837a))
</details>

<details><summary>sql: 0.30.0</summary>

##
[0.30.0](sql-v0.29.1...sql-v0.30.0)
(2026-10-08)


### Features

* Update API sources and regenerate
([#9554](#9554))
([8b6837a](8b6837a))
</details>

<details><summary>developer-knowledge: 0.9.0</summary>

##
[0.9.0](developer-knowledge-v0.8.0...developer-knowledge-v0.9.0)
(2026-10-08)


### Features

* Update API sources and regenerate
([#9554](#9554))
([8b6837a](8b6837a))
</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>
Co-authored-by: Shivanee Persaud <shivaneep@google.com>
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