Skip to content
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

Prevent errors linked to Security Manager when reading config #7846

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

vandonr
Copy link
Contributor

@vandonr vandonr commented Oct 29, 2024

What Does This Do

extends the logic implemented by @dougqh for the bootstrap in https://github.com/DataDog/dd-trace-java/blob/master/dd-java-agent/src/main/java/datadog/trace/bootstrap/SystemUtils.java to the rest of the codebase.

Motivation

The Java Security Manager can prevent us from accessing some env variables or system properties, but we should fallback to default values rather than crash when this happens.

Additional Notes

I added a warning log, because if we completely swallow those errors, it can get very confusing to the customers why their configs are not applied. We can also provide some guidance on how to fix the issue.

Also, I wasn't sure where to put the boundary between where we can fallback to a default value, and where we really expect to get something. For instance, there is still a bunch of unprotected getProperty in https://github.com/DataDog/dd-trace-java/blob/5622bdce6e5405a56e8fa7985d696e15ebb6dafb/internal-api/src/main/java/datadog/trace/api/Platform.java and also here:

System.getProperty("java.runtime.name"),
System.getProperty("java.version"),
System.getProperty("java.vendor"),
System.getProperty("os.arch"),
System.getProperty("os.name"),
System.getProperty("os.version"));

Contributor Checklist

Jira ticket: APMS-13069

@vandonr vandonr requested a review from a team as a code owner October 29, 2024 11:41
@vandonr vandonr requested review from ygree and dougqh October 29, 2024 11:41
@pr-commenter
Copy link

pr-commenter bot commented Oct 29, 2024

Benchmarks

Startup

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master vandonr/fix
git_commit_date 1731489224 1731506873
git_commit_sha 59388f1 316d0e1
release_version 1.43.0-SNAPSHOT~59388f19c2 1.43.0-SNAPSHOT~316d0e13dc
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1731509302 1731509302
ci_job_id 705333410 705333410
ci_pipeline_id 48901503 48901503
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
module Agent Agent
parent None None
variant iast iast

Summary

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

Startup time reports for petclinic
gantt
    title petclinic - global startup overhead: candidate=1.43.0-SNAPSHOT~316d0e13dc, baseline=1.43.0-SNAPSHOT~59388f19c2

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.093 s) : 0, 1093205
Total [baseline] (10.489 s) : 0, 10489234
Agent [candidate] (1.082 s) : 0, 1082070
Total [candidate] (10.52 s) : 0, 10519862
section appsec
Agent [baseline] (1.217 s) : 0, 1216593
Total [baseline] (10.689 s) : 0, 10688713
Agent [candidate] (1.22 s) : 0, 1220348
Total [candidate] (10.736 s) : 0, 10735922
section iast
Agent [baseline] (1.211 s) : 0, 1210924
Total [baseline] (10.943 s) : 0, 10943231
Agent [candidate] (1.212 s) : 0, 1211727
Total [candidate] (10.989 s) : 0, 10988777
section profiling
Agent [baseline] (1.281 s) : 0, 1280800
Total [baseline] (10.726 s) : 0, 10725715
Agent [candidate] (1.298 s) : 0, 1297792
Total [candidate] (10.74 s) : 0, 10739734
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.093 s -
Agent appsec 1.217 s 123.388 ms (11.3%)
Agent iast 1.211 s 117.718 ms (10.8%)
Agent profiling 1.281 s 187.594 ms (17.2%)
Total tracing 10.489 s -
Total appsec 10.689 s 199.479 ms (1.9%)
Total iast 10.943 s 453.997 ms (4.3%)
Total profiling 10.726 s 236.481 ms (2.3%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.082 s -
Agent appsec 1.22 s 138.277 ms (12.8%)
Agent iast 1.212 s 129.657 ms (12.0%)
Agent profiling 1.298 s 215.722 ms (19.9%)
Total tracing 10.52 s -
Total appsec 10.736 s 216.059 ms (2.1%)
Total iast 10.989 s 468.915 ms (4.5%)
Total profiling 10.74 s 219.871 ms (2.1%)
gantt
    title petclinic - break down per module: candidate=1.43.0-SNAPSHOT~316d0e13dc, baseline=1.43.0-SNAPSHOT~59388f19c2

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (693.998 ms) : 0, 693998
BytebuddyAgent [candidate] (687.494 ms) : 0, 687494
GlobalTracer [baseline] (318.354 ms) : 0, 318354
GlobalTracer [candidate] (316.413 ms) : 0, 316413
AppSec [baseline] (54.709 ms) : 0, 54709
AppSec [candidate] (54.332 ms) : 0, 54332
Remote Config [baseline] (691.777 µs) : 0, 692
Remote Config [candidate] (684.664 µs) : 0, 685
Telemetry [baseline] (11.576 ms) : 0, 11576
Telemetry [candidate] (9.39 ms) : 0, 9390
section appsec
BytebuddyAgent [baseline] (703.697 ms) : 0, 703697
BytebuddyAgent [candidate] (706.094 ms) : 0, 706094
GlobalTracer [baseline] (313.46 ms) : 0, 313460
GlobalTracer [candidate] (314.895 ms) : 0, 314895
AppSec [baseline] (167.304 ms) : 0, 167304
AppSec [candidate] (166.913 ms) : 0, 166913
Remote Config [baseline] (644.09 µs) : 0, 644
Remote Config [candidate] (646.617 µs) : 0, 647
Telemetry [baseline] (7.529 ms) : 0, 7529
Telemetry [candidate] (8.576 ms) : 0, 8576
IAST [baseline] (20.447 ms) : 0, 20447
IAST [candidate] (18.892 ms) : 0, 18892
section iast
BytebuddyAgent [baseline] (805.036 ms) : 0, 805036
BytebuddyAgent [candidate] (805.64 ms) : 0, 805640
GlobalTracer [baseline] (305.49 ms) : 0, 305490
GlobalTracer [candidate] (305.762 ms) : 0, 305762
AppSec [baseline] (57.073 ms) : 0, 57073
AppSec [candidate] (57.693 ms) : 0, 57693
Remote Config [baseline] (616.293 µs) : 0, 616
Remote Config [candidate] (630.804 µs) : 0, 631
Telemetry [baseline] (7.459 ms) : 0, 7459
Telemetry [candidate] (7.525 ms) : 0, 7525
IAST [baseline] (21.409 ms) : 0, 21409
IAST [candidate] (20.648 ms) : 0, 20648
section profiling
BytebuddyAgent [baseline] (681.062 ms) : 0, 681062
BytebuddyAgent [candidate] (691.854 ms) : 0, 691854
GlobalTracer [baseline] (400.155 ms) : 0, 400155
GlobalTracer [candidate] (403.807 ms) : 0, 403807
AppSec [baseline] (54.847 ms) : 0, 54847
AppSec [candidate] (55.257 ms) : 0, 55257
Remote Config [baseline] (665.295 µs) : 0, 665
Remote Config [candidate] (671.188 µs) : 0, 671
Telemetry [baseline] (12.139 ms) : 0, 12139
Telemetry [candidate] (13.541 ms) : 0, 13541
ProfilingAgent [baseline] (92.949 ms) : 0, 92949
ProfilingAgent [candidate] (92.691 ms) : 0, 92691
Profiling [baseline] (92.972 ms) : 0, 92972
Profiling [candidate] (92.715 ms) : 0, 92715
Loading
Startup time reports for insecure-bank
gantt
    title insecure-bank - global startup overhead: candidate=1.43.0-SNAPSHOT~316d0e13dc, baseline=1.43.0-SNAPSHOT~59388f19c2

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.085 s) : 0, 1084813
Total [baseline] (8.616 s) : 0, 8615782
Agent [candidate] (1.083 s) : 0, 1083200
Total [candidate] (8.584 s) : 0, 8584196
section iast
Agent [baseline] (1.221 s) : 0, 1220586
Total [baseline] (9.161 s) : 0, 9160664
Agent [candidate] (1.211 s) : 0, 1210615
Total [candidate] (9.204 s) : 0, 9204005
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.219 s) : 0, 1218704
Total [baseline] (9.146 s) : 0, 9145744
Agent [candidate] (1.211 s) : 0, 1210638
Total [candidate] (9.144 s) : 0, 9143904
section iast_TELEMETRY_OFF
Agent [baseline] (1.223 s) : 0, 1223231
Total [baseline] (9.155 s) : 0, 9154978
Agent [candidate] (1.212 s) : 0, 1211851
Total [candidate] (9.137 s) : 0, 9137488
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.085 s -
Agent iast 1.221 s 135.773 ms (12.5%)
Agent iast_HARDCODED_SECRET_DISABLED 1.219 s 133.891 ms (12.3%)
Agent iast_TELEMETRY_OFF 1.223 s 138.418 ms (12.8%)
Total tracing 8.616 s -
Total iast 9.161 s 544.881 ms (6.3%)
Total iast_HARDCODED_SECRET_DISABLED 9.146 s 529.962 ms (6.2%)
Total iast_TELEMETRY_OFF 9.155 s 539.196 ms (6.3%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.083 s -
Agent iast 1.211 s 127.414 ms (11.8%)
Agent iast_HARDCODED_SECRET_DISABLED 1.211 s 127.438 ms (11.8%)
Agent iast_TELEMETRY_OFF 1.212 s 128.651 ms (11.9%)
Total tracing 8.584 s -
Total iast 9.204 s 619.809 ms (7.2%)
Total iast_HARDCODED_SECRET_DISABLED 9.144 s 559.708 ms (6.5%)
Total iast_TELEMETRY_OFF 9.137 s 553.292 ms (6.4%)
gantt
    title insecure-bank - break down per module: candidate=1.43.0-SNAPSHOT~316d0e13dc, baseline=1.43.0-SNAPSHOT~59388f19c2

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (689.046 ms) : 0, 689046
BytebuddyAgent [candidate] (688.546 ms) : 0, 688546
GlobalTracer [baseline] (316.746 ms) : 0, 316746
GlobalTracer [candidate] (316.668 ms) : 0, 316668
AppSec [baseline] (54.467 ms) : 0, 54467
AppSec [candidate] (54.234 ms) : 0, 54234
Remote Config [baseline] (688.147 µs) : 0, 688
Remote Config [candidate] (678.143 µs) : 0, 678
Telemetry [baseline] (10.04 ms) : 0, 10040
Telemetry [candidate] (9.237 ms) : 0, 9237
section iast
BytebuddyAgent [baseline] (812.154 ms) : 0, 812154
BytebuddyAgent [candidate] (804.599 ms) : 0, 804599
GlobalTracer [baseline] (308.013 ms) : 0, 308013
GlobalTracer [candidate] (305.898 ms) : 0, 305898
AppSec [baseline] (58.032 ms) : 0, 58032
AppSec [candidate] (57.524 ms) : 0, 57524
IAST [baseline] (20.438 ms) : 0, 20438
IAST [candidate] (20.642 ms) : 0, 20642
Remote Config [baseline] (624.799 µs) : 0, 625
Remote Config [candidate] (623.787 µs) : 0, 624
Telemetry [baseline] (7.408 ms) : 0, 7408
Telemetry [candidate] (7.463 ms) : 0, 7463
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (809.464 ms) : 0, 809464
BytebuddyAgent [candidate] (804.604 ms) : 0, 804604
GlobalTracer [baseline] (308.015 ms) : 0, 308015
GlobalTracer [candidate] (305.723 ms) : 0, 305723
AppSec [baseline] (58.071 ms) : 0, 58071
AppSec [candidate] (57.539 ms) : 0, 57539
IAST [baseline] (21.029 ms) : 0, 21029
IAST [candidate] (20.828 ms) : 0, 20828
Remote Config [baseline] (626.101 µs) : 0, 626
Remote Config [candidate] (619.069 µs) : 0, 619
Telemetry [baseline] (7.601 ms) : 0, 7601
Telemetry [candidate] (7.486 ms) : 0, 7486
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (812.938 ms) : 0, 812938
BytebuddyAgent [candidate] (804.426 ms) : 0, 804426
GlobalTracer [baseline] (309.286 ms) : 0, 309286
GlobalTracer [candidate] (306.903 ms) : 0, 306903
AppSec [baseline] (58.554 ms) : 0, 58554
AppSec [candidate] (58.422 ms) : 0, 58422
IAST [baseline] (20.444 ms) : 0, 20444
IAST [candidate] (20.205 ms) : 0, 20205
Remote Config [baseline] (613.013 µs) : 0, 613
Remote Config [candidate] (608.31 µs) : 0, 608
Telemetry [baseline] (7.428 ms) : 0, 7428
Telemetry [candidate] (7.423 ms) : 0, 7423
Loading

Load

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
end_time 2024-11-13T14:18:35 2024-11-13T14:25:31
git_branch master vandonr/fix
git_commit_date 1731489224 1731506873
git_commit_sha 59388f1 316d0e1
release_version 1.43.0-SNAPSHOT~59388f19c2 1.43.0-SNAPSHOT~316d0e13dc
start_time 2024-11-13T14:18:21 2024-11-13T14:25:18
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1731508281 1731508281
ci_job_id 705333411 705333411
ci_pipeline_id 48901503 48901503
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
variant iast iast

Summary

Found 1 performance improvements and 0 performance regressions! Performance is the same for 11 metrics, 16 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:petclinic:profiling better
[-98.055µs; -46.970µs] or [-6.276%; -3.006%]
unstable
[-480.624op/s; +708.544op/s] or [-16.221%; +23.913%]
1.490ms 3076.923op/s 1.562ms 2962.963op/s
Request duration reports for petclinic
gantt
    title petclinic - request duration [CI 0.99] : candidate=1.43.0-SNAPSHOT~316d0e13dc, baseline=1.43.0-SNAPSHOT~59388f19c2
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.332 ms) : 1313, 1351
.   : milestone, 1332,
appsec (1.732 ms) : 1708, 1756
.   : milestone, 1732,
appsec_no_iast (1.724 ms) : 1698, 1749
.   : milestone, 1724,
iast (1.484 ms) : 1462, 1506
.   : milestone, 1484,
profiling (1.562 ms) : 1538, 1587
.   : milestone, 1562,
tracing (1.504 ms) : 1480, 1528
.   : milestone, 1504,
section candidate
no_agent (1.343 ms) : 1325, 1362
.   : milestone, 1343,
appsec (1.723 ms) : 1698, 1747
.   : milestone, 1723,
appsec_no_iast (1.732 ms) : 1708, 1756
.   : milestone, 1732,
iast (1.477 ms) : 1455, 1500
.   : milestone, 1477,
profiling (1.49 ms) : 1467, 1513
.   : milestone, 1490,
tracing (1.498 ms) : 1474, 1522
.   : milestone, 1498,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.332 ms [1.313 ms, 1.351 ms] -
appsec 1.732 ms [1.708 ms, 1.756 ms] 399.73 µs (30.0%)
appsec_no_iast 1.724 ms [1.698 ms, 1.749 ms] 391.125 µs (29.4%)
iast 1.484 ms [1.462 ms, 1.506 ms] 151.794 µs (11.4%)
profiling 1.562 ms [1.538 ms, 1.587 ms] 230.074 µs (17.3%)
tracing 1.504 ms [1.48 ms, 1.528 ms] 171.995 µs (12.9%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.343 ms [1.325 ms, 1.362 ms] -
appsec 1.723 ms [1.698 ms, 1.747 ms] 379.187 µs (28.2%)
appsec_no_iast 1.732 ms [1.708 ms, 1.756 ms] 388.162 µs (28.9%)
iast 1.477 ms [1.455 ms, 1.5 ms] 134.002 µs (10.0%)
profiling 1.49 ms [1.467 ms, 1.513 ms] 146.481 µs (10.9%)
tracing 1.498 ms [1.474 ms, 1.522 ms] 154.69 µs (11.5%)
Request duration reports for insecure-bank
gantt
    title insecure-bank - request duration [CI 0.99] : candidate=1.43.0-SNAPSHOT~316d0e13dc, baseline=1.43.0-SNAPSHOT~59388f19c2
    dateFormat X
    axisFormat %s
section baseline
no_agent (377.159 µs) : 357, 397
.   : milestone, 377,
iast (489.552 µs) : 468, 511
.   : milestone, 490,
iast_FULL (648.81 µs) : 628, 670
.   : milestone, 649,
iast_GLOBAL (514.684 µs) : 493, 537
.   : milestone, 515,
iast_HARDCODED_SECRET_DISABLED (491.319 µs) : 469, 513
.   : milestone, 491,
iast_INACTIVE (448.039 µs) : 427, 469
.   : milestone, 448,
iast_TELEMETRY_OFF (478.999 µs) : 457, 501
.   : milestone, 479,
tracing (456.55 µs) : 436, 477
.   : milestone, 457,
section candidate
no_agent (366.809 µs) : 346, 387
.   : milestone, 367,
iast (488.406 µs) : 467, 510
.   : milestone, 488,
iast_FULL (642.592 µs) : 621, 664
.   : milestone, 643,
iast_GLOBAL (515.2 µs) : 493, 537
.   : milestone, 515,
iast_HARDCODED_SECRET_DISABLED (482.244 µs) : 461, 503
.   : milestone, 482,
iast_INACTIVE (445.272 µs) : 425, 466
.   : milestone, 445,
iast_TELEMETRY_OFF (473.641 µs) : 452, 495
.   : milestone, 474,
tracing (450.571 µs) : 429, 472
.   : milestone, 451,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 377.159 µs [357.486 µs, 396.832 µs] -
iast 489.552 µs [468.438 µs, 510.666 µs] 112.393 µs (29.8%)
iast_FULL 648.81 µs [627.561 µs, 670.06 µs] 271.651 µs (72.0%)
iast_GLOBAL 514.684 µs [492.645 µs, 536.724 µs] 137.525 µs (36.5%)
iast_HARDCODED_SECRET_DISABLED 491.319 µs [469.453 µs, 513.185 µs] 114.16 µs (30.3%)
iast_INACTIVE 448.039 µs [427.113 µs, 468.966 µs] 70.88 µs (18.8%)
iast_TELEMETRY_OFF 478.999 µs [457.008 µs, 500.989 µs] 101.84 µs (27.0%)
tracing 456.55 µs [436.258 µs, 476.841 µs] 79.39 µs (21.0%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 366.809 µs [346.282 µs, 387.335 µs] -
iast 488.406 µs [467.021 µs, 509.791 µs] 121.597 µs (33.2%)
iast_FULL 642.592 µs [621.199 µs, 663.984 µs] 275.783 µs (75.2%)
iast_GLOBAL 515.2 µs [493.495 µs, 536.905 µs] 148.392 µs (40.5%)
iast_HARDCODED_SECRET_DISABLED 482.244 µs [460.996 µs, 503.492 µs] 115.436 µs (31.5%)
iast_INACTIVE 445.272 µs [424.544 µs, 465.999 µs] 78.463 µs (21.4%)
iast_TELEMETRY_OFF 473.641 µs [452.487 µs, 494.795 µs] 106.833 µs (29.1%)
tracing 450.571 µs [428.831 µs, 472.311 µs] 83.763 µs (22.8%)

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master vandonr/fix
git_commit_date 1731489224 1731506873
git_commit_sha 59388f1 316d0e1
release_version 1.43.0-SNAPSHOT~59388f19c2 1.43.0-SNAPSHOT~316d0e13dc
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1731508818 1731508818
ci_job_id 705333412 705333412
ci_pipeline_id 48901503 48901503
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
variant appsec appsec

Summary

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

Execution time for biojava
gantt
    title biojava - execution time [CI 0.99] : candidate=1.43.0-SNAPSHOT~316d0e13dc, baseline=1.43.0-SNAPSHOT~59388f19c2
    dateFormat X
    axisFormat %s
section baseline
no_agent (15.434 s) : 15434000, 15434000
.   : milestone, 15434000,
appsec (15.374 s) : 15374000, 15374000
.   : milestone, 15374000,
iast (18.981 s) : 18981000, 18981000
.   : milestone, 18981000,
iast_GLOBAL (18.145 s) : 18145000, 18145000
.   : milestone, 18145000,
profiling (14.898 s) : 14898000, 14898000
.   : milestone, 14898000,
tracing (15.039 s) : 15039000, 15039000
.   : milestone, 15039000,
section candidate
no_agent (15.273 s) : 15273000, 15273000
.   : milestone, 15273000,
appsec (15.271 s) : 15271000, 15271000
.   : milestone, 15271000,
iast (18.625 s) : 18625000, 18625000
.   : milestone, 18625000,
iast_GLOBAL (18.245 s) : 18245000, 18245000
.   : milestone, 18245000,
profiling (15.217 s) : 15217000, 15217000
.   : milestone, 15217000,
tracing (14.973 s) : 14973000, 14973000
.   : milestone, 14973000,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.434 s [15.434 s, 15.434 s] -
appsec 15.374 s [15.374 s, 15.374 s] -60.0 ms (-0.4%)
iast 18.981 s [18.981 s, 18.981 s] 3.547 s (23.0%)
iast_GLOBAL 18.145 s [18.145 s, 18.145 s] 2.711 s (17.6%)
profiling 14.898 s [14.898 s, 14.898 s] -536.0 ms (-3.5%)
tracing 15.039 s [15.039 s, 15.039 s] -395.0 ms (-2.6%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.273 s [15.273 s, 15.273 s] -
appsec 15.271 s [15.271 s, 15.271 s] -2.0 ms (-0.0%)
iast 18.625 s [18.625 s, 18.625 s] 3.352 s (21.9%)
iast_GLOBAL 18.245 s [18.245 s, 18.245 s] 2.972 s (19.5%)
profiling 15.217 s [15.217 s, 15.217 s] -56.0 ms (-0.4%)
tracing 14.973 s [14.973 s, 14.973 s] -300.0 ms (-2.0%)
Execution time for tomcat
gantt
    title tomcat - execution time [CI 0.99] : candidate=1.43.0-SNAPSHOT~316d0e13dc, baseline=1.43.0-SNAPSHOT~59388f19c2
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.465 ms) : 1453, 1476
.   : milestone, 1465,
appsec (2.344 ms) : 2303, 2386
.   : milestone, 2344,
iast (2.074 ms) : 2022, 2126
.   : milestone, 2074,
iast_GLOBAL (2.125 ms) : 2073, 2177
.   : milestone, 2125,
profiling (1.938 ms) : 1897, 1980
.   : milestone, 1938,
tracing (1.929 ms) : 1888, 1969
.   : milestone, 1929,
section candidate
no_agent (1.466 ms) : 1454, 1477
.   : milestone, 1466,
appsec (2.343 ms) : 2301, 2385
.   : milestone, 2343,
iast (2.081 ms) : 2028, 2133
.   : milestone, 2081,
iast_GLOBAL (2.122 ms) : 2070, 2174
.   : milestone, 2122,
profiling (1.945 ms) : 1903, 1987
.   : milestone, 1945,
tracing (1.928 ms) : 1887, 1969
.   : milestone, 1928,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.465 ms [1.453 ms, 1.476 ms] -
appsec 2.344 ms [2.303 ms, 2.386 ms] 879.291 µs (60.0%)
iast 2.074 ms [2.022 ms, 2.126 ms] 609.127 µs (41.6%)
iast_GLOBAL 2.125 ms [2.073 ms, 2.177 ms] 660.085 µs (45.1%)
profiling 1.938 ms [1.897 ms, 1.98 ms] 473.702 µs (32.3%)
tracing 1.929 ms [1.888 ms, 1.969 ms] 464.055 µs (31.7%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.466 ms [1.454 ms, 1.477 ms] -
appsec 2.343 ms [2.301 ms, 2.385 ms] 876.994 µs (59.8%)
iast 2.081 ms [2.028 ms, 2.133 ms] 614.877 µs (41.9%)
iast_GLOBAL 2.122 ms [2.07 ms, 2.174 ms] 656.252 µs (44.8%)
profiling 1.945 ms [1.903 ms, 1.987 ms] 479.219 µs (32.7%)
tracing 1.928 ms [1.887 ms, 1.969 ms] 462.247 µs (31.5%)

@sarahchen6
Copy link
Contributor

I'll work on the tests for this as part of my APM Ecosystems mentorship, learning java!

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.

A good addition would be to add the wrapped method into the forbidden APIs to prevent devs to use them any more.

@vandonr
Copy link
Contributor Author

vandonr commented Oct 30, 2024

I'll work on the tests for this as part of my APM Ecosystems mentorship, learning java!

oh I missed this comment ! Feel free to, but it's not the easiest task to start with ! Some tests are failing because we are using the logger "too early". We probably need to change the code to store a flag if we couldn't access the settings we wanted, and check it later, when the initialization is done, to log something.

@ygree
Copy link
Contributor

ygree commented Nov 8, 2024

Should we move it to a draft state as there are still things to address, such as logging too early and marking old APIs as forbidden?

@vandonr
Copy link
Contributor Author

vandonr commented Nov 8, 2024

Should we move it to a draft state as there are still things to address, such as logging too early and marking old APIs as forbidden?

Ah yes maybe I need to edit the description, but we're not logging too early anymore.

@sarahchen6 sarahchen6 mentioned this pull request Nov 12, 2024
5 tasks
}

public static String tryGetProperty(String property) {
try {
Copy link
Contributor

Choose a reason for hiding this comment

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

Could just be getPropertyOrDefault(property, null)?

Copy link
Contributor

@ygree ygree left a comment

Choose a reason for hiding this comment

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

LGTM

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.

4 participants