Skip to content

Conversation

@apiarian-datadog
Copy link
Contributor

@apiarian-datadog apiarian-datadog commented Nov 15, 2024

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

@github-actions
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-18 16:46:24

Comparing candidate commit 44f9a15 in PR branch aleksandr.pasechnik/svls-5956-dynamodb-table-resource-pointers with baseline commit 343ba22 in branch main.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 364 metrics, 2 unstable metrics.

@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: 44f9a15
Test service: dd-trace-py

✅ 0 Failed, 1468 Passed, 0 Skipped, 23m 55.22s Total duration (12m 57.06s time saved)

@apiarian-datadog apiarian-datadog force-pushed the aleksandr.pasechnik/svls-5956-dynamodb-table-resource-pointers branch from c91582f to 44f9a15 Compare November 18, 2024 16:02
@apiarian-datadog apiarian-datadog merged commit 5724fd3 into main Nov 19, 2024
535 of 536 checks passed
@apiarian-datadog apiarian-datadog deleted the aleksandr.pasechnik/svls-5956-dynamodb-table-resource-pointers branch November 19, 2024 14:59
github-actions bot pushed a commit that referenced this pull request Nov 19, 2024
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
- [x] 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](https://ddtrace.readthedocs.io/en/stable/releasenotes.html)
- The change includes or references documentation updates if necessary
- Backport labels are set (if
[applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting))

## Reviewer Checklist
- [x] 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](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)
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](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)

(cherry picked from commit 5724fd3)
github-actions bot pushed a commit that referenced this pull request Nov 19, 2024
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
- [x] 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](https://ddtrace.readthedocs.io/en/stable/releasenotes.html)
- The change includes or references documentation updates if necessary
- Backport labels are set (if
[applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting))

## Reviewer Checklist
- [x] 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](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)
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](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)

(cherry picked from commit 5724fd3)
apiarian-datadog added a commit that referenced this pull request Nov 19, 2024
…t 2.16] (#11443)

Backport 5724fd3 from #11420 to 2.16.

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
- [x] 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](https://ddtrace.readthedocs.io/en/stable/releasenotes.html)
- The change includes or references documentation updates if necessary
- Backport labels are set (if
[applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting))

## Reviewer Checklist
- [x] 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](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)
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](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)

Co-authored-by: Aleksandr Pasechnik <[email protected]>
apiarian-datadog added a commit that referenced this pull request Nov 19, 2024
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
- [x] 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](https://ddtrace.readthedocs.io/en/stable/releasenotes.html)
- The change includes or references documentation updates if necessary
- Backport labels are set (if
[applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting))

## Reviewer Checklist
- [x] 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](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)
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](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)

(cherry picked from commit 5724fd3)
apiarian-datadog added a commit that referenced this pull request Nov 19, 2024
…t 2.17] (#11444)

Backport 5724fd3 from #11420 to 2.17.

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
- [x] 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](https://ddtrace.readthedocs.io/en/stable/releasenotes.html)
- The change includes or references documentation updates if necessary
- Backport labels are set (if
[applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting))

## Reviewer Checklist
- [x] 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](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)
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](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)

Co-authored-by: Aleksandr Pasechnik <[email protected]>
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

4 participants