Skip to content

Commit 97482cd

Browse files
committed
fix(spanner): end spans for read-write methods
1 parent 7c78ec9 commit 97482cd

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

google-cloud-spanner/src/main/java/com/google/cloud/spanner/DatabaseClientImpl.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,8 @@ public TransactionRunner readWriteTransaction(TransactionOption... options) {
282282
span.setStatus(e);
283283
span.end();
284284
throw e;
285+
} finally {
286+
span.end();
285287
}
286288
}
287289

@@ -294,6 +296,8 @@ public TransactionManager transactionManager(TransactionOption... options) {
294296
span.setStatus(e);
295297
span.end();
296298
throw e;
299+
} finally {
300+
span.end();
297301
}
298302
}
299303

@@ -306,6 +310,8 @@ public AsyncRunner runAsync(TransactionOption... options) {
306310
span.setStatus(e);
307311
span.end();
308312
throw e;
313+
} finally {
314+
span.end();
309315
}
310316
}
311317

@@ -318,6 +324,8 @@ public AsyncTransactionManager transactionManagerAsync(TransactionOption... opti
318324
span.setStatus(e);
319325
span.end();
320326
throw e;
327+
} finally {
328+
span.end();
321329
}
322330
}
323331

0 commit comments

Comments
 (0)