Skip to content

Conversation

@dubloom
Copy link
Contributor

@dubloom dubloom commented Nov 12, 2025

This PR implements this RFC for dynamic instrumentation.

Add process_tags to dynamic instrumentation payload

Testing

  • Check that process tags are not included if deactivated
  • Check the right process tags are set in the payload when activated

@dubloom dubloom added the changelog/no-changelog A changelog entry is not required for this PR. label Nov 12, 2025
@github-actions
Copy link
Contributor

CODEOWNERS have been resolved as:

ddtrace/debugging/_encoding.py                                          @DataDog/debugger-python
tests/debugging/test_encoding.py                                        @DataDog/debugger-python

@github-actions
Copy link
Contributor

github-actions bot commented Nov 12, 2025

Bootstrap import analysis

Comparison of import times between this PR and base.

Summary

The average import time from this PR is: 240 ± 3 ms.

The average import time from base is: 240 ± 3 ms.

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

Import time breakdown

The following import paths have grown:

ddtrace.auto 0.060 ms (0.02%)
ddtrace.bootstrap.sitecustomize 0.060 ms (0.02%)
ddtrace.bootstrap.preload 0.060 ms (0.02%)
ddtrace.internal.symbol_db.remoteconfig 0.060 ms (0.02%)
ddtrace.internal.symbol_db.symbols 0.060 ms (0.02%)

The following import paths have shrunk:

ddtrace.auto 1.753 ms (0.73%)
ddtrace.bootstrap.sitecustomize 1.079 ms (0.45%)
ddtrace.bootstrap.preload 1.079 ms (0.45%)
ddtrace.internal.remoteconfig.client 0.565 ms (0.23%)
ddtrace 0.674 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%)

Comment on lines 277 to 281
from ddtrace.internal.process_tags.constants import ENTRYPOINT_BASEDIR_TAG
from ddtrace.internal.process_tags.constants import ENTRYPOINT_NAME_TAG
from ddtrace.internal.process_tags.constants import ENTRYPOINT_TYPE_SCRIPT
from ddtrace.internal.process_tags.constants import ENTRYPOINT_TYPE_TAG
from ddtrace.internal.process_tags.constants import ENTRYPOINT_WORKDIR_TAG
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think here it's enough to test that the field is set. Testing for the actual values should be done in a unit test for the process tags feature itself to avoid redundancy.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addressed in 0972b8d

@dubloom dubloom requested a review from P403n1x87 November 12, 2025 15:48
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants