Skip to content

feat(debugger): support agentless Dynamic Instrumentation - #10051

Draft
BridgeAR wants to merge 11 commits into
rochdev/apm-data-pipelinefrom
BridgeAR/2026-08-28-agentless-remote-config
Draft

feat(debugger): support agentless Dynamic Instrumentation#10051
BridgeAR wants to merge 11 commits into
rochdev/apm-data-pipelinefrom
BridgeAR/2026-08-28-agentless-remote-config

Conversation

@BridgeAR

Copy link
Copy Markdown
Member

Agentless mode disables the Agent Remote Config path, so Dynamic Instrumentation has no probe source without an Agent. This adds direct Remote Config polling, debugger logs, and diagnostics for that mode.

RemoteConfig remains the only scheduler, subscription registry, applied-config store, and acknowledgement owner. It sends each probe to the debugger worker. The worker acknowledgement updates the same applied-config record. The Agent transport stays callback-native. Libdatadog's Promise ends at the agentless adapter.

Poll generations cannot re-arm after stop or overlap after restart. Agent response state commits only after complete validation. Stale acknowledgements cannot update replacement configs. Test Optimization does not enable the debugger automatically.

rochdev and others added 7 commits August 27, 2026 18:56
Agentless mode disables the Agent Remote Config path, which leaves Dynamic Instrumentation without a probe source.

One Remote Config manager owns lifecycle and applied state for both transports. Libdatadog handles only direct backend polling.

Stopped poll generations cannot re-arm or overlap a restarted poll after an in-flight request completes.
@BridgeAR
BridgeAR requested review from a team as code owners August 28, 2026 15:58
@BridgeAR
BridgeAR requested review from khanayan123 and removed request for a team August 28, 2026 15:58
@datadog-official

datadog-official Bot commented Aug 28, 2026

Copy link
Copy Markdown

Pipelines  Tests

⚠️ Warnings

Your PR has failed checks. Please review the issues below and take necessary action before merging.

🚦 57 Pipeline jobs failed

System Tests | main / parametric / parametric (1) — ❌ 13 tests failed · 🔧 Needs a code fix, caused by this PR

View more details · View in GitHub Actions

5 failed assertions due to unexpected telemetry configuration values: expected DD_RUNTIME_METRICS_ENABLED=true but got false, expected DD_PROFILING_ENABLED=true but got false, expected DD_DATA_STREAMS_ENABLED=true but got false, expected DD_TRACE_PROPAGATION_STYLE=tracecontext but got datadog,tracecontext,baggage, and expected tag 'tag1:value1' not found

Showing tests most relevant to this failure.

❌ tests.parametric.test_config_consistency.Test_Stable_Config_Default.test_extended_configs[/etc/datadog-agent/application_monitoring.yaml-128bit_traceids-apm_... from system_tests_suite
AssertionError: Expected DD_TRACE_PROPAGATION_STYLE=tracecontext, got datadog,tracecontext,baggage
assert 'datadog,tracecontext,baggage' == 'tracecontext'
  - tracecontext
  + datadog,tracecontext,baggage

self = <tests.parametric.test_config_consistency.Test_Stable_Config_Default object at 0x7fe4f2c0b5c0>
test_agent = <utils.docker_fixtures._test_agent.TestAgentAPI object at 0x7fe4bfa428a0>
test_library = <utils.docker_fixtures._test_clients._test_client_parametric.ParametricTestClientApi object at 0x7fe4bfa68830>
path = '/etc/datadog-agent/application_monitoring.yaml'
name = '128bit_traceids'
...
❌ tests.parametric.test_config_consistency.Test_Stable_Config_Default.test_extended_configs[/etc/datadog-agent/application_monitoring.yaml-tags-apm_configurati... from system_tests_suite
AssertionError: Expected tag 'tag1:value1' not found in telemetry tags: 
assert 'tag1:value1' in ''

self = <tests.parametric.test_config_consistency.Test_Stable_Config_Default object at 0x7fb6adfc9520>
test_agent = <utils.docker_fixtures._test_agent.TestAgentAPI object at 0x7fb67a5d5d30>
test_library = <utils.docker_fixtures._test_clients._test_client_parametric.ParametricTestClientApi object at 0x7fb67b1530b0>
path = '/etc/datadog-agent/application_monitoring.yaml', name = 'tags'
apm_configuration_default = {'DD_TAGS': 'tag1:value1,tag2:value2'}
expected = {'dd_tags': 'tag1:value1,tag2:value2'}

...
❌ tests.parametric.test_config_consistency.Test_Stable_Config_Default.test_extended_configs[/etc/datadog-agent/managed/datadog-agent/stable/application_monitor... from system_tests_suite
AssertionError: Expected DD_TRACE_PROPAGATION_STYLE=tracecontext, got datadog,tracecontext,baggage
assert 'datadog,tracecontext,baggage' == 'tracecontext'
  - tracecontext
  + datadog,tracecontext,baggage

self = <tests.parametric.test_config_consistency.Test_Stable_Config_Default object at 0x7f51774de0f0>
test_agent = <utils.docker_fixtures._test_agent.TestAgentAPI object at 0x7f5143acb230>
test_library = <utils.docker_fixtures._test_clients._test_client_parametric.ParametricTestClientApi object at 0x7f51442f63c0>
path = '/etc/datadog-agent/managed/datadog-agent/stable/application_monitoring.yaml'
name = '128bit_traceids'
...
↳ and 10 more — View all
System Tests | main / parametric / parametric (6) — ❌ 4 tests failed · 🔧 Needs a code fix, caused by this PR

View more details · View in GitHub Actions

4 failed tests due to assertion errors on metadata content. Assertion Error: expected 1 memfd, got 0 in tests/parametric/test_process_discovery.py and telemetry configuration not found with origin 'fleet_stable_config' in tests/parametric/test_telemetry.py.

Showing tests most relevant to this failure.

❌ tests.parametric.test_process_discovery.Test_ProcessDiscovery.test_metadata_content_with_process_tags[library_env0, parametric-nodejs] from system_tests_suite
assert 0 == 1
 +  where 0 = len([])

self = <tests.parametric.test_process_discovery.Test_ProcessDiscovery object at 0x7fcbdece1b80>
test_library = <utils.docker_fixtures._test_clients._test_client_parametric.ParametricTestClientApi object at 0x7fcbde29a090>
library_env = {'DD_AGENT_HOST': 'localhost', 'DD_ENV': 'test', 'DD_EXPERIMENTAL_PROPAGATE_PROCESS_TAGS_ENABLED': 'true', 'DD_SERVICE': 'a', ...}

    @pytest.mark.parametrize(
        "library_env",
        [
...
❌ tests.parametric.test_process_discovery.Test_ProcessDiscovery.test_metadata_content_without_process_tags[library_env0, parametric-nodejs] from system_tests_suite
assert 0 == 1
 +  where 0 = len([])

self = <tests.parametric.test_process_discovery.Test_ProcessDiscovery object at 0x7fcbdece2c00>
test_library = <utils.docker_fixtures._test_clients._test_client_parametric.ParametricTestClientApi object at 0x7fcbde29b650>
library_env = {'DD_AGENT_HOST': 'localhost', 'DD_ENV': 'second-test', 'DD_EXPERIMENTAL_PROPAGATE_PROCESS_TAGS_ENABLED': 'false', 'DD_SERVICE': 'b', ...}

    @pytest.mark.parametrize(
        "library_env",
        [
...
❌ tests.parametric.test_telemetry.Test_Stable_Configuration_Origin.test_stable_configuration_origin[local_cfg0-library_env0-fleet_cfg0-expected_origins0, param... from system_tests_suite
AssertionError: No configuration found for any of DD_LOGS_INJECTION with origin 'fleet_stable_config'
assert None is not None

self = <tests.parametric.test_telemetry.Test_Stable_Configuration_Origin object at 0x7ff2fac90080>
local_cfg = {'DD_DYNAMIC_INSTRUMENTATION_ENABLED': True, 'DD_LOGS_INJECTION': True, 'DD_RUNTIME_METRICS_ENABLED': True}
fleet_cfg = {'DD_LOGS_INJECTION': True}
test_agent = <utils.docker_fixtures._test_agent.TestAgentAPI object at 0x7ff2f99e0ce0>
test_library = <utils.docker_fixtures._test_clients._test_client_parametric.ParametricTestClientApi object at 0x7ff2fa0744d0>
expected_origins = {'dynamic_instrumentation_enabled': 'local_stable_config', 'logs_injection_enabled': 'fleet_stable_config'}

...
↳ and 1 more — View all
All Green | all-green — ❌ 34 tests failed

View more details · View in GitHub Actions

No config file could be found during Codecov upload. Required tools not installed: 'xcrun', 'coverage.py'.

❌ "before each" hook for "should construct intake URL from site" from Mocha Tests
Cannot find module '@datadog/libdatadog'
Require stack:
- /home/runner/work/dd-trace-js/dd-trace-js/packages/dd-trace/src/exporters/agentless/writer.js
- /home/runner/work/dd-trace-js/dd-trace-js/packages/dd-trace/src/exporters/agentless/index.js
- /home/runner/work/dd-trace-js/dd-trace-js/packages/dd-trace/test/exporters/agentless/exporter.spec.js
Error: Cannot find module '@datadog/libdatadog'
Require stack:
- /home/runner/work/dd-trace-js/dd-trace-js/packages/dd-trace/src/exporters/agentless/writer.js
- /home/runner/work/dd-trace-js/dd-trace-js/packages/dd-trace/src/exporters/agentless/index.js
- /home/runner/work/dd-trace-js/dd-trace-js/packages/dd-trace/test/exporters/agentless/exporter.spec.js
...
❌ "before each" hook for "should initialize the binding" from Mocha Tests
Cannot find module '@datadog/libdatadog'
Require stack:
- /home/runner/work/dd-trace-js/dd-trace-js/packages/dd-trace/test/crashtracking/crashtracker.spec.js
Error: Cannot find module '@datadog/libdatadog'
Require stack:
- /home/runner/work/dd-trace-js/dd-trace-js/packages/dd-trace/test/crashtracking/crashtracker.spec.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1140:15)
    at Module._load (node:internal/modules/cjs/loader:981:27)
    at Module.require (node:internal/modules/cjs/loader:1231:19)
    at require (node:internal/modules/helpers:177:18)
...
❌ applies security controls from stable config from Mocha Tests
Expected values to be strictly equal:

false !== true


      + expected - actual

      -false
      +true
      
...
↳ and 31 more — View all

View all 57 failed jobs.

📋 Copy fix prompt
CI on my pull request is failing. Help me find and fix the root cause of each failing job below — they were flagged as caused by changes in this PR, so focus on the diff. For each job, explain the failure and propose a fix.

Before you start, set up the Datadog software-delivery tooling so you can
query the CI data yourself:

1. Check whether you already have the Datadog software-delivery MCP tools
   (e.g. a `search_datadog_ci_pipeline_events` tool) and the `unblock-pr` skill.
2. If either is missing, STOP and ask me for permission before installing
   anything. Do not install or run anything until I have said yes.
3. Only with my explicit approval, set up the Datadog software-delivery MCP
   server and skills by following:
     https://docs.datadoghq.com/getting_started/software_delivery_mcp_tools/
   then restart so the skill is picked up.
4. If I decline, skip all of the above and work from the context below alone.

Then run /unblock-pr — it will pull the CI data itself. The job context below is what we already know.

If /unblock-pr is not available — because I declined the setup above, or it did not install — work from the context below instead.

Datadog has already classified this failure as caused by changes in this PR.
Take that as given and work the fix:

1. Locate the change. Diff this branch against its base and find the change
   that produces this error. Explain the mechanism, don't just name a file:
     git fetch origin && git diff $(git merge-base origin/rochdev/apm-data-pipeline HEAD)...HEAD
2. Reproduce it locally. Run the failing job's command or test before
   proposing anything.
3. Propose the smallest fix that addresses the root cause — not a workaround,
   not a broadened assertion, not a disabled or skipped test.
4. Re-run the same command to confirm, and say exactly what you ran.
5. If the failure turns out to be intermittent rather than deterministic, say
   so plainly instead of "fixing" it — that is a flaky test, and patching it
   hides the problem.

If the right move is to re-run the job rather than change code, use the job
link in the context below. For GitHub Actions: `gh run rerun <run-id> --failed`,
where the run ID is the number after `/runs/` in that URL (not the trailing
number, which is the job ID).

Branch: BridgeAR/2026-08-28-agentless-remote-config

System Tests | main / parametric / parametric (1)
Commit: d6299d50b68312f126942aeb045b66b16f5f6d61
Error (code / test):
5 failed assertions due to unexpected telemetry configuration values: expected DD_RUNTIME_METRICS_ENABLED=true but got false, expected DD_PROFILING_ENABLED=true but got false, expected DD_DATA_STREAMS_ENABLED=true but got false, expected DD_TRACE_PROPAGATION_STYLE=tracecontext but got datadog,tracecontext,baggage, and expected tag 'tag1:value1' not found
CI job: https://github.com/DataDog/dd-trace-js/actions/runs/33198173386/job/98940744406

System Tests | main / parametric / parametric (6)
Commit: d6299d50b68312f126942aeb045b66b16f5f6d61
Error (code / test):
4 failed tests due to assertion errors on metadata content. Assertion Error: expected 1 memfd, got 0 in tests/parametric/test_process_discovery.py and telemetry configuration not found with origin 'fleet_stable_config' in tests/parametric/test_telemetry.py.
CI job: https://github.com/DataDog/dd-trace-js/actions/runs/33198173386/job/98940744281

Plus 27 more failing jobs not shown here.

ℹ️ Info

No other issues found (see more)

❄️ No new flaky tests detected

🎯 Code Coverage (details)
Patch Coverage: 69.78%
Overall Coverage: 87.99% (-0.09%)

Useful? React with 👍 / 👎

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

@codecov

codecov Bot commented Aug 28, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 69.94536% with 110 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.99%. Comparing base (2eb2803) to head (1accb34).

Files with missing lines Patch % Lines
packages/dd-trace/src/remote_config/index.js 66.22% 77 Missing ⚠️
packages/dd-trace/src/remote_config/fetcher.js 72.52% 25 Missing ⚠️
packages/dd-trace/src/debugger/config.js 44.44% 5 Missing ⚠️
packages/dd-trace/src/remote_config/scheduler.js 91.89% 3 Missing ⚠️
Additional details and impacted files
@@                      Coverage Diff                      @@
##           rochdev/apm-data-pipeline   #10051      +/-   ##
=============================================================
- Coverage                      88.08%   87.99%   -0.09%     
=============================================================
  Files                            893      894       +1     
  Lines                         135229   135484     +255     
  Branches                        7775     7753      -22     
=============================================================
+ Hits                          119112   119220     +108     
- Misses                         16117    16264     +147     
Flag Coverage Δ
aiguard 62.22% <44.38%> (-0.08%) ⬇️
aiguard-integration 58.85% <38.76%> (-0.08%) ⬇️
apm-bucket-0 63.40% <45.50%> (+1.67%) ⬆️
apm-bucket-1 68.00% <45.50%> (+0.67%) ⬆️
apm-bucket-2 64.29% <45.50%> (-1.78%) ⬇️
apm-integrations-aerospike 59.38% <38.48%> (-0.12%) ⬇️
apm-integrations-confluentinc-kafka-javascript 65.73% <45.50%> (-0.09%) ⬇️
apm-integrations-couchbase 60.03% <45.50%> (-0.05%) ⬇️
apm-integrations-http 65.49% <45.50%> (-0.08%) ⬇️
apm-integrations-next 63.00% <45.50%> (-0.07%) ⬇️
apm-integrations-sharedb 59.61% <45.50%> (?)
apm-integrations-sharedb_integrations-tedious ?
appsec-_express_fastify 77.41% <45.50%> (?)
appsec-_fastify_graphql ?
appsec-graphql_kafka_ldapjs 71.57% <45.50%> (?)
appsec-kafka_ldapjs_lodash ?
appsec-lodash_mongodb-core_mongoose 68.32% <45.50%> (?)
appsec-mongodb-core_mysql_node-serialize ?
appsec-next 56.43% <45.50%> (+9.49%) ⬆️
appsec-node-serialize_passport_sourcing 68.23% <45.50%> (?)
appsec-passport_sourcing_stripe ?
appsec-stripe_template 66.23% <45.50%> (?)
appsec-template ?
instrumentations-bucket-0 54.76% <45.50%> (-0.25%) ⬇️
instrumentations-bucket-1 62.98% <45.50%> (-0.42%) ⬇️
instrumentations-bucket-10 64.88% <45.50%> (+0.19%) ⬆️
instrumentations-bucket-11 60.45% <45.50%> (-4.94%) ⬇️
instrumentations-bucket-12 55.22% <45.50%> (+0.38%) ⬆️
instrumentations-bucket-13 54.63% <45.50%> (-0.41%) ⬇️
instrumentations-bucket-14 ?
instrumentations-bucket-2 56.24% <45.50%> (+0.27%) ⬆️
instrumentations-bucket-3 56.66% <45.50%> (-0.14%) ⬇️
instrumentations-bucket-4 62.83% <45.50%> (-0.02%) ⬇️
instrumentations-bucket-5 50.03% <45.50%> (+0.90%) ⬆️
instrumentations-bucket-6 65.22% <45.50%> (+0.49%) ⬆️
instrumentations-bucket-7 62.07% <45.50%> (-0.29%) ⬇️
instrumentations-bucket-8 63.73% <45.50%> (+0.67%) ⬆️
instrumentations-bucket-9 52.24% <44.38%> (-5.63%) ⬇️
instrumentations-instrumentation-couchbase 53.39% <37.07%> (-0.10%) ⬇️
instrumentations-instrumentation-zlib 54.71% <45.50%> (?)
llmobs-ai_anthropic_bedrock ?
llmobs-ai_bedrock_claude-agent-sdk 66.90% <45.50%> (?)
llmobs-bucket-1 ?
llmobs-google-genai_langchain_openai-agents 64.34% <45.50%> (?)
llmobs-openai-agents_vertex-ai ?
llmobs-sdk 75.37% <45.50%> (-0.16%) ⬇️
llmobs-vertex-ai 62.42% <45.50%> (?)
master-coverage ?
openfeature 59.43% <63.76%> (+<0.01%) ⬆️
openfeature-unit 57.34% <44.38%> (-0.05%) ⬇️
platform-core_esbuild_instrumentations-misc 40.45% <44.38%> (+0.03%) ⬆️
platform-shimmer_unit-guardrails_webpack 38.21% <44.38%> (+0.04%) ⬆️
plugins-browser-bunyan_cassandra_cookie 60.78% <45.50%> (-0.07%) ⬇️
plugins-bucket-0 60.13% <45.50%> (-0.05%) ⬇️
plugins-bucket-1 57.33% <38.76%> (-0.09%) ⬇️
plugins-bucket-10 65.97% <45.50%> (-0.08%) ⬇️
plugins-bucket-16 65.65% <45.50%> (-0.09%) ⬇️
plugins-bucket-17 66.02% <45.50%> (-0.08%) ⬇️
plugins-bucket-18 63.54% <45.50%> (-0.09%) ⬇️
plugins-bucket-19 65.93% <45.50%> (-0.09%) ⬇️
plugins-bucket-4 62.28% <45.50%> (-0.07%) ⬇️
plugins-cookie-parser_crypto_dd-trace-api 60.49% <45.50%> (-0.06%) ⬇️
plugins-fetch_fs_generic-pool 62.05% <45.50%> (-0.06%) ⬇️
plugins-grpc_handlebars_hapi 65.59% <45.50%> (-0.09%) ⬇️
plugins-hono_ioredis_langgraph 63.33% <45.50%> (-0.07%) ⬇️
plugins-ldapjs_light-my-request_limitd-client 62.39% <45.50%> (-0.08%) ⬇️
plugins-lodash_mariadb_memcached 62.93% <45.50%> (-0.07%) ⬇️
plugins-moleculer_mongodb-core_mongoose 65.01% <45.50%> (-0.08%) ⬇️
plugins-multer_mysql_mysql2 62.87% <45.50%> (-0.07%) ⬇️
plugins-nats_node-serialize_opensearch 64.71% <45.50%> (-0.08%) ⬇️
plugins-passport-http_pino_postgres 62.58% <45.50%> (-0.07%) ⬇️
plugins-process_pug_redis 61.33% <45.50%> (-0.06%) ⬇️
plugins-url_valkey_vm 61.03% <45.50%> (-0.01%) ⬇️
plugins-winston_ws 63.82% <45.50%> (-0.08%) ⬇️
profiling 65.43% <45.50%> (-0.08%) ⬇️
serverless-aws-sdk-aws-sdk 54.63% <45.50%> (-0.01%) ⬇️
serverless-aws-sdk-base-inject-field 54.11% <44.38%> (?)
serverless-aws-sdk-bedrockruntime 57.31% <45.50%> (-0.03%) ⬇️
serverless-aws-sdk-client 59.14% <45.50%> (?)
serverless-aws-sdk-dynamodb 58.23% <45.50%> (-0.04%) ⬇️
serverless-aws-sdk-eventbridge 56.86% <45.50%> (-0.02%) ⬇️
serverless-aws-sdk-lambda 60.23% <45.50%> (-0.05%) ⬇️
serverless-aws-sdk-s3 58.30% <45.50%> (-0.04%) ⬇️
serverless-aws-sdk-serverless-peer-service 63.05% <44.38%> (?)
serverless-aws-sdk-sns ?
serverless-aws-sdk-sqs 63.67% <45.50%> (-0.07%) ⬇️
serverless-aws-sdk-stepfunctions 58.11% <45.50%> (-0.04%) ⬇️
serverless-aws-sdk-util 54.74% <44.38%> (-0.03%) ⬇️
serverless-azure-durable-functions 54.63% <31.46%> (?)
serverless-bucket-0 ?
serverless-lambda 59.50% <44.38%> (-0.06%) ⬇️
test-bucket-0 59.44% <50.00%> (+0.06%) ⬆️
test-optimization-cypress 60.22% <50.00%> (-0.35%) ⬇️
test-optimization-playwright-playwright-atr 59.38% <50.00%> (+<0.01%) ⬆️
test-optimization-playwright-playwright-efd 59.32% <50.00%> (-0.01%) ⬇️
test-optimization-playwright-playwright-final-status 59.09% <50.00%> (+<0.01%) ⬆️
test-optimization-playwright-playwright-test-span 59.38% <50.00%> (+0.14%) ⬆️
test-optimization-selenium 58.49% <50.00%> (+<0.01%) ⬆️
test-optimization-vitest 64.45% <50.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d08593c9f1

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

// The native client reports at most one add and one update per path per poll, but it can
// report both when a config it stored while inactive becomes active with new contents. The
// second one would dispatch the config to its handler twice.
if (seenPaths.has(path)) continue

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve the newest duplicate change

When the native client reports the documented add-then-update pair for a path whose contents changed while inactive, this check retains the first, stale add and discards the newer update. The handler consequently installs the old probe while setConfigState acknowledges the fetcher's current path state, so the backend can believe the newer version was applied and never resend it; coalesce duplicate paths to the final change instead of keeping the first.

Useful? React with 👍 / 👎.

Comment on lines +246 to +249
try {
this.#applyChanges(changes)
} catch (applyError) {
log.error('[RC] Could not apply remote config update', applyError)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Retry changes after batch-handler failures

If a batch handler throws, this catch only logs the error even though the fetcher has already committed the returned changes as seen. For example, JsRemoteConfigFetcher.#diff updates #files before invoking this callback, so an unchanged response on the next poll produces no changes and the failed config is never dispatched again; a transient tracing or AppSec batch failure can therefore leave the process permanently on stale configuration until the backend publishes another version.

Useful? React with 👍 / 👎.

@BridgeAR
BridgeAR changed the base branch from rochdev/apm-data-pipeline to master August 28, 2026 16:10
@BridgeAR
BridgeAR requested review from a team as code owners August 28, 2026 16:10

@datadog-official datadog-official Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Datadog Autotest: FAIL

The dependency change does not update yarn.lock, so frozen installs fail. Remote Config can also keep old data or lose updates, and global agentless mode stops Feature Flagging exposure delivery.

Open Bits AI session

🤖 Datadog Autotest · Commit d08593c · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest

Comment thread package.json
},
"optionalDependencies": {
"@datadog/libdatadog": "0.12.1",
"@datadog/libdatadog": "^0.19.0",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Update the lock file for libdatadog

Repository installs that use the frozen lock file cannot complete.

Assertion details
  • Input: Run a frozen Yarn install from this revision.
  • Expected: The lock file must resolve a libdatadog version that satisfies the new manifest range.
  • Actual: The manifest requires libdatadog 0.19, but yarn.lock still contains only version 0.12.1. A frozen install fails.

Was this helpful? React 👍 or 👎
🤖 Datadog Autotest · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest

// The native client reports at most one add and one update per path per poll, but it can
// report both when a config it stored while inactive becomes active with new contents. The
// second one would dispatch the config to its handler twice.
if (seenPaths.has(path)) continue

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Keep the newest change for a repeated path

A probe or configuration can remain at an old version until a later server change occurs.

Assertion details
  • Input: The native client returns an add record and then a newer update record for the same path in one poll.
  • Expected: The code must apply the newest change for each path once.
  • Actual: The loop keeps the first change for a path and ignores the later update. The fetcher has already stored the later version, so another poll does not correct the old applied data.

Was this helpful? React 👍 or 👎
🤖 Datadog Autotest · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest

* @returns {void}
*/
function enable (config) {
if (config.DD_AGENTLESS_ENABLED) return

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Keep Feature Flagging exposure delivery in agentless mode

Global agentless mode silently drops all Feature Flagging exposure events.

Assertion details
  • Input: Enable DD_AGENTLESS_ENABLED and use the OpenFeature provider.
  • Expected: Feature Flagging must start the exposure writer and use its agentless delivery route.
  • Actual: The new return prevents the exposure writer and its channel subscribers from starting, although the configuration selects the direct agentless delivery route.

Was this helpful? React 👍 or 👎
🤖 Datadog Autotest · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest

for (const [handler, products] of this.#batchHandlers) {
const transactionView = filterTransactionByProducts(transaction, products)
if (transactionView.toUnapply.length || transactionView.toApply.length || transactionView.toModify.length) {
handler(transactionView)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Do not consume updates when a batch handler throws

An APM or AppSec configuration can remain unapplied, or a removed configuration can remain active.

Assertion details
  • Input: A Remote Config batch handler throws while it processes an add, update, or removal.
  • Expected: A handler failure must keep the update available for retry or complete dispatch with an error state.
  • Actual: The fetcher commits the new file state before this handler runs. If the handler throws, dispatch stops, but later polls report no change and cannot retry the update.

Was this helpful? React 👍 or 👎
🤖 Datadog Autotest · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest

@BridgeAR
BridgeAR marked this pull request as draft August 28, 2026 16:29
@BridgeAR
BridgeAR changed the base branch from master to rochdev/apm-data-pipeline August 28, 2026 16:50
Agentless polling duplicated the Agent parser, dispatch, and scheduler ownership, so acknowledgements and lifecycle fixes could drift between transports. Keep the existing RemoteConfig state machine and adapt libdatadog at its fetch boundary. Agentless mode no longer overrides the customer's Remote Config or Dynamic Instrumentation settings.
Agent and agentless updates used separate transaction and dispatch flows, so batch outcomes and acknowledgement behavior could drift. Translate Agent responses into the same change records libdatadog returns, then process both through one path.
The native fetch promise owns completion. The transaction outcome map owns whether a product handler runs. Duplicating both contracts let agent and agentless polling diverge.
DD_AGENTLESS_ENABLED does not require an API key. Adding the undefined value to the request headers makes Node reject the request before network I/O.

Copy link
Copy Markdown
Contributor

I see I was requested for a review but the PR is in draft mode, do you need a review now or wait?

@BridgeAR

Copy link
Copy Markdown
Member Author

@leoromanovsky thanks, not right now :)

@BridgeAR
BridgeAR force-pushed the rochdev/apm-data-pipeline branch from 2eb2803 to 8781d02 Compare August 31, 2026 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants