Skip to content

Conversation

@dd-octo-sts
Copy link
Contributor

@dd-octo-sts dd-octo-sts bot commented Nov 14, 2025

Backport 953ef8b from #15143 to 4.0.

Description

We change the probe source file path matching logic to return the longest matching path instead of the first result. This deals with cases where sources with the same name can be found on different entries of the Python path.

Testing

@dd-octo-sts dd-octo-sts bot requested review from a team as code owners November 14, 2025 18:16
@dd-octo-sts dd-octo-sts bot requested review from P403n1x87 and tabgok November 14, 2025 18:16
@P403n1x87 P403n1x87 closed this Nov 14, 2025
@P403n1x87 P403n1x87 reopened this Nov 14, 2025
@P403n1x87 P403n1x87 enabled auto-merge (squash) November 14, 2025 18:17
@github-actions
Copy link
Contributor

CODEOWNERS have been resolved as:

releasenotes/notes/debugging-probe-source-file-resolution-bd73a5fd172c3711.yaml  @DataDog/apm-python
ddtrace/debugging/_probe/model.py                                       @DataDog/debugger-python
tests/debugging/probe/test_model.py                                     @DataDog/debugger-python

## Description

We change the probe source file path matching logic to return the
longest matching path instead of the first result. This deals with cases
where sources with the same name can be found on different entries of
the Python path.

## Testing

<!-- Describe your testing strategy or note what tests are included -->

(cherry picked from commit 953ef8b)
@github-actions
Copy link
Contributor

github-actions bot commented Nov 14, 2025

Bootstrap import analysis

Comparison of import times between this PR and base.

Summary

The average import time from this PR is: 245 ± 2 ms.

The average import time from base is: 248 ± 2 ms.

The import time difference between this PR and base is: -2.35 ± 0.1 ms.

Import time breakdown

The following import paths have shrunk:

ddtrace.auto 2.060 ms (0.84%)
ddtrace.bootstrap.sitecustomize 1.372 ms (0.56%)
ddtrace.bootstrap.preload 1.372 ms (0.56%)
ddtrace.internal.remoteconfig.client 0.644 ms (0.26%)
ddtrace 0.687 ms (0.28%)
ddtrace.internal._unpatched 0.028 ms (0.01%)
json 0.028 ms (0.01%)
json.decoder 0.028 ms (0.01%)
re 0.028 ms (0.01%)
enum 0.028 ms (0.01%)
types 0.028 ms (0.01%)

@emmettbutler
Copy link
Collaborator

force-merging because tests have run, just waiting on microbenchmarks

@emmettbutler emmettbutler merged commit 90503b4 into 4.0 Nov 14, 2025
202 of 229 checks passed
@emmettbutler emmettbutler deleted the backport-15143-to-4.0 branch November 14, 2025 19:04
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.

3 participants