impl(o11y): introduce resend_count logic#4156
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the observability of client-side operations by introducing a resend_count attribute to tracing spans. This attribute, applied to both gRPC and HTTP requests, provides crucial context for understanding and analyzing retry behavior, which is vital for debugging transient errors and optimizing performance in distributed systems. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces logic to add a resend_count attribute to observability spans for retried requests. The implementation in SpanTracer is solid, correctly incrementing the count for each retry and adding the appropriate transport-specific attribute. The unit tests for this logic are also well-written.
However, I've found issues in the new integration tests in ITOtelTracing.java. The verification logic for the resend_count attribute is flawed in both the gRPC and HTTP JSON test cases. I've provided suggestions to correct the test logic to ensure it properly validates the new feature.
java-showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it/ITOtelTracing.java
Outdated
Show resolved
Hide resolved
java-showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it/ITOtelTracing.java
Outdated
Show resolved
Hide resolved
|
|





Introduces
gcp.grpc.resend_countandhttp.request.resend_count.Although
ApiTraceroffersattemptStarted(int attemptNumber), here we use an internal counter in order to not depend on external logic that would produce such an argument.