Skip to content

chore(profiling): collectors and py3.15 CI matrix - #19270

Draft
vlad-scherbich wants to merge 3 commits into
vlad/ddtracepy-315-profiling-nativefrom
vlad/ddtracepy-315-profiling-collectors
Draft

chore(profiling): collectors and py3.15 CI matrix#19270
vlad-scherbich wants to merge 3 commits into
vlad/ddtracepy-315-profiling-nativefrom
vlad/ddtracepy-315-profiling-collectors

Conversation

@vlad-scherbich

@vlad-scherbich vlad-scherbich commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

prev: #19269 | next: #19272

Summary

Python collector updates for 3.15 and riotfile/CI matrix wiring (formerly #19271). After merge, CI exercises profiling on 3.15 and setup.py can build natives for that version.

Layer This PR
Compiled
Armed collectors + CI/build matrix
Observable profiling suites run on 3.15 in CI

Test plan

Tracker

@datadog-prod-us1-5

datadog-prod-us1-5 Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Pipelines  Tests

Unblock PR with BitsAI

⚠️ Warnings

🚦 17 Pipeline jobs failed

DataDog/apm-reliability/dd-trace-py | build linux serverless: [amd64, cp315-cp315, v113741238-d2b8243-manylinux2014_x86_64, 1] — 🔧 Needs a code fix, caused by this PR

View in Datadog · View in GitLab

DataDog/apm-reliability/dd-trace-py | build linux serverless: [amd64, cp315-cp315, v126532274-233089d-musllinux_1_2_x86_64, 1] — 🔧 Needs a code fix, caused by this PR

View in Datadog · View in GitLab

DataDog/apm-reliability/dd-trace-py | build linux serverless: [arm64, cp315-cp315, v113741357-d2b8243-manylinux2014_aarch64, 1] — 🔧 Needs a code fix, caused by this PR

View in Datadog · View in GitLab

View all 17 failed jobs.

ℹ️ Info

No other issues found (see more)

🧪 All tests passed
❄️ No new flaky tests detected

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: ee28a3f | Docs | View more details | Give us feedback!

@vlad-scherbich
vlad-scherbich force-pushed the vlad/ddtracepy-315-profiling-native branch from 9a117a3 to 188e8e1 Compare August 21, 2026 04:53
@vlad-scherbich
vlad-scherbich force-pushed the vlad/ddtracepy-315-profiling-collectors branch from 7d3e825 to 9ef0d6d Compare August 21, 2026 04:53
@vlad-scherbich
vlad-scherbich force-pushed the vlad/ddtracepy-315-profiling-native branch from 188e8e1 to e6e1f72 Compare August 21, 2026 08:44
@vlad-scherbich
vlad-scherbich force-pushed the vlad/ddtracepy-315-profiling-collectors branch from 9ef0d6d to 6f9a44c Compare August 21, 2026 08:44
@cit-pr-commenter-54b7da

Copy link
Copy Markdown

Circular import analysis

⚠️ Existing circular imports

There are 3 circular imports that already exist on the base branch and have not been changed by this PR.

ddtrace.errortracking._handled_exceptions.bytecode_injector -> ddtrace.errortracking._handled_exceptions.callbacks -> ddtrace.errortracking._handled_exceptions.collector -> ddtrace.errortracking._handled_exceptions.bytecode_reporting -> ddtrace.errortracking._handled_exceptions.bytecode_injector
ddtrace.llmobs -> ddtrace.llmobs._evaluators -> ddtrace.llmobs._evaluators.format -> ddtrace.llmobs._experiment -> ddtrace.llmobs
ddtrace.appsec._asm_request_context -> ddtrace.appsec._iast._iast_request_context_base -> ddtrace.appsec._iast._iast_env -> ddtrace.appsec._iast.reporter -> ddtrace.appsec._exploit_prevention.stack_traces -> ddtrace.appsec._asm_request_context

@cit-pr-commenter-54b7da

Copy link
Copy Markdown

Codeowners resolved as

Resolved from the full PR diff against vlad/ddtracepy-315-profiling-native using the target branch CODEOWNERS file.
CODEOWNERS team requests not listed below are not required by the current file set.

ddtrace/internal/monitoring.py                                          @DataDog/apm-core-python
ddtrace/profiling/_asyncio.py                                           @DataDog/profiling-python
ddtrace/profiling/collector/asyncio.py                                  @DataDog/profiling-python
ddtrace/profiling/collector/exception.py                                @DataDog/profiling-python
ddtrace/profiling/collector/stack.py                                    @DataDog/profiling-python
ddtrace/profiling/collector/threading.py                                @DataDog/profiling-python
tests/profiling/test_scheduler.py                                       @DataDog/profiling-python

@cit-pr-commenter-54b7da

Copy link
Copy Markdown

Dependency direction analysis

⚠️ Existing dependency direction violations

There are 250 dependency direction violations that already exist on the base branch and have not been changed by this PR.

Show existing violations (showing 5 of 250 highest severity)
ddtrace.internal.tracemethods -×-> ddtrace.trace  (internal-core -> product:tracing, score=135)
ddtrace.llmobs._integrations.anthropic -×-> ddtrace.trace  (product:llmobs -> product:tracing, score=133)
ddtrace.llmobs._integrations.bedrock -×-> ddtrace.trace  (product:llmobs -> product:tracing, score=133)
ddtrace.internal.ci_visibility.filters -×-> ddtrace.trace  (product:ci_visibility -> product:tracing, score=133)
ddtrace.aiguard._api_client -×-> ddtrace.trace  (product:aiguard -> product:tracing, score=133)

To see all violations, download the layers-base.json and layers-pr.json artifacts from this CI job and run:

uv run --script scripts/import-analysis/layers.py compare layers-base.json layers-pr.json

# Conflicts:
#	ddtrace/internal/monitoring.py
#	ddtrace/internal/wrapping/asyncs.py
Profiling-native py3.15 job, setup.py guards, and crashtracker 3.15 opt-in.
Rebased onto the #17849 split stack (PR 17624).

# Conflicts:
#	riotfile.py
#	setup.py
@vlad-scherbich
vlad-scherbich force-pushed the vlad/ddtracepy-315-profiling-collectors branch from 6f9a44c to ee28a3f Compare August 21, 2026 18:43
@vlad-scherbich
vlad-scherbich force-pushed the vlad/ddtracepy-315-profiling-native branch from e6e1f72 to 0fb56d5 Compare August 21, 2026 18:43
@vlad-scherbich vlad-scherbich changed the title chore(profiling): update Python profiling collectors for py3.15 chore(profiling): collectors and py3.15 CI matrix Aug 21, 2026
@pr-commenter

pr-commenter Bot commented Aug 21, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-08-21 19:09:45

Comparing candidate commit ee28a3f in PR branch vlad/ddtracepy-315-profiling-collectors with baseline commit 69baea3 in branch main.

📊 Benchmarking dashboard

Found 0 performance improvements and 9 performance regressions! Performance is the same for 613 metrics, 10 unstable metrics.

Explanation

This is an A/B test comparing a candidate commit's performance against that of a baseline commit. Performance changes are noted in the tables below as:

  • 🟩 = significantly better candidate vs. baseline
  • 🟥 = significantly worse candidate vs. baseline

We compute a confidence interval (CI) over the relative difference of means between metrics from the candidate and baseline commits, considering the baseline as the reference.

If the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD), the change is considered significant.

Feel free to reach out to #apm-benchmarking-platform on Slack if you have any questions.

More details about the CI and significant changes

You can imagine this CI as a range of values that is likely to contain the true difference of means between the candidate and baseline commits.

CIs of the difference of means are often centered around 0%, because often changes are not that big:

---------------------------------(------|---^--------)-------------------------------->
                              -0.6%    0%  0.3%     +1.2%
                                 |          |        |
         lower bound of the CI --'          |        |
sample mean (center of the CI) -------------'        |
         upper bound of the CI ----------------------'

As described above, a change is considered significant if the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD).

For instance, for an execution time metric, this confidence interval indicates a significantly worse performance:

----------------------------------------|---------|---(---------^---------)---------->
                                       0%        1%  1.3%      2.2%      3.1%
                                                  |   |         |         |
       significant impact threshold --------------'   |         |         |
                      lower bound of CI --------------'         |         |
       sample mean (center of the CI) --------------------------'         |
                      upper bound of CI ----------------------------------'

scenario:httppropagationextract-empty_headers

  • 🟥 execution_time [+133.590ns; +168.263ns] or [+12.900%; +16.248%]

scenario:httppropagationinject-ids_only

  • 🟥 execution_time [+1.541µs; +1.698µs] or [+7.935%; +8.745%]

scenario:iastaspects-casefold_noaspect

  • 🟥 execution_time [+49.804µs; +56.076µs] or [+20.368%; +22.933%]

scenario:iastaspects-swapcase_noaspect

  • 🟥 execution_time [+20.364µs; +26.749µs] or [+9.936%; +13.051%]

scenario:iastaspectsospath-ospathbasename_aspect

  • 🟥 execution_time [+100.788µs; +110.146µs] or [+23.728%; +25.931%]

scenario:iastaspectssplit-rsplit_aspect

  • 🟥 execution_time [+16.406µs; +21.260µs] or [+11.172%; +14.478%]

scenario:span-start

  • 🟥 execution_time [+1.393ms; +1.573ms] or [+9.321%; +10.523%]

scenario:telemetryaddmetric-1-count-metric-1-times

  • 🟥 execution_time [+431.662ns; +462.880ns] or [+16.400%; +17.586%]

scenario:tracer-small

  • 🟥 execution_time [+28.941µs; +32.359µs] or [+8.928%; +9.982%]

Unstable benchmarks

These benchmarks have a confidence interval too wide to call a change; treat them as noise rather than signal.

scenario:coreapiscenario-context_with_data_listeners

  • unstable execution_time [-813.162ns; +671.752ns] or [-7.395%; +6.109%]

scenario:coreapiscenario-core_dispatch_1_listener

  • unstable execution_time [-27.838ns; +37.962ns] or [-4.565%; +6.225%]

scenario:coreapiscenario-core_dispatch_50_listeners

  • unstable execution_time [-1661.827ns; +1646.775ns] or [-9.788%; +9.700%]

scenario:coreapiscenario-core_dispatch_exception_listeners

  • unstable execution_time [-1212.985ns; +1328.338ns] or [-9.155%; +10.026%]

scenario:coreapiscenario-core_dispatch_listeners

  • unstable execution_time [-327.301ns; +322.476ns] or [-8.947%; +8.815%]

scenario:coreapiscenario-core_dispatch_no_args_listeners

  • unstable execution_time [-251.646ns; +250.700ns] or [-8.697%; +8.664%]

scenario:coreapiscenario-core_dispatch_with_results_1_listener

  • unstable execution_time [-63.926ns; +81.623ns] or [-5.674%; +7.245%]

scenario:coreapiscenario-core_dispatch_with_results_50_listeners

  • unstable execution_time [-3892.421ns; +4008.385ns] or [-9.609%; +9.895%]

scenario:coreapiscenario-core_dispatch_with_results_listeners

  • unstable execution_time [-796.307ns; +747.176ns] or [-9.881%; +9.272%]

scenario:packagesupdateimporteddependencies-import_many_stdlib_cached

  • unstable execution_time [-60948.779ns; +60704.078ns] or [-9.480%; +9.442%]

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