Skip to content

Commit 7d35ea9

Browse files
committed
fix: rename
1 parent f33bbdd commit 7d35ea9

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

sdk-platform-java/gax-java/gax/src/main/java/com/google/api/gax/tracing/GoldenSignalsMetricsTracer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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
}

sdk-platform-java/gax-java/gax/src/main/java/com/google/api/gax/tracing/SpanTracer.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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())) {

0 commit comments

Comments
 (0)