Skip to content

Migrate internal apis to environment component #9291

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

PerfectSlayer
Copy link
Contributor

@PerfectSlayer PerfectSlayer commented Aug 1, 2025

What Does This Do

This PR migrate internal-api module to the new environment component

Motivation

Additional Notes

Environment component related stacked PRs:

Contributor Checklist

Jira ticket: LANGPLAT-458

@PerfectSlayer PerfectSlayer requested review from a team as code owners August 1, 2025 10:17
@PerfectSlayer PerfectSlayer requested review from sarahchen6 and removed request for a team August 1, 2025 10:17
@PerfectSlayer PerfectSlayer added comp: core Tracer core tag: no release notes Changes to exclude from release notes labels Aug 1, 2025
@PerfectSlayer PerfectSlayer requested a review from smola August 1, 2025 10:17
return Stream.of("TMP", "TEMP", "USERPROFILE")
.map(EnvironmentVariables::get)
.filter(Objects::nonNull)
.filter(((Predicate<String>) String::isEmpty).negate())
Copy link
Contributor Author

@PerfectSlayer PerfectSlayer Aug 1, 2025

Choose a reason for hiding this comment

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

📝 notes: This behavior change (empty --> !empty) is expected. It’s a fix to the PidHelper on Windows platform and was confirmed with the author first.

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe add some comment about that?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For clarification, what kind of comment do you expect here?

One of the next step for the environment component will be to handle the "temp dir" computation.
So feedback about it would be useful for this part too 👍

Copy link
Contributor

Choose a reason for hiding this comment

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

Comment that will explain this non obvious empty --> !empty on Windows.

@datadog-datadog-prod-us1
Copy link
Contributor

datadog-datadog-prod-us1 bot commented Aug 1, 2025

Code coverage: total 57.22%, base diff 0.09%, patch 36.00% (view details)

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

@pr-commenter
Copy link

pr-commenter bot commented Aug 1, 2025

Debugger benchmarks

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
ci_job_date 1754063597 1754063943
end_time 2025-08-01T15:54:38 2025-08-01T16:00:24
git_branch master bbujon/environment-step2
git_commit_sha 023e525 2f67106
start_time 2025-08-01T15:53:18 2025-08-01T15:59:04
See matching parameters
Baseline Candidate
ci_job_id 1060448361 1060448361
ci_pipeline_id 72450153 72450153
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
git_commit_date 1754062935 1754062935

Summary

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

See unchanged results
scenario Δ mean agg_http_req_duration_min Δ mean agg_http_req_duration_p50 Δ mean agg_http_req_duration_p75 Δ mean agg_http_req_duration_p99 Δ mean throughput
scenario:noprobe unstable
[-49.470µs; +20.719µs] or [-17.071%; +7.150%]
unstable
[-66.102µs; +27.727µs] or [-19.831%; +8.318%]
unstable
[-76.633µs; +36.018µs] or [-21.992%; +10.336%]
unstable
[-423.330µs; +199.201µs] or [-39.480%; +18.578%]
same
scenario:basic same same same unstable
[-48.737µs; +154.359µs] or [-6.562%; +20.783%]
unstable
[-77.764op/s; +220.011op/s] or [-2.955%; +8.360%]
scenario:loop same unsure
[+0.717µs; +12.412µs] or [+0.008%; +0.138%]
same same same
Request duration reports for reports
gantt
    title reports - request duration [CI 0.99] : candidate=None, baseline=None
    dateFormat X
    axisFormat %s
section baseline
noprobe (333.331 µs) : 276, 391
.   : milestone, 333,
basic (279.563 µs) : 273, 286
.   : milestone, 280,
loop (8.969 ms) : 8964, 8975
.   : milestone, 8969,
section candidate
noprobe (314.144 µs) : 288, 340
.   : milestone, 314,
basic (277.345 µs) : 271, 284
.   : milestone, 277,
loop (8.976 ms) : 8971, 8982
.   : milestone, 8976,
Loading
  • baseline results
Scenario Request median duration [CI 0.99]
noprobe 333.331 µs [275.929 µs, 390.733 µs]
basic 279.563 µs [273.258 µs, 285.869 µs]
loop 8.969 ms [8.964 ms, 8.975 ms]
  • candidate results
Scenario Request median duration [CI 0.99]
noprobe 314.144 µs [287.796 µs, 340.492 µs]
basic 277.345 µs [270.56 µs, 284.129 µs]
loop 8.976 ms [8.971 ms, 8.982 ms]

@pr-commenter
Copy link

pr-commenter bot commented Aug 1, 2025

Benchmarks

Startup

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master bbujon/environment-step2
git_commit_date 1754058594 1754062935
git_commit_sha 023e525 2f67106
release_version 1.51.1-SNAPSHOT~023e5251a6 1.51.1-SNAPSHOT~2f67106fb9
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1754064833 1754064833
ci_job_id 1060448354 1060448354
ci_pipeline_id 72450153 72450153
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-l1jz7ocm 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-l1jz7ocm 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 48 metrics, 11 unstable metrics.

Startup time reports for petclinic
gantt
    title petclinic - global startup overhead: candidate=1.51.1-SNAPSHOT~2f67106fb9, baseline=1.51.1-SNAPSHOT~023e5251a6

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.051 s) : 0, 1050842
Total [baseline] (10.741 s) : 0, 10740941
Agent [candidate] (1.05 s) : 0, 1049681
Total [candidate] (10.777 s) : 0, 10777472
section appsec
Agent [baseline] (1.23 s) : 0, 1229542
Total [baseline] (10.788 s) : 0, 10787583
Agent [candidate] (1.219 s) : 0, 1219245
Total [candidate] (10.802 s) : 0, 10802252
section iast
Agent [baseline] (1.171 s) : 0, 1170536
Total [baseline] (10.873 s) : 0, 10873419
Agent [candidate] (1.173 s) : 0, 1173117
Total [candidate] (10.861 s) : 0, 10861292
section profiling
Agent [baseline] (1.198 s) : 0, 1197770
Total [baseline] (10.963 s) : 0, 10962949
Agent [candidate] (1.21 s) : 0, 1210381
Total [candidate] (10.876 s) : 0, 10875553
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.051 s -
Agent appsec 1.23 s 178.699 ms (17.0%)
Agent iast 1.171 s 119.694 ms (11.4%)
Agent profiling 1.198 s 146.927 ms (14.0%)
Total tracing 10.741 s -
Total appsec 10.788 s 46.642 ms (0.4%)
Total iast 10.873 s 132.478 ms (1.2%)
Total profiling 10.963 s 222.008 ms (2.1%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.05 s -
Agent appsec 1.219 s 169.564 ms (16.2%)
Agent iast 1.173 s 123.436 ms (11.8%)
Agent profiling 1.21 s 160.7 ms (15.3%)
Total tracing 10.777 s -
Total appsec 10.802 s 24.78 ms (0.2%)
Total iast 10.861 s 83.82 ms (0.8%)
Total profiling 10.876 s 98.081 ms (0.9%)
gantt
    title petclinic - break down per module: candidate=1.51.1-SNAPSHOT~2f67106fb9, baseline=1.51.1-SNAPSHOT~023e5251a6

    dateFormat X
    axisFormat %s
section tracing
crashtracking [baseline] (1.45 ms) : 0, 1450
crashtracking [candidate] (1.442 ms) : 0, 1442
BytebuddyAgent [baseline] (736.456 ms) : 0, 736456
BytebuddyAgent [candidate] (736.469 ms) : 0, 736469
GlobalTracer [baseline] (243.517 ms) : 0, 243517
GlobalTracer [candidate] (242.917 ms) : 0, 242917
AppSec [baseline] (30.32 ms) : 0, 30320
AppSec [candidate] (30.285 ms) : 0, 30285
Debugger [baseline] (6.088 ms) : 0, 6088
Debugger [candidate] (6.106 ms) : 0, 6106
Remote Config [baseline] (643.123 µs) : 0, 643
Remote Config [candidate] (653.781 µs) : 0, 654
Telemetry [baseline] (10.581 ms) : 0, 10581
Telemetry [candidate] (9.92 ms) : 0, 9920
section appsec
crashtracking [baseline] (1.441 ms) : 0, 1441
crashtracking [candidate] (1.434 ms) : 0, 1434
BytebuddyAgent [baseline] (759.744 ms) : 0, 759744
BytebuddyAgent [candidate] (753.087 ms) : 0, 753087
GlobalTracer [baseline] (236.849 ms) : 0, 236849
GlobalTracer [candidate] (234.715 ms) : 0, 234715
IAST [baseline] (23.872 ms) : 0, 23872
IAST [candidate] (23.531 ms) : 0, 23531
AppSec [baseline] (169.627 ms) : 0, 169627
AppSec [candidate] (168.661 ms) : 0, 168661
Debugger [baseline] (7.906 ms) : 0, 7906
Debugger [candidate] (7.888 ms) : 0, 7888
Remote Config [baseline] (619.119 µs) : 0, 619
Remote Config [candidate] (615.742 µs) : 0, 616
Telemetry [baseline] (8.275 ms) : 0, 8275
Telemetry [candidate] (8.279 ms) : 0, 8279
section iast
crashtracking [baseline] (1.42 ms) : 0, 1420
crashtracking [candidate] (1.429 ms) : 0, 1429
BytebuddyAgent [baseline] (845.144 ms) : 0, 845144
BytebuddyAgent [candidate] (846.797 ms) : 0, 846797
GlobalTracer [baseline] (231.16 ms) : 0, 231160
GlobalTracer [candidate] (232.508 ms) : 0, 232508
IAST [baseline] (29.518 ms) : 0, 29518
IAST [candidate] (28.107 ms) : 0, 28107
AppSec [baseline] (27.889 ms) : 0, 27889
AppSec [candidate] (28.624 ms) : 0, 28624
Debugger [baseline] (5.751 ms) : 0, 5751
Debugger [candidate] (5.82 ms) : 0, 5820
Remote Config [baseline] (579.556 µs) : 0, 580
Remote Config [candidate] (604.096 µs) : 0, 604
Telemetry [baseline] (8.082 ms) : 0, 8082
Telemetry [candidate] (8.189 ms) : 0, 8189
section profiling
crashtracking [baseline] (1.406 ms) : 0, 1406
crashtracking [candidate] (1.422 ms) : 0, 1422
BytebuddyAgent [baseline] (762.948 ms) : 0, 762948
BytebuddyAgent [candidate] (770.978 ms) : 0, 770978
GlobalTracer [baseline] (222.546 ms) : 0, 222546
GlobalTracer [candidate] (224.264 ms) : 0, 224264
AppSec [baseline] (30.154 ms) : 0, 30154
AppSec [candidate] (30.669 ms) : 0, 30669
Debugger [baseline] (6.326 ms) : 0, 6326
Debugger [candidate] (6.415 ms) : 0, 6415
Remote Config [baseline] (727.194 µs) : 0, 727
Remote Config [candidate] (712.013 µs) : 0, 712
Telemetry [baseline] (15.776 ms) : 0, 15776
Telemetry [candidate] (15.414 ms) : 0, 15414
ProfilingAgent [baseline] (108.238 ms) : 0, 108238
ProfilingAgent [candidate] (110.386 ms) : 0, 110386
Profiling [baseline] (108.895 ms) : 0, 108895
Profiling [candidate] (111.033 ms) : 0, 111033
Loading
Startup time reports for insecure-bank
gantt
    title insecure-bank - global startup overhead: candidate=1.51.1-SNAPSHOT~2f67106fb9, baseline=1.51.1-SNAPSHOT~023e5251a6

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.05 s) : 0, 1050475
Total [baseline] (8.633 s) : 0, 8633355
Agent [candidate] (1.053 s) : 0, 1053084
Total [candidate] (8.626 s) : 0, 8625618
section iast
Agent [baseline] (1.17 s) : 0, 1169802
Total [baseline] (9.343 s) : 0, 9343127
Agent [candidate] (1.172 s) : 0, 1171921
Total [candidate] (9.333 s) : 0, 9332578
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.05 s -
Agent iast 1.17 s 119.328 ms (11.4%)
Total tracing 8.633 s -
Total iast 9.343 s 709.772 ms (8.2%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.053 s -
Agent iast 1.172 s 118.837 ms (11.3%)
Total tracing 8.626 s -
Total iast 9.333 s 706.96 ms (8.2%)
gantt
    title insecure-bank - break down per module: candidate=1.51.1-SNAPSHOT~2f67106fb9, baseline=1.51.1-SNAPSHOT~023e5251a6

    dateFormat X
    axisFormat %s
section tracing
crashtracking [baseline] (1.442 ms) : 0, 1442
crashtracking [candidate] (1.459 ms) : 0, 1459
BytebuddyAgent [baseline] (735.654 ms) : 0, 735654
BytebuddyAgent [candidate] (736.157 ms) : 0, 736157
GlobalTracer [baseline] (241.605 ms) : 0, 241605
GlobalTracer [candidate] (243.411 ms) : 0, 243411
AppSec [baseline] (30.075 ms) : 0, 30075
AppSec [candidate] (30.254 ms) : 0, 30254
Debugger [baseline] (6.067 ms) : 0, 6067
Debugger [candidate] (6.043 ms) : 0, 6043
Remote Config [baseline] (650.448 µs) : 0, 650
Remote Config [candidate] (657.043 µs) : 0, 657
Telemetry [baseline] (13.938 ms) : 0, 13938
Telemetry [candidate] (14.036 ms) : 0, 14036
section iast
crashtracking [baseline] (1.424 ms) : 0, 1424
crashtracking [candidate] (1.429 ms) : 0, 1429
BytebuddyAgent [baseline] (844.889 ms) : 0, 844889
BytebuddyAgent [candidate] (846.222 ms) : 0, 846222
GlobalTracer [baseline] (231.324 ms) : 0, 231324
GlobalTracer [candidate] (231.093 ms) : 0, 231093
AppSec [baseline] (26.885 ms) : 0, 26885
AppSec [candidate] (25.247 ms) : 0, 25247
Debugger [baseline] (6.715 ms) : 0, 6715
Debugger [candidate] (6.631 ms) : 0, 6631
Remote Config [baseline] (588.776 µs) : 0, 589
Remote Config [candidate] (602.735 µs) : 0, 603
Telemetry [baseline] (8.033 ms) : 0, 8033
Telemetry [candidate] (8.09 ms) : 0, 8090
IAST [baseline] (28.973 ms) : 0, 28973
IAST [candidate] (31.756 ms) : 0, 31756
Loading

Load

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master bbujon/environment-step2
git_commit_date 1754058594 1754062935
git_commit_sha 023e525 2f67106
release_version 1.51.1-SNAPSHOT~023e5251a6 1.51.1-SNAPSHOT~2f67106fb9
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1754064510 1754064510
ci_job_id 1060448355 1060448355
ci_pipeline_id 72450153 72450153
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-4l9puvgy 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-4l9puvgy 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 2 performance improvements and 1 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:tracing:high_load better
[-463.722µs; -216.672µs] or [-5.957%; -2.783%]
unstable
[-51.734op/s; +105.546op/s] or [-8.697%; +17.744%]
7.444ms 621.750op/s 7.785ms 594.844op/s
scenario:load:petclinic:code_origins:high_load worse
[+1.439ms; +2.319ms] or [+3.195%; +5.150%]
unstable
[-12.378op/s; +1.500op/s] or [-11.772%; +1.426%]
46.915ms 99.713op/s 45.036ms 105.152op/s
scenario:load:petclinic:appsec:high_load better
[-2.814ms; -1.912ms] or [-5.805%; -3.945%]
unstable
[-2.323op/s; +12.148op/s] or [-2.407%; +12.585%]
46.115ms 101.438op/s 48.478ms 96.525op/s
Request duration reports for petclinic
gantt
    title petclinic - request duration [CI 0.99] : candidate=1.51.1-SNAPSHOT~2f67106fb9, baseline=1.51.1-SNAPSHOT~023e5251a6
    dateFormat X
    axisFormat %s
section baseline
no_agent (37.047 ms) : 36752, 37341
.   : milestone, 37047,
appsec (48.478 ms) : 48043, 48914
.   : milestone, 48478,
code_origins (45.036 ms) : 44647, 45426
.   : milestone, 45036,
iast (44.933 ms) : 44548, 45317
.   : milestone, 44933,
profiling (46.934 ms) : 46500, 47368
.   : milestone, 46934,
tracing (43.661 ms) : 43294, 44028
.   : milestone, 43661,
section candidate
no_agent (36.9 ms) : 36601, 37199
.   : milestone, 36900,
appsec (46.115 ms) : 45713, 46517
.   : milestone, 46115,
code_origins (46.915 ms) : 46487, 47343
.   : milestone, 46915,
iast (44.816 ms) : 44426, 45206
.   : milestone, 44816,
profiling (48.137 ms) : 47658, 48615
.   : milestone, 48137,
tracing (44.502 ms) : 44137, 44867
.   : milestone, 44502,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 37.047 ms [36.752 ms, 37.341 ms] -
appsec 48.478 ms [48.043 ms, 48.914 ms] 11.432 ms (30.9%)
code_origins 45.036 ms [44.647 ms, 45.426 ms] 7.99 ms (21.6%)
iast 44.933 ms [44.548 ms, 45.317 ms] 7.886 ms (21.3%)
profiling 46.934 ms [46.5 ms, 47.368 ms] 9.888 ms (26.7%)
tracing 43.661 ms [43.294 ms, 44.028 ms] 6.615 ms (17.9%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 36.9 ms [36.601 ms, 37.199 ms] -
appsec 46.115 ms [45.713 ms, 46.517 ms] 9.215 ms (25.0%)
code_origins 46.915 ms [46.487 ms, 47.343 ms] 10.015 ms (27.1%)
iast 44.816 ms [44.426 ms, 45.206 ms] 7.915 ms (21.5%)
profiling 48.137 ms [47.658 ms, 48.615 ms] 11.236 ms (30.5%)
tracing 44.502 ms [44.137 ms, 44.867 ms] 7.602 ms (20.6%)
Request duration reports for insecure-bank
gantt
    title insecure-bank - request duration [CI 0.99] : candidate=1.51.1-SNAPSHOT~2f67106fb9, baseline=1.51.1-SNAPSHOT~023e5251a6
    dateFormat X
    axisFormat %s
section baseline
no_agent (4.328 ms) : 4280, 4376
.   : milestone, 4328,
iast (9.31 ms) : 9156, 9465
.   : milestone, 9310,
iast_FULL (14.207 ms) : 13925, 14490
.   : milestone, 14207,
iast_GLOBAL (10.339 ms) : 10157, 10520
.   : milestone, 10339,
profiling (9.016 ms) : 8880, 9152
.   : milestone, 9016,
tracing (7.785 ms) : 7666, 7903
.   : milestone, 7785,
section candidate
no_agent (4.37 ms) : 4322, 4419
.   : milestone, 4370,
iast (9.454 ms) : 9297, 9612
.   : milestone, 9454,
iast_FULL (14.42 ms) : 14131, 14709
.   : milestone, 14420,
iast_GLOBAL (10.477 ms) : 10294, 10660
.   : milestone, 10477,
profiling (8.737 ms) : 8603, 8872
.   : milestone, 8737,
tracing (7.444 ms) : 7334, 7555
.   : milestone, 7444,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 4.328 ms [4.28 ms, 4.376 ms] -
iast 9.31 ms [9.156 ms, 9.465 ms] 4.983 ms (115.1%)
iast_FULL 14.207 ms [13.925 ms, 14.49 ms] 9.879 ms (228.3%)
iast_GLOBAL 10.339 ms [10.157 ms, 10.52 ms] 6.011 ms (138.9%)
profiling 9.016 ms [8.88 ms, 9.152 ms] 4.688 ms (108.3%)
tracing 7.785 ms [7.666 ms, 7.903 ms] 3.457 ms (79.9%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 4.37 ms [4.322 ms, 4.419 ms] -
iast 9.454 ms [9.297 ms, 9.612 ms] 5.084 ms (116.3%)
iast_FULL 14.42 ms [14.131 ms, 14.709 ms] 10.05 ms (229.9%)
iast_GLOBAL 10.477 ms [10.294 ms, 10.66 ms] 6.107 ms (139.7%)
profiling 8.737 ms [8.603 ms, 8.872 ms] 4.367 ms (99.9%)
tracing 7.444 ms [7.334 ms, 7.555 ms] 3.074 ms (70.3%)

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master bbujon/environment-step2
git_commit_date 1754058594 1754062935
git_commit_sha 023e525 2f67106
release_version 1.51.1-SNAPSHOT~023e5251a6 1.51.1-SNAPSHOT~2f67106fb9
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1754065034 1754065034
ci_job_id 1060448356 1060448356
ci_pipeline_id 72450153 72450153
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-qh91no6k 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-qh91no6k 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 0 performance improvements and 0 performance regressions! Performance is the same for 11 metrics, 1 unstable metrics.

Execution time for biojava
gantt
    title biojava - execution time [CI 0.99] : candidate=1.51.1-SNAPSHOT~2f67106fb9, baseline=1.51.1-SNAPSHOT~023e5251a6
    dateFormat X
    axisFormat %s
section baseline
no_agent (15.373 s) : 15373000, 15373000
.   : milestone, 15373000,
appsec (14.815 s) : 14815000, 14815000
.   : milestone, 14815000,
iast (18.498 s) : 18498000, 18498000
.   : milestone, 18498000,
iast_GLOBAL (17.738 s) : 17738000, 17738000
.   : milestone, 17738000,
profiling (15.464 s) : 15464000, 15464000
.   : milestone, 15464000,
tracing (15.04 s) : 15040000, 15040000
.   : milestone, 15040000,
section candidate
no_agent (14.965 s) : 14965000, 14965000
.   : milestone, 14965000,
appsec (14.748 s) : 14748000, 14748000
.   : milestone, 14748000,
iast (18.301 s) : 18301000, 18301000
.   : milestone, 18301000,
iast_GLOBAL (18.242 s) : 18242000, 18242000
.   : milestone, 18242000,
profiling (15.519 s) : 15519000, 15519000
.   : milestone, 15519000,
tracing (14.915 s) : 14915000, 14915000
.   : milestone, 14915000,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.373 s [15.373 s, 15.373 s] -
appsec 14.815 s [14.815 s, 14.815 s] -558.0 ms (-3.6%)
iast 18.498 s [18.498 s, 18.498 s] 3.125 s (20.3%)
iast_GLOBAL 17.738 s [17.738 s, 17.738 s] 2.365 s (15.4%)
profiling 15.464 s [15.464 s, 15.464 s] 91.0 ms (0.6%)
tracing 15.04 s [15.04 s, 15.04 s] -333.0 ms (-2.2%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 14.965 s [14.965 s, 14.965 s] -
appsec 14.748 s [14.748 s, 14.748 s] -217.0 ms (-1.5%)
iast 18.301 s [18.301 s, 18.301 s] 3.336 s (22.3%)
iast_GLOBAL 18.242 s [18.242 s, 18.242 s] 3.277 s (21.9%)
profiling 15.519 s [15.519 s, 15.519 s] 554.0 ms (3.7%)
tracing 14.915 s [14.915 s, 14.915 s] -50.0 ms (-0.3%)
Execution time for tomcat
gantt
    title tomcat - execution time [CI 0.99] : candidate=1.51.1-SNAPSHOT~2f67106fb9, baseline=1.51.1-SNAPSHOT~023e5251a6
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.475 ms) : 1464, 1487
.   : milestone, 1475,
appsec (3.651 ms) : 3435, 3867
.   : milestone, 3651,
iast (2.203 ms) : 2141, 2265
.   : milestone, 2203,
iast_GLOBAL (2.239 ms) : 2176, 2301
.   : milestone, 2239,
profiling (2.041 ms) : 1991, 2091
.   : milestone, 2041,
tracing (2.018 ms) : 1970, 2066
.   : milestone, 2018,
section candidate
no_agent (1.475 ms) : 1463, 1486
.   : milestone, 1475,
appsec (3.592 ms) : 3379, 3805
.   : milestone, 3592,
iast (2.189 ms) : 2127, 2251
.   : milestone, 2189,
iast_GLOBAL (2.238 ms) : 2175, 2301
.   : milestone, 2238,
profiling (2.04 ms) : 1990, 2090
.   : milestone, 2040,
tracing (2.029 ms) : 1980, 2077
.   : milestone, 2029,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.475 ms [1.464 ms, 1.487 ms] -
appsec 3.651 ms [3.435 ms, 3.867 ms] 2.176 ms (147.5%)
iast 2.203 ms [2.141 ms, 2.265 ms] 727.749 µs (49.3%)
iast_GLOBAL 2.239 ms [2.176 ms, 2.301 ms] 763.194 µs (51.7%)
profiling 2.041 ms [1.991 ms, 2.091 ms] 565.414 µs (38.3%)
tracing 2.018 ms [1.97 ms, 2.066 ms] 542.544 µs (36.8%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.475 ms [1.463 ms, 1.486 ms] -
appsec 3.592 ms [3.379 ms, 3.805 ms] 2.117 ms (143.5%)
iast 2.189 ms [2.127 ms, 2.251 ms] 713.91 µs (48.4%)
iast_GLOBAL 2.238 ms [2.175 ms, 2.301 ms] 763.301 µs (51.8%)
profiling 2.04 ms [1.99 ms, 2.09 ms] 565.176 µs (38.3%)
tracing 2.029 ms [1.98 ms, 2.077 ms] 553.737 µs (37.5%)

@PerfectSlayer PerfectSlayer force-pushed the bbujon/environment-step1 branch from d6e835b to c63c1f8 Compare August 1, 2025 14:49
@PerfectSlayer PerfectSlayer requested review from a team as code owners August 1, 2025 14:49
@PerfectSlayer PerfectSlayer requested review from jpbempel, nikita-tkachenko-datadog and sezen-datadog and removed request for a team August 1, 2025 14:49
@PerfectSlayer PerfectSlayer force-pushed the bbujon/environment-step2 branch from 3d69117 to 2f67106 Compare August 1, 2025 15:43
@PerfectSlayer
Copy link
Contributor Author

Stacked PR broke when rebasing from GH following the Gradle smoke test fix.
It’s only the last commit to review. I will sync the PR once #9290 is merged.

Comment on lines 14 to 23
public static CiEnvironment local() {
Map<String, String> env;
try {
env = System.getenv();
} catch (SecurityException e) {
env = Collections.emptyMap();
}
return new CiEnvironmentImpl(env);
}

Copy link
Contributor

Choose a reason for hiding this comment

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

Not 100% but maybe this class can be refactored to use datadog.environment.EnvironmentVariables instead of caching System.getenv() in private 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.

So far, I did not expose the "get all" API in the environment components.
So I only added safe access from the code that use it.

Do you think it would be better to offer the "get all" API in SystemProperties and EnvironmentVariable?

Copy link
Contributor

Choose a reason for hiding this comment

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

Do you think it would be better to offer the "get all" API in SystemProperties and EnvironmentVariable?

I like this, since the same security exception could occur with get all

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, as we have special dedicated classes to work with env and props, better to have one to rule them all :)

Comment on lines 142 to 149
Properties systemProperties = System.getProperties();
for (Map.Entry<Object, Object> e : systemProperties.entrySet()) {
String propertyName = (String) e.getKey();
Object propertyValue = e.getValue();
if ((propertyName.startsWith(Config.PREFIX)
|| propertyName.startsWith("datadog.slf4j.simpleLogger.defaultLogLevel"))
&& propertyValue != null) {
propagatedSystemProperties.put(propertyName, propertyValue.toString());
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here, can it be refactored to use SystemProperties?

if (systemProperties.containsKey(
propertyNameToSystemPropertyName(
CiVisibilityConfig.CIVISIBILITY_INJECTED_TRACER_VERSION))) {
if (SystemProperties.get(propertyNameToSystemPropertyName(CIVISIBILITY_INJECTED_TRACER_VERSION))
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe this long SystemProperties.get(propertyNameToSystemPropertyName(..) can be part of SystemProperties with some shorter and more convenient method name?
Just thinking out loud, if we can improve readability here and similar places.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That would bring config concern to the environment component.
I would rather avoiding it to keep bot separated.

return Stream.of("TMP", "TEMP", "USERPROFILE")
.map(EnvironmentVariables::get)
.filter(Objects::nonNull)
.filter(((Predicate<String>) String::isEmpty).negate())
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe add some comment about that?

@PerfectSlayer PerfectSlayer force-pushed the bbujon/environment-step1 branch from c63c1f8 to 3925256 Compare August 1, 2025 17:54
Base automatically changed from bbujon/environment-step1 to master August 1, 2025 19:10
@PerfectSlayer PerfectSlayer force-pushed the bbujon/environment-step2 branch from 2f67106 to 29fea0d Compare August 1, 2025 19:53
Copy link
Contributor

@mhlidd mhlidd left a comment

Choose a reason for hiding this comment

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

LGTM. FYI I will also migrate most of the calls to Environment component to call ConfigHelper when the Config Inversion PR is ready.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp: core Tracer core tag: no release notes Changes to exclude from release notes type: refactoring
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants