Skip to content

Commit 713eaea

Browse files
basepibeniwohli
andauthored
Fix default botocore handler (#1765)
* Fix default botocore handler * CHANGELOG --------- Co-authored-by: Benjamin Wohlwend <[email protected]>
1 parent 73b6eb8 commit 713eaea

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

CHANGELOG.asciidoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ endif::[]
3939
[float]
4040
===== Bug fixes
4141
42+
* Fix issue with botocore instrumentation creating spans with an incorrect `service.name` {pull}1765[#1765]
4243
* Fix a bug in the GRPC instrumentation when the agent is disabled or not recording {pull}1761[#1761]
4344
4445

elasticapm/instrumentation/packages/botocore.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -238,15 +238,15 @@ def modify_span_sqs_post(span: SpanType, args, kwargs, result):
238238
span.add_link(tp)
239239

240240

241-
def handle_default(operation_name, service, instance, args, kwargs, destination):
241+
def handle_default(operation_name, service, instance, args, kwargs, context):
242242
span_type = "aws"
243243
span_subtype = service.lower()
244244
span_action = operation_name
245245

246-
destination["service"] = {"name": span_subtype, "resource": span_subtype, "type": span_type}
246+
context["destination"]["service"] = {"name": span_subtype, "resource": span_subtype, "type": span_type}
247247

248248
signature = f"{service}:{operation_name}"
249-
return HandlerInfo(signature, span_type, span_subtype, span_action, destination)
249+
return HandlerInfo(signature, span_type, span_subtype, span_action, context)
250250

251251

252252
handlers = {

0 commit comments

Comments
 (0)