Skip to content

Fix Viper AllFlattenedSettingsWithSequenceID implementation#46997

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 4 commits intomainfrom
rayz/viper-flattened-keys
Mar 2, 2026
Merged

Fix Viper AllFlattenedSettingsWithSequenceID implementation#46997
gh-worker-dd-mergequeue-cf854d[bot] merged 4 commits intomainfrom
rayz/viper-flattened-keys

Conversation

@rayz
Copy link
Copy Markdown
Contributor

@rayz rayz commented Feb 26, 2026

What does this PR do?

Fixes AllFlattenedSettingsWithSequenceID() in Viper to match nodetreemodel (NTM) semantics by replacingViper.AllKeys() with a custom leaf-key implementation.

Motivation

Viper.AllKeys() recursively flattens map values with . delimiters, emitting non-schema keys like: additional_endpoints.https://url1.com

Describe how you validated your changes

  • Additional unit tests
  • E22 Test:
    1. Run the agent with additional_endpoints configured.
    2. Run ADP with DD_DATA_PLANE_USE_NEW_CONFIG_STREAM_ENDPOINT=true
    3. Observe that ADP no longer crashes.

Additional Notes

@dd-octo-sts dd-octo-sts Bot added the internal Identify a non-fork PR label Feb 26, 2026
@github-actions github-actions Bot added the short review PR is simple enough to be reviewed quickly label Feb 26, 2026
@rayz rayz added changelog/no-changelog No changelog entry needed qa/rc-required Only for a PR that requires validation on the Release Candidate labels Feb 26, 2026
@rayz rayz marked this pull request as ready for review February 26, 2026 17:35
@rayz rayz requested a review from a team as a code owner February 26, 2026 17:35
@rayz rayz requested a review from dustmop February 26, 2026 17:35
@agent-platform-auto-pr
Copy link
Copy Markdown
Contributor

agent-platform-auto-pr Bot commented Feb 26, 2026

Files inventory check summary

File checks results against ancestor f9067ed5:

Results for datadog-agent_7.78.0~devel.git.217.b87e93f.pipeline.99782179-1_amd64.deb:

Detected file changes:

39 Added files:

  • opt/datadog-agent/embedded/lib/python3.13/site-packages/datadog_checks/mysql/databases_data.py (21.51 KiB)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/keystoneauth1-5.13.0.dist-info/RECORD (14.81 KiB)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/keystoneauth1-5.13.0.dist-info/licenses/LICENSE (11.61 KiB)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/msal-1.34.0.dist-info/METADATA (11.35 KiB)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/stevedore-5.6.0.dist-info/LICENSE (11.09 KiB)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/keystoneauth1-5.13.0.dist-info/licenses/AUTHORS (8.96 KiB)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/stevedore-5.6.0.dist-info/RECORD (3.7 KiB)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/msal-1.34.0.dist-info/RECORD (3.63 KiB)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/keystoneauth1-5.13.0.dist-info/METADATA (3.03 KiB)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/stevedore-5.6.0.dist-info/AUTHORS (2.75 KiB)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/certifi-2026.1.4.dist-info/METADATA (2.42 KiB)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/stevedore-5.6.0.dist-info/METADATA (2.22 KiB)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/keystoneauth1-5.13.0.dist-info/entry_points.txt (1.81 KiB)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/certifi-2026.1.4.dist-info/RECORD (1.18 KiB)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/msal-1.34.0.dist-info/licenses/LICENSE (1.12 KiB)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/certifi-2026.1.4.dist-info/licenses/LICENSE (989.0 B)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/stevedore-5.6.0.dist-info/entry_points.txt (387.0 B)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/keystoneauth1-5.13.0.dist-info/direct_url.json (315.0 B)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/stevedore-5.6.0.dist-info/direct_url.json (306.0 B)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/certifi-2026.1.4.dist-info/direct_url.json (293.0 B)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/msal-1.34.0.dist-info/direct_url.json (285.0 B)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/certifi-2026.1.4.dist-info/WHEEL (91.0 B)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/keystoneauth1-5.13.0.dist-info/WHEEL (91.0 B)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/msal-1.34.0.dist-info/WHEEL (91.0 B)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/stevedore-5.6.0.dist-info/WHEEL (91.0 B)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/keystoneauth1-5.13.0.dist-info/pbr.json (46.0 B)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/stevedore-5.6.0.dist-info/pbr.json (46.0 B)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/keystoneauth1-5.13.0.dist-info/top_level.txt (14.0 B)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/stevedore-5.6.0.dist-info/top_level.txt (10.0 B)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/certifi-2026.1.4.dist-info/top_level.txt (8.0 B)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/msal-1.34.0.dist-info/top_level.txt (5.0 B)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/certifi-2026.1.4.dist-info/INSTALLER (4.0 B)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/keystoneauth1-5.13.0.dist-info/INSTALLER (4.0 B)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/msal-1.34.0.dist-info/INSTALLER (4.0 B)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/stevedore-5.6.0.dist-info/INSTALLER (4.0 B)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/certifi-2026.1.4.dist-info/REQUESTED (0 B)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/keystoneauth1-5.13.0.dist-info/REQUESTED (0 B)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/msal-1.34.0.dist-info/REQUESTED (0 B)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/stevedore-5.6.0.dist-info/REQUESTED (0 B)

78 Removed files:

  • opt/datadog-agent/embedded/lib/python3.13/site-packages/click/core.py (129.01 KiB)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/click/types.py (38.99 KiB)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/click/termui.py (30.31 KiB)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/click/_termui_impl.py (26.46 KiB)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/datadog_checks/mysql/schemas_legacy.py (22.39 KiB)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/click/shell_completion.py (20.5 KiB)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/click/utils.py (19.78 KiB)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/click/testing.py (18.65 KiB)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/click/parser.py (18.56 KiB)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/click/_compat.py (18.25 KiB)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/click/decorators.py (18.03 KiB)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/datadog_checks/mysql/schemas.py (16.37 KiB)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/keystoneauth1-5.13.1.dist-info/RECORD (14.81 KiB)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/keystoneauth1-5.13.1.dist-info/licenses/LICENSE (11.61 KiB)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/aws_msk_iam_sasl_signer_python-1.0.2.dist-info/METADATA (11.48 KiB)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/msal-1.35.0.dist-info/METADATA (11.4 KiB)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/stevedore-5.7.0.dist-info/licenses/LICENSE (11.09 KiB)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/aws_msk_iam_sasl_signer_python-1.0.2.dist-info/LICENSE (11.09 KiB)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/click/exceptions.py (9.72 KiB)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/click/formatting.py (9.5 KiB)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/aws_msk_iam_sasl_signer/MSKAuthTokenProvider.py (9.29 KiB)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/keystoneauth1-5.13.1.dist-info/licenses/AUTHORS (8.99 KiB)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/click/_winconsole.py (8.27 KiB)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/click/__init__.py (4.37 KiB)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/stevedore-5.7.0.dist-info/RECORD (3.72 KiB)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/msal-1.35.0.dist-info/RECORD (3.63 KiB)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/keystoneauth1-5.13.1.dist-info/METADATA (2.85 KiB)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/stevedore-5.7.0.dist-info/licenses/AUTHORS (2.75 KiB)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/click-8.3.1.dist-info/RECORD (2.65 KiB)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/click-8.3.1.dist-info/METADATA (2.56 KiB)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/certifi-2026.2.25.dist-info/METADATA (2.42 KiB)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/stevedore-5.7.0.dist-info/METADATA (2.32 KiB)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/click/globals.py (1.88 KiB)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/keystoneauth1-5.13.1.dist-info/entry_points.txt (1.81 KiB)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/aws_msk_iam_sasl_signer/cli.py (1.81 KiB)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/aws_msk_iam_sasl_signer_python-1.0.2.dist-info/RECORD (1.51 KiB)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/click-8.3.1.dist-info/licenses/LICENSE.txt (1.44 KiB)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/click/_textwrap.py (1.37 KiB)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/certifi-2026.2.25.dist-info/RECORD (1.19 KiB)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/msal-1.35.0.dist-info/licenses/LICENSE (1.12 KiB)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/certifi-2026.2.25.dist-info/licenses/LICENSE (989.0 B)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/click/_utils.py (943.0 B)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/stevedore-5.7.0.dist-info/entry_points.txt (387.0 B)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/aws_msk_iam_sasl_signer_python-1.0.2.dist-info/direct_url.json (340.0 B)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/keystoneauth1-5.13.1.dist-info/direct_url.json (315.0 B)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/stevedore-5.7.0.dist-info/direct_url.json (306.0 B)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/certifi-2026.2.25.dist-info/direct_url.json (294.0 B)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/click-8.3.1.dist-info/direct_url.json (286.0 B)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/msal-1.35.0.dist-info/direct_url.json (285.0 B)
  • opt/datadog-agent/embedded/bin/aws_msk_get_auth_token (228.0 B)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/aws_msk_iam_sasl_signer/__init__.py (194.0 B)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/aws_msk_iam_sasl_signer_python-1.0.2.dist-info/WHEEL (109.0 B)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/certifi-2026.2.25.dist-info/WHEEL (91.0 B)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/keystoneauth1-5.13.1.dist-info/WHEEL (91.0 B)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/msal-1.35.0.dist-info/WHEEL (91.0 B)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/stevedore-5.7.0.dist-info/WHEEL (91.0 B)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/click-8.3.1.dist-info/WHEEL (82.0 B)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/aws_msk_iam_sasl_signer_python-1.0.2.dist-info/entry_points.txt (79.0 B)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/keystoneauth1-5.13.1.dist-info/pbr.json (46.0 B)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/stevedore-5.7.0.dist-info/pbr.json (46.0 B)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/aws_msk_iam_sasl_signer_python-1.0.2.dist-info/top_level.txt (24.0 B)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/keystoneauth1-5.13.1.dist-info/top_level.txt (14.0 B)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/stevedore-5.7.0.dist-info/top_level.txt (10.0 B)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/certifi-2026.2.25.dist-info/top_level.txt (8.0 B)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/msal-1.35.0.dist-info/top_level.txt (5.0 B)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/aws_msk_iam_sasl_signer_python-1.0.2.dist-info/INSTALLER (4.0 B)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/certifi-2026.2.25.dist-info/INSTALLER (4.0 B)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/click-8.3.1.dist-info/INSTALLER (4.0 B)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/keystoneauth1-5.13.1.dist-info/INSTALLER (4.0 B)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/msal-1.35.0.dist-info/INSTALLER (4.0 B)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/stevedore-5.7.0.dist-info/INSTALLER (4.0 B)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/aws_msk_iam_sasl_signer_python-1.0.2.dist-info/REQUESTED (0 B)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/certifi-2026.2.25.dist-info/REQUESTED (0 B)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/click/py.typed (0 B)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/click-8.3.1.dist-info/REQUESTED (0 B)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/keystoneauth1-5.13.1.dist-info/REQUESTED (0 B)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/msal-1.35.0.dist-info/REQUESTED (0 B)
  • opt/datadog-agent/embedded/lib/python3.13/site-packages/stevedore-5.7.0.dist-info/REQUESTED (0 B)

@agent-platform-auto-pr
Copy link
Copy Markdown
Contributor

agent-platform-auto-pr Bot commented Feb 26, 2026

Static quality checks

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

Successful checks

Info

Quality gate Change Size (prev → curr → max)
agent_msi +3.0 KiB (0.00% increase) 607.853 → 607.856 → 1062.520
agent_rpm_arm64_fips +4.0 KiB (0.00% increase) 683.450 → 683.454 → 694.440
agent_suse_arm64_fips +4.0 KiB (0.00% increase) 683.450 → 683.454 → 694.440
iot_agent_deb_amd64 +4.0 KiB (0.01% increase) 42.855 → 42.859 → 43.290
iot_agent_deb_arm64 +4.0 KiB (0.01% increase) 39.930 → 39.934 → 40.920
iot_agent_deb_armhf +4.0 KiB (0.01% increase) 40.670 → 40.674 → 41.030
iot_agent_rpm_amd64 +4.0 KiB (0.01% increase) 42.856 → 42.860 → 43.290
iot_agent_suse_amd64 +4.0 KiB (0.01% increase) 42.856 → 42.860 → 43.290
23 successful checks with minimal change (< 2 KiB)
Quality gate Current Size
agent_deb_amd64 743.896 MiB
agent_deb_amd64_fips 702.350 MiB
agent_heroku_amd64 310.769 MiB
agent_rpm_amd64 743.879 MiB
agent_rpm_amd64_fips 702.334 MiB
agent_rpm_arm64 721.968 MiB
agent_suse_amd64 743.879 MiB
agent_suse_amd64_fips 702.334 MiB
agent_suse_arm64 721.968 MiB
docker_agent_amd64 804.477 MiB
docker_agent_arm64 807.363 MiB
docker_agent_jmx_amd64 995.388 MiB
docker_agent_jmx_arm64 987.057 MiB
docker_cluster_agent_amd64 203.168 MiB
docker_cluster_agent_arm64 217.646 MiB
docker_cws_instrumentation_amd64 7.135 MiB
docker_cws_instrumentation_arm64 6.689 MiB
docker_dogstatsd_amd64 38.501 MiB
docker_dogstatsd_arm64 36.812 MiB
dogstatsd_deb_amd64 29.721 MiB
dogstatsd_deb_arm64 27.881 MiB
dogstatsd_rpm_amd64 29.721 MiB
dogstatsd_suse_amd64 29.721 MiB
On-wire sizes (compressed)
Quality gate Change Size (prev → curr → max)
agent_deb_amd64 -37.14 KiB (0.02% reduction) 173.785 → 173.748 → 177.700
agent_deb_amd64_fips neutral 164.613 MiB → 172.230
agent_heroku_amd64 -4.3 KiB (0.01% reduction) 74.943 → 74.939 → 79.970
agent_msi +48.0 KiB (0.03% increase) 137.684 → 137.730 → 146.220
agent_rpm_amd64 +7.71 KiB (0.00% increase) 175.607 → 175.614 → 180.780
agent_rpm_amd64_fips -5.51 KiB (0.00% reduction) 167.536 → 167.531 → 173.370
agent_rpm_arm64 -63.57 KiB (0.04% reduction) 158.026 → 157.964 → 161.610
agent_rpm_arm64_fips -22.48 KiB (0.01% reduction) 150.806 → 150.784 → 155.910
agent_suse_amd64 +7.71 KiB (0.00% increase) 175.607 → 175.614 → 180.780
agent_suse_amd64_fips -5.51 KiB (0.00% reduction) 167.536 → 167.531 → 173.370
agent_suse_arm64 -63.57 KiB (0.04% reduction) 158.026 → 157.964 → 161.610
agent_suse_arm64_fips -22.48 KiB (0.01% reduction) 150.806 → 150.784 → 155.910
docker_agent_amd64 +3.69 KiB (0.00% increase) 266.121 → 266.125 → 271.240
docker_agent_arm64 +8.28 KiB (0.00% increase) 253.423 → 253.431 → 259.800
docker_agent_jmx_amd64 neutral 334.770 MiB → 339.870
docker_agent_jmx_arm64 -9.26 KiB (0.00% reduction) 318.065 → 318.056 → 324.390
docker_cluster_agent_amd64 -3.61 KiB (0.00% reduction) 71.108 → 71.104 → 71.920
docker_cluster_agent_arm64 +3.58 KiB (0.01% increase) 66.756 → 66.759 → 67.220
docker_cws_instrumentation_amd64 neutral 2.995 MiB → 3.330
docker_cws_instrumentation_arm64 neutral 2.726 MiB → 3.090
docker_dogstatsd_amd64 neutral 14.899 MiB → 15.820
docker_dogstatsd_arm64 neutral 14.238 MiB → 14.830
dogstatsd_deb_amd64 neutral 7.852 MiB → 8.790
dogstatsd_deb_arm64 neutral 6.741 MiB → 7.710
dogstatsd_rpm_amd64 neutral 7.864 MiB → 8.800
dogstatsd_suse_amd64 neutral 7.864 MiB → 8.800
iot_agent_deb_amd64 neutral 11.300 MiB → 12.040
iot_agent_deb_arm64 neutral 9.620 MiB → 10.450
iot_agent_deb_armhf neutral 9.850 MiB → 10.620
iot_agent_rpm_amd64 neutral 11.318 MiB → 12.060
iot_agent_suse_amd64 neutral 11.318 MiB → 12.060

@cit-pr-commenter-54b7da
Copy link
Copy Markdown

cit-pr-commenter-54b7da Bot commented Feb 26, 2026

Regression Detector

Regression Detector Results

Metrics dashboard
Target profiles
Run ID: 6e045b7f-a90d-4d53-a02d-a5aa44b5513a

Baseline: 47e0eb3
Comparison: 1782958
Diff

Optimization Goals: ✅ No significant changes detected

Experiments ignored for regressions

Regressions in experiments with settings containing erratic: true are ignored.

perf experiment goal Δ mean % Δ mean % CI trials links
docker_containers_cpu % cpu utilization -0.26 [-3.37, +2.85] 1 Logs

Fine details of change detection per experiment

perf experiment goal Δ mean % Δ mean % CI trials links
tcp_syslog_to_blackhole ingress throughput +0.52 [+0.40, +0.65] 1 Logs
otlp_ingest_metrics memory utilization +0.33 [+0.17, +0.49] 1 Logs
ddot_logs memory utilization +0.24 [+0.19, +0.30] 1 Logs
quality_gate_idle_all_features memory utilization +0.17 [+0.13, +0.21] 1 Logs bounds checks dashboard
docker_containers_memory memory utilization +0.09 [+0.02, +0.17] 1 Logs
file_to_blackhole_1000ms_latency egress throughput +0.08 [-0.33, +0.50] 1 Logs
ddot_metrics_sum_delta memory utilization +0.07 [-0.12, +0.25] 1 Logs
quality_gate_logs % cpu utilization +0.05 [-1.44, +1.54] 1 Logs bounds checks dashboard
quality_gate_metrics_logs memory utilization +0.02 [-0.19, +0.24] 1 Logs bounds checks dashboard
uds_dogstatsd_to_api ingress throughput +0.01 [-0.11, +0.12] 1 Logs
file_to_blackhole_100ms_latency egress throughput +0.01 [-0.04, +0.05] 1 Logs
uds_dogstatsd_to_api_v3 ingress throughput -0.00 [-0.13, +0.12] 1 Logs
tcp_dd_logs_filter_exclude ingress throughput -0.00 [-0.09, +0.08] 1 Logs
file_to_blackhole_0ms_latency egress throughput -0.09 [-0.57, +0.40] 1 Logs
file_to_blackhole_500ms_latency egress throughput -0.09 [-0.47, +0.29] 1 Logs
quality_gate_idle memory utilization -0.12 [-0.17, -0.07] 1 Logs bounds checks dashboard
ddot_metrics memory utilization -0.23 [-0.45, -0.02] 1 Logs
docker_containers_cpu % cpu utilization -0.26 [-3.37, +2.85] 1 Logs
otlp_ingest_logs memory utilization -0.27 [-0.36, -0.18] 1 Logs
file_tree memory utilization -0.33 [-0.38, -0.27] 1 Logs
ddot_metrics_sum_cumulative memory utilization -0.34 [-0.49, -0.19] 1 Logs
uds_dogstatsd_20mb_12k_contexts_20_senders memory utilization -0.38 [-0.43, -0.32] 1 Logs
ddot_metrics_sum_cumulativetodelta_exporter memory utilization -0.39 [-0.62, -0.16] 1 Logs

Bounds Checks: ❌ Failed

perf experiment bounds_check_name replicates_passed links
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_1000ms_latency lost_bytes 10/10
file_to_blackhole_1000ms_latency 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_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 9/10 bounds checks dashboard
quality_gate_idle_all_features intake_connections 10/10 bounds checks dashboard
quality_gate_idle_all_features memory_usage 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
quality_gate_logs memory_usage 10/10 bounds checks dashboard
quality_gate_metrics_logs cpu_usage 10/10 bounds checks dashboard
quality_gate_metrics_logs intake_connections 10/10 bounds checks dashboard
quality_gate_metrics_logs lost_bytes 10/10 bounds checks dashboard
quality_gate_metrics_logs memory_usage 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:

  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

Failed. Some Quality Gates were violated.

  • quality_gate_logs, bounds check intake_connections: 10/10 replicas passed. Gate passed.
  • quality_gate_logs, bounds check memory_usage: 10/10 replicas passed. Gate passed.
  • quality_gate_logs, bounds check lost_bytes: 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 lost_bytes: 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 intake_connections: 10/10 replicas passed. Gate passed.
  • quality_gate_idle, bounds check memory_usage: 9/10 replicas passed. Failed 1 which is > 0. Gate FAILED.
  • quality_gate_idle, bounds check intake_connections: 10/10 replicas passed. Gate passed.
  • quality_gate_idle_all_features, bounds check memory_usage: 10/10 replicas passed. Gate passed.
  • quality_gate_idle_all_features, bounds check intake_connections: 10/10 replicas passed. Gate passed.

@rayz rayz added the backport/7.77.x Automatically create a backport PR to the 7.77.x branch once the PR is merged label Feb 26, 2026
@rayz rayz added this to the 7.78.0 milestone Feb 26, 2026
Copy link
Copy Markdown
Member

@hush-hush hush-hush left a comment

Choose a reason for hiding this comment

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

Added some nit-pick, feel free to merge after addressing.

Comment thread pkg/config/viperconfig/viper.go Outdated
// 1. Collect known keys and filter for parent-child relationships (keep only leaves)
// 2. Add all unknown keys as-is
// Must be called while holding at least a read lock.
func (c *safeConfig) collectFlattenedKeys() []string {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could we add a test for this ?

Comment thread pkg/config/setup/config_secret_test.go Outdated
@github-actions github-actions Bot added medium review PR review might take time and removed short review PR is simple enough to be reviewed quickly labels Feb 27, 2026
Comment thread pkg/config/viperconfig/viper.go Outdated
Comment on lines +216 to +217
assert.ElementsMatch(t, viperKeys, ntmKeys)
assert.ElementsMatch(t, []string{"apm_config.foo", "apm_config.bar.baz", "proxy.http"}, viperKeys)
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.

Small style nit: for these compatibility tests, it's more in line with other tests to write them like this instead:

Suggested change
assert.ElementsMatch(t, viperKeys, ntmKeys)
assert.ElementsMatch(t, []string{"apm_config.foo", "apm_config.bar.baz", "proxy.http"}, viperKeys)
expectedKeys := []string{"apm_config.foo", "apm_config.bar.baz", "proxy.http"}
assert.ElementsMatch(t, expectedKeys, viperKeys)
assert.ElementsMatch(t, expectedKeys, ntmKeys)

The rationale: let's just suppose something changes in the future that causes these tests to fail. In your version, the first assertion would fail, saying the viper and ntm don't match, but that doesn't tell you which is acting incorrectly. In my suggested version, the failure would tell you what the expectations are, and which implementation fails to meet them. Both versions of the code accomplish the same thing, but they communicate differently.

Comment thread pkg/config/viperconfig/viper.go Outdated
defer c.RUnlock()

keys := c.Viper.AllKeys()
keys := c.collectFlattenedKeys()
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.

Could you add a unit test that specifically demonstrates how AllKeys() and collectFlattenedKeys() differ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Added a specific comparison in TestAllKeysVsCollectAllLeafKeys. For

	config.Set("additional_endpoints", map[string]interface{}{
		"https://app.datadoghq.com": []interface{}{"api_key"},...

viper.AllKeys() contains additional_endpoints.https://app.datadoghq.com as a key.

Comment thread pkg/config/viperconfig/viper.go Outdated
return res
}

// collectFlattenedKeys returns flattened keys that match nodetreemodel semantics:
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.

I don't think this method name properly distinguishes what this function does compared to other viper methods. All of the viper methods to retrieve lists of keys (AllKeys, GetKnownKeys, AllKeysLowercased) return dot-separated settings as a flat string list, as opposed to the AllSettings method which returns nested data. Perhaps this should be collectAllLeafKeys instead?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Renamed to collectAllLeafKeys 👍

@rayz rayz added the ask-review Ask required teams to review this PR label Mar 2, 2026
Copy link
Copy Markdown
Contributor

@dustmop dustmop left a comment

Choose a reason for hiding this comment

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

LGTM, with a request for one small fix. Thanks for the additional tests!

Comment thread pkg/config/viperconfig/viper_test.go Outdated
func TestCollectAllLeafKeys(t *testing.T) {
config := NewViperConfig("test", "DD", strings.NewReplacer(".", "_")).(*safeConfig) // nolint: forbidigo

config.SetKnown("apm_config.foo") //nolint:forbidigo // TODO: replace by 'SetDefaultAndBindEnv'
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.

Instead of the second comment being // TODO: replace by 'SetDefaultAndBindEnv' could you make it // testing behavior. Because (1) there's no method named SetDefaultAndBindEnv and (2) we won't ever replace this call, it's here on purpose to test the behavior it leads to. Same for when it shows up in TestAllKeysVsCollectAllLeafKeys please.

@rayz
Copy link
Copy Markdown
Contributor Author

rayz commented Mar 2, 2026

/merge

@gh-worker-devflow-routing-ef8351
Copy link
Copy Markdown

gh-worker-devflow-routing-ef8351 Bot commented Mar 2, 2026

View all feedbacks in Devflow UI.

2026-03-02 16:24:34 UTC ℹ️ Start processing command /merge


2026-03-02 16:24:40 UTC ℹ️ MergeQueue: waiting for PR to be ready

This pull request is not mergeable according to GitHub. Common reasons include pending required checks, missing approvals, or merge conflicts — but it could also be blocked by other repository rules or settings.
It will be added to the queue as soon as checks pass and/or get approvals. View in MergeQueue UI.
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.


2026-03-02 17:25:15 UTC ℹ️ MergeQueue: merge request added to the queue

The expected merge time in main is approximately 1h (p90).


2026-03-02 18:45:59 UTC ℹ️ MergeQueue: This merge request was merged

@gh-worker-dd-mergequeue-cf854d gh-worker-dd-mergequeue-cf854d Bot merged commit 1782958 into main Mar 2, 2026
283 checks passed
@gh-worker-dd-mergequeue-cf854d gh-worker-dd-mergequeue-cf854d Bot deleted the rayz/viper-flattened-keys branch March 2, 2026 18:45
dd-octo-sts Bot added a commit that referenced this pull request Mar 2, 2026
… ### What does this PR do? Fixes `AllFlattenedSettingsWithSequenceID()` in Viper to match nodetreemodel (NTM) semantics by replacing`Viper.AllKeys()` with a custom leaf-key implementation.

### Motivation
 `Viper.AllKeys()` recursively flattens map **values** with `.` delimiters, emitting non-schema keys like: `additional_endpoints.https://url1.com`

### Describe how you validated your changes
- Additional unit tests
- E22 Test:
  1. Run the agent with `additional_endpoints` configured.
  2. Run ADP with `DD_DATA_PLANE_USE_NEW_CONFIG_STREAM_ENDPOINT=true`
  3. Observe that ADP no longer crashes.
### Additional Notes

Co-authored-by: raymond.zhao <raymond.zhao@datadoghq.com>
(cherry picked from commit 1782958)

___

Co-authored-by: Raymond Zhao <35050708+rayz@users.noreply.github.com>
gh-worker-dd-mergequeue-cf854d Bot pushed a commit that referenced this pull request Mar 4, 2026
…ementation (#47185)

Backport 1782958 from #46997.

 ___

### What does this PR do?
Fixes `AllFlattenedSettingsWithSequenceID()` in Viper to match nodetreemodel (NTM) semantics by replacing`Viper.AllKeys()` with a custom leaf-key implementation.

### Motivation
 `Viper.AllKeys()` recursively flattens map **values** with `.` delimiters, emitting non-schema keys like: `additional_endpoints.https://url1.com` 

### Describe how you validated your changes
- Additional unit tests
- E22 Test:
  1. Run the agent with `additional_endpoints` configured.
  2. Run ADP with `DD_DATA_PLANE_USE_NEW_CONFIG_STREAM_ENDPOINT=true`
  3. Observe that ADP no longer crashes.
### Additional Notes

Co-authored-by: sabrina-datadog <sabrina.lu@datadoghq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ask-review Ask required teams to review this PR backport/7.77.x Automatically create a backport PR to the 7.77.x branch once the PR is merged changelog/no-changelog No changelog entry needed internal Identify a non-fork PR medium review PR review might take time qa/rc-required Only for a PR that requires validation on the Release Candidate team/agent-configuration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants