Skip to content

Conversation

@mhlidd
Copy link
Contributor

@mhlidd mhlidd commented Sep 15, 2025

What Does This Do

This PR implements basic Config Inversion, aiming to document all DD/OTEL environment variables used in the repo in a supported-configurations.json file.

Components:

  • ConfigInversionStrictStyle.java
    • Enum for how strict to run Config Inversion with.
    • Options are Strict which does not allow any usage of an unknown DD/OTEL environment variable, Warning which allows the usage but sends telemetry about unknown environment variables, and Test which allows the usage of unknown environment variables without sending telemetry.
    • Default value for Strictness is Warning
  • ConfigHelper.java
    • Layer of abstraction between Environment Variable Source and Environment Component that directly compares data loaded from supported-configurations.json to ensure the environment variable queried for is "known"
    • Determines what behavior to take given the ConfigInversionStrictStyle that is set.

Motivation

This PR supports the general Config Inversion theme that has already been implemented in dd-trace-js and currently being implemented in dd-trace-go and dd-trace-rb. Here is the RFC that documents what this project entails.

Additional Notes

This is a follow-up to

Contributor Checklist

Jira ticket: [PROJ-IDENT]

@mhlidd mhlidd force-pushed the mhlidd/config_inversion_base branch 2 times, most recently from 1a576ea to 512b2c6 Compare September 15, 2025 21:34
@pr-commenter
Copy link

pr-commenter bot commented Sep 15, 2025

Benchmarks

Startup

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master mhlidd/config_inversion_base
git_commit_date 1760118158 1760120286
git_commit_sha ef27983 7a2f0c5
release_version 1.55.0-SNAPSHOT~ef27983a1d 1.55.0-SNAPSHOT~7a2f0c58e0
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1760122132 1760122132
ci_job_id 1174648634 1174648634
ci_pipeline_id 79005413 79005413
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-zfyrx7zua-project-304-concurrent-0-bp6bdz9g 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-zfyrx7zua-project-304-concurrent-0-bp6bdz9g 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
module Agent Agent
parent None None

Summary

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

Startup time reports for petclinic
gantt
    title petclinic - global startup overhead: candidate=1.55.0-SNAPSHOT~7a2f0c58e0, baseline=1.55.0-SNAPSHOT~ef27983a1d

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.016 s) : 0, 1016349
Total [baseline] (10.773 s) : 0, 10773322
Agent [candidate] (1.019 s) : 0, 1019144
Total [candidate] (10.683 s) : 0, 10682801
section appsec
Agent [baseline] (1.194 s) : 0, 1193834
Total [baseline] (10.92 s) : 0, 10920118
Agent [candidate] (1.191 s) : 0, 1190686
Total [candidate] (11.041 s) : 0, 11041316
section iast
Agent [baseline] (1.15 s) : 0, 1149514
Total [baseline] (11.016 s) : 0, 11016186
Agent [candidate] (1.16 s) : 0, 1159601
Total [candidate] (11.101 s) : 0, 11100945
section profiling
Agent [baseline] (1.16 s) : 0, 1159603
Total [baseline] (11.031 s) : 0, 11031443
Agent [candidate] (1.169 s) : 0, 1168882
Total [candidate] (11.035 s) : 0, 11035434
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.016 s -
Agent appsec 1.194 s 177.485 ms (17.5%)
Agent iast 1.15 s 133.165 ms (13.1%)
Agent profiling 1.16 s 143.254 ms (14.1%)
Total tracing 10.773 s -
Total appsec 10.92 s 146.796 ms (1.4%)
Total iast 11.016 s 242.864 ms (2.3%)
Total profiling 11.031 s 258.121 ms (2.4%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.019 s -
Agent appsec 1.191 s 171.543 ms (16.8%)
Agent iast 1.16 s 140.457 ms (13.8%)
Agent profiling 1.169 s 149.739 ms (14.7%)
Total tracing 10.683 s -
Total appsec 11.041 s 358.515 ms (3.4%)
Total iast 11.101 s 418.144 ms (3.9%)
Total profiling 11.035 s 352.633 ms (3.3%)
gantt
    title petclinic - break down per module: candidate=1.55.0-SNAPSHOT~7a2f0c58e0, baseline=1.55.0-SNAPSHOT~ef27983a1d

    dateFormat X
    axisFormat %s
section tracing
crashtracking [baseline] (1.458 ms) : 0, 1458
crashtracking [candidate] (1.459 ms) : 0, 1459
BytebuddyAgent [baseline] (694.41 ms) : 0, 694410
BytebuddyAgent [candidate] (694.99 ms) : 0, 694990
GlobalTracer [baseline] (241.558 ms) : 0, 241558
GlobalTracer [candidate] (242.122 ms) : 0, 242122
AppSec [baseline] (32.567 ms) : 0, 32567
AppSec [candidate] (32.513 ms) : 0, 32513
Debugger [baseline] (6.464 ms) : 0, 6464
Debugger [candidate] (6.442 ms) : 0, 6442
Remote Config [baseline] (711.36 µs) : 0, 711
Remote Config [candidate] (698.445 µs) : 0, 698
Telemetry [baseline] (9.278 ms) : 0, 9278
Telemetry [candidate] (9.328 ms) : 0, 9328
Flare Poller [baseline] (8.719 ms) : 0, 8719
Flare Poller [candidate] (10.313 ms) : 0, 10313
section appsec
crashtracking [baseline] (1.451 ms) : 0, 1451
crashtracking [candidate] (1.441 ms) : 0, 1441
BytebuddyAgent [baseline] (718.109 ms) : 0, 718109
BytebuddyAgent [candidate] (715.687 ms) : 0, 715687
GlobalTracer [baseline] (234.54 ms) : 0, 234540
GlobalTracer [candidate] (233.755 ms) : 0, 233755
IAST [baseline] (24.673 ms) : 0, 24673
IAST [candidate] (24.819 ms) : 0, 24819
AppSec [baseline] (174.894 ms) : 0, 174894
AppSec [candidate] (174.949 ms) : 0, 174949
Debugger [baseline] (6.088 ms) : 0, 6088
Debugger [candidate] (6.076 ms) : 0, 6076
Remote Config [baseline] (622.803 µs) : 0, 623
Remote Config [candidate] (621.699 µs) : 0, 622
Telemetry [baseline] (8.437 ms) : 0, 8437
Telemetry [candidate] (8.397 ms) : 0, 8397
Flare Poller [baseline] (3.902 ms) : 0, 3902
Flare Poller [candidate] (3.917 ms) : 0, 3917
section iast
crashtracking [baseline] (1.458 ms) : 0, 1458
crashtracking [candidate] (1.463 ms) : 0, 1463
BytebuddyAgent [baseline] (814.35 ms) : 0, 814350
BytebuddyAgent [candidate] (820.643 ms) : 0, 820643
GlobalTracer [baseline] (231.015 ms) : 0, 231015
GlobalTracer [candidate] (233.101 ms) : 0, 233101
IAST [baseline] (26.38 ms) : 0, 26380
IAST [candidate] (26.95 ms) : 0, 26950
AppSec [baseline] (35.18 ms) : 0, 35180
AppSec [candidate] (35.767 ms) : 0, 35767
Debugger [baseline] (6.128 ms) : 0, 6128
Debugger [candidate] (6.264 ms) : 0, 6264
Remote Config [baseline] (604.896 µs) : 0, 605
Remote Config [candidate] (632.47 µs) : 0, 632
Telemetry [baseline] (8.601 ms) : 0, 8601
Telemetry [candidate] (8.799 ms) : 0, 8799
Flare Poller [baseline] (4.289 ms) : 0, 4289
Flare Poller [candidate] (4.255 ms) : 0, 4255
section profiling
crashtracking [baseline] (1.427 ms) : 0, 1427
crashtracking [candidate] (1.438 ms) : 0, 1438
BytebuddyAgent [baseline] (720.252 ms) : 0, 720252
BytebuddyAgent [candidate] (726.059 ms) : 0, 726059
GlobalTracer [baseline] (217.437 ms) : 0, 217437
GlobalTracer [candidate] (218.588 ms) : 0, 218588
AppSec [baseline] (32.364 ms) : 0, 32364
AppSec [candidate] (32.715 ms) : 0, 32715
Debugger [baseline] (6.523 ms) : 0, 6523
Debugger [candidate] (7.329 ms) : 0, 7329
Remote Config [baseline] (748.208 µs) : 0, 748
Remote Config [candidate] (867.981 µs) : 0, 868
Telemetry [baseline] (16.216 ms) : 0, 16216
Telemetry [candidate] (15.262 ms) : 0, 15262
Flare Poller [baseline] (4.148 ms) : 0, 4148
Flare Poller [candidate] (4.148 ms) : 0, 4148
ProfilingAgent [baseline] (107.853 ms) : 0, 107853
ProfilingAgent [candidate] (109.085 ms) : 0, 109085
Profiling [baseline] (108.596 ms) : 0, 108596
Profiling [candidate] (110.083 ms) : 0, 110083
Loading
Startup time reports for insecure-bank
gantt
    title insecure-bank - global startup overhead: candidate=1.55.0-SNAPSHOT~7a2f0c58e0, baseline=1.55.0-SNAPSHOT~ef27983a1d

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.015 s) : 0, 1014619
Total [baseline] (8.702 s) : 0, 8701670
Agent [candidate] (1.025 s) : 0, 1025305
Total [candidate] (8.732 s) : 0, 8732332
section iast
Agent [baseline] (1.148 s) : 0, 1148164
Total [baseline] (9.252 s) : 0, 9252101
Agent [candidate] (1.151 s) : 0, 1151353
Total [candidate] (9.269 s) : 0, 9268895
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.015 s -
Agent iast 1.148 s 133.545 ms (13.2%)
Total tracing 8.702 s -
Total iast 9.252 s 550.431 ms (6.3%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.025 s -
Agent iast 1.151 s 126.048 ms (12.3%)
Total tracing 8.732 s -
Total iast 9.269 s 536.564 ms (6.1%)
gantt
    title insecure-bank - break down per module: candidate=1.55.0-SNAPSHOT~7a2f0c58e0, baseline=1.55.0-SNAPSHOT~ef27983a1d

    dateFormat X
    axisFormat %s
section tracing
crashtracking [baseline] (1.451 ms) : 0, 1451
crashtracking [candidate] (1.476 ms) : 0, 1476
BytebuddyAgent [baseline] (691.629 ms) : 0, 691629
BytebuddyAgent [candidate] (698.84 ms) : 0, 698840
GlobalTracer [baseline] (242.161 ms) : 0, 242161
GlobalTracer [candidate] (243.821 ms) : 0, 243821
AppSec [baseline] (32.767 ms) : 0, 32767
AppSec [candidate] (33.028 ms) : 0, 33028
Debugger [baseline] (6.448 ms) : 0, 6448
Debugger [candidate] (6.592 ms) : 0, 6592
Remote Config [baseline] (704.521 µs) : 0, 705
Remote Config [candidate] (704.199 µs) : 0, 704
Telemetry [baseline] (9.296 ms) : 0, 9296
Telemetry [candidate] (9.426 ms) : 0, 9426
Flare Poller [baseline] (8.99 ms) : 0, 8990
Flare Poller [candidate] (10.217 ms) : 0, 10217
section iast
crashtracking [baseline] (1.488 ms) : 0, 1488
crashtracking [candidate] (1.481 ms) : 0, 1481
BytebuddyAgent [baseline] (813.52 ms) : 0, 813520
BytebuddyAgent [candidate] (816.241 ms) : 0, 816241
GlobalTracer [baseline] (230.318 ms) : 0, 230318
GlobalTracer [candidate] (231.107 ms) : 0, 231107
IAST [baseline] (26.331 ms) : 0, 26331
IAST [candidate] (27.362 ms) : 0, 27362
AppSec [baseline] (35.366 ms) : 0, 35366
AppSec [candidate] (34.017 ms) : 0, 34017
Debugger [baseline] (6.149 ms) : 0, 6149
Debugger [candidate] (6.168 ms) : 0, 6168
Remote Config [baseline] (601.847 µs) : 0, 602
Remote Config [candidate] (615.614 µs) : 0, 616
Telemetry [baseline] (8.644 ms) : 0, 8644
Telemetry [candidate] (8.684 ms) : 0, 8684
Flare Poller [baseline] (4.251 ms) : 0, 4251
Flare Poller [candidate] (4.163 ms) : 0, 4163
Loading

Load

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master mhlidd/config_inversion_base
git_commit_date 1760118158 1760120286
git_commit_sha ef27983 7a2f0c5
release_version 1.55.0-SNAPSHOT~ef27983a1d 1.55.0-SNAPSHOT~7a2f0c58e0
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1760121709 1760121709
ci_job_id 1174648636 1174648636
ci_pipeline_id 79005413 79005413
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-zfyrx7zua-project-304-concurrent-0-8ziz1hvi 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-zfyrx7zua-project-304-concurrent-0-8ziz1hvi 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

Summary

Found 1 performance improvements and 2 performance regressions! Performance is the same for 9 metrics, 12 unstable metrics.

scenario Δ mean http_req_duration Δ mean throughput candidate mean http_req_duration candidate mean throughput baseline mean http_req_duration baseline mean throughput
scenario:load:insecure-bank:no_agent:high_load worse
[+94.886µs; +209.737µs] or [+2.179%; +4.816%]
unstable
[-145.755op/s; +76.380op/s] or [-13.832%; +7.248%]
4.507ms 1019.062op/s 4.355ms 1053.750op/s
scenario:load:insecure-bank:iast_GLOBAL:high_load worse
[+567.718µs; +970.636µs] or [+5.552%; +9.492%]
unstable
[-80.456op/s; +17.643op/s] or [-17.709%; +3.883%]
10.995ms 422.906op/s 10.226ms 454.312op/s
scenario:load:petclinic:profiling:high_load better
[-2.306ms; -1.285ms] or [-4.668%; -2.602%]
unstable
[-3.893op/s; +11.068op/s] or [-4.108%; +11.680%]
47.601ms 98.350op/s 49.396ms 94.763op/s
Request duration reports for insecure-bank
gantt
    title insecure-bank - request duration [CI 0.99] : candidate=1.55.0-SNAPSHOT~7a2f0c58e0, baseline=1.55.0-SNAPSHOT~ef27983a1d
    dateFormat X
    axisFormat %s
section baseline
no_agent (4.355 ms) : 4306, 4403
.   : milestone, 4355,
iast (9.488 ms) : 9330, 9646
.   : milestone, 9488,
iast_FULL (14.323 ms) : 14037, 14608
.   : milestone, 14323,
iast_GLOBAL (10.226 ms) : 10048, 10404
.   : milestone, 10226,
profiling (8.846 ms) : 8700, 8992
.   : milestone, 8846,
tracing (7.912 ms) : 7789, 8035
.   : milestone, 7912,
section candidate
no_agent (4.507 ms) : 4449, 4565
.   : milestone, 4507,
iast (9.604 ms) : 9436, 9771
.   : milestone, 9604,
iast_FULL (14.064 ms) : 13783, 14346
.   : milestone, 14064,
iast_GLOBAL (10.995 ms) : 10799, 11191
.   : milestone, 10995,
profiling (9.092 ms) : 8950, 9234
.   : milestone, 9092,
tracing (7.884 ms) : 7770, 7997
.   : milestone, 7884,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 4.355 ms [4.306 ms, 4.403 ms] -
iast 9.488 ms [9.33 ms, 9.646 ms] 5.133 ms (117.9%)
iast_FULL 14.323 ms [14.037 ms, 14.608 ms] 9.968 ms (228.9%)
iast_GLOBAL 10.226 ms [10.048 ms, 10.404 ms] 5.871 ms (134.8%)
profiling 8.846 ms [8.7 ms, 8.992 ms] 4.492 ms (103.1%)
tracing 7.912 ms [7.789 ms, 8.035 ms] 3.557 ms (81.7%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 4.507 ms [4.449 ms, 4.565 ms] -
iast 9.604 ms [9.436 ms, 9.771 ms] 5.097 ms (113.1%)
iast_FULL 14.064 ms [13.783 ms, 14.346 ms] 9.557 ms (212.1%)
iast_GLOBAL 10.995 ms [10.799 ms, 11.191 ms] 6.488 ms (144.0%)
profiling 9.092 ms [8.95 ms, 9.234 ms] 4.585 ms (101.7%)
tracing 7.884 ms [7.77 ms, 7.997 ms] 3.377 ms (74.9%)
Request duration reports for petclinic
gantt
    title petclinic - request duration [CI 0.99] : candidate=1.55.0-SNAPSHOT~7a2f0c58e0, baseline=1.55.0-SNAPSHOT~ef27983a1d
    dateFormat X
    axisFormat %s
section baseline
no_agent (37.236 ms) : 36935, 37537
.   : milestone, 37236,
appsec (46.619 ms) : 46203, 47034
.   : milestone, 46619,
code_origins (43.749 ms) : 43378, 44119
.   : milestone, 43749,
iast (44.936 ms) : 44541, 45331
.   : milestone, 44936,
profiling (49.396 ms) : 48930, 49863
.   : milestone, 49396,
tracing (43.251 ms) : 42878, 43623
.   : milestone, 43251,
section candidate
no_agent (36.417 ms) : 36127, 36707
.   : milestone, 36417,
appsec (47.444 ms) : 47022, 47865
.   : milestone, 47444,
code_origins (44.719 ms) : 44323, 45116
.   : milestone, 44719,
iast (45.064 ms) : 44671, 45458
.   : milestone, 45064,
profiling (47.601 ms) : 47119, 48083
.   : milestone, 47601,
tracing (44.133 ms) : 43759, 44508
.   : milestone, 44133,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 37.236 ms [36.935 ms, 37.537 ms] -
appsec 46.619 ms [46.203 ms, 47.034 ms] 9.383 ms (25.2%)
code_origins 43.749 ms [43.378 ms, 44.119 ms] 6.513 ms (17.5%)
iast 44.936 ms [44.541 ms, 45.331 ms] 7.7 ms (20.7%)
profiling 49.396 ms [48.93 ms, 49.863 ms] 12.16 ms (32.7%)
tracing 43.251 ms [42.878 ms, 43.623 ms] 6.015 ms (16.2%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 36.417 ms [36.127 ms, 36.707 ms] -
appsec 47.444 ms [47.022 ms, 47.865 ms] 11.026 ms (30.3%)
code_origins 44.719 ms [44.323 ms, 45.116 ms] 8.302 ms (22.8%)
iast 45.064 ms [44.671 ms, 45.458 ms] 8.647 ms (23.7%)
profiling 47.601 ms [47.119 ms, 48.083 ms] 11.183 ms (30.7%)
tracing 44.133 ms [43.759 ms, 44.508 ms] 7.716 ms (21.2%)

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master mhlidd/config_inversion_base
git_commit_date 1760118158 1760120286
git_commit_sha ef27983 7a2f0c5
release_version 1.55.0-SNAPSHOT~ef27983a1d 1.55.0-SNAPSHOT~7a2f0c58e0
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1760122322 1760122322
ci_job_id 1174648638 1174648638
ci_pipeline_id 79005413 79005413
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-zfyrx7zua-project-304-concurrent-1-y6o1vugb 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-zfyrx7zua-project-304-concurrent-1-y6o1vugb 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

Summary

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

scenario Δ mean execution_time candidate mean execution_time baseline mean execution_time
scenario:dacapo:tomcat:appsec better
[-1.323ms; -0.990ms] or [-36.015%; -26.937%]
2.518ms 3.674ms
Execution time for biojava
gantt
    title biojava - execution time [CI 0.99] : candidate=1.55.0-SNAPSHOT~7a2f0c58e0, baseline=1.55.0-SNAPSHOT~ef27983a1d
    dateFormat X
    axisFormat %s
section baseline
no_agent (15.657 s) : 15657000, 15657000
.   : milestone, 15657000,
appsec (14.998 s) : 14998000, 14998000
.   : milestone, 14998000,
iast (18.704 s) : 18704000, 18704000
.   : milestone, 18704000,
iast_GLOBAL (17.818 s) : 17818000, 17818000
.   : milestone, 17818000,
profiling (15.595 s) : 15595000, 15595000
.   : milestone, 15595000,
tracing (14.854 s) : 14854000, 14854000
.   : milestone, 14854000,
section candidate
no_agent (14.774 s) : 14774000, 14774000
.   : milestone, 14774000,
appsec (14.803 s) : 14803000, 14803000
.   : milestone, 14803000,
iast (18.58 s) : 18580000, 18580000
.   : milestone, 18580000,
iast_GLOBAL (17.909 s) : 17909000, 17909000
.   : milestone, 17909000,
profiling (15.272 s) : 15272000, 15272000
.   : milestone, 15272000,
tracing (15.279 s) : 15279000, 15279000
.   : milestone, 15279000,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.657 s [15.657 s, 15.657 s] -
appsec 14.998 s [14.998 s, 14.998 s] -659.0 ms (-4.2%)
iast 18.704 s [18.704 s, 18.704 s] 3.047 s (19.5%)
iast_GLOBAL 17.818 s [17.818 s, 17.818 s] 2.161 s (13.8%)
profiling 15.595 s [15.595 s, 15.595 s] -62.0 ms (-0.4%)
tracing 14.854 s [14.854 s, 14.854 s] -803.0 ms (-5.1%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 14.774 s [14.774 s, 14.774 s] -
appsec 14.803 s [14.803 s, 14.803 s] 29.0 ms (0.2%)
iast 18.58 s [18.58 s, 18.58 s] 3.806 s (25.8%)
iast_GLOBAL 17.909 s [17.909 s, 17.909 s] 3.135 s (21.2%)
profiling 15.272 s [15.272 s, 15.272 s] 498.0 ms (3.4%)
tracing 15.279 s [15.279 s, 15.279 s] 505.0 ms (3.4%)
Execution time for tomcat
gantt
    title tomcat - execution time [CI 0.99] : candidate=1.55.0-SNAPSHOT~7a2f0c58e0, baseline=1.55.0-SNAPSHOT~ef27983a1d
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.48 ms) : 1469, 1492
.   : milestone, 1480,
appsec (3.674 ms) : 3462, 3887
.   : milestone, 3674,
iast (2.221 ms) : 2157, 2284
.   : milestone, 2221,
iast_GLOBAL (2.277 ms) : 2212, 2341
.   : milestone, 2277,
profiling (2.09 ms) : 2037, 2144
.   : milestone, 2090,
tracing (2.045 ms) : 1995, 2096
.   : milestone, 2045,
section candidate
no_agent (1.48 ms) : 1469, 1492
.   : milestone, 1480,
appsec (2.518 ms) : 2464, 2572
.   : milestone, 2518,
iast (2.222 ms) : 2159, 2286
.   : milestone, 2222,
iast_GLOBAL (2.257 ms) : 2193, 2321
.   : milestone, 2257,
profiling (2.521 ms) : 2352, 2689
.   : milestone, 2521,
tracing (2.037 ms) : 1987, 2087
.   : milestone, 2037,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.48 ms [1.469 ms, 1.492 ms] -
appsec 3.674 ms [3.462 ms, 3.887 ms] 2.194 ms (148.2%)
iast 2.221 ms [2.157 ms, 2.284 ms] 740.322 µs (50.0%)
iast_GLOBAL 2.277 ms [2.212 ms, 2.341 ms] 796.456 µs (53.8%)
profiling 2.09 ms [2.037 ms, 2.144 ms] 610.01 µs (41.2%)
tracing 2.045 ms [1.995 ms, 2.096 ms] 565.099 µs (38.2%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.48 ms [1.469 ms, 1.492 ms] -
appsec 2.518 ms [2.464 ms, 2.572 ms] 1.037 ms (70.1%)
iast 2.222 ms [2.159 ms, 2.286 ms] 742.116 µs (50.1%)
iast_GLOBAL 2.257 ms [2.193 ms, 2.321 ms] 776.41 µs (52.4%)
profiling 2.521 ms [2.352 ms, 2.689 ms] 1.04 ms (70.3%)
tracing 2.037 ms [1.987 ms, 2.087 ms] 556.782 µs (37.6%)

@datadog-official
Copy link

datadog-official bot commented Sep 16, 2025

🎯 Code Coverage
Patch Coverage: 84.21%
Total Coverage: 59.87% (+0.01%)

View detailed report

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 7a2f0c5 | Docs | Was this helpful? Give us feedback!

@mhlidd mhlidd changed the title Mhlidd/config inversion base Implement Config Inversion with Default Strictness of Warning Sep 17, 2025
@mhlidd mhlidd marked this pull request as ready for review September 18, 2025 15:13
@mhlidd mhlidd requested review from a team as code owners September 18, 2025 15:13
@mhlidd mhlidd requested review from AlexeyKuznetsov-DD and mcculls and removed request for a team September 18, 2025 15:13
@github-actions
Copy link
Contributor

Hi! 👋 Thanks for your pull request! 🎉

To help us review it, please make sure to:

  • Add at least one type, and one component or instrumentation label to the pull request

If you need help, please check our contributing guidelines.

@mhlidd mhlidd added type: enhancement Enhancements and improvements type: documentation comp: api Tracer public API labels Sep 18, 2025
@mhlidd mhlidd changed the base branch from master to mhlidd/config_inversion_plugins September 18, 2025 21:25
@mhlidd mhlidd force-pushed the mhlidd/config_inversion_base branch from aa18112 to 606dfd0 Compare September 18, 2025 21:32
@mhlidd mhlidd changed the base branch from mhlidd/config_inversion_plugins to mhlidd/migrate_config-utils_tests September 18, 2025 22:06
@mhlidd mhlidd force-pushed the mhlidd/config_inversion_base branch from 606dfd0 to 7cea99b Compare September 18, 2025 22:09
Copy link
Contributor

@PerfectSlayer PerfectSlayer left a comment

Choose a reason for hiding this comment

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

👏 praise: ‏Thanks for splitting the PR related to your config changes, that really helps to review 👍

🎯 suggestion: ‏I would recommend trying to decrease the overall (cognitive) complexity by refactoring using new few methods to de-duplicate code and give more meaning.

For example this should have its own function with a meaningful name:

if (key.startsWith("DD_")
          || key.startsWith("OTEL_")
          || configSource.getAliasMapping().containsKey(key))

@mhlidd mhlidd force-pushed the mhlidd/migrate_config-utils_tests branch from 57483a2 to 1574d9b Compare September 23, 2025 21:02
@mhlidd mhlidd force-pushed the mhlidd/config_inversion_base branch from a20edf0 to bb4f47c Compare September 23, 2025 21:09
Copy link
Contributor

@AlexeyKuznetsov-DD AlexeyKuznetsov-DD left a comment

Choose a reason for hiding this comment

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

Left some notes and questions.

configs.put(key, value);
// If this environment variable is the alias of another, and we haven't processed the
// original environment variable yet, handle it here.
} else if (null != primaryEnv && !configs.containsKey(primaryEnv)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we OK with Yoda style? Here and other similar places.
Maybe natural way is better or more human: primaryEnv != null, WDYT?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I remember in a previous PR, I was told that there was some benefit to doing Yoda style, but that may be for a different context. I can't find the old comment but I can reverse the ordering here for readability.

Copy link
Contributor

Choose a reason for hiding this comment

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

it is not strict request, can you search code base to get some stats?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I did a quick search on GitHub, instances of != null and == null vs null != and null == seem to be very comparable 🤷‍♂️

Copy link
Member

@jpbempel jpbempel Oct 7, 2025

Choose a reason for hiding this comment

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

I was told that there was some benefit to doing Yoda style

in C++, not in Java
see https://jpbempel.github.io/2015/09/21/yoda-conditions.html for more rationale

Comment on lines 41 to 42
// Cache for configs, init value is null
private Map<String, String> configs;
Copy link
Contributor

Choose a reason for hiding this comment

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

Just thinking out loud: do we need null state? Maybe empty map will be better? No null checks in usages? WDYT?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think we can use empty map instead. Here is my thought process:

The only situation where initializing configs as null would be better is when no env vars are set at all, since our cache would have the same effect as if we had not yet processed env vars. This is a very improbable situation since we expect customers to set env vars, so I'm happy to change to initializing to an empty map.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually, I learned that Collections.emptyMap() is a EmptyMap type, which is different than an empty HashMap. There is no reason to not use it here :)

@mhlidd mhlidd deleted the branch master October 9, 2025 17:26
@mhlidd mhlidd closed this Oct 9, 2025
@mhlidd mhlidd reopened this Oct 9, 2025
@mhlidd mhlidd changed the base branch from mhlidd/test to master October 10, 2025 17:44
@mhlidd mhlidd force-pushed the mhlidd/config_inversion_base branch from 63e5d5a to a257e6c Compare October 10, 2025 18:09
@mhlidd mhlidd merged commit d19bf60 into master Oct 10, 2025
530 checks passed
@mhlidd mhlidd deleted the mhlidd/config_inversion_base branch October 10, 2025 19:29
@github-actions github-actions bot added this to the 1.55.0 milestone Oct 10, 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 type: documentation type: enhancement Enhancements and improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants