Skip to content

Commit b542ff1

Browse files
committed
fix(gax): avoid potential NPE when resolving attempt span name
1 parent 349c14a commit b542ff1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ public Scope inScope() {
140140
this.apiTracerContext = apiTracerContext;
141141
this.operationSpanName = operationSpanName;
142142
this.attemptSpanName =
143-
attemptSpanName.equals(operationSpanName) ? attemptSpanName + "/attempt" : attemptSpanName;
143+
operationSpanName.equals(attemptSpanName) ? attemptSpanName + "/attempt" : attemptSpanName;
144144
this.attemptAttributes = new HashMap<>();
145145
this.parentContext = io.opentelemetry.context.Context.current();
146146
buildAttributes();

0 commit comments

Comments
 (0)