Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: [SVLS-5953] pointers for deserialized DynamoDB requests #11420

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

apiarian-datadog
Copy link
Contributor

Fixes #11320 .

The resource-based APIs for DynamoDB in boto3 accept deserialized python values and turn them into proper type-tagged DynamoDB API objects in the background. Unfortunately we don't seem to have access to those lower-level type-tagged objects, so if we see the deserialized forms we need to transform them ourselves in order to correctly extract the key values for hashing into span pointers.

Checklist

  • PR author has checked that all the criteria below are met
  • The PR description includes an overview of the change
  • The PR description articulates the motivation for the change
  • The change includes tests OR the PR description describes a testing strategy
  • The PR description notes risks associated with the change, if any
  • Newly-added code is easy to change
  • The change follows the library release note guidelines
  • The change includes or references documentation updates if necessary
  • Backport labels are set (if applicable)

Reviewer Checklist

  • Reviewer has checked that all the criteria below are met
  • Title is accurate
  • All changes are related to the pull request's stated goal
  • Avoids breaking API changes
  • Testing strategy adequately addresses listed risks
  • Newly-added code is easy to change
  • Release note makes sense to a user of the library
  • If necessary, author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment
  • Backport labels are set in a manner that is consistent with the release branch maintenance policy

@apiarian-datadog apiarian-datadog force-pushed the aleksandr.pasechnik/svls-5956-dynamodb-table-resource-pointers branch from c9f1438 to ce4c3ab Compare November 15, 2024 16:10
@apiarian-datadog
Copy link
Contributor Author

built on top of #11353

Copy link
Contributor

github-actions bot commented Nov 15, 2024

CODEOWNERS have been resolved as:

.riot/requirements/159f4bb.txt                                          @DataDog/apm-python
.riot/requirements/15e6ff4.txt                                          @DataDog/apm-python
.riot/requirements/15e8745.txt                                          @DataDog/apm-python
.riot/requirements/1793deb.txt                                          @DataDog/apm-python
.riot/requirements/18d037c.txt                                          @DataDog/apm-python
.riot/requirements/1aa24de.txt                                          @DataDog/apm-python
.riot/requirements/921bc6c.txt                                          @DataDog/apm-python
releasenotes/notes/fix-span-pointer-deserialized-dynamodb-requests-39b1235a102dab7c.yaml  @DataDog/apm-python
ddtrace/_trace/_span_pointer.py                                         @DataDog/apm-sdk-api-python
ddtrace/_trace/utils_botocore/span_pointers/__init__.py                 @DataDog/apm-sdk-api-python
ddtrace/_trace/utils_botocore/span_pointers/dynamodb.py                 @DataDog/apm-sdk-api-python
ddtrace/_trace/utils_botocore/span_pointers/s3.py                       @DataDog/apm-sdk-api-python
riotfile.py                                                             @DataDog/apm-python
tests/tracer/utils_botocore/test_span_pointers.py                       @DataDog/apm-sdk-api-python
.riot/requirements/19065a8.txt                                          @DataDog/apm-python
.riot/requirements/1a4f181.txt                                          @DataDog/apm-python

@apiarian-datadog apiarian-datadog changed the title chore: [SVLS-5953] pointers for deserialized DynamoDB requests bugfix: [SVLS-5953] pointers for deserialized DynamoDB requests Nov 15, 2024
@pr-commenter
Copy link

pr-commenter bot commented Nov 15, 2024

Benchmarks

Benchmark execution time: 2024-11-15 20:35:44

Comparing candidate commit c91582f in PR branch aleksandr.pasechnik/svls-5956-dynamodb-table-resource-pointers with baseline commit ecd0ab1 in branch main.

Found 3 performance improvements and 1 performance regressions! Performance is the same for 384 metrics, 2 unstable metrics.

scenario:iast_aspects-ospathsplitext_aspect

  • 🟥 execution_time [+260.204ns; +319.059ns] or [+7.070%; +8.669%]

scenario:iast_aspects-split_aspect

  • 🟩 execution_time [-279.836ns; -241.477ns] or [-14.451%; -12.470%]

scenario:iast_aspects-splitlines_aspect

  • 🟩 execution_time [-248.994ns; -217.394ns] or [-13.058%; -11.401%]

scenario:iast_aspects-upper_aspect

  • 🟩 execution_time [-325.684ns; -279.453ns] or [-10.798%; -9.265%]

@apiarian-datadog
Copy link
Contributor Author

confirmed that this change works as expected in a test lambda environment.

@apiarian-datadog apiarian-datadog force-pushed the aleksandr.pasechnik/less-noisy-span-pointers branch from c467f9d to 9d668a7 Compare November 15, 2024 17:40
@apiarian-datadog apiarian-datadog changed the title bugfix: [SVLS-5953] pointers for deserialized DynamoDB requests fix: [SVLS-5953] pointers for deserialized DynamoDB requests Nov 15, 2024
@apiarian-datadog apiarian-datadog force-pushed the aleksandr.pasechnik/svls-5956-dynamodb-table-resource-pointers branch from ce4c3ab to d32ff1d Compare November 15, 2024 17:53
Base automatically changed from aleksandr.pasechnik/less-noisy-span-pointers to main November 15, 2024 18:24
@apiarian-datadog apiarian-datadog force-pushed the aleksandr.pasechnik/svls-5956-dynamodb-table-resource-pointers branch from d32ff1d to 07cc209 Compare November 15, 2024 18:49
@datadog-dd-trace-py-rkomorn
Copy link

datadog-dd-trace-py-rkomorn bot commented Nov 15, 2024

Datadog Report

Branch report: aleksandr.pasechnik/svls-5956-dynamodb-table-resource-pointers
Commit report: 0a6d2ff
Test service: dd-trace-py

✅ 0 Failed, 1468 Passed, 0 Skipped, 24m 10.93s Total duration (11m 44.01s time saved)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Getting warning message from span_pointers.dynamodb
1 participant