@Test public void testRetriesExhaustedExample() { tracer.attemptStarted(0); tracer.connectionSelected(1); ApiException error0 = new DeadlineExceededException( "deadline exceeded", null, new FakeStatusCode(Code.DEADLINE_EXCEEDED), false); tracer.attemptFailedRetriesExhausted(error0); tracer.operationFailed(error0); verify(span) .addAnnotation( "Attempt started", ImmutableMap.of("attempt", AttributeValue.longAttributeValue(0))); verify(span) .addAnnotation( "Connection selected", ImmutableMap.of("id", AttributeValue.longAttributeValue(1))); verify(span) .addAnnotation( "Attempts exhausted", ImmutableMap.of( "attempt", AttributeValue.longAttributeValue(0), "status", AttributeValue.stringAttributeValue("DEADLINE_EXCEEDED"))); verify(span) .putAttributes(ImmutableMap.of("attempt count", AttributeValue.longAttributeValue(1))); verify(span) .end( EndSpanOptions.builder() .setStatus(Status.DEADLINE_EXCEEDED.withDescription("deadline exceeded")) .build()); verifyNoMoreInteractions(span); }