From da20d8bb8de63157f97dcaefb63af5935619776f Mon Sep 17 00:00:00 2001 From: kyy1996 Date: Thu, 25 Jul 2024 15:19:01 +0800 Subject: [PATCH] Fix missing throw statement in RestClientWrapper (#11892) (#11893) --- .../elasticsearch/rest/v7_0/RestClientWrapper.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/instrumentation/elasticsearch/elasticsearch-rest-7.0/library/src/main/java/io/opentelemetry/instrumentation/elasticsearch/rest/v7_0/RestClientWrapper.java b/instrumentation/elasticsearch/elasticsearch-rest-7.0/library/src/main/java/io/opentelemetry/instrumentation/elasticsearch/rest/v7_0/RestClientWrapper.java index e605bde1959c..9c5d39be5ea5 100644 --- a/instrumentation/elasticsearch/elasticsearch-rest-7.0/library/src/main/java/io/opentelemetry/instrumentation/elasticsearch/rest/v7_0/RestClientWrapper.java +++ b/instrumentation/elasticsearch/elasticsearch-rest-7.0/library/src/main/java/io/opentelemetry/instrumentation/elasticsearch/rest/v7_0/RestClientWrapper.java @@ -74,6 +74,7 @@ private static Class createProxyClass() { response = (Response) method.invoke(target, args); } catch (Throwable exception) { throwable = exception; + throw throwable; } finally { instrumenter.end(context, otelRequest, response, throwable); } @@ -102,6 +103,7 @@ private static Class createProxyClass() { return method.invoke(target, args); } catch (Throwable exception) { throwable = exception; + throw throwable; } finally { if (throwable != null) { instrumenter.end(context, otelRequest, null, throwable);