dd-trace-py icon indicating copy to clipboard operation
dd-trace-py copied to clipboard

chore(dev): ai development rules

Open ZStriker19 opened this issue 5 months ago • 3 comments

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

ZStriker19 avatar Jun 16 '25 21:06 ZStriker19

CODEOWNERS have been resolved as:

.cursor/dd-trace-py.mdc                                                 @DataDog/apm-core-python
AI_GUIDELINES.md                                                        @DataDog/apm-core-python
CLAUDE.md                                                               @DataDog/apm-core-python
scripts/generate_ai_docs.py                                             @DataDog/apm-core-python
.gitignore                                                              @DataDog/apm-core-python

github-actions[bot] avatar Jun 16 '25 21:06 github-actions[bot]

Bootstrap import analysis

Comparison of import times between this PR and base.

Summary

The average import time from this PR is: 280 ± 5 ms.

The average import time from base is: 289 ± 6 ms.

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

Import time breakdown

The following import paths have shrunk:

ddtrace.auto 3.064 ms (1.09%)
ddtrace.bootstrap.sitecustomize 2.233 ms (0.80%)
ddtrace.bootstrap.preload 2.057 ms (0.73%)
ddtrace.internal.remoteconfig.client 0.778 ms (0.28%)
multiprocessing.sharedctypes 0.166 ms (0.06%)
multiprocessing.heap 0.166 ms (0.06%)
mmap 0.166 ms (0.06%)
ddtrace.settings.dynamic_instrumentation 0.031 ms (0.01%)
ddtrace 0.831 ms (0.30%)
ddtrace.internal._unpatched 0.151 ms (0.05%)
subprocess 0.113 ms (0.04%)
contextlib 0.113 ms (0.04%)
json 0.038 ms (0.01%)
json.decoder 0.038 ms (0.01%)
re 0.038 ms (0.01%)
enum 0.038 ms (0.01%)
types 0.038 ms (0.01%)
ddtrace._logger 0.021 ms (0.01%)
ddtrace.internal.telemetry 0.021 ms (0.01%)
ddtrace.settings._agent 0.021 ms (0.01%)
ddtrace.settings 0.021 ms (0.01%)
ddtrace.settings.integration 0.021 ms (0.01%)
ddtrace.vendor.debtcollector 0.021 ms (0.01%)
ddtrace.vendor 0.021 ms (0.01%)
ddtrace.internal.module 0.021 ms (0.01%)
ddtrace.internal.wrapping.context 0.021 ms (0.01%)
ddtrace.internal.utils.inspection 0.021 ms (0.01%)

github-actions[bot] avatar Jun 16 '25 21:06 github-actions[bot]

Benchmarks

Benchmark execution time: 2025-06-16 22:07:40

Comparing candidate commit e241689450452ac9434df1f2d67545d5b5f031bc in PR branch zachg/ai_dev_rules with baseline commit d30bcd7b50bc9c33429ccc37eb46d6f8bf2d65ec in branch main.

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

scenario:iastaspects-format_map_aspect

  • 🟥 execution_time [+406.352ns; +461.603ns] or [+12.546%; +14.252%]

scenario:iastaspectsospath-ospathsplit_aspect

  • 🟥 execution_time [+769.455ns; +883.984ns] or [+16.013%; +18.396%]

scenario:telemetryaddmetric-flush-1-metric

  • 🟥 execution_time [+292.084ns; +444.817ns] or [+7.036%; +10.716%]

pr-commenter[bot] avatar Jun 16 '25 22:06 pr-commenter[bot]

This pull request has been automatically closed after a period of inactivity. After this much time, it will likely be easier to open a new pull request with the same changes than to update this one from the base branch. Please comment or reopen if you think this pull request was closed in error.

github-actions[bot] avatar Jul 19 '25 00:07 github-actions[bot]