impl(gax-internal): integrate RequestRecorder with gRPC transport for Server Streaming#5375
Open
haphungw wants to merge 1 commit intogoogleapis:mainfrom
Open
impl(gax-internal): integrate RequestRecorder with gRPC transport for Server Streaming#5375haphungw wants to merge 1 commit intogoogleapis:mainfrom
RequestRecorder with gRPC transport for Server Streaming#5375haphungw wants to merge 1 commit intogoogleapis:mainfrom
Conversation
… Server Streaming
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5375 +/- ##
==========================================
+ Coverage 97.58% 97.60% +0.01%
==========================================
Files 222 222
Lines 46609 46625 +16
==========================================
+ Hits 45485 45506 +21
+ Misses 1124 1119 -5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
suzmue
approved these changes
Apr 14, 2026
Comment on lines
+404
to
407
| if _prior_attempt_count > 0 { | ||
| Some(_prior_attempt_count) | ||
| } else { | ||
| None |
Contributor
There was a problem hiding this comment.
Suggested change
| if _prior_attempt_count > 0 { | |
| Some(_prior_attempt_count) | |
| } else { | |
| None | |
| (_prior_attempt_count > 0).then_some(_prior_attempt_count) |
Comment on lines
+634
to
+643
| let (service, version, repo, artifact) = if let Some(info) = attrs.instrumentation { | ||
| ( | ||
| Some(info.service_name), | ||
| Some(info.client_version), | ||
| Some("googleapis/google-cloud-rust"), | ||
| Some(info.client_artifact), | ||
| ) | ||
| } else { | ||
| (None, None, None, None) | ||
| }; |
Contributor
There was a problem hiding this comment.
Suggested change
| let (service, version, repo, artifact) = if let Some(info) = attrs.instrumentation { | |
| ( | |
| Some(info.service_name), | |
| Some(info.client_version), | |
| Some("googleapis/google-cloud-rust"), | |
| Some(info.client_artifact), | |
| ) | |
| } else { | |
| (None, None, None, None) | |
| }; | |
| let (service, version, repo, artifact) = attrs.instrumentation | |
| .map(|info| ( | |
| Some(info.service_name), | |
| Some(info.client_version), | |
| Some("googleapis/google-cloud-rust"), | |
| Some(info.client_artifact), | |
| )) | |
| .unwrap_or_default(); |
Comment on lines
+315
to
+317
| let pending = WithTransportMetric::new(self.metric.clone(), pending, 0); | ||
| let pending = WithTransportLogging::new(pending); | ||
| let pending = WithTransportSpan::new(span, pending); |
Contributor
There was a problem hiding this comment.
(no action on this pr), it might be nice to add some helpers that allow us to chain these more easily so the code can look like
let pending = pending
.with_transport_metric(self.metric.clone(), 0)
.with_transport_logging()
.with_transport_spane(span);
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.
Extend
RequestRecorderinto the server streaming implementation ingaxi. This ensures that transport-level metrics and spans are captured for server streams.Note:
TODO (#5372): the span created by
WithTransportSpanonly covers stream initiation, and we should consider instrumenting the returned stream to capture errors during the stream's lifetime.