Skip to content

Commit 186453f

Browse files
authored
Properly await wrapped async call in elasticsearch (#1725)
* Properly await wrapped async call in elasticsearch * CHANGELOG
1 parent d069ba0 commit 186453f

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

CHANGELOG.asciidoc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,10 @@ endif::[]
3838
3939
* GRPC support {pull}1703[#1703]
4040
41-
//[float]
42-
//===== Bug fixes
41+
[float]
42+
===== Bug fixes
43+
44+
* Fix an async issue with long elasticsearch queries {pull}1725[#1725]
4345
4446
4547
[[release-notes-6.x]]

elasticapm/instrumentation/packages/asyncio/elasticsearch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def get_instrument_list(self):
5656
async def call(self, module, method, wrapped, instance, args, kwargs):
5757
span = execution_context.get_span()
5858
if not span or isinstance(span, DroppedSpan):
59-
return wrapped(*args, **kwargs)
59+
return await wrapped(*args, **kwargs)
6060

6161
self._update_context_by_request_data(span.context, instance, args, kwargs)
6262

0 commit comments

Comments
 (0)