Skip to content

Commit f27fdb3

Browse files
committed
docs(tracing): add explanatory comments to T3/T4 hierarchy and retry tests
1 parent 22ca25d commit f27fdb3

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎sdk-platform-java/gax-java/gax/src/test/java/com/google/api/gax/tracing/OpenTelemetryTracingTracerIntegrationTest.java‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,10 @@ void testAttemptStarted_afterOperationCompleted_doesNotEmitNewSpan() {
270270

271271
@Test
272272
void testRetrySucceeds_operationAggregatesSuccessAttributes() {
273+
// Verifies that when a transient failure is retried and succeeds:
274+
// 1. Exactly one overall INTERNAL operation span (T3) is created.
275+
// 2. Both attempt spans (T4) have the operation span as their parent.
276+
// 3. The operation span aggregates the successful status (OK) from the final attempt.
273277
ApiTracer apiTracer = tracingFactory.newTracer(BaseApiTracer.getInstance(), TRACER_CONTEXT);
274278

275279
// Attempt 0 fails with transient error
@@ -317,6 +321,10 @@ void testRetrySucceeds_operationAggregatesSuccessAttributes() {
317321

318322
@Test
319323
void testRetriesExhausted_operationAggregatesFailureAttributes() {
324+
// Verifies that when retries are exhausted:
325+
// 1. Exactly one overall INTERNAL operation span (T3) is created.
326+
// 2. Both attempt spans (T4) have the operation span as their parent.
327+
// 3. The operation span aggregates the final ERROR status and error attributes.
320328
ApiTracer apiTracer = tracingFactory.newTracer(BaseApiTracer.getInstance(), TRACER_CONTEXT);
321329

322330
// Attempt 0 fails with transient error

0 commit comments

Comments
 (0)