Skip to content

Commit cce319e

Browse files
committed
chore(spanner): add span for abort
1 parent 638f94f commit cce319e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,8 +331,11 @@ private void createTxnAsync(
331331
&& session.getIsMultiplexed()
332332
&& mutation != null) {
333333
// Begin transaction can return ABORTED errors. This can only happen if it included
334-
// a mutation key, which again means that this is a mutation-only transaction on a multiplexed
335-
// session.
334+
// a mutation key, which again means that this is a mutation-only transaction on a
335+
// multiplexed session.
336+
span.addAnnotation(
337+
"Transaction Creation Failed with ABORT. Retrying",
338+
e.getCause() == null ? e : e.getCause());
336339
createTxnAsync(res, mutation);
337340
return;
338341
}

0 commit comments

Comments
 (0)