Skip to content

feat(apm): expose full obfuscation config in agent info - #56014

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits into
mainfrom
oscarld/expose-all-obfuscation-config
Sep 11, 2026
Merged

gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits into
mainfrom
oscarld/expose-all-obfuscation-config

Conversation

@Eldolfin

@Eldolfin Eldolfin commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

Expands the trace agent /info response 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 /info for 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_mode vs sql.obfuscation_mode), this is to both keep backward compatibility and provide a nicer to parse format for the future.

Before After
{
	"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]

@Eldolfin Eldolfin added team/agent-apm trace-agent qa/done QA done before merge and regressions are covered by tests labels Sep 8, 2026
@dd-octo-sts dd-octo-sts Bot added the internal Identify a non-fork PR label Sep 8, 2026
@github-actions github-actions Bot added the medium review PR review might take time label Sep 8, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

@datadog-official

datadog-official Bot commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

🎯 Code Coverage (details)
• Patch Coverage: 93.33%
• Overall Coverage: 58.20% (+1.80%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 79f52a9 | Docs | View more details | Give us feedback!

@dd-octo-sts

dd-octo-sts Bot commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

Files inventory check summary

File 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

@dd-octo-sts

dd-octo-sts Bot commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

Static quality checks

✅ Please find below the results from static quality gates
Comparison made with ancestor efcfce5
📊 Static Quality Gates Dashboard
🔗 SQG Job

Successful checks

Info

Quality gate Change Size (prev → curr → max)
✅ agent_deb_amd64 +4.0 KiB (0.00% increase, -0.21% of buffer) 781.111 → 781.115 → 782.940
✅ agent_deb_amd64_fips +8.0 KiB (0.00% increase, -0.34% of buffer) 715.750 → 715.758 → 718.020
✅ agent_heroku_amd64 +4.0 KiB (0.00% increase, -0.06% of buffer) 316.222 → 316.226 → 322.470
✅ agent_rpm_amd64 +4.0 KiB (0.00% increase, -0.22% of buffer) 781.094 → 781.098 → 782.910
✅ agent_rpm_amd64_fips +8.0 KiB (0.00% increase, -0.34% of buffer) 715.734 → 715.742 → 718.020
✅ agent_rpm_arm64 +4.0 KiB (0.00% increase, -0.12% of buffer) 752.030 → 752.034 → 755.210
✅ agent_rpm_arm64_fips +4.0 KiB (0.00% increase, -0.11% of buffer) 692.187 → 692.191 → 695.900
✅ agent_suse_amd64 +4.0 KiB (0.00% increase, -0.22% of buffer) 781.094 → 781.098 → 782.910
✅ agent_suse_amd64_fips +8.0 KiB (0.00% increase, -0.34% of buffer) 715.734 → 715.742 → 718.020
✅ agent_suse_arm64 +4.0 KiB (0.00% increase, -0.12% of buffer) 752.030 → 752.034 → 755.210
✅ agent_suse_arm64_fips +4.0 KiB (0.00% increase, -0.11% of buffer) 692.187 → 692.191 → 695.900
✅ docker_agent_amd64 +4.0 KiB (0.00% increase, -4.44% of buffer) 840.032 → 840.036 → 840.120
✅ docker_agent_arm64 +4.0 KiB (0.00% increase, -0.12% of buffer) 836.012 → 836.016 → 839.280
✅ docker_agent_jmx_amd64 +4.0 KiB (0.00% increase, -1.01% of buffer) 1030.944 → 1030.948 → 1031.330
✅ docker_agent_jmx_arm64 +4.0 KiB (0.00% increase, -0.12% of buffer) 1015.704 → 1015.708 → 1018.970
✅ docker_host_profiler_amd64 +6.34 KiB (0.00% increase, -0.05% of buffer) 307.724 → 307.731 → 319.490
✅ docker_host_profiler_arm64 -63.14 KiB (0.02% reduction, +0.53% of buffer) 318.972 → 318.910 → 330.690
15 successful checks with minimal change (< 2 KiB)
Quality gate Current Size
✅ docker_cluster_agent_amd64 212.901 MiB
✅ docker_cluster_agent_arm64 225.905 MiB
✅ docker_cws_instrumentation_amd64 7.439 MiB
✅ docker_cws_instrumentation_arm64 6.877 MiB
✅ docker_dogstatsd_amd64 39.597 MiB
✅ docker_dogstatsd_arm64 37.686 MiB
✅ dogstatsd_deb_amd64 30.343 MiB
✅ dogstatsd_deb_arm64 28.351 MiB
✅ dogstatsd_rpm_amd64 30.343 MiB
✅ dogstatsd_suse_amd64 30.343 MiB
✅ iot_agent_deb_amd64 46.669 MiB
✅ iot_agent_deb_arm64 43.286 MiB
✅ iot_agent_deb_armhf 44.108 MiB
✅ iot_agent_rpm_amd64 46.669 MiB
✅ iot_agent_suse_amd64 46.668 MiB

@dd-octo-sts

dd-octo-sts Bot commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

Benchmarks

Benchmark execution time: 2026-09-10 11:41:42

Comparing candidate commit 79f52a9 in PR branch oscarld/expose-all-obfuscation-config with baseline commit efcfce5 in branch main.

📊 Benchmarking dashboard

Found 0 performance improvements and 0 performance regressions! Performance is the same for 3 metrics, 0 unstable metrics.

Explanation

This is an A/B test comparing a candidate commit's performance against that of a baseline commit. Performance changes are noted in the tables below as:

  • 🟩 = significantly better candidate vs. baseline
  • 🟥 = significantly worse candidate vs. baseline

We compute a confidence interval (CI) over the relative difference of means between metrics from the candidate and baseline commits, considering the baseline as the reference.

If the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD), the change is considered significant.

Feel free to reach out to #apm-benchmarking-platform on Slack if you have any questions.

More details about the CI and significant changes

You can imagine this CI as a range of values that is likely to contain the true difference of means between the candidate and baseline commits.

CIs of the difference of means are often centered around 0%, because often changes are not that big:

---------------------------------(------|---^--------)-------------------------------->
                              -0.6%    0%  0.3%     +1.2%
                                 |          |        |
         lower bound of the CI --'          |        |
sample mean (center of the CI) -------------'        |
         upper bound of the CI ----------------------'

As described above, a change is considered significant if the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD).

For instance, for an execution time metric, this confidence interval indicates a significantly worse performance:

----------------------------------------|---------|---(---------^---------)---------->
                                       0%        1%  1.3%      2.2%      3.1%
                                                  |   |         |         |
       significant impact threshold --------------'   |         |         |
                      lower bound of CI --------------'         |         |
       sample mean (center of the CI) --------------------------'         |
                      upper bound of CI ----------------------------------'

@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented Sep 8, 2026 •

Copy link
Copy Markdown

Regression Detector

Regression Detector Results

Metrics dashboard
Target profiles
Job ID: 5cc61c45-30ba-4312-b223-021643d80dc9

Baseline: 63cc7f1
Comparison: 405fa85
Diff

Optimization Goals: ✅ No significant changes detected

Fine details of change detection per experiment

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:

  1. Its estimated |Δ mean %| ≥ 5.00%, indicating the change is big enough to merit a closer look.

  2. 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.

  3. 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.

@Eldolfin Eldolfin changed the title feat(trace): Expose obfuscation config in agent info feat(trace): expose full obfuscation config in agent info Sep 9, 2026
@Eldolfin Eldolfin changed the title feat(trace): expose full obfuscation config in agent info feat(apm): expose full obfuscation config in agent info Sep 10, 2026
@Eldolfin
Eldolfin marked this pull request as ready for review September 11, 2026 11:29
@Eldolfin
Eldolfin requested a review from a team as a code owner September 11, 2026 11:29

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot merged commit 405fa85 into main Sep 11, 2026
267 checks passed
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot deleted the oscarld/expose-all-obfuscation-config branch September 11, 2026 13:17
@github-actions github-actions Bot added this to the 7.85.0 milestone Sep 11, 2026
gh-worker-dd-mergequeue-cf854d Bot pushed a commit to DataDog/libdatadog that referenced this pull request Sep 21, 2026
#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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal Identify a non-fork PR medium review PR review might take time qa/done QA done before merge and regressions are covered by tests team/agent-apm trace-agent

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants