feat(gapic): ClientMetrics Integration for Go GAPIC#1709
Merged
westarle merged 5 commits intogoogleapis:mainfrom Mar 20, 2026
Merged
feat(gapic): ClientMetrics Integration for Go GAPIC#1709westarle merged 5 commits intogoogleapis:mainfrom
westarle merged 5 commits intogoogleapis:mainfrom
Conversation
0d8d577 to
9422622
Compare
2be585e to
98c706b
Compare
98c706b to
2c8acef
Compare
quartzmo
requested changes
Mar 16, 2026
983d355 to
fa0ccaf
Compare
quartzmo
reviewed
Mar 16, 2026
fa0ccaf to
dffdb5a
Compare
dffdb5a to
7f6b159
Compare
westarle
commented
Mar 16, 2026
Contributor
Author
westarle
left a comment
There was a problem hiding this comment.
I added the params for TRACING as well, I think we are going to need them (we expect e.g. "url_template" to be set in Auth.)
…nject client logger
7f6b159 to
83f1503
Compare
quartzmo
reviewed
Mar 18, 2026
dc9887b to
985a080
Compare
Based on PR 7 feedback from @quartzmo, this avoids a guaranteed reallocation per RPC call by merging WithClientMetrics into the options array directly on the client at initialization.
985a080 to
d1cc11f
Compare
quartzmo
approved these changes
Mar 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR integrates
gax.ClientMetricssupport into thegapic-generator-go, enabling standardized OpenTelemetry instrumentation for client libraries according to CLO v1 standards.Changes to Generated Clients
ClientMetricsusinggax.NewClientMetricswhen theMETRICSfeature is enabled.rpc.method,url.template) into the request context usingcallctx.WithTelemetryContextbefore reaching the transport layer.OpenTelemetryMetricsFeature("open_telemetry_metrics") to the generator's internal feature-enablement system. The Go code is guarded bygax.IsFeatureEnabled("METRICS")Test Improvements
.wantgolden files with different feature combinationsDepends on googleapis/gax-go#479