Skip to content

Commit da20d8b

Browse files
authored
Fix missing throw statement in RestClientWrapper (#11892) (#11893)
1 parent 1bb412b commit da20d8b

File tree

1 file changed

+2
-0
lines changed
  • instrumentation/elasticsearch/elasticsearch-rest-7.0/library/src/main/java/io/opentelemetry/instrumentation/elasticsearch/rest/v7_0

1 file changed

+2
-0
lines changed

instrumentation/elasticsearch/elasticsearch-rest-7.0/library/src/main/java/io/opentelemetry/instrumentation/elasticsearch/rest/v7_0/RestClientWrapper.java

+2
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ private static Class<?> createProxyClass() {
7474
response = (Response) method.invoke(target, args);
7575
} catch (Throwable exception) {
7676
throwable = exception;
77+
throw throwable;
7778
} finally {
7879
instrumenter.end(context, otelRequest, response, throwable);
7980
}
@@ -102,6 +103,7 @@ private static Class<?> createProxyClass() {
102103
return method.invoke(target, args);
103104
} catch (Throwable exception) {
104105
throwable = exception;
106+
throw throwable;
105107
} finally {
106108
if (throwable != null) {
107109
instrumenter.end(context, otelRequest, null, throwable);

0 commit comments

Comments
 (0)