Repository navigation
test(showcase): add GAPIC Showcase integration tests for OpenTelemetry T3 tracing - #14583
jinseopkim0 wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Code Review
This pull request implements client-level T3 tracing and M3 metrics exemplar correlation using OpenTelemetry in the GAX Java library, introducing a two-level span hierarchy (overall operation and individual attempts) managed thread-safely via ReentrantLock. It also adds comprehensive integration and unit tests to verify these tracing behaviors across HTTP and gRPC transports. A review comment identifies a potential NullPointerException in OpenTelemetryTracingTracer when comparing attemptSpanName to operationSpanName if the former is null, and suggests reversing the comparison to ensure safety.
95d6b8d to
0b9ef39
Compare
|
@gemini-code-assist review |
There was a problem hiding this comment.
Code Review
This pull request implements a two-level span hierarchy (T3 operation-level spans and T4 attempt-level child spans) in OpenTelemetryTracingTracer to support tracking of overall RPC operations and individual retry attempts. It also updates CompositeTracer to safely manage scopes and suppress exceptions during lifecycle notifications, and adds comprehensive integration and unit tests for tracing, hierarchy, and metrics exemplar correlation. The review feedback correctly identifies a potential IllegalArgumentException in CompositeTracer if an exception attempts to suppress itself, and suggests a robust check to prevent this.
0b9ef39 to
1b3a338
Compare
|
@gemini-code-assist review |
There was a problem hiding this comment.
Code Review
This pull request implements client-level T3 tracing and M3 metrics exemplar correlation using OpenTelemetry in the Java SDK, adding comprehensive integration tests for tracing hierarchy, retry aggregation, and metrics exemplars. Key changes include refactoring OpenTelemetryTracingTracer to manage an overall operation span (T3) and link individual attempt spans (T4) as children, and updating CompositeTracer to handle scopes safely. Feedback on these changes suggests ending lingering attempt spans with a CancellationException instead of null when superseded by a retry to prevent misleading success metrics, and avoiding the suppression of tracing-internal exceptions on business errors in CompositeTracer to keep telemetry transparent and non-intrusive.
1b3a338 to
110f41c
Compare
|
@gemini-code-assist review |
110f41c to
b44fecd
Compare
There was a problem hiding this comment.
Code Review
This pull request implements client-level T3 tracing and M3 metrics exemplar correlation using OpenTelemetry. It updates CompositeTracer and OpenTelemetryTracingTracer to support parent operation spans and child attempt spans with thread-safe state management, and introduces comprehensive integration and unit tests. The review feedback suggests minor readability improvements by replacing redundant fully qualified class names with their simple imported names.
b44fecd to
cf898f1
Compare
|
@gemini-code-assist review |
There was a problem hiding this comment.
Code Review
This pull request introduces operation-level tracing (T3 spans) alongside attempt-level tracing (T4 spans) in OpenTelemetryTracingTracer, establishing a proper parent-child span hierarchy for retries and aggregating retry results onto the operation span. It adds thread-safe coordination using a ReentrantLock to manage attempt transitions and operation completion. Additionally, comprehensive integration and unit tests have been added to verify client-level T3 tracing, T3/T4 hierarchy, and exemplar correlation across both HTTP/JSON and gRPC transports. I have no further feedback to provide as there are no review comments to evaluate.
cf898f1 to
e3ca6a3
Compare
|
@gemini-code-assist review |
There was a problem hiding this comment.
Code Review
This pull request introduces comprehensive client-level OpenTelemetry tracing (T3) and attempt-level tracing (T4) hierarchy, along with metrics exemplar correlation (M3) in GAX Java. It updates OpenTelemetryTracingTracer to manage an overall operation-level span (T3) that acts as the parent for individual attempt spans (T4), ensuring proper retry aggregation and thread-safe state transitions using a ReentrantLock. Additionally, CompositeTracer is updated to run lifecycle notifications within the active scope, and several new integration and unit tests are added to validate these features across both gRPC and HTTP/JSON transports. I have no feedback to provide as there are no review comments.
e3ca6a3 to
bd86844
Compare
|
@gemini-code-assist review |
There was a problem hiding this comment.
Code Review
This pull request introduces a hierarchical span structure (T3 operation span and T4 attempt spans) for OpenTelemetry tracing in GAX, along with integration tests verifying tracing and metrics exemplar correlation. It also updates CompositeTracer to execute lifecycle operations within the tracer's scope. Feedback on CompositeTracer.java highlights that a RuntimeException thrown during scope.close() in runInScope could propagate and disrupt lifecycle notifications, and suggests a safer try-finally block to catch and ignore such exceptions.
bd86844 to
5c6f2ac
Compare
|
@gemini-code-assist review |
5c6f2ac to
1353598
Compare
|
@gemini-code-assist review |
There was a problem hiding this comment.
Code Review
This pull request introduces client-level T3/T4 span hierarchy and retry aggregation using OpenTelemetry in the GAX Java library. It implements an overall operation-level span (T3) that acts as a parent to individual attempt-level spans (T4), ensuring thread-safe coordination of spans and retry aggregation. Additionally, comprehensive integration and unit tests have been added to validate tracing behavior, metrics exemplar correlation, and span hierarchy across both gRPC and HTTP/JSON transports. I have no feedback to provide as there are no review comments to assess.
There was a problem hiding this comment.
Code Review
This pull request implements hierarchical tracing and metrics exemplar correlation using OpenTelemetry. It introduces operation-level (T3) spans as parents to individual attempt (T4) spans, manages thread-safe span state with a ReentrantLock, and implements robust context propagation. Comprehensive integration and unit tests have been added to verify these tracing behaviors. The feedback suggests importing io.opentelemetry.context.Context directly rather than using its fully qualified name to improve code readability.
1353598 to
cb7a885
Compare
|
@gemini-code-assist review |
There was a problem hiding this comment.
Code Review
This pull request introduces client-level T3 tracing and T4 attempt span hierarchy, along with metrics exemplar correlation using OpenTelemetry in GAX. Key changes include the creation of an operation-level span (T3) that acts as a parent to individual attempt spans (T4), thread-safe state management using a ReentrantLock in OpenTelemetryTracingTracer, and robust scope handling in CompositeTracer. Additionally, comprehensive integration and unit tests have been added to verify these behaviors. The feedback highlights an important improvement opportunity in CompositeTracer.java to ensure that child scopes are closed in reverse order (LIFO) and wrapped in try-catch blocks to prevent resource leaks if an exception is thrown during closure.
cb7a885 to
f9da41b
Compare
There was a problem hiding this comment.
Code Review
This pull request introduces three new integration test files (ITOtelT3MetricsExemplar.java, ITOtelT3T4Hierarchy.java, and ITOtelT3Tracing.java) to verify OpenTelemetry tracing, metrics exemplar correlation, and span hierarchy/retry aggregation across both HTTP/JSON and gRPC transports. The feedback suggests a minor improvement in ITOtelT3MetricsExemplar.java to assert that the histogram points collection has exactly one element rather than just being non-empty, ensuring more precise and robust assertions in an isolated test environment.
|
@gemini-code-assist review |
There was a problem hiding this comment.
Code Review
This pull request introduces integration tests (ITOtelT3MetricsExemplar, ITOtelT3T4Hierarchy, and ITOtelT3Tracing) to verify OpenTelemetry T3 tracing, T3/T4 span hierarchy, retry aggregation, and metrics exemplar correlation across HTTP and gRPC. The feedback recommends removing redundant and insecure doNotValidateCertificate() calls in the HTTP transport setup, as the tests already run over plaintext HTTP. Additionally, it is suggested to tighten the HTTP status code assertion for INVALID_ARGUMENT errors from isAtLeast(400L) to exactly 400L to ensure more precise test validation.
|
@gemini-code-assist review |
There was a problem hiding this comment.
Code Review
This pull request adds three new integration test files (ITOtelT3MetricsExemplar.java, ITOtelT3T4Hierarchy.java, and ITOtelT3Tracing.java) to validate OpenTelemetry tracing and metrics functionality (Features 1, 2, and 3) for both HTTP/JSON and gRPC protocols. These tests cover client-level T3 tracing, T3/T4 span hierarchies with retry aggregation, and M3 metrics exemplar correlation. No review comments were provided, and there is no additional feedback.
157dbbd to
2e8b55a
Compare
fb730fb to
3dd0df7
Compare
|
@gemini-code-assist review |
There was a problem hiding this comment.
Code Review
This pull request introduces three new integration test classes (ITOtelT3MetricsExemplar, ITOtelT3T4Hierarchy, and ITOtelT3Tracing) to verify OpenTelemetry tracing, metrics exemplar correlation, and span hierarchy/retry aggregation behaviors across both HTTP/JSON and gRPC transports. I have no feedback to provide as there are no review comments.
2e8b55a to
55cee78
Compare
3dd0df7 to
1253bdf
Compare
|
@gemini-code-assist review |
There was a problem hiding this comment.
Code Review
This pull request introduces three new integration test files (ITOtelT3MetricsExemplar.java, ITOtelT3T4Hierarchy.java, and ITOtelT3Tracing.java) to verify OpenTelemetry tracing and metrics capabilities in the Showcase client. These tests cover client-level T3 tracing across HTTP and gRPC, T3/T4 span hierarchy and retry aggregation, and T3 tracing and M3 metrics exemplar correlation. I have no feedback to provide as there are no review comments.
|
|
24e64ee to
9e42e01
Compare
|
@gemini-code-assist review |
1253bdf to
d400486
Compare
There was a problem hiding this comment.
Code Review
This pull request introduces support for certificate-bound tokens for agent identities, GKE credential bundle fallbacks, and actor tokens within ComputeEngineCredentials and IdentityPoolCredentials. It also enhances error parsing in IamUtils and adds caching mechanisms to avoid redundant certificate validation. The reviewer feedback suggests storing certificate chains in memory rather than keeping file paths to prevent race conditions during rotation. Additionally, the reviewer points out potential HTTP connection leaks in ComputeEngineCredentials when throwing exceptions on 404 error paths without disconnecting the response.
|
@gemini-code-assist review |
There was a problem hiding this comment.
Code Review
This pull request introduces three new integration test files (ITOtelT3MetricsExemplar.java, ITOtelT3T4Hierarchy.java, and ITOtelT3Tracing.java) to validate OpenTelemetry tracing, metrics exemplar correlation, and span hierarchy/retry aggregation behaviors across HTTP/JSON and gRPC transports. The review feedback points out a bug in ITOtelT3Tracing.java where the expected http.url_template attribute value in an assertion is incorrect and should be updated to avoid test failure.
d400486 to
5cfabd6
Compare




This PR adds GAPIC Showcase integration tests for OpenTelemetry T3 tracing, covering:
b/588573053