Skip to content

Conversation

@dubloom
Copy link
Contributor

@dubloom dubloom commented Nov 12, 2025

This PR implements this RFC for telemetry.

Add process_tags to telemetry configuration

Testing

  • There is already a test testing the exact config so we know that if we are not enabling the process tags, it is not in the config
  • Check process tags are in the telemetry configuration when enabled.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 12, 2025

CODEOWNERS have been resolved as:

ddtrace/internal/settings/process_tags.py                               @DataDog/apm-core-python
ddtrace/internal/process_tags/__init__.py                               @DataDog/apm-core-python
ddtrace/internal/telemetry/data.py                                      @DataDog/apm-python
tests/internal/test_process_tags.py                                     @DataDog/apm-core-python
tests/telemetry/test_data.py                                            @DataDog/apm-python

@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

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: 219 ± 3 ms.

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

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

Import time breakdown

The following import paths have appeared:

ddtrace.auto 0.578 ms (0.26%)
ddtrace 0.578 ms (0.26%)
ddtrace._logger 0.578 ms (0.26%)
ddtrace.internal.telemetry 0.578 ms (0.26%)
ddtrace.internal.telemetry.writer 0.578 ms (0.26%)
ddtrace.internal.telemetry.data 0.578 ms (0.26%)
ddtrace.internal.process_tags 0.578 ms (0.26%)
ddtrace.internal.settings.process_tags 0.277 ms (0.13%)

The following import paths have disappeared:

ddtrace.auto 0.319 ms (0.15%)
ddtrace 0.319 ms (0.15%)
ddtrace.trace 0.319 ms (0.15%)
ddtrace._trace.filters 0.319 ms (0.15%)
ddtrace._trace.processor 0.319 ms (0.15%)
ddtrace.internal.process_tags 0.319 ms (0.15%)

The following import paths have grown:

ddtrace.auto 2.856 ms (1.30%)
ddtrace.bootstrap.sitecustomize 2.136 ms (0.98%)
ddtrace.bootstrap.preload 1.155 ms (0.53%)
multiprocessing 0.784 ms (0.36%)
multiprocessing.context 0.784 ms (0.36%)
multiprocessing.reduction 0.784 ms (0.36%)
pickle 0.784 ms (0.36%)
ddtrace.internal.settings.profiling 0.209 ms (0.10%)
ddtrace.internal.datadog.profiling 0.068 ms (0.03%)
ddtrace.vendor.psutil 0.054 ms (0.02%)
ddtrace.vendor.psutil._pslinux 0.054 ms (0.02%)
glob 0.054 ms (0.02%)
ddtrace.internal.remoteconfig.worker 0.094 ms (0.04%)
ddtrace._version 0.094 ms (0.04%)
multiprocessing.sharedctypes 0.067 ms (0.03%)
multiprocessing.heap 0.067 ms (0.03%)
multiprocessing.util 0.067 ms (0.03%)
ddtrace._trace.trace_handlers 0.222 ms (0.10%)
ddtrace.contrib.trace_utils 0.091 ms (0.04%)
ddtrace.contrib.internal.trace_utils 0.091 ms (0.04%)
ddtrace.internal.utils.wrappers 0.091 ms (0.04%)
ddtrace._trace.utils 0.077 ms (0.04%)
ddtrace._trace._inferred_proxy 0.054 ms (0.02%)
ddtrace 0.720 ms (0.33%)
ddtrace.trace 0.505 ms (0.23%)
ddtrace._trace.filters 0.395 ms (0.18%)
ddtrace._trace.processor 0.395 ms (0.18%)
ddtrace._trace.sampler 0.281 ms (0.13%)
ddtrace.internal.sampling 0.101 ms (0.05%)
ddtrace._trace.sampling_rule 0.101 ms (0.05%)
ddtrace.internal.glob_matching 0.101 ms (0.05%)
ddtrace._trace.span 0.089 ms (0.04%)
ddtrace.internal.core 0.089 ms (0.04%)
ddtrace.internal.writer 0.114 ms (0.05%)
ddtrace.internal.writer.writer 0.114 ms (0.05%)
ddtrace.internal.dogstatsd 0.114 ms (0.05%)
ddtrace.vendor.dogstatsd 0.114 ms (0.05%)
ddtrace.vendor.dogstatsd.base 0.114 ms (0.05%)
ddtrace.vendor.dogstatsd.context 0.114 ms (0.05%)
ddtrace.vendor.dogstatsd.context_async 0.114 ms (0.05%)
ddtrace._trace.provider 0.110 ms (0.05%)
ddtrace.internal.settings._config 0.215 ms (0.10%)
ddtrace.internal.gitmetadata 0.119 ms (0.05%)
ddtrace.ext.ci 0.119 ms (0.05%)
ddtrace.ext 0.119 ms (0.05%)
ddtrace.internal.settings.integration 0.095 ms (0.04%)
ddtrace._hooks 0.095 ms (0.04%)

The following import paths have shrunk:

ddtrace.auto 9.270 ms (4.23%)
ddtrace.bootstrap.sitecustomize 5.313 ms (2.43%)
ddtrace.bootstrap.preload 5.081 ms (2.32%)
multiprocessing.sharedctypes 0.986 ms (0.45%)
ctypes 0.902 ms (0.41%)
_ctypes 0.902 ms (0.41%)
multiprocessing.heap 0.085 ms (0.04%)
ddtrace.internal.remoteconfig.worker 0.648 ms (0.30%)
ddtrace.internal.remoteconfig.client 0.592 ms (0.27%)
ddtrace.internal.settings.dynamic_instrumentation 0.559 ms (0.26%)
ddtrace.internal.settings.profiling 0.370 ms (0.17%)
ddtrace.vendor.psutil 0.294 ms (0.13%)
ddtrace.vendor.psutil._pslinux 0.147 ms (0.07%)
ddtrace.vendor.psutil._psutil_linux 0.018 ms (0.01%)
pwd 0.009 ms (0.00%)
ddtrace.internal.datadog.profiling 0.076 ms (0.03%)
ddtrace.internal.datadog 0.076 ms (0.03%)
ddtrace.internal.products 0.155 ms (0.07%)
ddtrace.internal.uwsgi 0.021 ms (0.01%)
ddtrace.internal.runtime.runtime_metrics 0.029 ms (0.01%)
ddtrace._trace.trace_handlers 0.211 ms (0.10%)
ddtrace.contrib.trace_utils 0.151 ms (0.07%)
ddtrace.contrib.internal.trace_utils_async 0.072 ms (0.03%)
ddtrace._trace._inferred_proxy 0.059 ms (0.03%)
ddtrace.propagation.http 0.059 ms (0.03%)
ddtrace.propagation 0.059 ms (0.03%)
shlex 0.021 ms (0.01%)
ddtrace 3.937 ms (1.80%)
ddtrace.trace 1.316 ms (0.60%)
ddtrace._trace.filters 0.621 ms (0.28%)
ddtrace._trace.processor 0.621 ms (0.28%)
ddtrace.internal.writer 0.226 ms (0.10%)
ddtrace.internal.writer.writer 0.226 ms (0.10%)
ddtrace.internal.dogstatsd 0.160 ms (0.07%)
ddtrace.vendor.dogstatsd 0.160 ms (0.07%)
ddtrace.vendor.dogstatsd.base 0.160 ms (0.07%)
ddtrace.vendor.dogstatsd.container 0.123 ms (0.06%)
gzip 0.067 ms (0.03%)
ddtrace._trace.sampler 0.218 ms (0.10%)
ddtrace._trace.span 0.218 ms (0.10%)
ddtrace.internal.core 0.101 ms (0.05%)
ddtrace.internal.core.event_hub 0.101 ms (0.05%)
ddtrace.internal.settings.asm 0.141 ms (0.06%)
ddtrace._trace.tracer 0.159 ms (0.07%)
ddtrace._trace.processor.resource_renaming 0.138 ms (0.06%)
ddtrace.internal.debug 0.021 ms (0.01%)
ddtrace._logger 1.099 ms (0.50%)
ddtrace.internal.telemetry 1.069 ms (0.49%)
ddtrace.internal.telemetry.writer 0.840 ms (0.38%)
ddtrace.internal.utils.version 0.592 ms (0.27%)
ddtrace.vendor.packaging.version 0.070 ms (0.03%)
ddtrace.internal.runtime 0.104 ms (0.05%)
uuid 0.104 ms (0.05%)
platform 0.084 ms (0.04%)
ddtrace.internal.packages 0.083 ms (0.04%)
_sysconfigdata__linux_x86_64-linux-gnu 0.036 ms (0.02%)
ddtrace.internal.telemetry.data 0.038 ms (0.02%)
ddtrace.internal.runtime.container 0.038 ms (0.02%)
ddtrace.internal.encoding 0.024 ms (0.01%)
ddtrace.internal._encoding 0.024 ms (0.01%)
ddtrace.internal.utils.formats 0.140 ms (0.06%)
ddtrace.internal.compat 0.140 ms (0.06%)
wrapt 0.140 ms (0.06%)
wrapt.importer 0.140 ms (0.06%)
importlib.metadata 0.140 ms (0.06%)
zipfile 0.022 ms (0.01%)
shutil 0.022 ms (0.01%)
importlib.metadata._adapters 0.022 ms (0.01%)
email.message 0.022 ms (0.01%)
email.utils 0.022 ms (0.01%)
email._parseaddr 0.022 ms (0.01%)
calendar 0.022 ms (0.01%)
ddtrace.internal.settings._agent 0.089 ms (0.04%)
urllib.parse 0.089 ms (0.04%)
ddtrace.internal.logger 0.030 ms (0.01%)
ddtrace.internal.settings._config 0.279 ms (0.13%)
ddtrace.internal.gitmetadata 0.165 ms (0.08%)
ddtrace.ext.ci 0.165 ms (0.08%)
ddtrace.ext.git 0.165 ms (0.08%)
ddtrace.internal._unpatched 0.151 ms (0.07%)
subprocess 0.110 ms (0.05%)
contextlib 0.110 ms (0.05%)
json 0.041 ms (0.02%)
json.decoder 0.041 ms (0.02%)
re 0.041 ms (0.02%)
enum 0.041 ms (0.02%)
types 0.041 ms (0.02%)
ddtrace._monkey 0.065 ms (0.03%)
ddtrace.vendor.packaging.specifiers 0.065 ms (0.03%)

@dubloom dubloom force-pushed the dubloom/process-tags-telemetry branch from 7e097ee to 256f2de Compare November 12, 2025 15:52
@dubloom dubloom force-pushed the dubloom/process-tags-telemetry branch from e338aa1 to 8341969 Compare November 19, 2025 17:14
@dubloom dubloom requested a review from P403n1x87 November 19, 2025 17:25
@dubloom dubloom marked this pull request as ready for review November 19, 2025 17:32
@dubloom dubloom requested review from a team as code owners November 19, 2025 17:32
@dubloom dubloom requested review from florentinl and juanjux and removed request for a team November 19, 2025 17:32
Base automatically changed from dubloom/process-tags-collection to main November 20, 2025 09:04
@gitsync-ddbuild-stable11 gitsync-ddbuild-stable11 bot requested review from a team as code owners November 20, 2025 09:04
@dubloom dubloom enabled auto-merge (squash) November 20, 2025 09:19
@dubloom dubloom merged commit c9b3088 into main Nov 20, 2025
401 checks passed
@dubloom dubloom deleted the dubloom/process-tags-telemetry branch November 20, 2025 10:49
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.

4 participants