Skip to content

feat(v2): hook transport telemetry into gax.Invoke and record#496

Merged
quartzmo merged 1 commit intogoogleapis:mainfrom
westarle:westarle/metrics-transport-hook-v4
Mar 26, 2026
Merged

feat(v2): hook transport telemetry into gax.Invoke and record#496
quartzmo merged 1 commit intogoogleapis:mainfrom
westarle:westarle/metrics-transport-hook-v4

Conversation

@westarle
Copy link
Copy Markdown
Contributor

@westarle westarle commented Mar 26, 2026

feat: hook TransportTelemetryData into gax, remove experimental ResponseStatusCode

details:
Read server and port from TransportTelemetryData.

Removed experimental SetResponseStatusCode and ResponseStatusCode from TransportTelemetryData. Clients of this API should use the new gax.ExtractTelemetryErrorInfo to get this information from the error result.

@westarle westarle marked this pull request as ready for review March 26, 2026 16:33
@westarle westarle requested a review from a team as a code owner March 26, 2026 16:33
Comment thread v2/telemetry.go
Comment thread v2/telemetry.go
@westarle westarle enabled auto-merge (squash) March 26, 2026 17:36
@westarle westarle disabled auto-merge March 26, 2026 17:37
@quartzmo quartzmo merged commit d531001 into googleapis:main Mar 26, 2026
5 checks passed
westarle added a commit to googleapis/google-cloud-go that referenced this pull request Apr 2, 2026
This PR has auth code fill in TelemetryTransportData in order to send
details from the transport back up to higher layers. See
googleapis/gax-go#496. This in turn allows code
in those higher layers to report telemetry information for the last
request that is only known by the transport layer.

### Changes Made
* **Logical Hostname Extraction:** Updated extraction logic to parse
logical hostnames and ports directly from `req.URL` (HTTP) and
`cc.Target()` (gRPC) prior to invoking the transport
layer.
* **Implicit Port Fallback:** Added scheme-based port fallbacks (`80`
for HTTP, `443` for HTTPS) when handling URLs with implicit ports.
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