Skip to content

Commit 6c6e25a

Browse files
committed
fix missing scope close
1 parent 2f6cfc4 commit 6c6e25a

File tree

2 files changed

+2
-0
lines changed
  • instrumentation/opensearch

2 files changed

+2
-0
lines changed

instrumentation/opensearch/opensearch-rest-1.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/opensearch/rest/v1_0/RestClientInstrumentation.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ public void endWithResponse(@Nullable Response response, @Nullable Throwable thr
9494
}
9595

9696
public void endWithListener(@Nullable Throwable throwable) {
97+
scope.close();
9798
if (throwable != null) {
9899
instrumenter().end(context, otelRequest, null, throwable);
99100
}

instrumentation/opensearch/opensearch-rest-3.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/opensearch/rest/v3_0/RestClientInstrumentation.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ public void endWithResponse(@Nullable Response response, @Nullable Throwable thr
9494
}
9595

9696
public void endWithListener(@Nullable Throwable throwable) {
97+
scope.close();
9798
if (throwable != null) {
9899
instrumenter().end(context, otelRequest, null, throwable);
99100
}

0 commit comments

Comments
 (0)