Skip to content

fix(config): handle invalid programmatic option values#9312

Merged
BridgeAR merged 4 commits into
masterfrom
BridgeAR/2026-07-13-programmatic-transformers
Jul 14, 2026
Merged

fix(config): handle invalid programmatic option values#9312
BridgeAR merged 4 commits into
masterfrom
BridgeAR/2026-07-13-programmatic-transformers

Conversation

@BridgeAR

Copy link
Copy Markdown
Member

Summary

Invalid programmatic configuration values could reach option-specific transforms and abort tracer startup. This adds safe per-type coercion and ignores invalid inputs so lower-priority environment or default values remain active.

Refs: #9226

@dd-octo-sts

dd-octo-sts Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Overall package size

Self size: 6.71 MB
Deduped: 7.37 MB
No deduping: 7.37 MB

Dependency sizes | name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 3.3.1 | 122.62 kB | 438.86 kB | | opentracing | 0.14.7 | 194.81 kB | 194.81 kB | | dc-polyfill | 0.1.11 | 25.74 kB | 25.74 kB |

🤖 This report was automatically generated by heaviest-objects-in-the-universe

@datadog-datadog-prod-us1-2

datadog-datadog-prod-us1-2 Bot commented Jul 13, 2026

Copy link
Copy Markdown

Tests

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 96.57% (+0.00%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: ede853a | Docs | Datadog PR Page | Give us feedback!

@pr-commenter

pr-commenter Bot commented Jul 13, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-07-14 11:10:47

Comparing candidate commit ede853a in PR branch BridgeAR/2026-07-13-programmatic-transformers with baseline commit 8bcc0d2 in branch master.

📊 Benchmarking dashboard

Found 0 performance improvements and 0 performance regressions! Performance is the same for 2305 metrics, 53 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 ----------------------------------'

Unstable benchmarks

These benchmarks have a confidence interval too wide to call a change; treat them as noise rather than signal.

scenario:appsec-appsec-enabled-24

  • unstable execution_time [-206.800ms; +198.454ms] or [-7.826%; +7.510%]

scenario:appsec-appsec-enabled-26

  • unstable execution_time [-224.554ms; +228.063ms] or [-8.782%; +8.920%]

scenario:appsec-appsec-enabled-with-attacks-24

  • unstable execution_time [-163.213ms; +160.956ms] or [-5.220%; +5.148%]

scenario:appsec-appsec-enabled-with-attacks-26

  • unstable execution_time [-157.372ms; +214.513ms] or [-5.389%; +7.346%]

scenario:appsec-control-20

  • unstable execution_time [-126379.600µs; +126145.200µs] or [-7.700%; +7.686%]

scenario:appsec-control-24

  • unstable execution_time [-111.366ms; +109.210ms] or [-9.006%; +8.832%]

scenario:appsec-control-26

  • unstable execution_time [-128.000ms; +120.833ms] or [-10.333%; +9.755%]

scenario:appsec-iast-no-vulnerability-control-20

  • unstable execution_time [-18.146ms; +10.576ms] or [-7.062%; +4.116%]

scenario:appsec-iast-no-vulnerability-iast-enabled-always-active-20

  • unstable execution_time [-11.599ms; +27.975ms] or [-4.428%; +10.680%]

scenario:appsec-iast-no-vulnerability-iast-enabled-default-config-20

  • unstable execution_time [-10.502ms; +21.213ms] or [-4.035%; +8.151%]

scenario:appsec-iast-with-vulnerability-control-20

  • unstable execution_time [-26.422ms; +34.028ms] or [-4.782%; +6.158%]

scenario:appsec-iast-with-vulnerability-iast-enabled-default-config-20

  • unstable execution_time [-34.887ms; +32.418ms] or [-6.279%; +5.835%]

scenario:child_process-shell-string-24

  • unstable execution_time [-12.855ms; +22.600ms] or [-3.915%; +6.883%]

scenario:debugger-line-probe-with-snapshot-default-24

  • unstable cpu_user_time [-1429.335ms; +570.520ms] or [-16.744%; +6.683%]
  • unstable execution_time [-1405.258ms; +593.237ms] or [-15.210%; +6.421%]
  • unstable instructions [-12.3G instructions; +4.7G instructions] or [-17.603%; +6.780%]
  • unstable throughput [-194.438op/s; +390.173op/s] or [-5.496%; +11.029%]

scenario:debugger-line-probe-with-snapshot-default-26

  • unstable cpu_user_time [-3.216s; +0.459s] or [-31.663%; +4.522%]
  • unstable execution_time [-3.186s; +0.486s] or [-29.268%; +4.462%]
  • unstable instructions [-28.5G instructions; +3.9G instructions] or [-33.453%; +4.580%]
  • unstable throughput [-106.177op/s; +651.235op/s] or [-3.433%; +21.055%]

scenario:debugger-line-probe-with-snapshot-minimal-24

  • unstable cpu_user_time [-1524.481ms; +505.437ms] or [-18.268%; +6.057%]
  • unstable execution_time [-1533.522ms; +518.862ms] or [-16.955%; +5.737%]
  • unstable instructions [-13.1G instructions; +4.4G instructions] or [-19.167%; +6.387%]
  • unstable throughput [-163.442op/s; +451.777op/s] or [-4.517%; +12.485%]

scenario:debugger-line-probe-with-snapshot-minimal-26

  • unstable cpu_user_time [-2059.087ms; +3372.975ms] or [-21.998%; +36.035%]
  • unstable execution_time [-2063.573ms; +3366.368ms] or [-20.505%; +33.450%]
  • unstable instructions [-18.2G instructions; +29.7G instructions] or [-23.341%; +38.099%]
  • unstable max_rss_usage [-6.892MB; +10.560MB] or [-4.330%; +6.635%]
  • unstable throughput [-737.867op/s; +442.815op/s] or [-22.606%; +13.566%]

scenario:debugger-line-probe-without-snapshot-24

  • unstable cpu_user_time [-1435.810ms; +2726.250ms] or [-17.237%; +32.729%]
  • unstable execution_time [-1440.966ms; +2721.288ms] or [-15.910%; +30.047%]
  • unstable instructions [-12.5G instructions; +23.4G instructions] or [-18.350%; +34.447%]
  • unstable max_rss_usage [-6.748MB; +11.244MB] or [-4.298%; +7.162%]
  • unstable throughput [-781.215op/s; +376.366op/s] or [-21.636%; +10.423%]

scenario:debugger-line-probe-without-snapshot-26

  • unstable cpu_user_time [-2039.738ms; +3216.213ms] or [-21.849%; +34.451%]
  • unstable execution_time [-2031.928ms; +3250.398ms] or [-20.180%; +32.281%]
  • unstable instructions [-18.5G instructions; +29.4G instructions] or [-23.678%; +37.566%]
  • unstable max_rss_usage [-6.426MB; +10.916MB] or [-4.040%; +6.862%]
  • unstable throughput [-714.405op/s; +445.871op/s] or [-21.935%; +13.690%]

scenario:dogstatsd-with-tags-20

  • unstable cpu_user_time [-435.983ms; +200.758ms] or [-9.176%; +4.225%]
  • unstable execution_time [-438.615ms; +205.845ms] or [-9.085%; +4.264%]
  • unstable throughput [-73009.808op/s; +154654.536op/s] or [-4.200%; +8.896%]

scenario:iast-sink-check-26

  • unstable execution_time [-103.109ms; +267.217ms] or [-2.785%; +7.217%]

scenario:plugin-claude-agent-sdk-compact-stream-scan-26

  • unstable cpu_user_time [-2404.903µs; +3764.716µs] or [-3.931%; +6.154%]

scenario:plugin-graphql-long-with-depth-off-20

  • unstable max_rss_usage [-7139.964KB; +6774.250KB] or [-5.561%; +5.276%]

scenario:plugin-graphql-long-with-depth-on-max-20

  • unstable cpu_user_time [-701.407ms; +677.803ms] or [-5.464%; +5.281%]
  • unstable execution_time [-704.190ms; +676.541ms] or [-5.367%; +5.157%]
  • unstable throughput [-3.128op/s; +3.215op/s] or [-5.100%; +5.241%]

scenario:plugin-pg-service-26

  • unstable cpu_usage_percentage [-11.349%; +7.292%]
  • unstable execution_time [-122.217ms; +197.822ms] or [-13.333%; +21.581%]
  • unstable throughput [-856404.677op/s; +526588.313op/s] or [-12.743%; +7.835%]

scenario:test-optimization-large-suite-20

  • unstable max_rss_usage [-7.176MB; +2.067MB] or [-8.860%; +2.552%]

@codecov

codecov Bot commented Jul 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.60%. Comparing base (8bcc0d2) to head (ede853a).
⚠️ Report is 5 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff            @@
##           master    #9312    +/-   ##
========================================
  Coverage   96.60%   96.60%            
========================================
  Files         919      919            
  Lines      121692   121823   +131     
  Branches    21299    20332   -967     
========================================
+ Hits       117562   117692   +130     
- Misses       4130     4131     +1     
Flag Coverage Δ
aiguard 53.59% <68.75%> (-0.02%) ⬇️
aiguard-integration 57.01% <59.82%> (-0.01%) ⬇️
apm-bucket-0 53.82% <69.64%> (-0.02%) ⬇️
apm-bucket-1 58.10% <69.64%> (-0.02%) ⬇️
apm-bucket-2 56.14% <69.64%> (-0.02%) ⬇️
apm-capabilities-tracing 60.38% <100.00%> (+0.04%) ⬆️
apm-integrations-aerospike 52.97% <68.75%> (-0.02%) ⬇️
apm-integrations-confluentinc-kafka-javascript 57.09% <69.64%> (-0.02%) ⬇️
apm-integrations-couchbase 53.31% <69.64%> (-0.01%) ⬇️
apm-integrations-http 57.98% <68.75%> (-0.03%) ⬇️
apm-integrations-kafkajs 57.74% <69.64%> (-0.02%) ⬇️
apm-integrations-next 54.27% <69.64%> (-0.02%) ⬇️
apm-integrations-prisma 54.20% <69.64%> (-0.01%) ⬇️
apm-integrations-tedious 53.07% <68.75%> (-0.03%) ⬇️
appsec 69.01% <69.64%> (+0.02%) ⬆️
appsec-express_fastify_graphql 65.69% <68.75%> (-0.04%) ⬇️
appsec-integration 51.95% <69.64%> (-0.04%) ⬇️
appsec-kafka_ldapjs_lodash 59.11% <68.75%> (-0.03%) ⬇️
appsec-mongodb-core_mongoose_mysql 62.25% <68.75%> (-0.03%) ⬇️
appsec-next 52.88% <68.75%> (-0.01%) ⬇️
appsec-node-serialize_passport_postgres 61.89% <68.75%> (-0.02%) ⬇️
appsec-sourcing_stripe_template 60.35% <68.75%> (-0.03%) ⬇️
debugger 65.76% <71.42%> (+0.02%) ⬆️
instrumentations-bucket-0 48.80% <68.75%> (+<0.01%) ⬆️
instrumentations-bucket-1 54.99% <68.75%> (-0.02%) ⬇️
instrumentations-bucket-10 56.65% <68.75%> (-0.02%) ⬇️
instrumentations-bucket-11 48.79% <68.75%> (+<0.01%) ⬆️
instrumentations-bucket-12 48.89% <68.75%> (+<0.01%) ⬆️
instrumentations-bucket-13 48.73% <68.75%> (+<0.01%) ⬆️
instrumentations-bucket-2 49.79% <68.75%> (-0.01%) ⬇️
instrumentations-bucket-3 53.87% <68.75%> (-0.02%) ⬇️
instrumentations-bucket-4 49.21% <68.75%> (-0.01%) ⬇️
instrumentations-bucket-5 53.05% <68.75%> (-0.01%) ⬇️
instrumentations-bucket-6 55.63% <68.75%> (-0.02%) ⬇️
instrumentations-bucket-7 53.65% <68.75%> (-0.01%) ⬇️
instrumentations-bucket-8 54.67% <68.75%> (-0.02%) ⬇️
instrumentations-bucket-9 56.13% <68.75%> (-0.02%) ⬇️
instrumentations-instrumentation-couchbase 48.18% <51.78%> (-0.05%) ⬇️
instrumentations-integration-esbuild 33.98% <51.78%> (+<0.01%) ⬆️
llmobs-ai_anthropic_bedrock 57.75% <69.64%> (-0.02%) ⬇️
llmobs-bucket-1 57.01% <69.64%> (-0.02%) ⬇️
llmobs-openai 57.58% <69.64%> (-0.02%) ⬇️
llmobs-sdk 59.97% <69.64%> (-0.03%) ⬇️
llmobs-vertex-ai 54.24% <69.64%> (-0.02%) ⬇️
master-coverage 96.60% <100.00%> (?)
openfeature 54.64% <64.28%> (+0.02%) ⬆️
openfeature-unit 49.83% <51.78%> (-0.06%) ⬇️
platform-core_esbuild_instrumentations-misc 38.46% <51.78%> (-0.03%) ⬇️
platform-integration 62.28% <78.57%> (+0.04%) ⬆️
platform-shimmer_unit-guardrails_webpack 37.29% <51.78%> (-0.03%) ⬇️
plugins-bucket-0 53.21% <69.64%> (-0.01%) ⬇️
plugins-bucket-1 55.06% <52.67%> (-0.02%) ⬇️
plugins-bucket-11 55.62% <68.75%> (-0.02%) ⬇️
plugins-bucket-18 57.10% <69.64%> (-0.02%) ⬇️
plugins-bucket-19 55.41% <69.64%> (-0.02%) ⬇️
plugins-bucket-20 57.46% <69.64%> (-0.02%) ⬇️
plugins-bucket-4 53.89% <68.75%> (-0.02%) ⬇️
plugins-bullmq_cassandra_cookie 57.38% <69.64%> (-0.02%) ⬇️
plugins-cookie-parser_crypto_dd-trace-api 52.36% <68.75%> (-0.01%) ⬇️
plugins-fetch_fs_generic-pool 54.50% <69.64%> (-0.02%) ⬇️
plugins-google-cloud-pubsub_grpc_handlebars 59.88% <69.64%> (-0.03%) ⬇️
plugins-hapi_hono_ioredis 55.89% <69.64%> (-0.02%) ⬇️
plugins-jest_knex_langgraph 51.70% <68.75%> (-0.01%) ⬇️
plugins-ldapjs_light-my-request_limitd-client 53.45% <69.64%> (-0.01%) ⬇️
plugins-lodash_mariadb_memcached 54.25% <69.64%> (-0.02%) ⬇️
plugins-moleculer_mongodb_mongodb-core 57.32% <73.21%> (-0.01%) ⬇️
plugins-mongoose_multer_mysql 54.74% <69.64%> (-0.02%) ⬇️
plugins-mysql2_nats_node-serialize 56.24% <69.64%> (-0.02%) ⬇️
plugins-opensearch_passport-http_pino 55.09% <69.64%> (-0.02%) ⬇️
plugins-postgres_process_pug 54.32% <69.64%> (-0.02%) ⬇️
plugins-redis_router_sequelize 57.04% <69.64%> (-0.04%) ⬇️
plugins-test-and-upstream-rhea_undici_url 57.03% <69.64%> (-0.04%) ⬇️
plugins-valkey_vm_winston 53.96% <69.64%> (+0.06%) ⬆️
plugins-ws 54.83% <68.75%> (-0.02%) ⬇️
profiling 58.24% <76.78%> (+<0.01%) ⬆️
serverless-aws-sdk-aws-sdk 50.70% <68.75%> (-0.01%) ⬇️
serverless-aws-sdk-bedrockruntime 50.72% <68.75%> (-0.01%) ⬇️
serverless-aws-sdk-client 51.97% <52.67%> (-0.05%) ⬇️
serverless-aws-sdk-dynamodb 51.81% <68.75%> (+0.02%) ⬆️
serverless-aws-sdk-eventbridge 46.26% <51.78%> (-0.04%) ⬇️
serverless-aws-sdk-kinesis 54.74% <68.75%> (-0.02%) ⬇️
serverless-aws-sdk-lambda 52.82% <68.75%> (-0.01%) ⬇️
serverless-aws-sdk-s3 51.57% <68.75%> (-0.01%) ⬇️
serverless-aws-sdk-serverless-peer-service 54.76% <68.75%> (-0.05%) ⬇️
serverless-aws-sdk-sns 55.51% <68.75%> (-0.02%) ⬇️
serverless-aws-sdk-sqs 55.94% <69.64%> (-0.02%) ⬇️
serverless-aws-sdk-stepfunctions 51.29% <68.75%> (-0.01%) ⬇️
serverless-aws-sdk-util 48.48% <51.78%> (-0.05%) ⬇️
serverless-bucket-0 55.21% <51.78%> (-0.02%) ⬇️
serverless-bucket-1 56.05% <71.42%> (-0.01%) ⬇️
test-optimization-cucumber 72.95% <77.67%> (+<0.01%) ⬆️
test-optimization-cypress 66.39% <67.85%> (+0.11%) ⬆️
test-optimization-jest 74.25% <77.67%> (-0.03%) ⬇️
test-optimization-mocha 74.70% <77.67%> (+0.07%) ⬆️
test-optimization-playwright-playwright-atr 61.56% <67.85%> (+0.02%) ⬆️
test-optimization-playwright-playwright-efd 61.75% <67.85%> (-0.14%) ⬇️
test-optimization-playwright-playwright-final-status 61.73% <67.85%> (+0.04%) ⬆️
test-optimization-playwright-playwright-impacted-tests 61.67% <67.85%> (+0.43%) ⬆️
test-optimization-playwright-playwright-reporting 61.34% <67.85%> (+0.09%) ⬆️
test-optimization-playwright-playwright-test-management 62.30% <67.85%> (-0.03%) ⬇️
test-optimization-playwright-playwright-test-span 61.48% <67.85%> (-0.03%) ⬇️
test-optimization-selenium 60.67% <67.85%> (-0.13%) ⬇️
test-optimization-testopt 59.16% <69.64%> (+0.09%) ⬆️
test-optimization-vitest 71.59% <77.67%> (+0.05%) ⬆️

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.

Comment thread packages/dd-trace/src/config/defaults.js Outdated
Comment thread packages/dd-trace/src/config/defaults.js Outdated
Comment thread packages/dd-trace/src/config/defaults.js Outdated
Comment thread packages/dd-trace/src/config/parsers.js Outdated
Comment thread packages/dd-trace/src/config/parsers.js Outdated
Comment thread packages/dd-trace/src/config/index.js Outdated
Comment thread packages/dd-trace/src/config/parsers.js Outdated
Comment thread packages/dd-trace/src/config/parsers.js Outdated
Comment thread packages/dd-trace/src/config/parsers.js Outdated
Comment thread packages/dd-trace/src/config/defaults.js Outdated
BridgeAR added 3 commits July 14, 2026 01:31
Invalid programmatic values could reach option-specific transforms and abort tracer startup. Normalize safe primitive conversions and ignore invalid inputs so lower-priority environment or default values remain active.
This prevents programmatic arrays with numeric or boolean entries from falling back to defaults.
@BridgeAR
BridgeAR force-pushed the BridgeAR/2026-07-13-programmatic-transformers branch from 1cac9ca to fd5e9d8 Compare July 14, 2026 00:14
Comment thread packages/dd-trace/src/config/index.js Outdated
Comment thread packages/dd-trace/src/config/index.js Outdated
Co-authored-by: Ruben Bridgewater <[email protected]>
@BridgeAR
BridgeAR marked this pull request as ready for review July 14, 2026 11:01
@BridgeAR
BridgeAR requested a review from a team as a code owner July 14, 2026 11:01
@BridgeAR
BridgeAR requested review from khanayan123 and removed request for a team July 14, 2026 11:01

@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: ede853af3a

ℹ️ 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".

Comment thread packages/dd-trace/src/config/parsers.js
Comment thread packages/dd-trace/src/config/parsers.js
@BridgeAR
BridgeAR merged commit 665ccb5 into master Jul 14, 2026
657 checks passed
@BridgeAR
BridgeAR deleted the BridgeAR/2026-07-13-programmatic-transformers branch July 14, 2026 11:20
This was referenced Jul 14, 2026
juan-fernandez pushed a commit that referenced this pull request Jul 14, 2026
Invalid programmatic values could reach option-specific transforms and abort tracer startup. Normalize safe primitive conversions and ignore invalid inputs so lower-priority environment or default values remain active.
juan-fernandez pushed a commit that referenced this pull request Jul 14, 2026
Invalid programmatic values could reach option-specific transforms and abort tracer startup. Normalize safe primitive conversions and ignore invalid inputs so lower-priority environment or default values remain active.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants