@@ -869,14 +869,15 @@ public HttpResponse execute() throws IOException {
869
869
.spanBuilder (OpenCensusUtils .SPAN_NAME_HTTP_REQUEST_EXECUTE )
870
870
.setRecordEvents (OpenCensusUtils .isRecordEvent ())
871
871
.startSpan ();
872
- long idGenerator = 0L ;
872
+ long sentIdGenerator = 0L ;
873
+ long recvIdGenerator = 0L ;
873
874
874
875
do {
875
876
span .addAnnotation (
876
877
Annotation .fromDescriptionAndAttributes (
877
878
"retry" ,
878
879
Collections .<String , AttributeValue >singletonMap (
879
- "number of retry " ,
880
+ "number" ,
880
881
AttributeValue .longAttributeValue (numRetries - retriesRemaining ))));
881
882
// Cleanup any unneeded response from a previous iteration
882
883
if (response != null ) {
@@ -1005,12 +1006,12 @@ public HttpResponse execute() throws IOException {
1005
1006
// switch tracing scope to current span
1006
1007
Scope ws = tracer .withSpan (span );
1007
1008
OpenCensusUtils .recordSentMessageEvent (
1008
- span , idGenerator ++, lowLevelHttpRequest .getContentLength ());
1009
+ span , sentIdGenerator ++, lowLevelHttpRequest .getContentLength ());
1009
1010
try {
1010
1011
LowLevelHttpResponse lowLevelHttpResponse = lowLevelHttpRequest .execute ();
1011
1012
if (lowLevelHttpResponse != null ) {
1012
1013
OpenCensusUtils .recordReceivedMessageEvent (
1013
- span , idGenerator ++, lowLevelHttpResponse .getContentLength ());
1014
+ span , recvIdGenerator ++, lowLevelHttpResponse .getContentLength ());
1014
1015
}
1015
1016
// Flag used to indicate if an exception is thrown before the response is constructed.
1016
1017
boolean responseConstructed = false ;
0 commit comments