Skip to content

Stable Config: make Selector.matches field optional #8898

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 29, 2025

Conversation

mtoffl01
Copy link
Contributor

@mtoffl01 mtoffl01 commented May 28, 2025

What Does This Do

Modifies stableconfig yaml parsing to account for Selectors without a matches entry.

Motivation

Stableconfig yaml parsing was modified since the v1.49.0 release in this PR. With the latest dev version, I encountered null ptr exception while testing the following valid file:

apm_configuration_rules:
  - selectors:
    - origin: process_arguments
       key: "-Darg1"
       operator: exists
  configuration:
    SOME_KEY: "value"

See: https://github.com/DataDog/system-tests/actions/runs/15278035597/job/42969611110?pr=4333

[dd.trace 2025-05-27 14:34:32:780 +0000] [main] WARN datadog.trace.bootstrap.config.provider.StableConfigSource - Encountered the following exception when attempting to read stable configuration file at path: /etc/datadog-agent/managed/datadog-agent/stable/application_monitoring.yaml, dropping configs.
java.lang.NullPointerException: Cannot invoke "java.util.List.getClass()" because "list" is null
	at java.base/java.util.Collections.unmodifiableList(Collections.java:1473)
	at datadog.trace.bootstrap.config.provider.stableconfig.Selector.<init>(Selector.java:24)

Additional Notes

Contributor Checklist

Jira ticket: [PROJ-IDENT]

@mtoffl01 mtoffl01 marked this pull request as ready for review May 28, 2025 17:03
@mtoffl01 mtoffl01 requested a review from a team as a code owner May 28, 2025 17:03
@mtoffl01 mtoffl01 requested review from dougqh and ygree May 28, 2025 17:03
Copy link
Contributor

github-actions bot commented May 28, 2025

Hi! 👋 Thanks for your pull request! 🎉

To help us review it, please make sure to:

  • Remove the tag from the pull request title

If you need help, please check our contributing guidelines.

@mtoffl01 mtoffl01 added comp: api Tracer public API type: bug Bug report and fix labels May 28, 2025
@pr-commenter
Copy link

pr-commenter bot commented May 28, 2025

Benchmarks

Startup

Load

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
end_time 2025-05-28T17:07:22 2025-05-28T17:15:05
git_branch master mtoff/scfg_selector_fix
git_commit_date 1746789389 1748451007
git_commit_sha ad6d5fe d0aa2a8
release_version 1.50.0-SNAPSHOT~ad6d5fef42 1.50.0-SNAPSHOT~d0aa2a89cc
start_time 2025-05-28T17:07:08 2025-05-28T17:14:51
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1748452902 1748452902
ci_job_id 958155220 958155220
ci_pipeline_id 66348805 66348805
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-1kw1trhr-project-304-concurrent-0-eex538x4 6.8.0-1029-aws #31~22.04.1-Ubuntu SMP Thu Apr 24 21:16:18 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-1kw1trhr-project-304-concurrent-0-eex538x4 6.8.0-1029-aws #31~22.04.1-Ubuntu SMP Thu Apr 24 21:16:18 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
variant iast iast

Summary

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

Request duration reports for petclinic
gantt
    title petclinic - request duration [CI 0.99] : candidate=1.50.0-SNAPSHOT~d0aa2a89cc, baseline=1.50.0-SNAPSHOT~ad6d5fef42
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.353 ms) : 1333, 1374
.   : milestone, 1353,
appsec (1.745 ms) : 1722, 1768
.   : milestone, 1745,
appsec_no_iast (1.727 ms) : 1704, 1749
.   : milestone, 1727,
code_origins (1.649 ms) : 1622, 1677
.   : milestone, 1649,
iast (1.5 ms) : 1475, 1525
.   : milestone, 1500,
profiling (1.554 ms) : 1530, 1579
.   : milestone, 1554,
tracing (1.49 ms) : 1465, 1515
.   : milestone, 1490,
section candidate
no_agent (1.352 ms) : 1333, 1372
.   : milestone, 1352,
appsec (1.731 ms) : 1707, 1754
.   : milestone, 1731,
appsec_no_iast (1.729 ms) : 1706, 1753
.   : milestone, 1729,
code_origins (1.667 ms) : 1640, 1695
.   : milestone, 1667,
iast (1.532 ms) : 1508, 1556
.   : milestone, 1532,
profiling (1.521 ms) : 1496, 1546
.   : milestone, 1521,
tracing (1.485 ms) : 1460, 1511
.   : milestone, 1485,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.353 ms [1.333 ms, 1.374 ms] -
appsec 1.745 ms [1.722 ms, 1.768 ms] 391.392 µs (28.9%)
appsec_no_iast 1.727 ms [1.704 ms, 1.749 ms] 373.084 µs (27.6%)
code_origins 1.649 ms [1.622 ms, 1.677 ms] 296.039 µs (21.9%)
iast 1.5 ms [1.475 ms, 1.525 ms] 146.655 µs (10.8%)
profiling 1.554 ms [1.53 ms, 1.579 ms] 201.05 µs (14.9%)
tracing 1.49 ms [1.465 ms, 1.515 ms] 136.905 µs (10.1%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.352 ms [1.333 ms, 1.372 ms] -
appsec 1.731 ms [1.707 ms, 1.754 ms] 378.347 µs (28.0%)
appsec_no_iast 1.729 ms [1.706 ms, 1.753 ms] 376.901 µs (27.9%)
code_origins 1.667 ms [1.64 ms, 1.695 ms] 314.923 µs (23.3%)
iast 1.532 ms [1.508 ms, 1.556 ms] 179.759 µs (13.3%)
profiling 1.521 ms [1.496 ms, 1.546 ms] 168.644 µs (12.5%)
tracing 1.485 ms [1.46 ms, 1.511 ms] 132.991 µs (9.8%)
Request duration reports for insecure-bank
gantt
    title insecure-bank - request duration [CI 0.99] : candidate=1.50.0-SNAPSHOT~d0aa2a89cc, baseline=1.50.0-SNAPSHOT~ad6d5fef42
    dateFormat X
    axisFormat %s
section baseline
no_agent (375.535 µs) : 356, 395
.   : milestone, 376,
iast (516.196 µs) : 495, 538
.   : milestone, 516,
iast_FULL (728.631 µs) : 707, 751
.   : milestone, 729,
iast_GLOBAL (556.223 µs) : 535, 578
.   : milestone, 556,
iast_HARDCODED_SECRET_DISABLED (516.51 µs) : 493, 540
.   : milestone, 517,
iast_INACTIVE (468.561 µs) : 446, 491
.   : milestone, 469,
iast_TELEMETRY_OFF (499.396 µs) : 476, 523
.   : milestone, 499,
tracing (457.52 µs) : 435, 480
.   : milestone, 458,
section candidate
no_agent (380.637 µs) : 361, 400
.   : milestone, 381,
iast (508.759 µs) : 487, 530
.   : milestone, 509,
iast_FULL (735.433 µs) : 714, 757
.   : milestone, 735,
iast_GLOBAL (568.814 µs) : 546, 591
.   : milestone, 569,
iast_HARDCODED_SECRET_DISABLED (515.58 µs) : 494, 537
.   : milestone, 516,
iast_INACTIVE (467.82 µs) : 445, 491
.   : milestone, 468,
iast_TELEMETRY_OFF (498.167 µs) : 475, 521
.   : milestone, 498,
tracing (452.718 µs) : 431, 474
.   : milestone, 453,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 375.535 µs [355.838 µs, 395.232 µs] -
iast 516.196 µs [494.695 µs, 537.698 µs] 140.661 µs (37.5%)
iast_FULL 728.631 µs [706.711 µs, 750.55 µs] 353.096 µs (94.0%)
iast_GLOBAL 556.223 µs [534.78 µs, 577.665 µs] 180.688 µs (48.1%)
iast_HARDCODED_SECRET_DISABLED 516.51 µs [493.36 µs, 539.66 µs] 140.975 µs (37.5%)
iast_INACTIVE 468.561 µs [445.712 µs, 491.41 µs] 93.026 µs (24.8%)
iast_TELEMETRY_OFF 499.396 µs [475.941 µs, 522.851 µs] 123.861 µs (33.0%)
tracing 457.52 µs [435.378 µs, 479.661 µs] 81.985 µs (21.8%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 380.637 µs [360.972 µs, 400.302 µs] -
iast 508.759 µs [487.214 µs, 530.303 µs] 128.122 µs (33.7%)
iast_FULL 735.433 µs [713.519 µs, 757.346 µs] 354.796 µs (93.2%)
iast_GLOBAL 568.814 µs [546.367 µs, 591.261 µs] 188.177 µs (49.4%)
iast_HARDCODED_SECRET_DISABLED 515.58 µs [494.134 µs, 537.026 µs] 134.943 µs (35.5%)
iast_INACTIVE 467.82 µs [444.515 µs, 491.124 µs] 87.183 µs (22.9%)
iast_TELEMETRY_OFF 498.167 µs [475.186 µs, 521.147 µs] 117.53 µs (30.9%)
tracing 452.718 µs [431.157 µs, 474.28 µs] 72.081 µs (18.9%)

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master mtoff/scfg_selector_fix
git_commit_date 1746789389 1748451007
git_commit_sha ad6d5fe d0aa2a8
release_version 1.50.0-SNAPSHOT~ad6d5fef42 1.50.0-SNAPSHOT~d0aa2a89cc
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1748453395 1748453395
ci_job_id 958155222 958155222
ci_pipeline_id 66348805 66348805
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-jcqxzdvc-project-304-concurrent-1-2fngj6cy 6.8.0-1029-aws #31~22.04.1-Ubuntu SMP Thu Apr 24 21:16:18 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-jcqxzdvc-project-304-concurrent-1-2fngj6cy 6.8.0-1029-aws #31~22.04.1-Ubuntu SMP Thu Apr 24 21:16:18 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
variant appsec appsec

Summary

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

Execution time for tomcat
gantt
    title tomcat - execution time [CI 0.99] : candidate=1.50.0-SNAPSHOT~d0aa2a89cc, baseline=1.50.0-SNAPSHOT~ad6d5fef42
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.471 ms) : 1460, 1483
.   : milestone, 1471,
appsec (2.383 ms) : 2335, 2431
.   : milestone, 2383,
iast (2.179 ms) : 2118, 2240
.   : milestone, 2179,
iast_GLOBAL (2.208 ms) : 2147, 2269
.   : milestone, 2208,
profiling (2.029 ms) : 1980, 2078
.   : milestone, 2029,
tracing (1.99 ms) : 1942, 2037
.   : milestone, 1990,
section candidate
no_agent (1.476 ms) : 1464, 1487
.   : milestone, 1476,
appsec (2.383 ms) : 2335, 2431
.   : milestone, 2383,
iast (2.166 ms) : 2105, 2227
.   : milestone, 2166,
iast_GLOBAL (2.216 ms) : 2155, 2278
.   : milestone, 2216,
profiling (2.498 ms) : 2315, 2680
.   : milestone, 2498,
tracing (2.008 ms) : 1960, 2056
.   : milestone, 2008,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.471 ms [1.46 ms, 1.483 ms] -
appsec 2.383 ms [2.335 ms, 2.431 ms] 911.271 µs (61.9%)
iast 2.179 ms [2.118 ms, 2.24 ms] 707.941 µs (48.1%)
iast_GLOBAL 2.208 ms [2.147 ms, 2.269 ms] 736.484 µs (50.1%)
profiling 2.029 ms [1.98 ms, 2.078 ms] 557.418 µs (37.9%)
tracing 1.99 ms [1.942 ms, 2.037 ms] 518.121 µs (35.2%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.476 ms [1.464 ms, 1.487 ms] -
appsec 2.383 ms [2.335 ms, 2.431 ms] 907.317 µs (61.5%)
iast 2.166 ms [2.105 ms, 2.227 ms] 690.361 µs (46.8%)
iast_GLOBAL 2.216 ms [2.155 ms, 2.278 ms] 740.946 µs (50.2%)
profiling 2.498 ms [2.315 ms, 2.68 ms] 1.022 ms (69.3%)
tracing 2.008 ms [1.96 ms, 2.056 ms] 532.465 µs (36.1%)
Execution time for biojava
gantt
    title biojava - execution time [CI 0.99] : candidate=1.50.0-SNAPSHOT~d0aa2a89cc, baseline=1.50.0-SNAPSHOT~ad6d5fef42
    dateFormat X
    axisFormat %s
section baseline
no_agent (15.487 s) : 15487000, 15487000
.   : milestone, 15487000,
appsec (15.159 s) : 15159000, 15159000
.   : milestone, 15159000,
iast (18.705 s) : 18705000, 18705000
.   : milestone, 18705000,
iast_GLOBAL (18.123 s) : 18123000, 18123000
.   : milestone, 18123000,
profiling (15.434 s) : 15434000, 15434000
.   : milestone, 15434000,
tracing (14.986 s) : 14986000, 14986000
.   : milestone, 14986000,
section candidate
no_agent (14.958 s) : 14958000, 14958000
.   : milestone, 14958000,
appsec (14.949 s) : 14949000, 14949000
.   : milestone, 14949000,
iast (18.789 s) : 18789000, 18789000
.   : milestone, 18789000,
iast_GLOBAL (18.142 s) : 18142000, 18142000
.   : milestone, 18142000,
profiling (15.535 s) : 15535000, 15535000
.   : milestone, 15535000,
tracing (14.572 s) : 14572000, 14572000
.   : milestone, 14572000,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.487 s [15.487 s, 15.487 s] -
appsec 15.159 s [15.159 s, 15.159 s] -328.0 ms (-2.1%)
iast 18.705 s [18.705 s, 18.705 s] 3.218 s (20.8%)
iast_GLOBAL 18.123 s [18.123 s, 18.123 s] 2.636 s (17.0%)
profiling 15.434 s [15.434 s, 15.434 s] -53.0 ms (-0.3%)
tracing 14.986 s [14.986 s, 14.986 s] -501.0 ms (-3.2%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 14.958 s [14.958 s, 14.958 s] -
appsec 14.949 s [14.949 s, 14.949 s] -9.0 ms (-0.1%)
iast 18.789 s [18.789 s, 18.789 s] 3.831 s (25.6%)
iast_GLOBAL 18.142 s [18.142 s, 18.142 s] 3.184 s (21.3%)
profiling 15.535 s [15.535 s, 15.535 s] 577.0 ms (3.9%)
tracing 14.572 s [14.572 s, 14.572 s] -386.0 ms (-2.6%)

@mcculls mcculls added comp: core Tracer core and removed comp: core Tracer core labels May 29, 2025
@mcculls mcculls changed the title [StableConfig] make Selector.matches field optional Stable Config: make Selector.matches field optional May 29, 2025
@mcculls mcculls added the tag: no release notes Changes to exclude from release notes label May 29, 2025
@mtoffl01 mtoffl01 merged commit aac0226 into master May 29, 2025
527 of 534 checks passed
@mtoffl01 mtoffl01 deleted the mtoff/scfg_selector_fix branch May 29, 2025 14:21
@github-actions github-actions bot added this to the 1.50.0 milestone May 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp: api Tracer public API tag: no release notes Changes to exclude from release notes type: bug Bug report and fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants