Skip to content

Commit cc9e822

Browse files
fix(profiling): avoid possible circular import [backport 1.20] (#7059)
Backport 518365c from #7038 to 1.20. I'm not 100% sure why this is suddenly happening, but sometimes we get an error in pprof.pyx because the `sanitize_string` name cannot be imported. ## Checklist - [X] Change(s) are motivated and described in the PR description. - [X] Testing strategy is described if automated tests are not included in the PR. - [X] Risk is outlined (performance impact, potential for breakage, maintainability, etc). - [X] Change is maintainable (easy to change, telemetry, documentation). - [X] [Library release note guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html) are followed. If no release note is required, add label `changelog/no-changelog`. - [X] Documentation is included (in-code, generated user docs, [public corp docs](https://github.com/DataDog/documentation/)). - [X] Backport labels are set (if [applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)) ## Reviewer Checklist - [X] Title is accurate. - [X] No unnecessary changes are introduced. - [X] Description motivates each change. - [X] Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes unless absolutely necessary. - [X] Testing strategy adequately addresses listed risk(s). - [X] Change is maintainable (easy to change, telemetry, documentation). - [X] Release note makes sense to a user of the library. - [X] Reviewer has explicitly acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment. - [X] 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) - [X] If this PR touches code that signs or publishes builds or packages, or handles credentials of any kind, I've requested a review from `@DataDog/security-design-and-guidance`. - [X] This PR doesn't touch any of that. Co-authored-by: David Sanchez <[email protected]>
1 parent 129b653 commit cc9e822

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ddtrace/profiling/exporter/pprof.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ from ddtrace import ext
1212
from ddtrace.internal import packages
1313
from ddtrace.internal._encoding import ListStringTable as _StringTable
1414
from ddtrace.internal.compat import ensure_str
15-
from ddtrace.internal.datadog.profiling.ddup import sanitize_string
15+
from ddtrace.internal.datadog.profiling.utils import sanitize_string
1616
from ddtrace.internal.utils import config
1717
from ddtrace.profiling import event
1818
from ddtrace.profiling import exporter

0 commit comments

Comments
 (0)