Skip to content

fix(django): simplify django db components#13900

Closed
wantsui wants to merge 4 commits intomainfrom
fix-django-component
Closed

fix(django): simplify django db components#13900
wantsui wants to merge 4 commits intomainfrom
fix-django-component

Conversation

@wantsui
Copy link
Collaborator

@wantsui wantsui commented Jul 7, 2025

Closing this PR in favor of #13910

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

@github-actions
Copy link
Contributor

github-actions bot commented Jul 7, 2025

CODEOWNERS have been resolved as:

releasenotes/notes/fix-django-component-157c93506f76f614.yaml           @DataDog/apm-python
ddtrace/contrib/dbapi.py                                                @DataDog/apm-core-python @DataDog/apm-idm-python
tests/snapshots/tests.contrib.django.test_django_snapshots.test_psycopg3_query_default.json  @DataDog/apm-python

@github-actions
Copy link
Contributor

github-actions bot commented Jul 7, 2025

Bootstrap import analysis

Comparison of import times between this PR and base.

Summary

The average import time from this PR is: 277 ± 3 ms.

The average import time from base is: 281 ± 5 ms.

The import time difference between this PR and base is: -3.4 ± 0.2 ms.

Import time breakdown

The following import paths have shrunk:

ddtrace.auto 2.118 ms (0.76%)
ddtrace.bootstrap.sitecustomize 1.437 ms (0.52%)
ddtrace.bootstrap.preload 1.437 ms (0.52%)
ddtrace.internal.remoteconfig.client 0.675 ms (0.24%)
ddtrace 0.681 ms (0.25%)
ddtrace.internal._unpatched 0.033 ms (0.01%)
json 0.033 ms (0.01%)
json.decoder 0.033 ms (0.01%)
re 0.033 ms (0.01%)
enum 0.033 ms (0.01%)
types 0.033 ms (0.01%)

@pr-commenter
Copy link

pr-commenter bot commented Jul 7, 2025

Benchmarks

Benchmark execution time: 2025-07-07 21:18:12

Comparing candidate commit 4b8886b in PR branch fix-django-component with baseline commit 8d01a6c in branch main.

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

scenario:iastaspects-lstrip_aspect

  • 🟥 execution_time [+793.457ns; +890.672ns] or [+7.624%; +8.558%]

scenario:iastaspects-strip_aspect

  • 🟥 execution_time [+740.788ns; +811.129ns] or [+7.121%; +7.797%]

@wantsui wantsui changed the title fix(dbapi): simplify django db components. fix(dbapi): simplify django db components Jul 7, 2025
@wantsui wantsui changed the title fix(dbapi): simplify django db components fix(django): simplify django db components Jul 7, 2025
@wantsui
Copy link
Collaborator Author

wantsui commented Jul 8, 2025

Closing in favor of #13910

@wantsui wantsui closed this Jul 8, 2025
wantsui added a commit that referenced this pull request Jul 25, 2025
The goal of this PR is to reduce the possible components in the django
ORM layer.

Supercedes the approach in
#13900

Original PR that added this functionality:
#9601


## 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: Brett Langdon <brett.langdon@datadoghq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant