Skip to content

Conversation

@mcculls
Copy link
Contributor

@mcculls mcculls commented Jun 14, 2024

What Does This Do

  • Support arbitrary lookup of 'otel.' config from extensions
  • Redirect InstrumentationConfig requests to our own ConfigProvider
  • Redirect CallDepth requests to our own CallDepthThreadLocalMap
  • Embed OTel instrumentation API and javaagent-extension API
  • Remove classes covered by existing mappings as well as experimental packages
  • Embed opentelemetry-javaagent-servlet-common-bootstrap
  • Rework OTel package remapper to remap both shaded and unshaded references

Jira ticket: APMAPI-64

@mcculls mcculls added the inst: opentelemetry OpenTelemetry instrumentation label Jun 14, 2024
@mcculls mcculls requested a review from a team as a code owner June 14, 2024 11:06
@mcculls mcculls requested review from dougqh and nayeem-kamal June 14, 2024 11:06
@mcculls mcculls requested a review from PerfectSlayer June 14, 2024 11:14
@pr-commenter
Copy link

pr-commenter bot commented Jun 14, 2024

Benchmarks

Startup

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master mcculls/map-otel-config-for-dropin
git_commit_date 1718370692 1718365766
git_commit_sha 33a2dcd 3a6894e
release_version 1.36.0-SNAPSHOT~33a2dcd37c 1.36.0-SNAPSHOT~3a6894e6da
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1718377486 1718377486
ci_job_id 543839425 543839425
ci_pipeline_id 36766866 36766866
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 2 performance improvements and 0 performance regressions! Performance is the same for 53 metrics, 16 unstable metrics.

scenario Δ mean execution_time candidate mean execution_time baseline mean execution_time
scenario:startup:insecure-bank:iast_TELEMETRY_OFF:Remote Config better
[-77.031µs; -17.527µs] or [-12.780%; -2.908%]
555.475µs 602.754µs
scenario:startup:petclinic:profiling:Logs Intake better
[-27.037µs; -9.599µs] or [-7.726%; -2.743%]
331.621µs 349.940µs
Startup time reports for petclinic
gantt
    title petclinic - global startup overhead: candidate=1.36.0-SNAPSHOT~3a6894e6da, baseline=1.36.0-SNAPSHOT~33a2dcd37c

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.064 s) : 0, 1064182
Total [baseline] (10.298 s) : 0, 10297786
Agent [candidate] (1.059 s) : 0, 1059347
Total [candidate] (10.362 s) : 0, 10361689
section appsec
Agent [baseline] (1.18 s) : 0, 1179538
Total [baseline] (10.437 s) : 0, 10437057
Agent [candidate] (1.183 s) : 0, 1183152
Total [candidate] (10.529 s) : 0, 10528565
section iast
Agent [baseline] (1.168 s) : 0, 1168334
Total [baseline] (10.682 s) : 0, 10682012
Agent [candidate] (1.167 s) : 0, 1167171
Total [candidate] (10.721 s) : 0, 10720552
section profiling
Agent [baseline] (1.263 s) : 0, 1262784
Total [baseline] (10.682 s) : 0, 10681582
Agent [candidate] (1.261 s) : 0, 1261323
Total [candidate] (10.623 s) : 0, 10623431
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.064 s -
Agent appsec 1.18 s 115.356 ms (10.8%)
Agent iast 1.168 s 104.152 ms (9.8%)
Agent profiling 1.263 s 198.602 ms (18.7%)
Total tracing 10.298 s -
Total appsec 10.437 s 139.271 ms (1.4%)
Total iast 10.682 s 384.227 ms (3.7%)
Total profiling 10.682 s 383.796 ms (3.7%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.059 s -
Agent appsec 1.183 s 123.805 ms (11.7%)
Agent iast 1.167 s 107.824 ms (10.2%)
Agent profiling 1.261 s 201.976 ms (19.1%)
Total tracing 10.362 s -
Total appsec 10.529 s 166.877 ms (1.6%)
Total iast 10.721 s 358.864 ms (3.5%)
Total profiling 10.623 s 261.743 ms (2.5%)
gantt
    title petclinic - break down per module: candidate=1.36.0-SNAPSHOT~3a6894e6da, baseline=1.36.0-SNAPSHOT~33a2dcd37c

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (666.439 ms) : 0, 666439
BytebuddyAgent [candidate] (663.293 ms) : 0, 663293
GlobalTracer [baseline] (304.491 ms) : 0, 304491
GlobalTracer [candidate] (303.066 ms) : 0, 303066
AppSec [baseline] (50.297 ms) : 0, 50297
AppSec [candidate] (50.046 ms) : 0, 50046
Logs Intake [baseline] (331.815 µs) : 0, 332
Logs Intake [candidate] (417.369 µs) : 0, 417
Remote Config [baseline] (668.455 µs) : 0, 668
Remote Config [candidate] (665.499 µs) : 0, 665
Telemetry [baseline] (7.602 ms) : 0, 7602
Telemetry [candidate] (7.552 ms) : 0, 7552
section appsec
BytebuddyAgent [baseline] (674.031 ms) : 0, 674031
BytebuddyAgent [candidate] (677.102 ms) : 0, 677102
GlobalTracer [baseline] (296.543 ms) : 0, 296543
GlobalTracer [candidate] (298.18 ms) : 0, 298180
AppSec [baseline] (154.093 ms) : 0, 154093
AppSec [candidate] (152.82 ms) : 0, 152820
Logs Intake [baseline] (320.487 µs) : 0, 320
Logs Intake [candidate] (321.526 µs) : 0, 322
Remote Config [baseline] (634.068 µs) : 0, 634
Remote Config [candidate] (650.398 µs) : 0, 650
Telemetry [baseline] (9.486 ms) : 0, 9486
Telemetry [candidate] (8.756 ms) : 0, 8756
IAST [baseline] (20.459 ms) : 0, 20459
IAST [candidate] (21.749 ms) : 0, 21749
section iast
BytebuddyAgent [baseline] (778.391 ms) : 0, 778391
BytebuddyAgent [candidate] (778.599 ms) : 0, 778599
GlobalTracer [baseline] (292.927 ms) : 0, 292927
GlobalTracer [candidate] (292.985 ms) : 0, 292985
AppSec [baseline] (47.153 ms) : 0, 47153
AppSec [candidate] (47.014 ms) : 0, 47014
Logs Intake [baseline] (1.719 ms) : 0, 1719
Logs Intake [candidate] (300.907 µs) : 0, 301
Remote Config [baseline] (700.147 µs) : 0, 700
Remote Config [candidate] (569.63 µs) : 0, 570
Telemetry [baseline] (6.918 ms) : 0, 6918
Telemetry [candidate] (7.592 ms) : 0, 7592
IAST [baseline] (27.267 ms) : 0, 27267
IAST [candidate] (26.825 ms) : 0, 26825
section profiling
ProfilingAgent [baseline] (96.698 ms) : 0, 96698
ProfilingAgent [candidate] (95.925 ms) : 0, 95925
BytebuddyAgent [baseline] (661.31 ms) : 0, 661310
BytebuddyAgent [candidate] (662.954 ms) : 0, 662954
GlobalTracer [baseline] (387.606 ms) : 0, 387606
GlobalTracer [candidate] (386.329 ms) : 0, 386329
AppSec [baseline] (51.718 ms) : 0, 51718
AppSec [candidate] (50.824 ms) : 0, 50824
Logs Intake [baseline] (349.94 µs) : 0, 350
Logs Intake [candidate] (331.621 µs) : 0, 332
Remote Config [baseline] (745.126 µs) : 0, 745
Remote Config [candidate] (739.81 µs) : 0, 740
Telemetry [baseline] (7.465 ms) : 0, 7465
Telemetry [candidate] (7.354 ms) : 0, 7354
Profiling [baseline] (96.722 ms) : 0, 96722
Profiling [candidate] (95.95 ms) : 0, 95950
Loading
Startup time reports for insecure-bank
gantt
    title insecure-bank - global startup overhead: candidate=1.36.0-SNAPSHOT~3a6894e6da, baseline=1.36.0-SNAPSHOT~33a2dcd37c

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.064 s) : 0, 1063643
Total [baseline] (8.548 s) : 0, 8547870
Agent [candidate] (1.068 s) : 0, 1068282
Total [candidate] (8.563 s) : 0, 8562621
section iast
Agent [baseline] (1.167 s) : 0, 1166809
Total [baseline] (8.987 s) : 0, 8987492
Agent [candidate] (1.173 s) : 0, 1172995
Total [candidate] (9.032 s) : 0, 9031859
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.179 s) : 0, 1178513
Total [baseline] (9.008 s) : 0, 9007913
Agent [candidate] (1.167 s) : 0, 1166611
Total [candidate] (9.012 s) : 0, 9011738
section iast_TELEMETRY_OFF
Agent [baseline] (1.164 s) : 0, 1163702
Total [baseline] (9.049 s) : 0, 9048986
Agent [candidate] (1.163 s) : 0, 1162996
Total [candidate] (8.969 s) : 0, 8969134
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.064 s -
Agent iast 1.167 s 103.166 ms (9.7%)
Agent iast_HARDCODED_SECRET_DISABLED 1.179 s 114.871 ms (10.8%)
Agent iast_TELEMETRY_OFF 1.164 s 100.06 ms (9.4%)
Total tracing 8.548 s -
Total iast 8.987 s 439.622 ms (5.1%)
Total iast_HARDCODED_SECRET_DISABLED 9.008 s 460.042 ms (5.4%)
Total iast_TELEMETRY_OFF 9.049 s 501.116 ms (5.9%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.068 s -
Agent iast 1.173 s 104.713 ms (9.8%)
Agent iast_HARDCODED_SECRET_DISABLED 1.167 s 98.329 ms (9.2%)
Agent iast_TELEMETRY_OFF 1.163 s 94.714 ms (8.9%)
Total tracing 8.563 s -
Total iast 9.032 s 469.238 ms (5.5%)
Total iast_HARDCODED_SECRET_DISABLED 9.012 s 449.117 ms (5.2%)
Total iast_TELEMETRY_OFF 8.969 s 406.512 ms (4.7%)
gantt
    title insecure-bank - break down per module: candidate=1.36.0-SNAPSHOT~3a6894e6da, baseline=1.36.0-SNAPSHOT~33a2dcd37c

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (666.341 ms) : 0, 666341
BytebuddyAgent [candidate] (669.296 ms) : 0, 669296
GlobalTracer [baseline] (303.964 ms) : 0, 303964
GlobalTracer [candidate] (305.353 ms) : 0, 305353
AppSec [baseline] (50.278 ms) : 0, 50278
AppSec [candidate] (50.343 ms) : 0, 50343
Logs Intake [baseline] (336.753 µs) : 0, 337
Logs Intake [candidate] (421.855 µs) : 0, 422
Remote Config [baseline] (666.439 µs) : 0, 666
Remote Config [candidate] (674.463 µs) : 0, 674
Telemetry [baseline] (7.578 ms) : 0, 7578
Telemetry [candidate] (7.615 ms) : 0, 7615
section iast
BytebuddyAgent [baseline] (779.201 ms) : 0, 779201
BytebuddyAgent [candidate] (783.008 ms) : 0, 783008
GlobalTracer [baseline] (292.763 ms) : 0, 292763
GlobalTracer [candidate] (295.425 ms) : 0, 295425
AppSec [baseline] (47.152 ms) : 0, 47152
AppSec [candidate] (47.018 ms) : 0, 47018
IAST [baseline] (26.565 ms) : 0, 26565
IAST [candidate] (24.829 ms) : 0, 24829
Logs Intake [baseline] (299.346 µs) : 0, 299
Logs Intake [candidate] (307.149 µs) : 0, 307
Remote Config [baseline] (585.026 µs) : 0, 585
Remote Config [candidate] (1.982 ms) : 0, 1982
Telemetry [baseline] (6.956 ms) : 0, 6956
Telemetry [candidate] (7.084 ms) : 0, 7084
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (783.062 ms) : 0, 783062
BytebuddyAgent [candidate] (778.873 ms) : 0, 778873
GlobalTracer [baseline] (296.556 ms) : 0, 296556
GlobalTracer [candidate] (293.618 ms) : 0, 293618
AppSec [baseline] (47.923 ms) : 0, 47923
AppSec [candidate] (46.406 ms) : 0, 46406
IAST [baseline] (29.698 ms) : 0, 29698
IAST [candidate] (25.009 ms) : 0, 25009
Logs Intake [baseline] (306.377 µs) : 0, 306
Logs Intake [candidate] (302.581 µs) : 0, 303
Remote Config [baseline] (580.073 µs) : 0, 580
Remote Config [candidate] (605.141 µs) : 0, 605
Telemetry [baseline] (6.988 ms) : 0, 6988
Telemetry [candidate] (8.538 ms) : 0, 8538
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (775.823 ms) : 0, 775823
BytebuddyAgent [candidate] (774.763 ms) : 0, 774763
GlobalTracer [baseline] (293.356 ms) : 0, 293356
GlobalTracer [candidate] (293.356 ms) : 0, 293356
AppSec [baseline] (47.23 ms) : 0, 47230
AppSec [candidate] (46.236 ms) : 0, 46236
IAST [baseline] (24.536 ms) : 0, 24536
IAST [candidate] (25.577 ms) : 0, 25577
Logs Intake [baseline] (299.521 µs) : 0, 300
Logs Intake [candidate] (295.064 µs) : 0, 295
Remote Config [baseline] (602.754 µs) : 0, 603
Remote Config [candidate] (555.475 µs) : 0, 555
Telemetry [baseline] (8.54 ms) : 0, 8540
Telemetry [candidate] (8.933 ms) : 0, 8933
Loading

Load

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
end_time 2024-06-14T13:11:29 2024-06-14T13:18:16
git_branch master mcculls/map-otel-config-for-dropin
git_commit_date 1718368440 1718365766
git_commit_sha 7939bfd 3a6894e
release_version 1.36.0-SNAPSHOT~7939bfdb9d 1.36.0-SNAPSHOT~3a6894e6da
start_time 2024-06-14T13:11:15 2024-06-14T13:18:02
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1718371439 1718371439
ci_job_id 543691366 543691366
ci_pipeline_id 36766866 36766866
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 0 performance improvements and 0 performance regressions! Performance is the same for 11 metrics, 17 unstable metrics.

Request duration reports for petclinic
gantt
    title petclinic - request duration [CI 0.99] : candidate=1.36.0-SNAPSHOT~3a6894e6da, baseline=1.36.0-SNAPSHOT~7939bfdb9d
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.337 ms) : 1318, 1357
.   : milestone, 1337,
appsec (1.702 ms) : 1677, 1726
.   : milestone, 1702,
appsec_no_iast (1.697 ms) : 1674, 1721
.   : milestone, 1697,
iast (1.434 ms) : 1412, 1457
.   : milestone, 1434,
profiling (1.475 ms) : 1451, 1500
.   : milestone, 1475,
tracing (1.468 ms) : 1443, 1492
.   : milestone, 1468,
section candidate
no_agent (1.346 ms) : 1327, 1365
.   : milestone, 1346,
appsec (1.704 ms) : 1679, 1728
.   : milestone, 1704,
appsec_no_iast (1.724 ms) : 1699, 1748
.   : milestone, 1724,
iast (1.483 ms) : 1460, 1506
.   : milestone, 1483,
profiling (1.485 ms) : 1461, 1510
.   : milestone, 1485,
tracing (1.454 ms) : 1429, 1478
.   : milestone, 1454,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.337 ms [1.318 ms, 1.357 ms] -
appsec 1.702 ms [1.677 ms, 1.726 ms] 364.126 µs (27.2%)
appsec_no_iast 1.697 ms [1.674 ms, 1.721 ms] 359.828 µs (26.9%)
iast 1.434 ms [1.412 ms, 1.457 ms] 96.885 µs (7.2%)
profiling 1.475 ms [1.451 ms, 1.5 ms] 137.62 µs (10.3%)
tracing 1.468 ms [1.443 ms, 1.492 ms] 130.519 µs (9.8%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.346 ms [1.327 ms, 1.365 ms] -
appsec 1.704 ms [1.679 ms, 1.728 ms] 357.553 µs (26.6%)
appsec_no_iast 1.724 ms [1.699 ms, 1.748 ms] 377.561 µs (28.0%)
iast 1.483 ms [1.46 ms, 1.506 ms] 136.697 µs (10.2%)
profiling 1.485 ms [1.461 ms, 1.51 ms] 139.324 µs (10.4%)
tracing 1.454 ms [1.429 ms, 1.478 ms] 107.725 µs (8.0%)
Request duration reports for insecure-bank
gantt
    title insecure-bank - request duration [CI 0.99] : candidate=1.36.0-SNAPSHOT~3a6894e6da, baseline=1.36.0-SNAPSHOT~7939bfdb9d
    dateFormat X
    axisFormat %s
section baseline
no_agent (366.113 µs) : 346, 386
.   : milestone, 366,
iast (474.143 µs) : 453, 495
.   : milestone, 474,
iast_FULL (544.676 µs) : 524, 566
.   : milestone, 545,
iast_GLOBAL (507.591 µs) : 486, 529
.   : milestone, 508,
iast_HARDCODED_SECRET_DISABLED (478.248 µs) : 457, 500
.   : milestone, 478,
iast_INACTIVE (460.325 µs) : 438, 482
.   : milestone, 460,
iast_TELEMETRY_OFF (461.683 µs) : 441, 483
.   : milestone, 462,
tracing (437.947 µs) : 418, 458
.   : milestone, 438,
section candidate
no_agent (369.238 µs) : 350, 389
.   : milestone, 369,
iast (477.601 µs) : 456, 499
.   : milestone, 478,
iast_FULL (545.769 µs) : 525, 567
.   : milestone, 546,
iast_GLOBAL (516.081 µs) : 493, 539
.   : milestone, 516,
iast_HARDCODED_SECRET_DISABLED (473.696 µs) : 453, 495
.   : milestone, 474,
iast_INACTIVE (448.579 µs) : 427, 470
.   : milestone, 449,
iast_TELEMETRY_OFF (468.431 µs) : 447, 489
.   : milestone, 468,
tracing (440.068 µs) : 419, 462
.   : milestone, 440,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 366.113 µs [346.127 µs, 386.098 µs] -
iast 474.143 µs [453.238 µs, 495.049 µs] 108.03 µs (29.5%)
iast_FULL 544.676 µs [523.572 µs, 565.78 µs] 178.563 µs (48.8%)
iast_GLOBAL 507.591 µs [485.954 µs, 529.228 µs] 141.478 µs (38.6%)
iast_HARDCODED_SECRET_DISABLED 478.248 µs [456.851 µs, 499.646 µs] 112.136 µs (30.6%)
iast_INACTIVE 460.325 µs [438.296 µs, 482.354 µs] 94.212 µs (25.7%)
iast_TELEMETRY_OFF 461.683 µs [440.829 µs, 482.537 µs] 95.57 µs (26.1%)
tracing 437.947 µs [417.604 µs, 458.291 µs] 71.835 µs (19.6%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 369.238 µs [349.712 µs, 388.765 µs] -
iast 477.601 µs [456.273 µs, 498.928 µs] 108.362 µs (29.3%)
iast_FULL 545.769 µs [524.763 µs, 566.775 µs] 176.53 µs (47.8%)
iast_GLOBAL 516.081 µs [493.157 µs, 539.005 µs] 146.843 µs (39.8%)
iast_HARDCODED_SECRET_DISABLED 473.696 µs [452.571 µs, 494.822 µs] 104.458 µs (28.3%)
iast_INACTIVE 448.579 µs [427.143 µs, 470.014 µs] 79.34 µs (21.5%)
iast_TELEMETRY_OFF 468.431 µs [447.463 µs, 489.399 µs] 99.192 µs (26.9%)
tracing 440.068 µs [418.582 µs, 461.554 µs] 70.83 µs (19.2%)

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master mcculls/map-otel-config-for-dropin
git_commit_date 1718365351 1718365766
git_commit_sha 24d82a5 3a6894e
release_version 1.36.0-SNAPSHOT~24d82a55c1 1.36.0-SNAPSHOT~3a6894e6da
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1718368178 1718368178
ci_job_id 543577912 543577912
ci_pipeline_id 36766866 36766866
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 tomcat
gantt
    title tomcat - execution time [CI 0.99] : candidate=1.36.0-SNAPSHOT~3a6894e6da, baseline=1.36.0-SNAPSHOT~24d82a55c1
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.469 ms) : 1458, 1480
.   : milestone, 1469,
appsec (2.226 ms) : 2192, 2261
.   : milestone, 2226,
iast (1.973 ms) : 1932, 2014
.   : milestone, 1973,
iast_GLOBAL (2.017 ms) : 1975, 2059
.   : milestone, 2017,
profiling (1.869 ms) : 1835, 1902
.   : milestone, 1869,
tracing (1.838 ms) : 1806, 1869
.   : milestone, 1838,
section candidate
no_agent (1.464 ms) : 1453, 1476
.   : milestone, 1464,
appsec (2.218 ms) : 2184, 2252
.   : milestone, 2218,
iast (1.96 ms) : 1920, 2001
.   : milestone, 1960,
iast_GLOBAL (2.004 ms) : 1964, 2045
.   : milestone, 2004,
profiling (1.86 ms) : 1825, 1895
.   : milestone, 1860,
tracing (1.839 ms) : 1806, 1871
.   : milestone, 1839,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.469 ms [1.458 ms, 1.48 ms] -
appsec 2.226 ms [2.192 ms, 2.261 ms] 757.281 µs (51.5%)
iast 1.973 ms [1.932 ms, 2.014 ms] 504.161 µs (34.3%)
iast_GLOBAL 2.017 ms [1.975 ms, 2.059 ms] 547.874 µs (37.3%)
profiling 1.869 ms [1.835 ms, 1.902 ms] 399.453 µs (27.2%)
tracing 1.838 ms [1.806 ms, 1.869 ms] 368.501 µs (25.1%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.464 ms [1.453 ms, 1.476 ms] -
appsec 2.218 ms [2.184 ms, 2.252 ms] 754.124 µs (51.5%)
iast 1.96 ms [1.92 ms, 2.001 ms] 496.292 µs (33.9%)
iast_GLOBAL 2.004 ms [1.964 ms, 2.045 ms] 540.057 µs (36.9%)
profiling 1.86 ms [1.825 ms, 1.895 ms] 395.765 µs (27.0%)
tracing 1.839 ms [1.806 ms, 1.871 ms] 374.696 µs (25.6%)
Execution time for biojava
gantt
    title biojava - execution time [CI 0.99] : candidate=1.36.0-SNAPSHOT~3a6894e6da, baseline=1.36.0-SNAPSHOT~24d82a55c1
    dateFormat X
    axisFormat %s
section baseline
no_agent (14.949 s) : 14949000, 14949000
.   : milestone, 14949000,
appsec (15.444 s) : 15444000, 15444000
.   : milestone, 15444000,
iast (18.915 s) : 18915000, 18915000
.   : milestone, 18915000,
iast_GLOBAL (18.134 s) : 18134000, 18134000
.   : milestone, 18134000,
profiling (15.064 s) : 15064000, 15064000
.   : milestone, 15064000,
tracing (14.922 s) : 14922000, 14922000
.   : milestone, 14922000,
section candidate
no_agent (15.039 s) : 15039000, 15039000
.   : milestone, 15039000,
appsec (15.133 s) : 15133000, 15133000
.   : milestone, 15133000,
iast (18.841 s) : 18841000, 18841000
.   : milestone, 18841000,
iast_GLOBAL (18.209 s) : 18209000, 18209000
.   : milestone, 18209000,
profiling (15.215 s) : 15215000, 15215000
.   : milestone, 15215000,
tracing (15.058 s) : 15058000, 15058000
.   : milestone, 15058000,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 14.949 s [14.949 s, 14.949 s] -
appsec 15.444 s [15.444 s, 15.444 s] 495.0 ms (3.3%)
iast 18.915 s [18.915 s, 18.915 s] 3.966 s (26.5%)
iast_GLOBAL 18.134 s [18.134 s, 18.134 s] 3.185 s (21.3%)
profiling 15.064 s [15.064 s, 15.064 s] 115.0 ms (0.8%)
tracing 14.922 s [14.922 s, 14.922 s] -27.0 ms (-0.2%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.039 s [15.039 s, 15.039 s] -
appsec 15.133 s [15.133 s, 15.133 s] 94.0 ms (0.6%)
iast 18.841 s [18.841 s, 18.841 s] 3.802 s (25.3%)
iast_GLOBAL 18.209 s [18.209 s, 18.209 s] 3.17 s (21.1%)
profiling 15.215 s [15.215 s, 15.215 s] 176.0 ms (1.2%)
tracing 15.058 s [15.058 s, 15.058 s] 19.0 ms (0.1%)

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.

Sounds good.
One quick check in the comments.

Otherwise, OTel supports Spring as config source.
Can it cause troubles for Spring customer if we don't? Do we plan to support it too?

embeddedClasspath group: 'io.opentelemetry.javaagent', name: 'opentelemetry-javaagent-extension-api', version: "$otelInstrumentationApiVersion-alpha"

// selected bootstrap types shared across multiple OpenTelemetry instrumentations
embeddedClasspath group: 'io.opentelemetry.javaagent.instrumentation', name: 'opentelemetry-javaagent-servlet-common-bootstrap', version: "$otelInstrumentationApiVersion-alpha"
Copy link
Contributor

Choose a reason for hiding this comment

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

Just checking: can this cause an issue with customers shipping OTel SDK (especially another version) as part of their dependencies?

Copy link
Contributor Author

@mcculls mcculls Jun 17, 2024

Choose a reason for hiding this comment

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

no, the embedded classpath is shaded - see https://github.com/DataDog/dd-trace-java/blob/mcculls/map-otel-config-for-dropin/dd-java-agent/agent-otel/otel-bootstrap/build.gradle#L97

the only code which will use it are external extensions which are loaded and translated by our extension mechanism

Copy link
Contributor

Choose a reason for hiding this comment

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

Between custom Gradle configuration, shadowing and ClassRemapper implementation, I wonder if there is a better way (in term of maintainability) to express the single need of "I want this dependency under this package" 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You could look at using a single configuration file - the downside is that you'd need more code on both the gradle and Java sides to load that file into the respective plugins, increasing their complexity. Sometimes duplication is acceptable for things that change infrequently...

@mcculls
Copy link
Contributor Author

mcculls commented Jun 17, 2024

Otherwise, OTel supports Spring as config source. Can it cause troubles for Spring customer if we don't? Do we plan to support it too?

That's outside the scope of this feature - the focus here is allowing the same config provider (system properties, environment variables, config file) to feed configuration to both Datadog and OpenTelemetry instrumentations.

If/when we add the ability to configure the Datadog tracer from Spring then this PR would let that configuration flow through to both Datadog and OpenTelemetry instrumentations.

@mcculls mcculls merged commit 19753bb into master Jun 17, 2024
@mcculls mcculls deleted the mcculls/map-otel-config-for-dropin branch June 17, 2024 09:13
@github-actions github-actions bot added this to the 1.35.1 milestone Jun 17, 2024
@PerfectSlayer
Copy link
Contributor

If/when we add the ability to configure the Datadog tracer from Spring then this PR would let that configuration flow through to both Datadog and OpenTelemetry instrumentations.

Sure, it was more to enquire about the next roadmap 😇

@mcculls mcculls modified the milestones: 1.35.1, 1.36.0 Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

inst: opentelemetry OpenTelemetry instrumentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants