wlm: process: allow SD collector to work when process collection is disabled
What does this PR do?
This PR allows the process collector to run when process collection is disabled, only collecting service information and storing Service Discovery only fields.
Motivation
Handle the case where process collection is disabled.
Describe how you validated your changes
Unit tests are included, and were run, but are skipped until the configuration is no longer hardcoded.
The change was also tested manually by:
- Changing the return value of isServiceDiscoveryEnabled to true
- Run processes that look like a service: Python HTTP server, postgres, rails server.
- Running the agent and system-probe, and run
agent workload-list. Only service information should be present on the output. Example:
vagrant@agent-dev-ubuntu-22:/git/datadog-agent$ ./bin/agent/agent workload-list -c ./dev/dist/datadog.yaml --sysprobecfgpath ./dev/dist/system-probe.yaml | rg -A 10 'Entity process'
=== Entity process sources(merged):[service_discovery] id: 563793 ===
----------- Entity ID -----------
PID: 563793
Namespace PID: 0
Container ID:
Creation time: 2025-06-24 12:43:52 +0000 UTC
Service Generated Name: agent
===
=== Entity process sources(merged):[service_discovery] id: 921 ===
----------- Entity ID -----------
PID: 921
Namespace PID: 0
Container ID:
Creation time: 2025-06-22 20:42:10 +0000 UTC
Service Generated Name: postgres
===
=== Entity process sources(merged):[service_discovery] id: 993737 ===
----------- Entity ID -----------
PID: 993737
Namespace PID: 0
Container ID:
Creation time: 2025-06-23 12:12:39 +0000 UTC
Service Generated Name: rails_hello
===
=== Entity process sources(merged):[service_discovery] id: 1346514 ===
----------- Entity ID -----------
PID: 1346514
Namespace PID: 0
Container ID:
Creation time: 2025-06-24 01:57:43 +0000 UTC
Service Generated Name: node
===
Possible Drawbacks / Trade-offs
Additional Notes
Regression Detector
Regression Detector Results
Metrics dashboard
Target profiles
Run ID: 52ee6de6-4643-4dbc-b072-c787c6b402ba
Baseline: 2c3712cf88443c30601cd7a13dfccf02972e275b Comparison: aebd6f3972c2692b291e98254c88975aa2a71301 Diff
Optimization Goals: ✅ No significant changes detected
Fine details of change detection per experiment
| perf | experiment | goal | Δ mean % | Δ mean % CI | trials | links |
|---|---|---|---|---|---|---|
| ➖ | uds_dogstatsd_20mb_12k_contexts_20_senders | memory utilization | +1.08 | [+1.01, +1.15] | 1 | Logs |
| ➖ | file_tree | memory utilization | +0.51 | [+0.35, +0.66] | 1 | Logs |
| ➖ | otlp_ingest_logs | memory utilization | +0.45 | [+0.32, +0.58] | 1 | Logs |
| ➖ | file_to_blackhole_100ms_latency | egress throughput | +0.13 | [-0.47, +0.72] | 1 | Logs |
| ➖ | file_to_blackhole_500ms_latency | egress throughput | +0.10 | [-0.51, +0.71] | 1 | Logs |
| ➖ | file_to_blackhole_0ms_latency | egress throughput | +0.07 | [-0.53, +0.67] | 1 | Logs |
| ➖ | file_to_blackhole_0ms_latency_http1 | egress throughput | +0.04 | [-0.57, +0.65] | 1 | Logs |
| ➖ | file_to_blackhole_300ms_latency | egress throughput | +0.02 | [-0.57, +0.62] | 1 | Logs |
| ➖ | file_to_blackhole_1000ms_latency_linear_load | egress throughput | +0.02 | [-0.21, +0.25] | 1 | Logs |
| ➖ | uds_dogstatsd_to_api | ingress throughput | +0.01 | [-0.27, +0.29] | 1 | Logs |
| ➖ | tcp_dd_logs_filter_exclude | ingress throughput | +0.00 | [-0.02, +0.02] | 1 | Logs |
| ➖ | file_to_blackhole_0ms_latency_http2 | egress throughput | -0.03 | [-0.63, +0.57] | 1 | Logs |
| ➖ | docker_containers_cpu | % cpu utilization | -0.03 | [-3.16, +3.10] | 1 | Logs |
| ➖ | file_to_blackhole_1000ms_latency | egress throughput | -0.04 | [-0.65, +0.57] | 1 | Logs |
| ➖ | ddot_metrics | memory utilization | -0.11 | [-0.23, +0.00] | 1 | Logs |
| ➖ | ddot_logs | memory utilization | -0.17 | [-0.26, -0.08] | 1 | Logs |
| ➖ | otlp_ingest_metrics | memory utilization | -0.17 | [-0.33, -0.02] | 1 | Logs |
| ➖ | quality_gate_idle_all_features | memory utilization | -0.25 | [-0.35, -0.15] | 1 | Logs bounds checks dashboard |
| ➖ | quality_gate_idle | memory utilization | -0.34 | [-0.41, -0.27] | 1 | Logs bounds checks dashboard |
| ➖ | uds_dogstatsd_to_api_cpu | % cpu utilization | -0.69 | [-1.56, +0.18] | 1 | Logs |
| ➖ | tcp_syslog_to_blackhole | ingress throughput | -1.93 | [-2.02, -1.85] | 1 | Logs |
| ➖ | quality_gate_logs | % cpu utilization | -2.06 | [-4.84, +0.73] | 1 | Logs bounds checks dashboard |
| ➖ | docker_containers_memory | memory utilization | -2.81 | [-2.97, -2.66] | 1 | Logs |
Bounds Checks: ❌ Failed
| perf | experiment | bounds_check_name | replicates_passed | links |
|---|---|---|---|---|
| ❌ | quality_gate_logs | memory_usage | 7/10 | bounds checks dashboard |
| ❌ | quality_gate_idle_all_features | memory_usage | 8/10 | bounds checks dashboard |
| ✅ | docker_containers_cpu | simple_check_run | 10/10 | |
| ✅ | docker_containers_memory | memory_usage | 10/10 | |
| ✅ | docker_containers_memory | simple_check_run | 10/10 | |
| ✅ | file_to_blackhole_0ms_latency | lost_bytes | 10/10 | |
| ✅ | file_to_blackhole_0ms_latency | memory_usage | 10/10 | |
| ✅ | file_to_blackhole_0ms_latency_http1 | lost_bytes | 10/10 | |
| ✅ | file_to_blackhole_0ms_latency_http1 | memory_usage | 10/10 | |
| ✅ | file_to_blackhole_0ms_latency_http2 | lost_bytes | 10/10 | |
| ✅ | file_to_blackhole_0ms_latency_http2 | memory_usage | 10/10 | |
| ✅ | file_to_blackhole_1000ms_latency | memory_usage | 10/10 | |
| ✅ | file_to_blackhole_1000ms_latency_linear_load | memory_usage | 10/10 | |
| ✅ | file_to_blackhole_100ms_latency | lost_bytes | 10/10 | |
| ✅ | file_to_blackhole_100ms_latency | memory_usage | 10/10 | |
| ✅ | file_to_blackhole_300ms_latency | lost_bytes | 10/10 | |
| ✅ | file_to_blackhole_300ms_latency | memory_usage | 10/10 | |
| ✅ | file_to_blackhole_500ms_latency | lost_bytes | 10/10 | |
| ✅ | file_to_blackhole_500ms_latency | memory_usage | 10/10 | |
| ✅ | quality_gate_idle | intake_connections | 10/10 | bounds checks dashboard |
| ✅ | quality_gate_idle | memory_usage | 10/10 | bounds checks dashboard |
| ✅ | quality_gate_idle_all_features | intake_connections | 10/10 | bounds checks dashboard |
| ✅ | quality_gate_logs | intake_connections | 10/10 | bounds checks dashboard |
| ✅ | quality_gate_logs | lost_bytes | 10/10 | bounds checks dashboard |
Explanation
Confidence level: 90.00% Effect size tolerance: |Δ mean %| ≥ 5.00%
Performance changes are noted in the perf column of each table:
- ✅ = significantly better comparison variant performance
- ❌ = significantly worse comparison variant performance
- ➖ = no significant change in performance
A regression test is an A/B test of target performance in a repeatable rig, where "performance" is measured as "comparison variant minus baseline variant" for an optimization goal (e.g., ingress throughput). Due to intrinsic variability in measuring that goal, we can only estimate its mean value for each experiment; we report uncertainty in that value as a 90.00% confidence interval denoted "Δ mean % CI".
For each experiment, we decide whether a change in performance is a "regression" -- a change worth investigating further -- if all of the following criteria are true:
-
Its estimated |Δ mean %| ≥ 5.00%, indicating the change is big enough to merit a closer look.
-
Its 90.00% confidence interval "Δ mean % CI" does not contain zero, indicating that if our statistical model is accurate, there is at least a 90.00% chance there is a difference in performance between baseline and comparison variants.
-
Its configuration does not mark it "erratic".
CI Pass/Fail Decision
❌ Failed. Some Quality Gates were violated.
- quality_gate_idle_all_features, bounds check intake_connections: 10/10 replicas passed. Gate passed.
- quality_gate_idle_all_features, bounds check memory_usage: 8/10 replicas passed. Failed 2 which is > 0. Gate FAILED.
- quality_gate_logs, bounds check memory_usage: 7/10 replicas passed. Failed 3 which is > 0. Gate FAILED.
- quality_gate_logs, bounds check lost_bytes: 10/10 replicas passed. Gate passed.
- quality_gate_logs, bounds check intake_connections: 10/10 replicas passed. Gate passed.
- quality_gate_idle, bounds check memory_usage: 10/10 replicas passed. Gate passed.
- quality_gate_idle, bounds check intake_connections: 10/10 replicas passed. Gate passed.
Static quality checks
✅ Please find below the results from static quality gates Comparison made with ancestor 2c3712cf88443c30601cd7a13dfccf02972e275b
Successful checks
Info
| Quality gate | Delta | On disk size (MiB) | Delta | On wire size (MiB) | |
|---|---|---|---|---|---|
| ✅ | agent_deb_amd64 | $${0}$$ | $${699.16}$$ < $${700.55}$$ | $${+0.01}$$ | $${176.57}$$ < $${177.62}$$ |
| ✅ | agent_deb_amd64_fips | $${0}$$ | $${697.42}$$ < $${699.75}$$ | $${+0.03}$$ | $${176.02}$$ < $${177.04}$$ |
| ✅ | agent_heroku_amd64 | $${0}$$ | $${352.31}$$ < $${362.84}$$ | $${+0}$$ | $${95.12}$$ < $${98.91}$$ |
| ✅ | agent_msi | $${0}$$ | $${973.39}$$ < $${973.9}$$ | $${-0.02}$$ | $${147.13}$$ < $${148.11}$$ |
| ✅ | agent_rpm_amd64 | $${0}$$ | $${699.15}$$ < $${700.53}$$ | $${-0.04}$$ | $${178.27}$$ < $${179.2}$$ |
| ✅ | agent_rpm_amd64_fips | $${0}$$ | $${697.41}$$ < $${699.74}$$ | $${-0.04}$$ | $${177.83}$$ < $${178.75}$$ |
| ✅ | agent_rpm_arm64 | $${0}$$ | $${689.02}$$ < $${690.5}$$ | $${+0}$$ | $${161.61}$$ < $${162.56}$$ |
| ✅ | agent_rpm_arm64_fips | $${0}$$ | $${687.4}$$ < $${689.8}$$ | $${-0.01}$$ | $${160.71}$$ < $${161.61}$$ |
| ✅ | agent_suse_amd64 | $${0}$$ | $${699.15}$$ < $${700.54}$$ | $${-0.04}$$ | $${178.27}$$ < $${179.2}$$ |
| ✅ | agent_suse_amd64_fips | $${0}$$ | $${697.41}$$ < $${699.74}$$ | $${-0.04}$$ | $${177.83}$$ < $${178.93}$$ |
| ✅ | agent_suse_arm64 | $${0}$$ | $${689.02}$$ < $${690.43}$$ | $${+0}$$ | $${161.61}$$ < $${162.57}$$ |
| ✅ | agent_suse_arm64_fips | $${0}$$ | $${687.4}$$ < $${689.78}$$ | $${-0.01}$$ | $${160.71}$$ < $${161.61}$$ |
| ✅ | docker_agent_amd64 | $${+0}$$ | $${782.95}$$ < $${784.33}$$ | $${-0}$$ | $${269.59}$$ < $${270.56}$$ |
| ✅ | docker_agent_arm64 | $${-0}$$ | $${796.27}$$ < $${797.68}$$ | $${+0}$$ | $${256.89}$$ < $${257.84}$$ |
| ✅ | docker_agent_jmx_amd64 | $${+0}$$ | $${974.14}$$ < $${975.52}$$ | $${-0}$$ | $${338.58}$$ < $${339.53}$$ |
| ✅ | docker_agent_jmx_arm64 | $${0}$$ | $${976.06}$$ < $${977.47}$$ | $${+0.01}$$ | $${321.85}$$ < $${322.81}$$ |
| ✅ | docker_agent_windows1809 | $${-0.07}$$ | $${1184.98}$$ < $${1190.0}$$ | $${+0.01}$$ | $${417.38}$$ < $${422.66}$$ |
| ✅ | docker_agent_windows1809_core | $${+0}$$ | $${5915.01}$$ < $${5919.41}$$ | $${0}$$ | $${2048.0}$$ < $${2049.0}$$ |
| ✅ | docker_agent_windows1809_core_jmx | $${+0.2}$$ | $${6036.77}$$ < $${6063.56}$$ | $${0}$$ | $${2048.0}$$ < $${2049.0}$$ |
| ✅ | docker_agent_windows1809_jmx | $${-0}$$ | $${1306.67}$$ < $${1311.1}$$ | $${+0}$$ | $${459.65}$$ < $${464.35}$$ |
| ✅ | docker_agent_windows2022 | $${+0.33}$$ | $${1204.47}$$ < $${1208.75}$$ | $${+0.05}$$ | $${430.18}$$ < $${434.91}$$ |
| ✅ | docker_agent_windows2022_core | $${-0}$$ | $${5888.1}$$ < $${5892.66}$$ | $${0}$$ | $${2048.0}$$ < $${2049.0}$$ |
| ✅ | docker_agent_windows2022_core_jmx | $${+0}$$ | $${6009.74}$$ < $${6014.08}$$ | $${0}$$ | $${2048.0}$$ < $${2049.0}$$ |
| ✅ | docker_agent_windows2022_jmx | $${+0.33}$$ | $${1326.06}$$ < $${1330.39}$$ | $${-0.03}$$ | $${472.4}$$ < $${477.17}$$ |
| ✅ | docker_cluster_agent_amd64 | $${-0}$$ | $${213.64}$$ < $${214.5}$$ | $${-0}$$ | $${72.6}$$ < $${73.51}$$ |
| ✅ | docker_cluster_agent_arm64 | $${-0}$$ | $${229.43}$$ < $${230.33}$$ | $${+0}$$ | $${68.86}$$ < $${69.77}$$ |
| ✅ | docker_cws_instrumentation_amd64 | $${0}$$ | $${7.08}$$ < $${7.12}$$ | $${-0}$$ | $${2.95}$$ < $${3.29}$$ |
| ✅ | docker_cws_instrumentation_arm64 | $${0}$$ | $${6.69}$$ < $${6.92}$$ | $${-0}$$ | $${2.7}$$ < $${3.07}$$ |
| ✅ | docker_dogstatsd_amd64 | $${0}$$ | $${39.23}$$ < $${39.57}$$ | $${-0}$$ | $${15.12}$$ < $${15.76}$$ |
| ✅ | docker_dogstatsd_arm64 | $${+0}$$ | $${37.88}$$ < $${38.2}$$ | $${-0}$$ | $${14.53}$$ < $${14.83}$$ |
| ✅ | dogstatsd_deb_amd64 | $${0}$$ | $${30.46}$$ < $${31.4}$$ | $${-0}$$ | $${8.0}$$ < $${8.95}$$ |
| ✅ | dogstatsd_deb_arm64 | $${0}$$ | $${29.03}$$ < $${29.97}$$ | $${+0}$$ | $${6.94}$$ < $${7.89}$$ |
| ✅ | dogstatsd_rpm_amd64 | $${0}$$ | $${30.46}$$ < $${31.4}$$ | $${+0}$$ | $${8.01}$$ < $${8.96}$$ |
| ✅ | dogstatsd_suse_amd64 | $${0}$$ | $${30.46}$$ < $${31.4}$$ | $${+0}$$ | $${8.01}$$ < $${8.96}$$ |
| ✅ | iot_agent_deb_amd64 | $${0}$$ | $${53.7}$$ < $${54.55}$$ | $${-0}$$ | $${13.52}$$ < $${14.45}$$ |
| ✅ | iot_agent_deb_arm64 | $${0}$$ | $${51.06}$$ < $${51.9}$$ | $${+0}$$ | $${11.7}$$ < $${12.63}$$ |
| ✅ | iot_agent_deb_armhf | $${0}$$ | $${50.57}$$ < $${51.42}$$ | $${-0.03}$$ | $${11.78}$$ < $${12.74}$$ |
| ✅ | iot_agent_rpm_amd64 | $${0}$$ | $${53.71}$$ < $${54.55}$$ | $${+0}$$ | $${13.54}$$ < $${14.47}$$ |
| ✅ | iot_agent_rpm_arm64 | $${0}$$ | $${51.06}$$ < $${51.91}$$ | $${-0}$$ | $${11.72}$$ < $${12.65}$$ |
| ✅ | iot_agent_suse_amd64 | $${0}$$ | $${53.71}$$ < $${54.55}$$ | $${+0}$$ | $${13.54}$$ < $${14.47}$$ |
/merge
View all feedbacks in Devflow UI.
2025-07-02 13:05:09 UTC :information_source: Start processing command /merge
2025-07-02 13:05:24 UTC :information_source: MergeQueue: waiting for PR to be ready
This merge request is not mergeable yet, because of pending checks/missing approvals. It will be added to the queue as soon as checks pass and/or get approvals.
Note: if you pushed new commits since the last approval, you may need additional approval.
You can remove it from the waiting list with /remove command.
2025-07-02 15:15:29 UTC :information_source: MergeQueue: merge request added to the queue
The expected merge time in main is approximately 47m (p90).
2025-07-02 15:53:39 UTC :information_source: MergeQueue: This merge request was merged