Remove unneeded catch blocks (#4130)

* Remove unneeded catch blocks

* Update test!
This commit is contained in:
Trask Stalnaker 2021-09-15 09:42:18 -07:00 committed by GitHub
parent b8391b1354
commit d28f0d3d3f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 6 deletions

View File

@ -147,9 +147,6 @@ final class TracingClientInterceptor implements ClientInterceptor {
span.addEvent("message", attributes);
try (Scope ignored = context.makeCurrent()) {
delegate().onMessage(message);
} catch (Throwable e) {
instrumenter.end(context, request, null, e);
throw e;
}
}
@ -165,9 +162,6 @@ final class TracingClientInterceptor implements ClientInterceptor {
public void onReady() {
try (Scope ignored = context.makeCurrent()) {
delegate().onReady();
} catch (Throwable e) {
instrumenter.end(context, request, null, e);
throw e;
}
}
}

View File

@ -870,6 +870,7 @@ abstract class AbstractGrpcTest extends InstrumentationSpecification {
"${SemanticAttributes.RPC_SERVICE.key}" "example.Greeter"
"${SemanticAttributes.RPC_METHOD.key}" "SayHello"
"${SemanticAttributes.NET_TRANSPORT.key}" SemanticAttributes.NetTransportValues.IP_TCP
"${SemanticAttributes.RPC_GRPC_STATUS_CODE.key}" Status.CANCELLED.code.value()
}
}
span(2) {