Skip to content

fix(gax): only set resend_count on T4 attempt spans - #9540

Merged
shivanee-p merged 1 commit into
mainfrom
shivaneep-o11y-resend-count
Oct 6, 2026
Merged

shivanee-p merged 1 commit into
mainfrom
shivaneep-o11y-resend-count

Conversation

@shivanee-p

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

Copy link
Copy Markdown
Contributor

Updates OpenTelemetry tracing in google-gax so that transport resend count attributes (gcp.grpc.resend_count and http.request.resend_count) are only recorded on per-attempt network spans (traceAttempt) and omitted from parent client request spans (traceCall)

@shivanee-p
shivanee-p marked this pull request as ready for review October 6, 2026 17:52
@shivanee-p
shivanee-p requested a review from a team as a code owner October 6, 2026 17:52

@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 refactors the tracing logic in google-gax to ensure that resend counts are omitted from T3 client request spans and only recorded on T4 attempt spans. This is done by removing the recordResend recorder parameter from traceCall and updating the corresponding unit tests. However, a critical issue was identified in createApiCall.ts where omitting recordResend from the invokeCall arguments prevents the local recorder from being invoked during retries, which would incorrectly leave the resend count at zero on T4 attempt spans.

Comment thread core/packages/gax/src/createApiCall.ts
@github-actions
github-actions Bot requested a review from bshaffer October 6, 2026 17:54
@shivanee-p
shivanee-p merged commit 3b3f600 into main Oct 6, 2026
47 checks passed
@shivanee-p
shivanee-p deleted the shivaneep-o11y-resend-count branch October 6, 2026 19:49
@release-please release-please Bot mentioned this pull request Oct 6, 2026
shivanee-p pushed a commit that referenced this pull request Oct 6, 2026
🤖 I have created a release *beep* *boop*
---


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

##
[6.11.1](google-gax-v6.11.0...google-gax-v6.11.1)
(2026-10-06)


### Bug Fixes

* **gax:** Only set resend_count on T4 attempt spans
([#9540](#9540))
([3b3f600](3b3f600))
* **gax:** Widen port to number | string in GrpcClientOptions
([#9542](#9542))
([17978e7](17978e7))
</details>

<details><summary>pubsub: 6.1.1</summary>

##
[6.1.1](pubsub-v6.1.0...pubsub-v6.1.1)
(2026-10-06)


### Bug Fixes

* **pubsub:** Align ClientConfig.port type with gax.GrpcClientOptions
([#9539](#9539))
([4443d6d](4443d6d))
* **test-utils:** Make google-test-utils a private workspace package
([#9525](#9525))
([be25b6f](be25b6f))
</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>
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