Skip to content

Conversation

@amarziali
Copy link
Contributor

What Does This Do

When mulesoft use the internal jpms module layering, application deployment fails because of DDEventTracer uses internal mule classes not opened/exported to the unnamed module.

This PR make the needed module export all the packages to unnamed (where our code resides) in order to avoid this issue

solves #8130

Motivation

Additional Notes

Contributor Checklist

Jira ticket: [PROJ-IDENT]

@amarziali amarziali requested a review from a team as a code owner January 13, 2025 11:08
@amarziali amarziali requested a review from mcculls January 13, 2025 11:08
@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.

@amarziali amarziali added type: bug Bug report and fix inst: others All other instrumentations labels Jan 13, 2025
public class JpmsAdvisingHelper {
private static final WeakHashMap<Module, Boolean> ALREADY_PROCESSED_CACHE = new WeakHashMap<>();

public static boolean isModuleAlreadyProcessed(final Module module) {
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 don't need synchornisation here. It's not bad if it's called twice

@pr-commenter
Copy link

pr-commenter bot commented Jan 13, 2025

Benchmarks

Startup

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master andrea.marziali/mule-jpms
git_commit_date 1736853230 1736855970
git_commit_sha 82e3386 817c5ed
release_version 1.46.0-SNAPSHOT~82e3386fa9 1.46.0-SNAPSHOT~817c5ed1e7
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1736858335 1736858335
ci_job_id 765270627 765270627
ci_pipeline_id 52922776 52922776
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 58 metrics, 5 unstable metrics.

Startup time reports for insecure-bank
gantt
    title insecure-bank - global startup overhead: candidate=1.46.0-SNAPSHOT~817c5ed1e7, baseline=1.46.0-SNAPSHOT~82e3386fa9

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.056 s) : 0, 1055780
Total [baseline] (8.624 s) : 0, 8623848
Agent [candidate] (1.062 s) : 0, 1061866
Total [candidate] (8.655 s) : 0, 8655247
section iast
Agent [baseline] (1.18 s) : 0, 1179962
Total [baseline] (9.21 s) : 0, 9209545
Agent [candidate] (1.182 s) : 0, 1181818
Total [candidate] (9.197 s) : 0, 9196992
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.198 s) : 0, 1197782
Total [baseline] (9.219 s) : 0, 9218867
Agent [candidate] (1.184 s) : 0, 1184312
Total [candidate] (9.23 s) : 0, 9229931
section iast_TELEMETRY_OFF
Agent [baseline] (1.178 s) : 0, 1177699
Total [baseline] (9.2 s) : 0, 9200262
Agent [candidate] (1.184 s) : 0, 1184142
Total [candidate] (9.224 s) : 0, 9224189
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.056 s -
Agent iast 1.18 s 124.183 ms (11.8%)
Agent iast_HARDCODED_SECRET_DISABLED 1.198 s 142.002 ms (13.4%)
Agent iast_TELEMETRY_OFF 1.178 s 121.919 ms (11.5%)
Total tracing 8.624 s -
Total iast 9.21 s 585.697 ms (6.8%)
Total iast_HARDCODED_SECRET_DISABLED 9.219 s 595.019 ms (6.9%)
Total iast_TELEMETRY_OFF 9.2 s 576.414 ms (6.7%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.062 s -
Agent iast 1.182 s 119.952 ms (11.3%)
Agent iast_HARDCODED_SECRET_DISABLED 1.184 s 122.446 ms (11.5%)
Agent iast_TELEMETRY_OFF 1.184 s 122.276 ms (11.5%)
Total tracing 8.655 s -
Total iast 9.197 s 541.745 ms (6.3%)
Total iast_HARDCODED_SECRET_DISABLED 9.23 s 574.684 ms (6.6%)
Total iast_TELEMETRY_OFF 9.224 s 568.942 ms (6.6%)
gantt
    title insecure-bank - break down per module: candidate=1.46.0-SNAPSHOT~817c5ed1e7, baseline=1.46.0-SNAPSHOT~82e3386fa9

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (713.953 ms) : 0, 713953
BytebuddyAgent [candidate] (718.274 ms) : 0, 718274
GlobalTracer [baseline] (255.739 ms) : 0, 255739
GlobalTracer [candidate] (257.225 ms) : 0, 257225
AppSec [baseline] (56.687 ms) : 0, 56687
AppSec [candidate] (56.257 ms) : 0, 56257
Remote Config [baseline] (723.683 µs) : 0, 724
Remote Config [candidate] (758.632 µs) : 0, 759
Telemetry [baseline] (13.66 ms) : 0, 13660
Telemetry [candidate] (14.217 ms) : 0, 14217
section iast
BytebuddyAgent [baseline] (830.065 ms) : 0, 830065
BytebuddyAgent [candidate] (831.411 ms) : 0, 831411
GlobalTracer [baseline] (246.177 ms) : 0, 246177
GlobalTracer [candidate] (246.63 ms) : 0, 246630
AppSec [baseline] (57.855 ms) : 0, 57855
AppSec [candidate] (57.997 ms) : 0, 57997
Remote Config [baseline] (672.982 µs) : 0, 673
Remote Config [candidate] (680.579 µs) : 0, 681
Telemetry [baseline] (8.806 ms) : 0, 8806
Telemetry [candidate] (8.7 ms) : 0, 8700
IAST [baseline] (21.353 ms) : 0, 21353
IAST [candidate] (21.396 ms) : 0, 21396
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (842.871 ms) : 0, 842871
BytebuddyAgent [candidate] (832.956 ms) : 0, 832956
GlobalTracer [baseline] (249.291 ms) : 0, 249291
GlobalTracer [candidate] (247.251 ms) : 0, 247251
AppSec [baseline] (58.684 ms) : 0, 58684
AppSec [candidate] (58.056 ms) : 0, 58056
Remote Config [baseline] (710.913 µs) : 0, 711
Remote Config [candidate] (669.066 µs) : 0, 669
Telemetry [baseline] (9.129 ms) : 0, 9129
Telemetry [candidate] (8.761 ms) : 0, 8761
IAST [baseline] (22.018 ms) : 0, 22018
IAST [candidate] (21.58 ms) : 0, 21580
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (828.078 ms) : 0, 828078
BytebuddyAgent [candidate] (832.779 ms) : 0, 832779
GlobalTracer [baseline] (246.814 ms) : 0, 246814
GlobalTracer [candidate] (247.842 ms) : 0, 247842
AppSec [baseline] (57.844 ms) : 0, 57844
AppSec [candidate] (58.17 ms) : 0, 58170
Remote Config [baseline] (644.946 µs) : 0, 645
Remote Config [candidate] (670.017 µs) : 0, 670
Telemetry [baseline] (8.607 ms) : 0, 8607
Telemetry [candidate] (8.656 ms) : 0, 8656
IAST [baseline] (20.663 ms) : 0, 20663
IAST [candidate] (20.933 ms) : 0, 20933
Loading
Startup time reports for petclinic
gantt
    title petclinic - global startup overhead: candidate=1.46.0-SNAPSHOT~817c5ed1e7, baseline=1.46.0-SNAPSHOT~82e3386fa9

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.057 s) : 0, 1056943
Total [baseline] (10.474 s) : 0, 10474176
Agent [candidate] (1.061 s) : 0, 1060812
Total [candidate] (10.509 s) : 0, 10509409
section appsec
Agent [baseline] (1.189 s) : 0, 1189490
Total [baseline] (10.724 s) : 0, 10723968
Agent [candidate] (1.195 s) : 0, 1194650
Total [candidate] (10.768 s) : 0, 10768264
section iast
Agent [baseline] (1.182 s) : 0, 1181887
Total [baseline] (11.044 s) : 0, 11044452
Agent [candidate] (1.183 s) : 0, 1183120
Total [candidate] (10.986 s) : 0, 10986277
section profiling
Agent [baseline] (1.272 s) : 0, 1272031
Total [baseline] (10.945 s) : 0, 10944991
Agent [candidate] (1.278 s) : 0, 1278151
Total [candidate] (10.838 s) : 0, 10838411
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.057 s -
Agent appsec 1.189 s 132.547 ms (12.5%)
Agent iast 1.182 s 124.944 ms (11.8%)
Agent profiling 1.272 s 215.088 ms (20.4%)
Total tracing 10.474 s -
Total appsec 10.724 s 249.792 ms (2.4%)
Total iast 11.044 s 570.275 ms (5.4%)
Total profiling 10.945 s 470.814 ms (4.5%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.061 s -
Agent appsec 1.195 s 133.838 ms (12.6%)
Agent iast 1.183 s 122.308 ms (11.5%)
Agent profiling 1.278 s 217.339 ms (20.5%)
Total tracing 10.509 s -
Total appsec 10.768 s 258.855 ms (2.5%)
Total iast 10.986 s 476.868 ms (4.5%)
Total profiling 10.838 s 329.003 ms (3.1%)
gantt
    title petclinic - break down per module: candidate=1.46.0-SNAPSHOT~817c5ed1e7, baseline=1.46.0-SNAPSHOT~82e3386fa9

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (714.256 ms) : 0, 714256
BytebuddyAgent [candidate] (718.325 ms) : 0, 718325
GlobalTracer [baseline] (255.992 ms) : 0, 255992
GlobalTracer [candidate] (256.923 ms) : 0, 256923
AppSec [baseline] (56.623 ms) : 0, 56623
AppSec [candidate] (56.042 ms) : 0, 56042
Remote Config [baseline] (722.382 µs) : 0, 722
Remote Config [candidate] (720.366 µs) : 0, 720
Telemetry [baseline] (14.317 ms) : 0, 14317
Telemetry [candidate] (13.721 ms) : 0, 13721
section appsec
BytebuddyAgent [baseline] (731.281 ms) : 0, 731281
BytebuddyAgent [candidate] (734.695 ms) : 0, 734695
GlobalTracer [baseline] (253.503 ms) : 0, 253503
GlobalTracer [candidate] (254.463 ms) : 0, 254463
AppSec [baseline] (171.091 ms) : 0, 171091
AppSec [candidate] (171.518 ms) : 0, 171518
IAST [baseline] (19.466 ms) : 0, 19466
IAST [candidate] (19.794 ms) : 0, 19794
Remote Config [baseline] (662.178 µs) : 0, 662
Remote Config [candidate] (672.649 µs) : 0, 673
Telemetry [baseline] (8.206 ms) : 0, 8206
Telemetry [candidate] (8.32 ms) : 0, 8320
section iast
BytebuddyAgent [baseline] (831.213 ms) : 0, 831213
BytebuddyAgent [candidate] (831.639 ms) : 0, 831639
GlobalTracer [baseline] (246.614 ms) : 0, 246614
GlobalTracer [candidate] (247.346 ms) : 0, 247346
AppSec [baseline] (57.926 ms) : 0, 57926
AppSec [candidate] (58.157 ms) : 0, 58157
IAST [baseline] (21.646 ms) : 0, 21646
IAST [candidate] (21.462 ms) : 0, 21462
Remote Config [baseline] (675.627 µs) : 0, 676
Remote Config [candidate] (658.773 µs) : 0, 659
Telemetry [baseline] (8.819 ms) : 0, 8819
Telemetry [candidate] (8.756 ms) : 0, 8756
section profiling
BytebuddyAgent [baseline] (703.714 ms) : 0, 703714
BytebuddyAgent [candidate] (707.61 ms) : 0, 707610
GlobalTracer [baseline] (367.437 ms) : 0, 367437
GlobalTracer [candidate] (368.417 ms) : 0, 368417
AppSec [baseline] (53.753 ms) : 0, 53753
AppSec [candidate] (54.128 ms) : 0, 54128
Remote Config [baseline] (687.238 µs) : 0, 687
Remote Config [candidate] (691.749 µs) : 0, 692
Telemetry [baseline] (8.784 ms) : 0, 8784
Telemetry [candidate] (8.864 ms) : 0, 8864
ProfilingAgent [baseline] (95.59 ms) : 0, 95590
ProfilingAgent [candidate] (96.059 ms) : 0, 96059
Profiling [baseline] (95.614 ms) : 0, 95614
Profiling [candidate] (96.085 ms) : 0, 96085
Loading

Load

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
end_time 2025-01-14T12:09:10 2025-01-14T12:16:07
git_branch master andrea.marziali/mule-jpms
git_commit_date 1736853230 1736855970
git_commit_sha 82e3386 817c5ed
release_version 1.46.0-SNAPSHOT~82e3386fa9 1.46.0-SNAPSHOT~817c5ed1e7
start_time 2025-01-14T12:08:56 2025-01-14T12:15:54
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1736857320 1736857320
ci_job_id 765270628 765270628
ci_pipeline_id 52922776 52922776
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 12 metrics, 16 unstable metrics.

Request duration reports for petclinic
gantt
    title petclinic - request duration [CI 0.99] : candidate=1.46.0-SNAPSHOT~817c5ed1e7, baseline=1.46.0-SNAPSHOT~82e3386fa9
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.353 ms) : 1334, 1373
.   : milestone, 1353,
appsec (1.74 ms) : 1716, 1763
.   : milestone, 1740,
appsec_no_iast (1.759 ms) : 1736, 1782
.   : milestone, 1759,
iast (1.512 ms) : 1490, 1535
.   : milestone, 1512,
profiling (1.523 ms) : 1499, 1548
.   : milestone, 1523,
tracing (1.492 ms) : 1468, 1517
.   : milestone, 1492,
section candidate
no_agent (1.362 ms) : 1342, 1381
.   : milestone, 1362,
appsec (1.736 ms) : 1712, 1759
.   : milestone, 1736,
appsec_no_iast (1.757 ms) : 1733, 1781
.   : milestone, 1757,
iast (1.492 ms) : 1469, 1515
.   : milestone, 1492,
profiling (1.501 ms) : 1477, 1525
.   : milestone, 1501,
tracing (1.501 ms) : 1476, 1526
.   : milestone, 1501,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.353 ms [1.334 ms, 1.373 ms] -
appsec 1.74 ms [1.716 ms, 1.763 ms] 386.071 µs (28.5%)
appsec_no_iast 1.759 ms [1.736 ms, 1.782 ms] 405.726 µs (30.0%)
iast 1.512 ms [1.49 ms, 1.535 ms] 158.872 µs (11.7%)
profiling 1.523 ms [1.499 ms, 1.548 ms] 169.918 µs (12.6%)
tracing 1.492 ms [1.468 ms, 1.517 ms] 138.968 µs (10.3%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.362 ms [1.342 ms, 1.381 ms] -
appsec 1.736 ms [1.712 ms, 1.759 ms] 374.042 µs (27.5%)
appsec_no_iast 1.757 ms [1.733 ms, 1.781 ms] 395.385 µs (29.0%)
iast 1.492 ms [1.469 ms, 1.515 ms] 130.447 µs (9.6%)
profiling 1.501 ms [1.477 ms, 1.525 ms] 139.297 µs (10.2%)
tracing 1.501 ms [1.476 ms, 1.526 ms] 139.69 µs (10.3%)
Request duration reports for insecure-bank
gantt
    title insecure-bank - request duration [CI 0.99] : candidate=1.46.0-SNAPSHOT~817c5ed1e7, baseline=1.46.0-SNAPSHOT~82e3386fa9
    dateFormat X
    axisFormat %s
section baseline
no_agent (382.759 µs) : 363, 402
.   : milestone, 383,
iast (487.128 µs) : 466, 509
.   : milestone, 487,
iast_FULL (655.788 µs) : 634, 677
.   : milestone, 656,
iast_GLOBAL (528.561 µs) : 506, 551
.   : milestone, 529,
iast_HARDCODED_SECRET_DISABLED (495.882 µs) : 474, 517
.   : milestone, 496,
iast_INACTIVE (447.429 µs) : 427, 468
.   : milestone, 447,
iast_TELEMETRY_OFF (482.537 µs) : 461, 505
.   : milestone, 483,
tracing (455.399 µs) : 434, 477
.   : milestone, 455,
section candidate
no_agent (372.812 µs) : 353, 393
.   : milestone, 373,
iast (491.458 µs) : 469, 514
.   : milestone, 491,
iast_FULL (658.206 µs) : 636, 680
.   : milestone, 658,
iast_GLOBAL (514.109 µs) : 493, 535
.   : milestone, 514,
iast_HARDCODED_SECRET_DISABLED (498.382 µs) : 476, 520
.   : milestone, 498,
iast_INACTIVE (448.07 µs) : 427, 469
.   : milestone, 448,
iast_TELEMETRY_OFF (487.776 µs) : 465, 510
.   : milestone, 488,
tracing (447.071 µs) : 426, 468
.   : milestone, 447,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 382.759 µs [363.11 µs, 402.408 µs] -
iast 487.128 µs [465.704 µs, 508.552 µs] 104.369 µs (27.3%)
iast_FULL 655.788 µs [634.186 µs, 677.391 µs] 273.029 µs (71.3%)
iast_GLOBAL 528.561 µs [505.715 µs, 551.407 µs] 145.802 µs (38.1%)
iast_HARDCODED_SECRET_DISABLED 495.882 µs [474.334 µs, 517.43 µs] 113.123 µs (29.6%)
iast_INACTIVE 447.429 µs [426.846 µs, 468.012 µs] 64.67 µs (16.9%)
iast_TELEMETRY_OFF 482.537 µs [460.573 µs, 504.5 µs] 99.778 µs (26.1%)
tracing 455.399 µs [433.822 µs, 476.977 µs] 72.64 µs (19.0%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 372.812 µs [352.566 µs, 393.057 µs] -
iast 491.458 µs [469.285 µs, 513.631 µs] 118.646 µs (31.8%)
iast_FULL 658.206 µs [636.49 µs, 679.922 µs] 285.395 µs (76.6%)
iast_GLOBAL 514.109 µs [492.855 µs, 535.362 µs] 141.297 µs (37.9%)
iast_HARDCODED_SECRET_DISABLED 498.382 µs [476.437 µs, 520.327 µs] 125.571 µs (33.7%)
iast_INACTIVE 448.07 µs [426.838 µs, 469.301 µs] 75.258 µs (20.2%)
iast_TELEMETRY_OFF 487.776 µs [465.486 µs, 510.066 µs] 114.964 µs (30.8%)
tracing 447.071 µs [426.389 µs, 467.754 µs] 74.26 µs (19.9%)

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master andrea.marziali/mule-jpms
git_commit_date 1736853230 1736855970
git_commit_sha 82e3386 817c5ed
release_version 1.46.0-SNAPSHOT~82e3386fa9 1.46.0-SNAPSHOT~817c5ed1e7
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1736857964 1736857964
ci_job_id 765270629 765270629
ci_pipeline_id 52922776 52922776
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.46.0-SNAPSHOT~817c5ed1e7, baseline=1.46.0-SNAPSHOT~82e3386fa9
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.471 ms) : 1460, 1483
.   : milestone, 1471,
appsec (2.368 ms) : 2325, 2411
.   : milestone, 2368,
iast (2.109 ms) : 2054, 2163
.   : milestone, 2109,
iast_GLOBAL (2.162 ms) : 2107, 2217
.   : milestone, 2162,
profiling (1.963 ms) : 1920, 2007
.   : milestone, 1963,
tracing (1.953 ms) : 1911, 1995
.   : milestone, 1953,
section candidate
no_agent (1.471 ms) : 1460, 1483
.   : milestone, 1471,
appsec (2.359 ms) : 2317, 2402
.   : milestone, 2359,
iast (2.108 ms) : 2054, 2163
.   : milestone, 2108,
iast_GLOBAL (2.154 ms) : 2099, 2208
.   : milestone, 2154,
profiling (1.972 ms) : 1928, 2015
.   : milestone, 1972,
tracing (1.947 ms) : 1905, 1989
.   : milestone, 1947,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.471 ms [1.46 ms, 1.483 ms] -
appsec 2.368 ms [2.325 ms, 2.411 ms] 896.169 µs (60.9%)
iast 2.109 ms [2.054 ms, 2.163 ms] 637.502 µs (43.3%)
iast_GLOBAL 2.162 ms [2.107 ms, 2.217 ms] 690.524 µs (46.9%)
profiling 1.963 ms [1.92 ms, 2.007 ms] 491.721 µs (33.4%)
tracing 1.953 ms [1.911 ms, 1.995 ms] 481.632 µs (32.7%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.471 ms [1.46 ms, 1.483 ms] -
appsec 2.359 ms [2.317 ms, 2.402 ms] 888.215 µs (60.4%)
iast 2.108 ms [2.054 ms, 2.163 ms] 637.054 µs (43.3%)
iast_GLOBAL 2.154 ms [2.099 ms, 2.208 ms] 682.241 µs (46.4%)
profiling 1.972 ms [1.928 ms, 2.015 ms] 500.399 µs (34.0%)
tracing 1.947 ms [1.905 ms, 1.989 ms] 475.667 µs (32.3%)
Execution time for biojava
gantt
    title biojava - execution time [CI 0.99] : candidate=1.46.0-SNAPSHOT~817c5ed1e7, baseline=1.46.0-SNAPSHOT~82e3386fa9
    dateFormat X
    axisFormat %s
section baseline
no_agent (15.393 s) : 15393000, 15393000
.   : milestone, 15393000,
appsec (15.031 s) : 15031000, 15031000
.   : milestone, 15031000,
iast (18.555 s) : 18555000, 18555000
.   : milestone, 18555000,
iast_GLOBAL (18.081 s) : 18081000, 18081000
.   : milestone, 18081000,
profiling (15.213 s) : 15213000, 15213000
.   : milestone, 15213000,
tracing (15.122 s) : 15122000, 15122000
.   : milestone, 15122000,
section candidate
no_agent (14.712 s) : 14712000, 14712000
.   : milestone, 14712000,
appsec (14.722 s) : 14722000, 14722000
.   : milestone, 14722000,
iast (18.81 s) : 18810000, 18810000
.   : milestone, 18810000,
iast_GLOBAL (18.349 s) : 18349000, 18349000
.   : milestone, 18349000,
profiling (15.194 s) : 15194000, 15194000
.   : milestone, 15194000,
tracing (15.028 s) : 15028000, 15028000
.   : milestone, 15028000,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.393 s [15.393 s, 15.393 s] -
appsec 15.031 s [15.031 s, 15.031 s] -362.0 ms (-2.4%)
iast 18.555 s [18.555 s, 18.555 s] 3.162 s (20.5%)
iast_GLOBAL 18.081 s [18.081 s, 18.081 s] 2.688 s (17.5%)
profiling 15.213 s [15.213 s, 15.213 s] -180.0 ms (-1.2%)
tracing 15.122 s [15.122 s, 15.122 s] -271.0 ms (-1.8%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 14.712 s [14.712 s, 14.712 s] -
appsec 14.722 s [14.722 s, 14.722 s] 10.0 ms (0.1%)
iast 18.81 s [18.81 s, 18.81 s] 4.098 s (27.9%)
iast_GLOBAL 18.349 s [18.349 s, 18.349 s] 3.637 s (24.7%)
profiling 15.194 s [15.194 s, 15.194 s] 482.0 ms (3.3%)
tracing 15.028 s [15.028 s, 15.028 s] 316.0 ms (2.1%)

@amarziali amarziali force-pushed the andrea.marziali/mule-jpms branch 4 times, most recently from a853a04 to fada2a5 Compare January 14, 2025 09:22
@amarziali amarziali force-pushed the andrea.marziali/mule-jpms branch from fada2a5 to a85b577 Compare January 14, 2025 11:03
@amarziali amarziali added comp: api Tracer public API and removed comp: api Tracer public API labels Jan 14, 2025
@amarziali amarziali requested a review from mcculls January 14, 2025 11:18
@amarziali amarziali force-pushed the andrea.marziali/mule-jpms branch from a85b577 to 817c5ed Compare January 14, 2025 11:59

main_java11CompileOnly project(':internal-api')
main_java11CompileOnly project(':dd-java-agent:agent-tooling')
main_java11CompileOnly project(':dd-java-agent:agent-bootstrap')
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
main_java11CompileOnly project(':dd-java-agent:agent-bootstrap')

I don't believe you need agent-bootstrap to compile what's currently under the java11 folder

Copy link
Contributor

@mcculls mcculls left a comment

Choose a reason for hiding this comment

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

LGTM

After the refactoring there's nothing mule-specific about JpmsAdvisingHelper and JpmsClearanceAdvice so we could move them to dd-java-agent/agent-bootstrap/src/main/java/datadog/trace/bootstrap/instrumentation/jpms in a separate PR, but lets get this in and backported first

@amarziali amarziali enabled auto-merge (squash) January 14, 2025 13:24
@amarziali amarziali changed the title Mule: do not crash with JPMS Fix crash using Mule with JPMS Jan 14, 2025
@amarziali amarziali added comp: api Tracer public API and removed comp: api Tracer public API labels Jan 14, 2025
@amarziali amarziali merged commit 0df72c4 into master Jan 14, 2025
173 of 174 checks passed
@amarziali amarziali deleted the andrea.marziali/mule-jpms branch January 14, 2025 14:24
@github-actions github-actions bot added this to the 1.46.0 milestone Jan 14, 2025
@amarziali
Copy link
Contributor Author

amarziali commented Jan 14, 2025

LGTM

After the refactoring there's nothing mule-specific about JpmsAdvisingHelper and JpmsClearanceAdvice so we could move them to dd-java-agent/agent-bootstrap/src/main/java/datadog/trace/bootstrap/instrumentation/jpms in a separate PR, but lets get this in and backported first

@mcculls that code has to be inlined inside the transformed class so, if I move in a different package I think it won't work anymore as expected. Did you mean that we can have a generic advice we can reuse also for other similar needs?

svc-squareup-copybara pushed a commit to cashapp/misk that referenced this pull request Jan 31, 2025
| Package | Type | Package file | Manager | Update | Change |
|---|---|---|---|---|---|
|
[com.google.cloud:google-cloud-datastore](https://github.com/googleapis/java-datastore)
| dependencies | misk/gradle/libs.versions.toml | gradle | minor |
`2.25.4` -> `2.26.0` |
| [com.datadoghq:dd-trace-api](https://github.com/datadog/dd-trace-java)
| dependencies | misk/gradle/libs.versions.toml | gradle | minor |
`1.45.2` -> `1.46.0` |
| [com.datadoghq:dd-trace-ot](https://github.com/datadog/dd-trace-java)
| dependencies | misk/gradle/libs.versions.toml | gradle | minor |
`1.45.2` -> `1.46.0` |
| [software.amazon.awssdk:sdk-core](https://aws.amazon.com/sdkforjava) |
dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.30.9` -> `2.30.10` |
|
[software.amazon.awssdk:dynamodb-enhanced](https://aws.amazon.com/sdkforjava)
| dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.30.9` -> `2.30.10` |
| [software.amazon.awssdk:dynamodb](https://aws.amazon.com/sdkforjava) |
dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.30.9` -> `2.30.10` |
| [software.amazon.awssdk:aws-core](https://aws.amazon.com/sdkforjava) |
dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.30.9` -> `2.30.10` |
| [software.amazon.awssdk:bom](https://aws.amazon.com/sdkforjava) |
dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.30.9` -> `2.30.10` |
| [software.amazon.awssdk:auth](https://aws.amazon.com/sdkforjava) |
dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.30.9` -> `2.30.10` |

---

### Release Notes

<details>
<summary>googleapis/java-datastore
(com.google.cloud:google-cloud-datastore)</summary>

###
[`v2.26.0`](https://github.com/googleapis/java-datastore/blob/HEAD/CHANGELOG.md#2260-2025-01-29)

##### Features

- Add firestoreInDatastoreMode for datastore emulator
([#&#8203;1698](googleapis/java-datastore#1698))
([50f106d](googleapis/java-datastore@50f106d))

##### Dependencies

- Update dependency com.google.cloud:sdk-platform-java-config to v3.42.0
([#&#8203;1725](googleapis/java-datastore#1725))
([1cbaf22](googleapis/java-datastore@1cbaf22))

</details>

<details>
<summary>datadog/dd-trace-java (com.datadoghq:dd-trace-api)</summary>

###
[`v1.46.0`](https://github.com/DataDog/dd-trace-java/releases/tag/v1.46.0):
1.46.0

##### Breaking Changes

> \[!WARNING]
> jnr-unixsocket is now an external dependency of dd-trace-ot and must
be included when deploying dd-trace-ot.

> \[!NOTE]
> The API `TracerScope.setAsync(boolean)`, used to manually control
asynchronous span propagation, does no more apply to the scope instance
but to the active span scope.

##### Components

##### Application Security Management (IAST)

- 🐛 Fix String.replace instrumentation for IAST
([#&#8203;8281](DataDog/dd-trace-java#8281) -
[@&#8203;Mariovido](https://github.com/Mariovido))
- ✨ Apply the standard nomenclature to the stacktrace configs
([#&#8203;8244](DataDog/dd-trace-java#8244) -
[@&#8203;jandro996](https://github.com/jandro996))
- 🐛 Exclude false positive weak randomness
([#&#8203;8232](DataDog/dd-trace-java#8232) -
[@&#8203;jandro996](https://github.com/jandro996))
- ✨ Propagation of translateEscapes of String class
([#&#8203;8186](DataDog/dd-trace-java#8186) -
[@&#8203;sezen-datadog](https://github.com/sezen-datadog))
- ✨ Add security control metrics
([#&#8203;8175](DataDog/dd-trace-java#8175) -
[@&#8203;jandro996](https://github.com/jandro996))
- ✨ Increase IAST propagation to StringBuffer setLength
([#&#8203;8128](DataDog/dd-trace-java#8128) -
[@&#8203;Mariovido](https://github.com/Mariovido))
- ✨ Add IAST taint tracking for DB values
([#&#8203;8072](DataDog/dd-trace-java#8072) -
[@&#8203;Mariovido](https://github.com/Mariovido))

##### Application Security Management (WAF)

- 🐛 Prevents a NPE when there is no subscriber for user events
([#&#8203;8258](DataDog/dd-trace-java#8258) -
[@&#8203;manuel-alvarez-alvarez](https://github.com/manuel-alvarez-alvarez))
- ✨ Apply the standard nomenclature to the stacktrace configs
([#&#8203;8244](DataDog/dd-trace-java#8244) -
[@&#8203;jandro996](https://github.com/jandro996))
- 🐛 Ensure cached subscriptions are cleared on reconfiguration via
RC ([#&#8203;8229](DataDog/dd-trace-java#8229)
-
[@&#8203;manuel-alvarez-alvarez](https://github.com/manuel-alvarez-alvarez))
- ✨ Add support for session tracking in Vertx
([#&#8203;8167](DataDog/dd-trace-java#8167) -
[@&#8203;manuel-alvarez-alvarez](https://github.com/manuel-alvarez-alvarez))
- ✨ Create span tag: \_dd.appsec.rasp.timeout
([#&#8203;8269](DataDog/dd-trace-java#8269) -
[@&#8203;Mariovido](https://github.com/Mariovido))

##### Build & Tooling

- 🐛 Ensure shaded helpers have unique names when injected into
class-loaders
([#&#8203;8192](DataDog/dd-trace-java#8192) -
[@&#8203;mcculls](https://github.com/mcculls))

##### Configuration at Runtime

- 🐛 Remove filtering of `DD_SERVICE` and `DD_ENV` from the tracer
([#&#8203;8176](DataDog/dd-trace-java#8176) -
[@&#8203;mhlidd](https://github.com/mhlidd))

##### Continuous Integration Visibility

- 🧹 Generalize TestRetryPolicy to TestExecutionPolicy
([#&#8203;8302](DataDog/dd-trace-java#8302) -
[@&#8203;nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog))
- 🧹 Parallelize CI Visibility settings requests
([#&#8203;8299](DataDog/dd-trace-java#8299) -
[@&#8203;nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog))
- 🧹 Generalize test retry logic
([#&#8203;8289](DataDog/dd-trace-java#8289) -
[@&#8203;nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog))
- 🧹 Generalize tests skipping logic
([#&#8203;8288](DataDog/dd-trace-java#8288) -
[@&#8203;nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog))
- 🧹 Remove skip and shouldBeSkipped methods from TestEventsHandler
in favor of isSkippable
([#&#8203;8286](DataDog/dd-trace-java#8286) -
[@&#8203;nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog))
- ✨⚡ Optimize Git repository information computation
([#&#8203;8270](DataDog/dd-trace-java#8270) -
[@&#8203;dougqh](https://github.com/dougqh))
- ✨ Always request known tests from the backend
([#&#8203;8268](DataDog/dd-trace-java#8268) -
[@&#8203;nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog))
- ✨ Fix NPE when trying to get retry analyzer in Test NG
([#&#8203;8253](DataDog/dd-trace-java#8253) -
[@&#8203;nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog))
- 🐛 Set test framework and test framework version tags atomically
([#&#8203;8252](DataDog/dd-trace-java#8252) -
[@&#8203;nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog))
- ✨ Add debug logging to Android Gradle module layout logic
([#&#8203;8251](DataDog/dd-trace-java#8251) -
[@&#8203;nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog))
- 🐛 Fix source and destination folders computation for Android
Gradle projects
([#&#8203;8190](DataDog/dd-trace-java#8190) -
[@&#8203;nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog))
- ✨ Add basic Scala Weaver sbt support
([#&#8203;8189](DataDog/dd-trace-java#8189) -
[@&#8203;daniel-mohedano](https://github.com/daniel-mohedano))
- ✨ Implement impacted tests detection
([#&#8203;8188](DataDog/dd-trace-java#8188) -
[@&#8203;nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog))

##### Data Streams Monitoring

- ✨ Change hash computation for protobuf to better represent
impacting changes + save proto number in schema
([#&#8203;8201](DataDog/dd-trace-java#8201) -
[@&#8203;vandonr](https://github.com/vandonr))

##### Database Monitoring

- Add peer service tag in dbm sql commenter
([#&#8203;7913](DataDog/dd-trace-java#7913) -
[@&#8203;jordan-wong](https://github.com/jordan-wong))

##### Dynamic Instrumentation

- ✨ Add support for SymDB to scan directories
([#&#8203;8306](DataDog/dd-trace-java#8306) -
[@&#8203;jpbempel](https://github.com/jpbempel))
- ✨ Add SymDB report for any jar scanning failures
([#&#8203;8300](DataDog/dd-trace-java#8300) -
[@&#8203;jpbempel](https://github.com/jpbempel))
- ✨ Use two budgets depending on type
([#&#8203;8283](DataDog/dd-trace-java#8283) -
[@&#8203;evanchooly](https://github.com/evanchooly))
- ✨ Institute a 10 snapshot per probe per trace budget
([#&#8203;8277](DataDog/dd-trace-java#8277) -
[@&#8203;evanchooly](https://github.com/evanchooly))
- 🐛 Avoid double snapshots for Exception Replay
([#&#8203;8273](DataDog/dd-trace-java#8273) -
[@&#8203;jpbempel](https://github.com/jpbempel))
- ✨ Simplify code origins. Separate out snapshot generation.
([#&#8203;8263](DataDog/dd-trace-java#8263) -
[@&#8203;evanchooly](https://github.com/evanchooly))
- ✨ Add Exception probe custom instrumentation
([#&#8203;8230](DataDog/dd-trace-java#8230) -
[@&#8203;jpbempel](https://github.com/jpbempel))
- ✨ Enhance log probes to honor debug session tags
([#&#8203;8215](DataDog/dd-trace-java#8215) -
[@&#8203;evanchooly](https://github.com/evanchooly))
- 🐛 Don't redact env tokens from debugger probe snapshots
([#&#8203;8211](DataDog/dd-trace-java#8211) -
[@&#8203;watson](https://github.com/watson))
- ✨⚡ Move Trace/SpanId capture at commit time
([#&#8203;8184](DataDog/dd-trace-java#8184) -
[@&#8203;jpbempel](https://github.com/jpbempel))
- 🐛 Capture values at entry for method probe
([#&#8203;8169](DataDog/dd-trace-java#8169) -
[@&#8203;jpbempel](https://github.com/jpbempel))

##### JMX fetch

- 🐛 Mute JMXFetch Shutdown in progress error
([#&#8203;8068](DataDog/dd-trace-java#8068) -
[@&#8203;ygree](https://github.com/ygree))

##### OpenTracing

- ⚠️🧹 Make jnr-unixsocket an explicit dependency of
dd-trace-ot
([#&#8203;8307](DataDog/dd-trace-java#8307) -
[@&#8203;mcculls](https://github.com/mcculls))

##### Profiling

- 🐛 Avoid unsupported API call for creating folders on windows
([#&#8203;8304](DataDog/dd-trace-java#8304) -
[@&#8203;jbachorik](https://github.com/jbachorik))
- ✨ Tag profiles for serverless
([#&#8203;8279](DataDog/dd-trace-java#8279) -
[@&#8203;jbachorik](https://github.com/jbachorik))
- ✨ add queue type and length to queue events
([#&#8203;8242](DataDog/dd-trace-java#8242) -
[@&#8203;richardstartin](https://github.com/richardstartin))
- 🐛 TempLocationManager Fixes and Improvements
([#&#8203;8191](DataDog/dd-trace-java#8191) -
[@&#8203;jbachorik](https://github.com/jbachorik))
- ✨ Bump ddprof to 1.18.0
([#&#8203;8173](DataDog/dd-trace-java#8173) -
[@&#8203;jbachorik](https://github.com/jbachorik))
- ✨ Report profiler initialization and configuration errors to
telemetry
([#&#8203;8171](DataDog/dd-trace-java#8171) -
[@&#8203;jbachorik](https://github.com/jbachorik))

##### Telemetry

- ✨ Add pending traces report in tracer flares
([#&#8203;8053](DataDog/dd-trace-java#8053) -
[@&#8203;mhlidd](https://github.com/mhlidd))

##### Testing

- ✨ Test http server requests in parallel
([#&#8203;8222](DataDog/dd-trace-java#8222) -
[@&#8203;amarziali](https://github.com/amarziali))

##### Trace context propagation

- ✨ Add non default propagator registration
([#&#8203;8310](DataDog/dd-trace-java#8310) -
[@&#8203;PerfectSlayer](https://github.com/PerfectSlayer))

##### Tracer core

- ✨ Probe for existence of IBMSASL or ACCP security providers
([#&#8203;8276](DataDog/dd-trace-java#8276) -
[@&#8203;mcculls](https://github.com/mcculls))
- ✨⚡ Overhead improvement to agent feedback based sampling
([#&#8203;8265](DataDog/dd-trace-java#8265) -
[@&#8203;dougqh](https://github.com/dougqh))
- 🧹 Move async propagation API from scope to tracer
([#&#8203;8231](DataDog/dd-trace-java#8231) -
[@&#8203;PerfectSlayer](https://github.com/PerfectSlayer))
- ✨ Introduce context propagation API
([#&#8203;8161](DataDog/dd-trace-java#8161) -
[@&#8203;PerfectSlayer](https://github.com/PerfectSlayer))
- ✨🧪 Use env-entry to add tags per webapp deployment
([#&#8203;8138](DataDog/dd-trace-java#8138) -
[@&#8203;amarziali](https://github.com/amarziali))
- ✨ Introduce context helpers API
([#&#8203;8134](DataDog/dd-trace-java#8134) -
[@&#8203;PerfectSlayer](https://github.com/PerfectSlayer))
- ✨ Support IPv6 values for `DD_AGENT_HOST` and
`DD_TRACE_AGENT_URL`
([#&#8203;7984](DataDog/dd-trace-java#7984) -
[@&#8203;mhlidd](https://github.com/mhlidd))

##### Instrumentations

##### Apache HttpComponents

- 🐛 Properly finish spans and support latest apache httpclient5
([#&#8203;8272](DataDog/dd-trace-java#8272) -
[@&#8203;amarziali](https://github.com/amarziali))

##### AWS Lambda instrumentation

- 🐛 Properly capture lambda payloads for all handler types.
([#&#8203;8264](DataDog/dd-trace-java#8264) -
[@&#8203;purple4reina](https://github.com/purple4reina))

##### AWS S3 instrumentation

- 💡 Create S3 instrumentation + add span pointers
([#&#8203;8075](DataDog/dd-trace-java#8075) -
[@&#8203;nhulston](https://github.com/nhulston))

##### AWS SDK instrumentation

- 🐛 Revert "Add avoid double instrumenting lambda non-streaming
handlers."
([#&#8203;8247](DataDog/dd-trace-java#8247) -
[@&#8203;nhulston](https://github.com/nhulston))

##### Cassandra

- ✨ Allow extracting keyspace from statement result
([#&#8203;8239](DataDog/dd-trace-java#8239) -
[@&#8203;amarziali](https://github.com/amarziali))

##### Core Java language instrumentation

- ✨ Propagation of translateEscapes of String class
([#&#8203;8186](DataDog/dd-trace-java#8186) -
[@&#8203;sezen-datadog](https://github.com/sezen-datadog))

##### Eclipse Vert.x instrumentation

- 🐛 Fix vertx worker propagation and error handling
([#&#8203;8237](DataDog/dd-trace-java#8237) -
[@&#8203;amarziali](https://github.com/amarziali))
- ✨ Support vertx 5
([#&#8203;8220](DataDog/dd-trace-java#8220) -
[@&#8203;amarziali](https://github.com/amarziali))
- ✨ Add support for session tracking in Vertx
([#&#8203;8167](DataDog/dd-trace-java#8167) -
[@&#8203;manuel-alvarez-alvarez](https://github.com/manuel-alvarez-alvarez))

##### Kafka instrumentation

- 🐛 Prevent possible NPE calculating Kafka record header size
([#&#8203;8292](DataDog/dd-trace-java#8292) -
[@&#8203;ygree](https://github.com/ygree))

##### Mule instrumentation

- 🐛 Fix crash using Mule with JPMS
([#&#8203;8187](DataDog/dd-trace-java#8187) -
[@&#8203;amarziali](https://github.com/amarziali))

##### Protocol Buffer instrumentation

- ✨ Change hash computation for protobuf to better represent
impacting changes + save proto number in schema
([#&#8203;8201](DataDog/dd-trace-java#8201) -
[@&#8203;vandonr](https://github.com/vandonr))

##### Spring instrumentation

- 🐛 Preserve getQualifier from spring scheduling runnables
([#&#8203;8293](DataDog/dd-trace-java#8293) -
[@&#8203;amarziali](https://github.com/amarziali))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 6pm every weekday,before 2am
every weekday" in timezone Australia/Melbourne, Automerge - At any time
(no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://github.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://github.com/renovatebot/renovate).

GitOrigin-RevId: bb09d47e4eed77a003f630273b4d0a84003eb899
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

inst: others All other instrumentations type: bug Bug report and fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants