Skip to content

Commit e23c71b

Browse files
authored
Fix async elasticsearch to match #1690 (#1758)
* Fix async elasticsearch to match #1690 * CHANGELOG
1 parent 5f837f7 commit e23c71b

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.asciidoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ endif::[]
4444
* Small fix to underlying Starlette logic to prevent duplicate Client objects {pull}1735[#1735]
4545
* Change `server_url` default to `http://127.0.0.1:8200` to avoid ipv6 ambiguity {pull}1744[#1744]
4646
* Fix an issue in GRPC instrumentation with unsampled transactions {pull}1740[#1740]
47+
* Fix error in async Elasticsearch instrumentation when spans are dropped {pull}1758[#1758]
4748
4849
4950
[[release-notes-6.x]]

elasticapm/instrumentation/packages/asyncio/elasticsearch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,6 @@ async def call(self, module, method, wrapped, instance, args, kwargs):
106106

107107
hits = self._get_hits(result_data)
108108
if hits:
109-
span.context["db"]["rows_affected"] = hits
109+
span.update_context("db", {"rows_affected": hits})
110110

111111
return result_data

0 commit comments

Comments
 (0)