feat(apm): expose full obfuscation config in agent info - #56014
gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits into
Conversation
There was a problem hiding this comment.
AI review by Codex (OpenAI) - workflow run
patch is correct. The added fields reflect the Agent configuration, preserve existing response fields, and have focused handler test coverage. No actionable correctness issues found. Tests were not run in the read-only environment.
|
🎯 Code Coverage (details) 🔗 Commit SHA: 79f52a9 | Docs | View more details | Give us feedback! |
Files inventory check summaryFile checks results against ancestor efcfce51: Results for datadog-agent_7.85.0~devel.git.146.79f52a9.pipeline.136592152-1_amd64.deb:No change detected Results for datadog-iot-agent_7.85.0~devel.git.146.79f52a9.pipeline.136592152-1_amd64.deb:No change detected |
Static quality checks✅ Please find below the results from static quality gates Successful checksInfo
15 successful checks with minimal change (< 2 KiB)
|
BenchmarksBenchmark execution time: 2026-09-10 11:41:42 Comparing candidate commit 79f52a9 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 3 metrics, 0 unstable metrics.
|
Regression DetectorRegression Detector ResultsMetrics dashboard Baseline: 63cc7f1 Optimization Goals: ✅ No significant changes detected
|
| perf | experiment | goal | Δ mean % | Δ mean % CI | trials | links |
|---|---|---|---|---|---|---|
| ➖ | quality_gate_security_mean_fs_load | memory utilization | +0.42 | [+0.36, +0.47] | 1 | Logs bounds checks dashboard |
| ➖ | dsd_uds_10mb_3k_timestamped_contexts_memory | memory utilization | +0.29 | [+0.08, +0.51] | 1 | Logs |
| ➖ | quality_gate_security_idle | memory utilization | +0.21 | [+0.18, +0.25] | 1 | Logs bounds checks dashboard |
| ➖ | quality_gate_idle | memory utilization | +0.16 | [+0.12, +0.20] | 1 | Logs bounds checks dashboard |
| ➖ | quality_gate_idle_all_features | memory utilization | +0.02 | [-0.02, +0.05] | 1 | Logs bounds checks dashboard |
| ➖ | quality_gate_security_no_fs_load | memory utilization | -0.34 | [-0.42, -0.27] | 1 | Logs bounds checks dashboard |
| ➖ | quality_gate_private_action_runner | memory utilization | -0.53 | [-0.65, -0.40] | 1 | Logs bounds checks dashboard |
| ➖ | quality_gate_metrics_logs | memory utilization | -0.55 | [-0.79, -0.32] | 1 | Logs bounds checks dashboard |
| ➖ | dsd_uds_10mb_3k_timestamped_contexts_cpu | % cpu utilization | -0.74 | [-0.97, -0.50] | 1 | Logs |
| ➖ | quality_gate_logs | % cpu utilization | -3.11 | [-3.94, -2.28] | 1 | Logs bounds checks dashboard |
Bounds Checks: ✅ Passed
| perf | experiment | bounds_check_name | replicates_passed | observed_value | links |
|---|---|---|---|---|---|
| ✅ | quality_gate_idle | intake_connections | 10/10 | 4 ≤ 5 | bounds checks dashboard |
| ✅ | quality_gate_idle | memory_usage | 10/10 | 172.56MiB ≤ 179MiB | bounds checks dashboard |
| ✅ | quality_gate_idle | total_bytes_received | 10/10 | 746.25KiB ≤ 819.20KiB | bounds checks dashboard |
| ✅ | quality_gate_idle_all_features | intake_connections | 10/10 | 4 ≤ 5 | bounds checks dashboard |
| ✅ | quality_gate_idle_all_features | memory_usage | 10/10 | 518.89MiB ≤ 537MiB | bounds checks dashboard |
| ✅ | quality_gate_idle_all_features | total_bytes_received | 10/10 | 1.13MiB ≤ 1.25MiB | bounds checks dashboard |
| ✅ | quality_gate_logs | intake_connections | 10/10 | 18 ≤ 40 | bounds checks dashboard |
| ✅ | quality_gate_logs | memory_usage | 10/10 | 211.02MiB ≤ 228MiB | bounds checks dashboard |
| ✅ | quality_gate_logs | missed_bytes | 10/10 | 0B = 0B | bounds checks dashboard |
| ✅ | quality_gate_logs | total_bytes_received | 10/10 | 263.51MiB ≤ 292MiB | bounds checks dashboard |
| ✅ | quality_gate_metrics_logs | cpu_usage | 10/10 | 360.47 ≤ 2000 | bounds checks dashboard |
| ✅ | quality_gate_metrics_logs | intake_connections | 10/10 | 21 ≤ 40 | bounds checks dashboard |
| ✅ | quality_gate_metrics_logs | memory_usage | 10/10 | 414.36MiB ≤ 455MiB | bounds checks dashboard |
| ✅ | quality_gate_metrics_logs | missed_bytes | 10/10 | 0B = 0B | bounds checks dashboard |
| ✅ | quality_gate_metrics_logs | total_bytes_received | 10/10 | 0.94GiB ≤ 1.04GiB | bounds checks dashboard |
| ✅ | quality_gate_private_action_runner | memory_usage | 10/10 | 72.82MiB ≤ 75MiB | bounds checks dashboard |
| ✅ | quality_gate_security_idle | cpu_usage | 10/10 | 29.45 ≤ 100 | bounds checks dashboard |
| ✅ | quality_gate_security_idle | memory_usage | 10/10 | 327.01MiB ≤ 355MiB | bounds checks dashboard |
| ✅ | quality_gate_security_mean_fs_load | cpu_usage | 10/10 | 64.99 ≤ 200 | bounds checks dashboard |
| ✅ | quality_gate_security_mean_fs_load | memory_usage | 10/10 | 308.05MiB ≤ 335MiB | bounds checks dashboard |
| ✅ | quality_gate_security_no_fs_load | cpu_usage | 10/10 | 23.48 ≤ 100 | bounds checks dashboard |
| ✅ | quality_gate_security_no_fs_load | memory_usage | 10/10 | 312.57MiB ≤ 345MiB | 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
✅ Passed. All Quality Gates passed.
- quality_gate_logs, bounds check intake_connections: 10/10 replicas passed. Gate passed.
- quality_gate_logs, bounds check missed_bytes: 10/10 replicas passed. Gate passed.
- quality_gate_logs, bounds check memory_usage: 10/10 replicas passed. Gate passed.
- quality_gate_logs, bounds check total_bytes_received: 10/10 replicas passed. Gate passed.
- quality_gate_idle, bounds check total_bytes_received: 10/10 replicas passed. Gate passed.
- quality_gate_idle, 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_private_action_runner, bounds check memory_usage: 10/10 replicas passed. Gate passed.
- quality_gate_metrics_logs, bounds check missed_bytes: 10/10 replicas passed. Gate passed.
- quality_gate_metrics_logs, bounds check intake_connections: 10/10 replicas passed. Gate passed.
- quality_gate_metrics_logs, bounds check memory_usage: 10/10 replicas passed. Gate passed.
- quality_gate_metrics_logs, bounds check cpu_usage: 10/10 replicas passed. Gate passed.
- quality_gate_metrics_logs, bounds check total_bytes_received: 10/10 replicas passed. Gate passed.
- quality_gate_security_mean_fs_load, bounds check memory_usage: 10/10 replicas passed. Gate passed.
- quality_gate_security_mean_fs_load, bounds check cpu_usage: 10/10 replicas passed. Gate passed.
- quality_gate_idle_all_features, bounds check intake_connections: 10/10 replicas passed. Gate passed.
- quality_gate_idle_all_features, bounds check total_bytes_received: 10/10 replicas passed. Gate passed.
- quality_gate_idle_all_features, bounds check memory_usage: 10/10 replicas passed. Gate passed.
- quality_gate_security_no_fs_load, bounds check memory_usage: 10/10 replicas passed. Gate passed.
- quality_gate_security_no_fs_load, bounds check cpu_usage: 10/10 replicas passed. Gate passed.
- quality_gate_security_idle, bounds check memory_usage: 10/10 replicas passed. Gate passed.
- quality_gate_security_idle, bounds check cpu_usage: 10/10 replicas passed. Gate passed.
There was a problem hiding this comment.
AI review by Codex (OpenAI) - workflow run
The patch is correct. The added fields reflect the agent’s configuration and preserve existing response fields. No actionable regressions found. Tests were not run in the read-only environment.
#2490) # What does this PR do? Parse the obfuscation config from the agent `/info` endpoint with a new, more complete format. It now includes the missing parts, these are not used in stats computation yet it will come in a follow up PR. Agent side PR: DataDog/datadog-agent#56014 # Motivation 2 main motivation: `Client side stats obfuscates resources without using the agent config. This is a breaking change for customers enabling CSS when they have a custom obfuscation config`. See https://docs.google.com/document/d/1i-CQfkF-5B_8vLYepIJ6A16aRISH-Px7XIBSq0HKMaY/edit?tab=t.0#heading=h.i4txi29o2zao We might want to obfuscate span derived primary tags in client side stats in the future. # Additional Notes # How to test the change? I tried the `fetch_info` function manually using a released agent version and with the version in the [mentioned PR](ttps://github.com/DataDog/datadog-agent/pull/56014). Co-authored-by: oscar.ledauphin <oscar.ledauphin@datadoghq.com>
What does this PR do?
Expands the trace agent
/inforesponse with tag replacement rules and detailed credit card, SQL, Elasticsearch, OpenSearch, and MongoDB obfuscation settings. Existing response fields remain unchanged for backward compatibility.Motivation
Make the trace agent effective obfuscation configuration discoverable through
/infofor client-side stats usage.See https://datadoghq.atlassian.net/wiki/spaces/APM/pages/6704136267/CSS+Obfuscation+Specification
Describe how you validated your changes
Ran
dda inv test --targets=./pkg/trace/api.Here is a comparison of what it had before compared to now:
Notice that some fields are duplicated now (ex
sql_obfuscation_modevssql.obfuscation_mode), this is to both keep backward compatibility and provide a nicer to parse format for the future.{ "elastic_search": true, "mongo": true, "sql_exec_plan": false, "sql_exec_plan_normalize": false, "sql_obfuscation_mode": "", "http": { "remove_query_string": false, "remove_path_digits": false }, "remove_stack_traces": false, "redis": { "enabled": true, "remove_all_args": false }, "valkey": { "enabled": true, "remove_all_args": false }, "memcached": { "enabled": true, "keep_command": false } }{ "elastic_search": true, "mongo": true, "sql_exec_plan": false, "sql_exec_plan_normalize": false, "sql_obfuscation_mode": "", "tag_replace_rules": null, "http": { "remove_query_string": true, "remove_path_digits": true }, "remove_stack_traces": false, "redis": { "enabled": true, "remove_all_args": true }, "valkey": { "enabled": true, "remove_all_args": false }, "memcached": { "enabled": true, "keep_command": false }, "credit_cards": { "enabled": true, "luhn": false, "keep_values": [] }, "sql": { "replace_digits": false, "keep_sql_alias": false, "dollar_quoted_func": false, "keep_null": false, "keep_boolean": false, "keep_positional_parameter": false, "keep_trailing_semicolon": false, "keep_identifier_quotation": false, "replace_bind_parameter": false, "remove_space_between_parentheses": false, "keep_json_path": false, "obfuscation_mode": "" }, "elasticsearch": { "enabled": true, "keep_keys": [] }, "opensearch": { "enabled": true, "keep_keys": [] }, "mongodb": { "enabled": true, "keep_keys": [] } }[Generated using codex]