Skip to content

Commit 09aa890

Browse files
github-actions[bot]shethhriday29mabdinur
authored
fix(dsm): enable tuples as botocore param [backport 1.16] (#6347)
Backport 8401722 from #6289 to 1.16. ## Checklist - [x] Change(s) are motivated and described in the PR description. - [x] Testing strategy is described if automated tests are not included in the PR. - [x] Risk is outlined (performance impact, potential for breakage, maintainability, etc). - [x] Change is maintainable (easy to change, telemetry, documentation). - [x] [Library release note guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html) are followed. If no release note is required, add label `changelog/no-changelog`. - [x] Documentation is included (in-code, generated user docs, [public corp docs](https://github.com/DataDog/documentation/)). - [x] Backport labels are set (if [applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)) ## Reviewer Checklist - [x] Title is accurate. - [x] No unnecessary changes are introduced. - [x] Description motivates each change. - [x] Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes unless absolutely necessary. - [x] Testing strategy adequately addresses listed risk(s). - [x] Change is maintainable (easy to change, telemetry, documentation). - [x] Release note makes sense to a user of the library. - [x] Reviewer has explicitly acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment. - [x] Backport labels are set in a manner that is consistent with the [release branch maintenance policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting) --------- Co-authored-by: shethhriday29 <[email protected]> Co-authored-by: Munir Abdinur <[email protected]> Co-authored-by: Hriday Sheth <[email protected]>
1 parent defe522 commit 09aa890

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

ddtrace/contrib/botocore/patch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ def patched_api_call(original_func, instance, args, kwargs):
511511
if "MessageAttributeNames" not in params:
512512
params.update({"MessageAttributeNames": ["_datadog"]})
513513
elif "_datadog" not in params["MessageAttributeNames"]:
514-
params.update({"MessageAttributeNames": params["MessageAttributeNames"] + ["_datadog"]})
514+
params.update({"MessageAttributeNames": list(params["MessageAttributeNames"]) + ["_datadog"]})
515515

516516
result = original_func(*args, **kwargs)
517517
_set_response_metadata_tags(span, result)
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
fixes:
3+
- |
4+
botocore: Enables Data Streams Monitoring for SQS when `MessageAttributes` are passed in
5+
as a tuple in addition to when they are passed in as a list.

0 commit comments

Comments
 (0)