File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
sdk-platform-java/gax-java/gax/src/main/java/com/google/api/gax/tracing Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -89,9 +89,9 @@ public void operationFailed(Throwable error) {
8989 }
9090
9191 private void recordMetric (Throwable error ) {
92- Map <String , Object > errorAttributes =
92+ Map <String , Object > responseAttributes =
9393 ObservabilityUtils .getResponseAttributes (error , transport );
94- attributes .putAll (errorAttributes );
94+ attributes .putAll (responseAttributes );
9595 metricsRecorder .recordOperationLatency (
9696 clientRequestTimer .elapsed (TimeUnit .NANOSECONDS ) / 1_000_000_000.0 , attributes );
9797 }
Original file line number Diff line number Diff line change @@ -217,10 +217,10 @@ private void recordErrorAndEndAttempt(Throwable error) {
217217 if (attemptSpan == null ) {
218218 return ;
219219 }
220- Map <String , Object > errorAttributes =
220+ Map <String , Object > responseAttributes =
221221 ObservabilityUtils .getResponseAttributes (error , this .apiTracerContext .transport ());
222- if (!errorAttributes .isEmpty ()) {
223- attemptSpan .setAllAttributes (ObservabilityUtils .toOtelAttributes (errorAttributes ));
222+ if (!responseAttributes .isEmpty ()) {
223+ attemptSpan .setAllAttributes (ObservabilityUtils .toOtelAttributes (responseAttributes ));
224224 }
225225
226226 if (error != null && !Strings .isNullOrEmpty (error .getMessage ())) {
You can’t perform that action at this time.
0 commit comments