Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(spanner): end spans for read-write methods #3629

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,8 @@ public TransactionManager transactionManager(TransactionOption... options) {
span.setStatus(e);
span.end();
throw e;
} finally {
span.end();
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4006,7 +4006,10 @@ public void testTransactionManager_usesOptions() {
when(pool.getSession()).thenReturn(session);
TransactionOption option = mock(TransactionOption.class);

DatabaseClientImpl client = new DatabaseClientImpl(pool, mock(TraceWrapper.class));
TraceWrapper traceWrapper =
new TraceWrapper(Tracing.getTracer(), OpenTelemetry.noop().getTracer(""), false);

DatabaseClientImpl client = new DatabaseClientImpl(pool, traceWrapper);
try (TransactionManager ignore = client.transactionManager(option)) {
verify(session).transactionManager(option);
}
Expand Down
Loading