Skip to content

Conversation

@taegyunkim
Copy link
Contributor

trigger gitlab for #15080

Description

Testing

Risks

Additional Notes

jitokim and others added 3 commits October 30, 2025 00:43
  Fixes issue where child processes ignore DD_PROFILING_ENABLED settings
  after fork by implementing in-place config reload mechanism.

  - Add ProfilingConfig.reload_from_env() to update config in-place
  - Recalculate derived fields (stack.v2_enabled, heap.sample_size)
  - Synchronize metadata (_value_source, config_id) for nested configs
  - Add comprehensive regression test suite (10 tests)

  This preserves all existing module import references while ensuring
  child processes respect environment variable changes.

Signed-off-by: jitokim <pigberger70@gmail.com>
@taegyunkim taegyunkim requested a review from a team as a code owner October 29, 2025 17:06
@taegyunkim taegyunkim added changelog/no-changelog A changelog entry is not required for this PR. Profiling Continous Profling labels Oct 29, 2025
@github-actions
Copy link
Contributor

CODEOWNERS have been resolved as:

tests/profiling_v2/test_config_reload.py                                @DataDog/profiling-python
ddtrace/profiling/bootstrap/sitecustomize.py                            @DataDog/profiling-python
ddtrace/profiling/profiler.py                                           @DataDog/profiling-python
ddtrace/settings/profiling.py                                           @DataDog/profiling-python

@github-actions
Copy link
Contributor

Bootstrap import analysis

Comparison of import times between this PR and base.

Summary

The average import time from this PR is: 243 ± 4 ms.

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

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

Import time breakdown

The following import paths have shrunk:

ddtrace.auto 2.362 ms (0.97%)
ddtrace.bootstrap.sitecustomize 1.569 ms (0.65%)
ddtrace.bootstrap.preload 1.569 ms (0.65%)
ddtrace.internal.remoteconfig.client 0.704 ms (0.29%)
ddtrace 0.794 ms (0.33%)
ddtrace.internal._unpatched 0.137 ms (0.06%)
subprocess 0.109 ms (0.04%)
contextlib 0.109 ms (0.04%)
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%)

@vlad-scherbich
Copy link
Contributor

@taegyunkim What is the purpose of this PR? Do we need to act on it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/no-changelog A changelog entry is not required for this PR. Profiling Continous Profling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants